diff --git a/.gn b/.gn
index 1264b7d..2f343e0 100644
--- a/.gn
+++ b/.gn
@@ -107,15 +107,14 @@
   "//ui/base/*",
   "//ui/chromeos/*",
   "//ui/compositor/*",
+  "//ui/content_accelerators/*",
   "//ui/display/*",
-  "//ui/events:events",
-  "//ui/events:events_base",
-  "//ui/events:events_unittests",
-  "//ui/events/ozone/*",
+  "//ui/events/*",
   "//ui/file_manager/*",
   "//ui/gfx/*",
   "//ui/gl/*",
   "//ui/keyboard/*",
+  "//ui/latency_info/*",
   "//ui/login/*",
   "//ui/message_center/*",
   "//ui/mojo/*",
diff --git a/BUILD.gn b/BUILD.gn
index c6d0396..2e769ee5 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -241,7 +241,7 @@
     deps += [
       "//ash:ash_shell_with_content",
       "//ash:ash_unittests",
-      "//ui/app_list/shower:app_list_shower_unittests",
+      "//ui/app_list/presenter:app_list_presenter_unittests",
       "//ui/aura:aura_unittests",
       "//ui/aura:demo",
       "//ui/wm:wm_unittests",
@@ -625,14 +625,6 @@
     ]
   }
 
-  if (is_win && use_drfuzz) {
-    # build libfuzzer fuzzers on Windows to run with Dr. Fuzz
-    deps += [
-      "//testing/libfuzzer/fuzzers",
-      "//testing/libfuzzer/tests:libfuzzer_tests",
-    ]
-  }
-
   if (is_linux && !is_chromeos && !is_chromecast) {
     # TODO(GYP): Figure out if any of these should be in gn_all
     # and figure out how cross-platform they are
@@ -652,8 +644,6 @@
       "//media/cast:udp_proxy",
       "//native_client/src/trusted/debug_stub:gdb_rsp_unittest",
       "//storage/browser:dump_file_system",
-      "//testing/libfuzzer/fuzzers",
-      "//testing/libfuzzer/tests:libfuzzer_tests",
       "//third_party/angle:libANGLE",
       "//third_party/angle:libEGL",
       "//third_party/angle:libGLESv2",
@@ -721,6 +711,14 @@
     deps += [ "//ui/ozone/demo" ]
   }
 
+  if ((is_linux && !is_chromeos && !is_chromecast) || (is_win && use_drfuzz) ||
+      (use_libfuzzer && is_mac)) {
+    deps += [
+      "//testing/libfuzzer/fuzzers",
+      "//testing/libfuzzer/tests:libfuzzer_tests",
+    ]
+  }
+
   if (enable_nacl) {
     deps += [ "//native_client_sdk/src:nacl_core_sdk" ]
   }
diff --git a/DEPS b/DEPS
index a7b0ad0d..e2d1c92 100644
--- a/DEPS
+++ b/DEPS
@@ -39,7 +39,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling Skia
   # and whatever else without interference from each other.
-  'skia_revision': '82497f9300432375cb9fd0e0ceca011ea7dce847',
+  'skia_revision': '86498fbfcb93a9048bbe1c28cc0df40d8d0c96e9',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling V8
   # and whatever else without interference from each other.
@@ -59,7 +59,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling PDFium
   # and whatever else without interference from each other.
-  'pdfium_revision': '461129efe889fa7d653c8c4620a12179eeddd5ec',
+  'pdfium_revision': '2ba3dc72f73f8e6cdd0423d02a12528096c2d90a',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling openmax_dl
   # and whatever else without interference from each other.
@@ -96,7 +96,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling catapult
   # and whatever else without interference from each other.
-  'catapult_revision': 'aef0785afec53840e404f01ce5a6405b18757ce3',
+  'catapult_revision': '7f35a3f99d178e5d86510e266f67d6b9d2de6546',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
@@ -138,13 +138,13 @@
    Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'c291cde264469b20ca969ce8832088acb21e0c48',
 
   'src/third_party/hunspell_dictionaries':
-   Var('chromium_git') + '/chromium/deps/hunspell_dictionaries.git' + '@' + 'b53f0de2762f982117be3bd986a221cee2f6769c',
+   Var('chromium_git') + '/chromium/deps/hunspell_dictionaries.git' + '@' + 'dc6e7c25bf47cbfb466e0701fd2728b4a12e79d5',
 
   'src/third_party/safe_browsing/testing':
     Var('chromium_git') + '/external/google-safe-browsing/testing.git' + '@' + '9d7e8064f3ca2e45891470c9b5b1dce54af6a9d6',
 
   'src/third_party/leveldatabase/src':
-    Var('chromium_git') + '/external/leveldb.git' + '@' + '7306ef856a91e462a73ff1832c1fa8771008ba36',
+    Var('chromium_git') + '/external/leveldb.git' + '@' + 'a7bff697baa062c8f6b8fb760eacf658712b611a',
 
   'src/third_party/snappy/src':
     Var('chromium_git') + '/external/snappy.git' + '@' + '762bb32f0c9d2f31ba4958c7c0933d22e80c20bf',
@@ -180,7 +180,7 @@
     Var('chromium_git') + '/external/bidichecker/lib.git' + '@' + '97f2aa645b74c28c57eca56992235c79850fa9e0',
 
   'src/third_party/webgl/src':
-   Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'd3f9e2bac23f44dfe53c9b719345ef31e771e6bd',
+   Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'f70ad1e4dd026599aea7e0b7c11bf82eabdb34f2',
 
   'src/third_party/webdriver/pylib':
     Var('chromium_git') + '/external/selenium/py.git' + '@' + '5fd78261a75fe08d27ca4835fb6c5ce4b42275bd',
@@ -216,7 +216,7 @@
    Var('chromium_git') + '/native_client/src/third_party/scons-2.0.1.git' + '@' + '1c1550e17fc26355d08627fbdec13d8291227067',
 
   'src/third_party/webrtc':
-    Var('chromium_git') + '/external/webrtc/trunk/webrtc.git' + '@' + 'a528b35a9f0795c30c20c3a0d6d8dafd593190d0', # commit position 12369
+    Var('chromium_git') + '/external/webrtc/trunk/webrtc.git' + '@' + '780d506ddf7bcba4a3dc04cfe2240c1ae80880f2', # commit position 12384
 
   'src/third_party/openmax_dl':
     Var('chromium_git') + '/external/webrtc/deps/third_party/openmax.git' + '@' +  Var('openmax_dl_revision'),
@@ -278,6 +278,10 @@
 
   'src/third_party/re2/src':
     Var('chromium_git') + '/external/github.com/google/re2.git' + '@' + 'dba3349aba83b5588e85e5ecf2b56c97f2d259b7',
+
+  # Used for building libFuzzers (only supports Linux).
+  'src/third_party/libFuzzer/src':
+    Var('chromium_git') + '/chromium/llvm-project/llvm/lib/Fuzzer.git' + '@' +  Var('libfuzzer_revision'),
 }
 
 
@@ -376,7 +380,7 @@
 
     # For Linux and Chromium OS.
     'src/third_party/cros_system_api':
-     Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + '452060bb03235f1241f5822f326f2abbc936e656',
+     Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + '4b936110e07abfa7b582e15af36d805bef25318b',
 
     # Note that this is different from Android's freetype repo.
     'src/third_party/freetype2/src':
@@ -385,13 +389,13 @@
     'src/third_party/freetype-android/src':
      Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + Var('freetype_android_revision'),
 
-    # Build tools for Chrome OS.
+    # Build tools for Chrome OS. Note: This depends on third_party/pyelftools.
     'src/third_party/chromite':
-     Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'e19f83ba227bf1ec0077f5d3a816a415f1dd88d0',
+     Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '9bb353c06c398f670e8a33db1eba74760ac3a6d6',
 
-    # Dependency of chromite.git.
+    # Dependency of chromite.git and skia.
     'src/third_party/pyelftools':
-     Var('chromium_git') + '/chromiumos/third_party/pyelftools.git' + '@' + 'bdc1d380acd88d4bfaf47265008091483b0d614e',
+     Var('chromium_git') + '/chromiumos/third_party/pyelftools.git' + '@' + '19b3e610c86fcadb837d252c794cb5e8008826ae',
 
     'src/third_party/liblouis/src':
      Var('chromium_git') + '/external/liblouis-github.git' + '@' + '5f9c03f2a3478561deb6ae4798175094be8a26c2',
@@ -419,10 +423,6 @@
     # Wireless Display Software. Used on Chrome OS.
     'src/third_party/wds/src':
      Var('chromium_git') + '/external/github.com/01org/wds' + '@' + 'f187dda5fccaad08e168dc6657109325f42c648e',
-
-    # Used for building libFuzzers (only supports Linux).
-    'src/third_party/libFuzzer/src':
-     Var('chromium_git') + '/chromium/llvm-project/llvm/lib/Fuzzer.git' + '@' +  Var('libfuzzer_revision'),
   },
   'android': {
     'src/third_party/android_protobuf/src':
@@ -839,6 +839,14 @@
     'action': ['python', 'src/third_party/instrumented_libraries/scripts/download_binaries.py'],
   },
   {
+    # Pull doclava binaries if building for Android.
+    'name': 'doclava',
+    'pattern': '.',
+    'action': ['python',
+               'src/build/android/download_doclava.py',
+    ],
+  },
+  {
     # A change to a .gyp, .gypi, or to GYP itself should run the generator.
     'name': 'gyp',
     'pattern': '.',
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc
index 3cd1128..73d840c 100644
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -350,26 +350,6 @@
   return false;
 }
 
-net::URLRequestContextGetter* AwBrowserContext::GetMediaRequestContext() {
-  return content::BrowserContext::GetDefaultStoragePartition(this)->
-      GetURLRequestContext();
-}
-
-net::URLRequestContextGetter*
-AwBrowserContext::GetMediaRequestContextForRenderProcess(
-    int renderer_child_id) {
-  return content::BrowserContext::GetDefaultStoragePartition(this)->
-      GetURLRequestContext();
-}
-
-net::URLRequestContextGetter*
-AwBrowserContext::GetMediaRequestContextForStoragePartition(
-    const base::FilePath& partition_path,
-    bool in_memory) {
-  NOTREACHED();
-  return NULL;
-}
-
 content::ResourceContext* AwBrowserContext::GetResourceContext() {
   if (!resource_context_) {
     resource_context_.reset(
@@ -439,6 +419,18 @@
   return NULL;
 }
 
+net::URLRequestContextGetter* AwBrowserContext::CreateMediaRequestContext() {
+  return url_request_context_getter_.get();
+}
+
+net::URLRequestContextGetter*
+AwBrowserContext::CreateMediaRequestContextForStoragePartition(
+    const base::FilePath& partition_path,
+    bool in_memory) {
+  NOTREACHED();
+  return NULL;
+}
+
 policy::URLBlacklistManager* AwBrowserContext::GetURLBlacklistManager() {
   // Should not be called until the end of PreMainMessageLoopRun, where
   // blacklist_manager_ is initialized.
diff --git a/android_webview/browser/aw_browser_context.h b/android_webview/browser/aw_browser_context.h
index d568dff..eee1ac2 100644
--- a/android_webview/browser/aw_browser_context.h
+++ b/android_webview/browser/aw_browser_context.h
@@ -102,12 +102,6 @@
       const base::FilePath& partition_path) override;
   base::FilePath GetPath() const override;
   bool IsOffTheRecord() const override;
-  net::URLRequestContextGetter* GetMediaRequestContext() override;
-  net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
-      int renderer_child_id) override;
-  net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
-      const base::FilePath& partition_path,
-      bool in_memory) override;
   content::ResourceContext* GetResourceContext() override;
   content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
   content::BrowserPluginGuestManager* GetGuestManager() override;
@@ -124,6 +118,10 @@
       bool in_memory,
       content::ProtocolHandlerMap* protocol_handlers,
       content::URLRequestInterceptorScopedVector request_interceptors) override;
+  net::URLRequestContextGetter* CreateMediaRequestContext() override;
+  net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
+      const base::FilePath& partition_path,
+      bool in_memory) override;
 
   // visitedlink::VisitedLinkDelegate implementation.
   void RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) override;
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 903c00a..6c350aef 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -80,10 +80,8 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Locale;
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.Callable;
 
 /**
@@ -257,11 +255,6 @@
     private final boolean mSupportsFunctorDetachedCallback;
     private boolean mFunctorDetachedCallbackPending;
 
-    // TODO(boliu): This is temporary for M51. AwContents is in |sGcRoots| if and only if
-    // mFunctorDetachedCallbackPending is true, to ensure that the whole system do not
-    // get garbage collected before functor detached callback.
-    private static final Set<AwContents> sGcRoots = new HashSet<>();
-
     private boolean mIsPaused;
     private boolean mIsViewVisible;
     private boolean mIsWindowVisible;
@@ -2355,7 +2348,6 @@
     // FullScreenView.
     public void onFunctorDetached() {
         mFunctorDetachedCallbackPending = false;
-        sGcRoots.remove(this);
         if (isDestroyed(NO_WARN) && mAwGLFunctor != null) {
             mAwGLFunctor.destroy();
             mAwGLFunctor = null;
@@ -2959,9 +2951,6 @@
                 did_draw = mNativeGLDelegate.requestDrawGL(canvas, false, mContainerView);
                 mFunctorDetachedCallbackPending |=
                         (mSupportsFunctorDetachedCallback && did_draw && !isFullScreen());
-                if (mFunctorDetachedCallbackPending) {
-                    sGcRoots.add(AwContents.this);
-                }
             }
             if (did_draw) {
                 int scrollXDiff = mContainerView.getScrollX() - scrollX;
diff --git a/ash/BUILD.gn b/ash/BUILD.gn
index 0f017cf..f37c43c 100644
--- a/ash/BUILD.gn
+++ b/ash/BUILD.gn
@@ -40,7 +40,7 @@
     "//skia",
     "//third_party/icu",
     "//ui/accessibility",
-    "//ui/app_list/shower",
+    "//ui/app_list/presenter",
     "//ui/aura",
     "//ui/base",
     "//ui/base:ui_data_pack",
@@ -201,7 +201,7 @@
     "//testing/gtest",
     "//ui/accessibility",
     "//ui/app_list:test_support",
-    "//ui/app_list/shower",
+    "//ui/app_list/presenter",
     "//ui/aura",
     "//ui/aura:test_support",
     "//ui/base:test_support",
@@ -286,7 +286,7 @@
     "//net",
     "//skia",
     "//third_party/icu",
-    "//ui/app_list/shower",
+    "//ui/app_list/presenter",
     "//ui/aura",
     "//ui/base",
     "//ui/base/ime",
@@ -356,7 +356,7 @@
     "//testing/gtest",
     "//third_party/icu",
     "//ui/accessibility",
-    "//ui/app_list/shower",
+    "//ui/app_list/presenter",
     "//ui/aura",
     "//ui/aura:test_support",
     "//ui/base",
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index d2a93c7..20882abe 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -460,6 +460,16 @@
   ime_control_delegate->HandleSwitchIme(accelerator);
 }
 
+void HandleTakeActiveWindowScreenshot(ScreenshotDelegate* screenshot_delegate) {
+  base::RecordAction(UserMetricsAction("Accel_Take_Window_Screenshot"));
+  aura::Window* active_window = wm::GetActiveWindow();
+  if (!active_window)
+    return;
+  DCHECK(screenshot_delegate);
+  if (screenshot_delegate->CanTakeScreenshot())
+    screenshot_delegate->HandleTakeWindowScreenshot(active_window);
+}
+
 void HandleTakePartialScreenshot(ScreenshotDelegate* screenshot_delegate) {
   base::RecordAction(UserMetricsAction("Accel_Take_Partial_Screenshot"));
   DCHECK(screenshot_delegate);
@@ -1082,6 +1092,7 @@
     case SHOW_KEYBOARD_OVERLAY:
     case SHOW_SYSTEM_TRAY_BUBBLE:
     case SHOW_TASK_MANAGER:
+    case TAKE_ACTIVE_WINDOW_SCREENSHOT:
     case TAKE_PARTIAL_SCREENSHOT:
     case TAKE_SCREENSHOT:
     case TOGGLE_FULLSCREEN:
@@ -1253,6 +1264,9 @@
     case SWITCH_IME:
       HandleSwitchIme(ime_control_delegate_.get(), accelerator);
       break;
+    case TAKE_ACTIVE_WINDOW_SCREENSHOT:
+      HandleTakeActiveWindowScreenshot(screenshot_delegate_.get());
+      break;
     case TAKE_PARTIAL_SCREENSHOT:
       HandleTakePartialScreenshot(screenshot_delegate_.get());
       break;
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index 79925a63..a755e3b 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -859,6 +859,17 @@
     EXPECT_TRUE(ProcessInController(ui::Accelerator(
         ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN)));
     EXPECT_EQ(2, delegate->handle_take_screenshot_count());
+    // None active window test case.
+    EXPECT_TRUE(ProcessInController(ui::Accelerator(
+        ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN)));
+    EXPECT_EQ(0, delegate->handle_take_window_screenshot_count());
+    // Active window test case.
+    std::unique_ptr<aura::Window> window;
+    window.reset(CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
+    wm::ActivateWindow(window.get());
+    EXPECT_TRUE(ProcessInController(ui::Accelerator(
+        ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN)));
+    EXPECT_EQ(1, delegate->handle_take_window_screenshot_count());
   }
   const ui::Accelerator volume_mute(ui::VKEY_VOLUME_MUTE, ui::EF_NONE);
   const ui::Accelerator volume_down(ui::VKEY_VOLUME_DOWN, ui::EF_NONE);
diff --git a/ash/accelerators/accelerator_table.cc b/ash/accelerators/accelerator_table.cc
index 1c6c9c8..f31143a 100644
--- a/ash/accelerators/accelerator_table.cc
+++ b/ash/accelerators/accelerator_table.cc
@@ -36,6 +36,8 @@
   { true, ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_CONTROL_DOWN, TAKE_SCREENSHOT },
   { true, ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
     TAKE_PARTIAL_SCREENSHOT },
+  { true, ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
+    TAKE_ACTIVE_WINDOW_SCREENSHOT },
   { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_NONE, BRIGHTNESS_DOWN },
   { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_ALT_DOWN, KEYBOARD_BRIGHTNESS_DOWN },
   { true, ui::VKEY_BRIGHTNESS_UP, ui::EF_NONE, BRIGHTNESS_UP },
@@ -348,6 +350,7 @@
   SCALE_UI_RESET,
   SHOW_SYSTEM_TRAY_BUBBLE,
   SWITCH_IME,  // Switch to another IME depending on the accelerator.
+  TAKE_ACTIVE_WINDOW_SCREENSHOT,
   TAKE_PARTIAL_SCREENSHOT,
   TAKE_SCREENSHOT,
 #if defined(OS_CHROMEOS)
@@ -403,6 +406,7 @@
   SCALE_UI_RESET,
   SHOW_KEYBOARD_OVERLAY,
   SWITCH_IME,
+  TAKE_ACTIVE_WINDOW_SCREENSHOT,
   TAKE_PARTIAL_SCREENSHOT,
   TAKE_SCREENSHOT,
 #if defined(OS_CHROMEOS)
@@ -443,6 +447,7 @@
     SCALE_UI_UP,
     SCALE_UI_DOWN,
     SCALE_UI_RESET,
+    TAKE_ACTIVE_WINDOW_SCREENSHOT,
     TAKE_PARTIAL_SCREENSHOT,
     TAKE_SCREENSHOT,
     TOGGLE_FULLSCREEN,
@@ -526,6 +531,7 @@
     PREVIOUS_IME,
     PRINT_UI_HIERARCHIES,
     SWITCH_IME,
+    TAKE_ACTIVE_WINDOW_SCREENSHOT,
     TAKE_PARTIAL_SCREENSHOT,
     TAKE_SCREENSHOT,
 #if defined(OS_CHROMEOS)
diff --git a/ash/accelerators/accelerator_table.h b/ash/accelerators/accelerator_table.h
index 804473ab..e89e707 100644
--- a/ash/accelerators/accelerator_table.h
+++ b/ash/accelerators/accelerator_table.h
@@ -99,6 +99,7 @@
   SHOW_SYSTEM_TRAY_BUBBLE,
   SHOW_TASK_MANAGER,
   SWITCH_IME,  // Switch to another IME depending on the accelerator.
+  TAKE_ACTIVE_WINDOW_SCREENSHOT,
   TAKE_PARTIAL_SCREENSHOT,
   TAKE_SCREENSHOT,
   TOGGLE_APP_LIST,
diff --git a/ash/app_list/app_list_shower_delegate.cc b/ash/app_list/app_list_presenter_delegate.cc
similarity index 82%
rename from ash/app_list/app_list_shower_delegate.cc
rename to ash/app_list/app_list_presenter_delegate.cc
index f79d9f91..bbc4c8f3b 100644
--- a/ash/app_list/app_list_shower_delegate.cc
+++ b/ash/app_list/app_list_presenter_delegate.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 "ash/app_list/app_list_shower_delegate.h"
+#include "ash/app_list/app_list_presenter_delegate.h"
 
 #include "ash/app_list/app_list_view_delegate_factory.h"
 #include "ash/ash_switches.h"
@@ -17,7 +17,7 @@
 #include "base/command_line.h"
 #include "ui/app_list/app_list_constants.h"
 #include "ui/app_list/app_list_switches.h"
-#include "ui/app_list/shower/app_list_shower.h"
+#include "ui/app_list/presenter/app_list_presenter.h"
 #include "ui/app_list/views/app_list_view.h"
 #include "ui/aura/window.h"
 #include "ui/events/event.h"
@@ -48,8 +48,8 @@
 
 // Using |button_bounds|, determine the anchor offset so that the bubble gets
 // shown above the shelf (used for the alternate shelf theme).
-gfx::Vector2d GetAnchorPositionOffsetToShelf(
-    const gfx::Rect& button_bounds, views::Widget* widget) {
+gfx::Vector2d GetAnchorPositionOffsetToShelf(const gfx::Rect& button_bounds,
+                                             views::Widget* widget) {
   DCHECK(Shell::HasInstance());
   ShelfAlignment shelf_alignment = Shell::GetInstance()->GetShelfAlignment(
       widget->GetNativeView()->GetRootWindow());
@@ -60,7 +60,8 @@
         int screen_width = widget->GetWorkAreaBoundsInScreen().width();
         return gfx::Vector2d(
             std::min(screen_width - kMinimalAnchorPositionOffset - anchor.x(),
-                     0), 0);
+                     0),
+            0);
       }
       return gfx::Vector2d(
           std::max(kMinimalAnchorPositionOffset - anchor.x(), 0), 0);
@@ -119,16 +120,16 @@
 }  // namespace
 
 ////////////////////////////////////////////////////////////////////////////////
-// AppListShowerDelegate, public:
+// AppListPresenterDelegate, public:
 
-AppListShowerDelegate::AppListShowerDelegate(
-    app_list::AppListShower* shower,
+AppListPresenterDelegate::AppListPresenterDelegate(
+    app_list::AppListPresenter* presenter,
     AppListViewDelegateFactory* view_delegate_factory)
-    : shower_(shower), view_delegate_factory_(view_delegate_factory) {
+    : presenter_(presenter), view_delegate_factory_(view_delegate_factory) {
   Shell::GetInstance()->AddShellObserver(this);
 }
 
-AppListShowerDelegate::~AppListShowerDelegate() {
+AppListPresenterDelegate::~AppListPresenterDelegate() {
   DCHECK(view_);
   keyboard::KeyboardController* keyboard_controller =
       keyboard::KeyboardController::GetInstance();
@@ -140,13 +141,13 @@
   Shell::GetInstance()->RemoveShellObserver(this);
 }
 
-app_list::AppListViewDelegate* AppListShowerDelegate::GetViewDelegate() {
+app_list::AppListViewDelegate* AppListPresenterDelegate::GetViewDelegate() {
   return view_delegate_factory_->GetDelegate();
 }
 
-void AppListShowerDelegate::Init(app_list::AppListView* view,
-                                 aura::Window* root_window,
-                                 int current_apps_page) {
+void AppListPresenterDelegate::Init(app_list::AppListView* view,
+                                    aura::Window* root_window,
+                                    int current_apps_page) {
   // App list needs to know the new shelf layout in order to calculate its
   // UI layout when AppListView visibility changes.
   ash::Shell::GetPrimaryRootWindowController()
@@ -169,10 +170,8 @@
   } else if (is_centered_) {
     // Note: We can't center the app list until we have its dimensions, so we
     // init at (0, 0) and then reset its anchor point.
-    view->InitAsBubbleAtFixedLocation(container,
-                                      current_apps_page,
-                                      gfx::Point(),
-                                      views::BubbleBorder::FLOAT,
+    view->InitAsBubbleAtFixedLocation(container, current_apps_page,
+                                      gfx::Point(), views::BubbleBorder::FLOAT,
                                       true /* border_accepts_events */);
     // The experimental app list is centered over the display of the app list
     // button that was pressed (if triggered via keyboard, this is the display
@@ -182,18 +181,15 @@
   } else {
     gfx::Rect applist_button_bounds = applist_button->GetBoundsInScreen();
     // We need the location of the button within the local screen.
-    applist_button_bounds = ScreenUtil::ConvertRectFromScreen(
-        root_window,
-        applist_button_bounds);
+    applist_button_bounds =
+        ScreenUtil::ConvertRectFromScreen(root_window, applist_button_bounds);
     view->InitAsBubbleAttachedToAnchor(
-        container,
-        current_apps_page,
+        container, current_apps_page,
         Shelf::ForWindow(container)->GetAppListButtonView(),
         GetAnchorPositionOffsetToShelf(
             applist_button_bounds,
             Shelf::ForWindow(container)->GetAppListButtonView()->GetWidget()),
-        GetBubbleArrow(container),
-        true /* border_accepts_events */);
+        GetBubbleArrow(container), true /* border_accepts_events */);
     view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE);
   }
 
@@ -211,13 +207,13 @@
       Shelf::ForWindow(root_window)->GetDragAndDropHostForAppList());
 }
 
-void AppListShowerDelegate::OnShown(aura::Window* root_window) {
+void AppListPresenterDelegate::OnShown(aura::Window* root_window) {
   is_visible_ = true;
   // Update applist button status when app list visibility is changed.
   Shelf::ForWindow(root_window)->GetAppListButtonView()->SchedulePaint();
 }
 
-void AppListShowerDelegate::OnDismissed() {
+void AppListPresenterDelegate::OnDismissed() {
   DCHECK(is_visible_);
   DCHECK(view_);
 
@@ -235,7 +231,7 @@
       ->SchedulePaint();
 }
 
-void AppListShowerDelegate::UpdateBounds() {
+void AppListPresenterDelegate::UpdateBounds() {
   if (!view_ || !is_visible_)
     return;
 
@@ -247,7 +243,7 @@
   }
 }
 
-gfx::Vector2d AppListShowerDelegate::GetVisibilityAnimationOffset(
+gfx::Vector2d AppListPresenterDelegate::GetVisibilityAnimationOffset(
     aura::Window* root_window) {
   DCHECK(Shell::HasInstance());
 
@@ -272,9 +268,9 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// AppListShowerDelegate, private:
+// AppListPresenterDelegate, private:
 
-void AppListShowerDelegate::ProcessLocatedEvent(ui::LocatedEvent* event) {
+void AppListPresenterDelegate::ProcessLocatedEvent(ui::LocatedEvent* event) {
   if (!view_ || !is_visible_)
     return;
 
@@ -299,58 +295,60 @@
   aura::Window* window = view_->GetWidget()->GetNativeView()->parent();
   if (!window->Contains(target) &&
       !app_list::switches::ShouldNotDismissOnBlur()) {
-    shower_->Dismiss();
+    presenter_->Dismiss();
   }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// AppListShowerDelegate, aura::EventFilter implementation:
+// AppListPresenterDelegate, aura::EventFilter implementation:
 
-void AppListShowerDelegate::OnMouseEvent(ui::MouseEvent* event) {
+void AppListPresenterDelegate::OnMouseEvent(ui::MouseEvent* event) {
   if (event->type() == ui::ET_MOUSE_PRESSED)
     ProcessLocatedEvent(event);
 }
 
-void AppListShowerDelegate::OnGestureEvent(ui::GestureEvent* event) {
+void AppListPresenterDelegate::OnGestureEvent(ui::GestureEvent* event) {
   if (event->type() == ui::ET_GESTURE_TAP_DOWN)
     ProcessLocatedEvent(event);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// AppListShowerDelegate, keyboard::KeyboardControllerObserver implementation:
+// AppListPresenterDelegate, keyboard::KeyboardControllerObserver
+// implementation:
 
-void AppListShowerDelegate::OnKeyboardBoundsChanging(
+void AppListPresenterDelegate::OnKeyboardBoundsChanging(
     const gfx::Rect& new_bounds) {
   UpdateBounds();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// AppListShowerDelegate, ShellObserver implementation:
-void AppListShowerDelegate::OnShelfAlignmentChanged(aura::Window* root_window) {
+// AppListPresenterDelegate, ShellObserver implementation:
+void AppListPresenterDelegate::OnShelfAlignmentChanged(
+    aura::Window* root_window) {
   if (view_)
     view_->SetBubbleArrow(GetBubbleArrow(view_->GetWidget()->GetNativeView()));
 }
 
-void AppListShowerDelegate::OnMaximizeModeStarted() {
+void AppListPresenterDelegate::OnMaximizeModeStarted() {
   // The "fullscreen" app-list is initialized as in a different type of window,
   // therefore we can't switch between the fullscreen status and the normal
   // app-list bubble. App-list should be dismissed for the transition between
   // maximize mode (touch-view mode) and non-maximize mode, otherwise the app
   // list tries to behave as a bubble which leads to a crash. crbug.com/510062
   if (IsFullscreenAppListEnabled() && is_visible_)
-    shower_->Dismiss();
+    presenter_->Dismiss();
 }
 
-void AppListShowerDelegate::OnMaximizeModeEnded() {
+void AppListPresenterDelegate::OnMaximizeModeEnded() {
   // See the comments of OnMaximizeModeStarted().
   if (IsFullscreenAppListEnabled() && is_visible_)
-    shower_->Dismiss();
+    presenter_->Dismiss();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// AppListShowerDelegate, ShelfIconObserver implementation:
+// AppListPresenterDelegate, ShelfIconObserver implementation:
 
-void AppListShowerDelegate::OnShelfIconPositionsChanged() {
+void AppListPresenterDelegate::OnShelfIconPositionsChanged() {
   UpdateBounds();
 }
 
diff --git a/ash/app_list/app_list_shower_delegate.h b/ash/app_list/app_list_presenter_delegate.h
similarity index 78%
rename from ash/app_list/app_list_shower_delegate.h
rename to ash/app_list/app_list_presenter_delegate.h
index f8fe6ec..7645171 100644
--- a/ash/app_list/app_list_shower_delegate.h
+++ b/ash/app_list/app_list_presenter_delegate.h
@@ -2,15 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef ASH_APP_LIST_APP_LIST_SHOWER_DELEGATE_H_
-#define ASH_APP_LIST_APP_LIST_SHOWER_DELEGATE_H_
+#ifndef ASH_APP_LIST_APP_LIST_PRESENTER_DELEGATE_H_
+#define ASH_APP_LIST_APP_LIST_PRESENTER_DELEGATE_H_
 
 #include "ash/ash_export.h"
 #include "ash/shelf/shelf_icon_observer.h"
 #include "ash/shell_observer.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "ui/app_list/shower/app_list_shower_delegate.h"
+#include "ui/app_list/presenter/app_list_presenter_delegate.h"
 #include "ui/events/event_handler.h"
 #include "ui/keyboard/keyboard_controller_observer.h"
 
@@ -20,7 +20,7 @@
 }
 
 namespace app_list {
-class AppListShower;
+class AppListPresenter;
 }
 
 namespace ui {
@@ -30,7 +30,7 @@
 namespace ash {
 
 namespace test {
-class AppListShowerAshTestApi;
+class AppListPresenterAshTestApi;
 }
 
 class AppListViewDelegateFactory;
@@ -39,18 +39,18 @@
 // launch icon as the state of the app list changes. Listens to shell events
 // and touches/mouse clicks outside the app list to auto dismiss the UI or
 // update its layout as necessary.
-class ASH_EXPORT AppListShowerDelegate
-    : public app_list::AppListShowerDelegate,
+class ASH_EXPORT AppListPresenterDelegate
+    : public app_list::AppListPresenterDelegate,
       public ui::EventHandler,
       public keyboard::KeyboardControllerObserver,
       public ShellObserver,
       public ShelfIconObserver {
  public:
-  AppListShowerDelegate(app_list::AppListShower* shower,
-                        AppListViewDelegateFactory* view_delegate_factory);
-  ~AppListShowerDelegate() override;
+  AppListPresenterDelegate(app_list::AppListPresenter* presenter,
+                           AppListViewDelegateFactory* view_delegate_factory);
+  ~AppListPresenterDelegate() override;
 
-  // app_list::AppListShowerDelegate:
+  // app_list::AppListPresenterDelegate:
   app_list::AppListViewDelegate* GetViewDelegate() override;
   void Init(app_list::AppListView* view,
             aura::Window* root_window,
@@ -86,7 +86,7 @@
   bool is_centered_ = false;
 
   // Not owned. Pointer is guaranteed to be valid while this object is alive.
-  app_list::AppListShower* shower_;
+  app_list::AppListPresenter* presenter_;
 
   // Not owned. Pointer is guaranteed to be valid while this object is alive.
   AppListViewDelegateFactory* view_delegate_factory_;
@@ -94,9 +94,9 @@
   // The AppListView this class manages, owned by its widget.
   app_list::AppListView* view_ = nullptr;
 
-  DISALLOW_COPY_AND_ASSIGN(AppListShowerDelegate);
+  DISALLOW_COPY_AND_ASSIGN(AppListPresenterDelegate);
 };
 
 }  // namespace ash
 
-#endif  // ASH_APP_LIST_APP_LIST_SHOWER_DELEGATE_H_
+#endif  // ASH_APP_LIST_APP_LIST_PRESENTER_DELEGATE_H_
diff --git a/ash/app_list/app_list_presenter_delegate_factory.cc b/ash/app_list/app_list_presenter_delegate_factory.cc
new file mode 100644
index 0000000..bf051bdc
--- /dev/null
+++ b/ash/app_list/app_list_presenter_delegate_factory.cc
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/app_list/app_list_presenter_delegate_factory.h"
+
+#include "ash/app_list/app_list_presenter_delegate.h"
+#include "ash/app_list/app_list_view_delegate_factory.h"
+#include "base/memory/ptr_util.h"
+
+namespace ash {
+
+AppListPresenterDelegateFactory::AppListPresenterDelegateFactory(
+    std::unique_ptr<AppListViewDelegateFactory> view_delegate_factory)
+    : view_delegate_factory_(std::move(view_delegate_factory)) {}
+
+AppListPresenterDelegateFactory::~AppListPresenterDelegateFactory() {}
+
+std::unique_ptr<app_list::AppListPresenterDelegate>
+AppListPresenterDelegateFactory::GetDelegate(
+    app_list::AppListPresenter* presenter) {
+  return base::WrapUnique(
+      new AppListPresenterDelegate(presenter, view_delegate_factory_.get()));
+}
+
+}  // namespace ash
diff --git a/ash/app_list/app_list_presenter_delegate_factory.h b/ash/app_list/app_list_presenter_delegate_factory.h
new file mode 100644
index 0000000..f8d4f20
--- /dev/null
+++ b/ash/app_list/app_list_presenter_delegate_factory.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_APP_LIST_APP_LIST_PRESENTER_DELEGATE_FACTORY_H_
+#define ASH_APP_LIST_APP_LIST_PRESENTER_DELEGATE_FACTORY_H_
+
+#include <memory>
+
+#include "ash/ash_export.h"
+#include "base/macros.h"
+#include "ui/app_list/presenter/app_list_presenter_delegate_factory.h"
+
+namespace app_list {
+class AppListPresenter;
+}
+
+namespace ash {
+
+class AppListViewDelegateFactory;
+
+class ASH_EXPORT AppListPresenterDelegateFactory
+    : public app_list::AppListPresenterDelegateFactory {
+ public:
+  explicit AppListPresenterDelegateFactory(
+      std::unique_ptr<AppListViewDelegateFactory> view_delegate_factory);
+  ~AppListPresenterDelegateFactory() override;
+
+  std::unique_ptr<app_list::AppListPresenterDelegate> GetDelegate(
+      app_list::AppListPresenter* presenter) override;
+
+ private:
+  std::unique_ptr<AppListViewDelegateFactory> view_delegate_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(AppListPresenterDelegateFactory);
+};
+
+}  // namespace ash
+
+#endif  // ASH_APP_LIST_APP_LIST_PRESENTER_DELEGATE_FACTORY_H_
diff --git a/ash/app_list/app_list_shower_delegate_unittest.cc b/ash/app_list/app_list_presenter_delegate_unittest.cc
similarity index 81%
rename from ash/app_list/app_list_shower_delegate_unittest.cc
rename to ash/app_list/app_list_presenter_delegate_unittest.cc
index 37b2526f..a627dc84 100644
--- a/ash/app_list/app_list_shower_delegate_unittest.cc
+++ b/ash/app_list/app_list_presenter_delegate_unittest.cc
@@ -12,7 +12,7 @@
 #include "ash/wm/window_util.h"
 #include "base/command_line.h"
 #include "ui/app_list/app_list_switches.h"
-#include "ui/app_list/shower/app_list_shower_impl.h"
+#include "ui/app_list/presenter/app_list_presenter_impl.h"
 #include "ui/app_list/views/app_list_view.h"
 #include "ui/aura/test/test_windows.h"
 #include "ui/aura/window.h"
@@ -26,24 +26,25 @@
 
 // The parameter is true to test the centered app list, false for normal.
 // (The test name ends in "/0" for normal, "/1" for centered.)
-class AppListShowerDelegateTest : public test::AshTestBase,
-                                  public ::testing::WithParamInterface<bool> {
+class AppListPresenterDelegateTest
+    : public test::AshTestBase,
+      public ::testing::WithParamInterface<bool> {
  public:
-  AppListShowerDelegateTest();
-  virtual ~AppListShowerDelegateTest();
+  AppListPresenterDelegateTest();
+  virtual ~AppListPresenterDelegateTest();
 
   // testing::Test:
   void SetUp() override;
 
-  app_list::AppListShowerImpl* GetAppListShower();
+  app_list::AppListPresenterImpl* GetAppListPresenter();
   bool IsCentered() const;
 };
 
-AppListShowerDelegateTest::AppListShowerDelegateTest() {}
+AppListPresenterDelegateTest::AppListPresenterDelegateTest() {}
 
-AppListShowerDelegateTest::~AppListShowerDelegateTest() {}
+AppListPresenterDelegateTest::~AppListPresenterDelegateTest() {}
 
-void AppListShowerDelegateTest::SetUp() {
+void AppListPresenterDelegateTest::SetUp() {
   AshTestBase::SetUp();
   if (IsCentered()) {
     base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
@@ -54,16 +55,17 @@
   UpdateDisplay("1024x768");
 }
 
-app_list::AppListShowerImpl* AppListShowerDelegateTest::GetAppListShower() {
-  return ash_test_helper()->test_shell_delegate()->app_list_shower();
+app_list::AppListPresenterImpl*
+AppListPresenterDelegateTest::GetAppListPresenter() {
+  return ash_test_helper()->test_shell_delegate()->app_list_presenter();
 }
 
-bool AppListShowerDelegateTest::IsCentered() const {
+bool AppListPresenterDelegateTest::IsCentered() const {
   return GetParam();
 }
 
 // Tests that app launcher hides when focus moves to a normal window.
-TEST_P(AppListShowerDelegateTest, HideOnFocusOut) {
+TEST_P(AppListPresenterDelegateTest, HideOnFocusOut) {
   Shell::GetInstance()->ShowAppList(NULL);
   EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility());
 
@@ -75,7 +77,8 @@
 
 // Tests that app launcher remains visible when focus is moved to a different
 // window in kShellWindowId_AppListContainer.
-TEST_P(AppListShowerDelegateTest, RemainVisibleWhenFocusingToApplistContainer) {
+TEST_P(AppListPresenterDelegateTest,
+       RemainVisibleWhenFocusingToApplistContainer) {
   Shell::GetInstance()->ShowAppList(NULL);
   EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility());
 
@@ -89,10 +92,10 @@
 }
 
 // Tests that clicking outside the app-list bubble closes it.
-TEST_P(AppListShowerDelegateTest, ClickOutsideBubbleClosesBubble) {
+TEST_P(AppListPresenterDelegateTest, ClickOutsideBubbleClosesBubble) {
   Shell* shell = Shell::GetInstance();
   shell->ShowAppList(NULL);
-  aura::Window* app_window = GetAppListShower()->GetWindow();
+  aura::Window* app_window = GetAppListPresenter()->GetWindow();
   ASSERT_TRUE(app_window);
   ui::test::EventGenerator generator(shell->GetPrimaryRootWindow(), app_window);
   // Click on the bubble itself. The bubble should remain visible.
@@ -111,11 +114,11 @@
 }
 
 // Tests that clicking outside the app-list bubble closes it.
-TEST_P(AppListShowerDelegateTest, TapOutsideBubbleClosesBubble) {
+TEST_P(AppListPresenterDelegateTest, TapOutsideBubbleClosesBubble) {
   Shell* shell = Shell::GetInstance();
   shell->ShowAppList(NULL);
 
-  aura::Window* app_window = GetAppListShower()->GetWindow();
+  aura::Window* app_window = GetAppListPresenter()->GetWindow();
   ASSERT_TRUE(app_window);
   gfx::Rect app_window_bounds = app_window->GetBoundsInRootWindow();
 
@@ -135,7 +138,7 @@
 
 // Tests opening the app launcher on a non-primary display, then deleting the
 // display.
-TEST_P(AppListShowerDelegateTest, NonPrimaryDisplay) {
+TEST_P(AppListPresenterDelegateTest, NonPrimaryDisplay) {
   if (!SupportsMultipleDisplays())
     return;
 
@@ -160,7 +163,7 @@
 
 // Tests opening the app launcher on a tiny display that is too small to contain
 // it.
-TEST_P(AppListShowerDelegateTest, TinyDisplay) {
+TEST_P(AppListPresenterDelegateTest, TinyDisplay) {
   // Don't test this for the non-centered app list case; it isn't designed for
   // small displays. The most common case of a small display --- when the
   // virtual keyboard is open --- switches into the centered app list mode, so
@@ -183,14 +186,14 @@
   // from the anchor (center) and height. There isn't a bounds rect that gives
   // the actual app list position (the widget bounds include the bubble border
   // which is much bigger than the actual app list size).
-  app_list::AppListView* app_list = GetAppListShower()->GetView();
+  app_list::AppListView* app_list = GetAppListPresenter()->GetView();
   int app_list_view_top =
       app_list->anchor_rect().y() - app_list->bounds().height() / 2;
   EXPECT_GE(app_list_view_top, kMinimalCenteredAppListMargin);
 }
 
-INSTANTIATE_TEST_CASE_P(AppListShowerDelegateTestInstance,
-                        AppListShowerDelegateTest,
+INSTANTIATE_TEST_CASE_P(AppListPresenterDelegateTestInstance,
+                        AppListPresenterDelegateTest,
                         ::testing::Bool());
 
 }  // namespace ash
diff --git a/ash/app_list/app_list_shower_delegate_factory.cc b/ash/app_list/app_list_shower_delegate_factory.cc
deleted file mode 100644
index 5ac2d7b..0000000
--- a/ash/app_list/app_list_shower_delegate_factory.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/app_list/app_list_shower_delegate_factory.h"
-
-#include "ash/app_list/app_list_shower_delegate.h"
-#include "ash/app_list/app_list_view_delegate_factory.h"
-#include "base/memory/ptr_util.h"
-
-namespace ash {
-
-AppListShowerDelegateFactory::AppListShowerDelegateFactory(
-    std::unique_ptr<AppListViewDelegateFactory> view_delegate_factory)
-    : view_delegate_factory_(std::move(view_delegate_factory)) {}
-
-AppListShowerDelegateFactory::~AppListShowerDelegateFactory() {}
-
-std::unique_ptr<app_list::AppListShowerDelegate>
-AppListShowerDelegateFactory::GetDelegate(app_list::AppListShower* shower) {
-  return base::WrapUnique(
-      new AppListShowerDelegate(shower, view_delegate_factory_.get()));
-}
-
-}  // namespace ash
diff --git a/ash/app_list/app_list_shower_delegate_factory.h b/ash/app_list/app_list_shower_delegate_factory.h
deleted file mode 100644
index 67ee0aa..0000000
--- a/ash/app_list/app_list_shower_delegate_factory.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_APP_LIST_APP_LIST_SHOWER_DELEGATE_FACTORY_H_
-#define ASH_APP_LIST_APP_LIST_SHOWER_DELEGATE_FACTORY_H_
-
-#include <memory>
-
-#include "ash/ash_export.h"
-#include "base/macros.h"
-#include "ui/app_list/shower/app_list_shower_delegate_factory.h"
-
-namespace app_list {
-class AppListShower;
-}
-
-namespace ash {
-
-class AppListViewDelegateFactory;
-
-class ASH_EXPORT AppListShowerDelegateFactory
-    : public app_list::AppListShowerDelegateFactory {
- public:
-  explicit AppListShowerDelegateFactory(
-      std::unique_ptr<AppListViewDelegateFactory> view_delegate_factory);
-  ~AppListShowerDelegateFactory() override;
-
-  std::unique_ptr<app_list::AppListShowerDelegate> GetDelegate(
-      app_list::AppListShower* shower) override;
-
- private:
-  std::unique_ptr<AppListViewDelegateFactory> view_delegate_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(AppListShowerDelegateFactory);
-};
-
-}  // namespace ash
-
-#endif  // ASH_APP_LIST_APP_LIST_SHOWER_DELEGATE_FACTORY_H_
diff --git a/ash/app_list/app_list_view_delegate_factory.h b/ash/app_list/app_list_view_delegate_factory.h
index 4de11b4..399e874 100644
--- a/ash/app_list/app_list_view_delegate_factory.h
+++ b/ash/app_list/app_list_view_delegate_factory.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef ASH_WM_APP_LIST_VIEW_DELEGATE_FACTORY_H_
-#define ASH_WM_APP_LIST_VIEW_DELEGATE_FACTORY_H_
+#ifndef ASH_APP_LIST_APP_LIST_VIEW_DELEGATE_FACTORY_H_
+#define ASH_APP_LIST_APP_LIST_VIEW_DELEGATE_FACTORY_H_
 
 #include "ash/ash_export.h"
 
@@ -22,4 +22,4 @@
 
 }  // namespace ash
 
-#endif  // ASH_WM_APP_LIST_VIEW_DELEGATE_FACTORY_H_
+#endif  // ASH_APP_LIST_APP_LIST_VIEW_DELEGATE_FACTORY_H_
diff --git a/ash/ash.gyp b/ash/ash.gyp
index c95b02f..49f8358 100644
--- a/ash/ash.gyp
+++ b/ash/ash.gyp
@@ -28,10 +28,10 @@
       'accelerators/spoken_feedback_toggler.cc',
       'accelerators/spoken_feedback_toggler.h',
       'accessibility_delegate.h',
-      'app_list/app_list_shower_delegate.cc',
-      'app_list/app_list_shower_delegate.h',
-      'app_list/app_list_shower_delegate_factory.cc',
-      'app_list/app_list_shower_delegate_factory.h',
+      'app_list/app_list_presenter_delegate.cc',
+      'app_list/app_list_presenter_delegate.h',
+      'app_list/app_list_presenter_delegate_factory.cc',
+      'app_list/app_list_presenter_delegate_factory.h',
       'app_list/app_list_view_delegate_factory.h',
       'ash_constants.cc',
       'ash_constants.h',
@@ -523,6 +523,8 @@
       'wm/ash_focus_rules.h',
       'wm/ash_native_cursor_manager.cc',
       'wm/ash_native_cursor_manager.h',
+      'wm/aura/aura_layout_manager_adapter.cc',
+      'wm/aura/aura_layout_manager_adapter.h',
       'wm/aura/wm_root_window_controller_aura.cc',
       'wm/aura/wm_root_window_controller_aura.h',
       'wm/aura/wm_window_aura.cc',
@@ -531,9 +533,12 @@
       'wm/boot_splash_screen_chromeos.h',
       'wm/common/wm_event.cc',
       'wm/common/wm_event.h',
+      'wm/common/wm_layout_manager.h',
       'wm/common/wm_root_window_controller.h',
       'wm/common/wm_screen_util.cc',
       'wm/common/wm_screen_util.h',
+      'wm/common/wm_types.cc',
+      'wm/common/wm_types.h',
       'wm/common/wm_window.h',
       'wm/common/wm_window_observer.h',
       'wm/common/wm_window_property.h',
@@ -674,8 +679,6 @@
       'wm/window_state_util.h',
       'wm/window_util.cc',
       'wm/window_util.h',
-      'wm/wm_types.cc',
-      'wm/wm_types.h',
       'wm/workspace/magnetism_matcher.cc',
       'wm/workspace/magnetism_matcher.h',
       'wm/workspace/multi_window_resize_controller.cc',
@@ -827,7 +830,7 @@
       'accelerators/accelerator_table_unittest.cc',
       'accelerators/magnifier_key_scroller_unittest.cc',
       'accelerators/spoken_feedback_toggler_unittest.cc',
-      'app_list/app_list_shower_delegate_unittest.cc',
+      'app_list/app_list_presenter_delegate_unittest.cc',
       'ash_touch_exploration_manager_chromeos_unittest.cc',
       'autoclick/autoclick_unittest.cc',
       'content/display/screen_orientation_controller_chromeos_unittest.cc',
@@ -982,7 +985,7 @@
         '../third_party/icu/icu.gyp:icuuc',
         '../ui/accessibility/accessibility.gyp:accessibility',
         '../ui/app_list/app_list.gyp:app_list',
-        '../ui/app_list/shower/app_list_shower.gyp:app_list_shower',
+        '../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter',
         '../ui/aura/aura.gyp:aura',
         '../ui/base/ime/ui_base_ime.gyp:ui_base_ime',
         '../ui/base/ui_base.gyp:ui_base',
@@ -1117,7 +1120,7 @@
         '../testing/gtest.gyp:gtest',
         '../ui/accessibility/accessibility.gyp:ax_gen',
         '../ui/app_list/app_list.gyp:app_list_test_support',
-        '../ui/app_list/shower/app_list_shower.gyp:app_list_shower',
+        '../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter',
         '../ui/events/devices/events_devices.gyp:events_devices',
         '../ui/views/views.gyp:views_test_support',
         'ash',
@@ -1180,7 +1183,7 @@
         '../third_party/icu/icu.gyp:icuuc',
         '../ui/accessibility/accessibility.gyp:accessibility',
         '../ui/app_list/app_list.gyp:app_list',
-        '../ui/app_list/shower/app_list_shower.gyp:app_list_shower',
+        '../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter',
         '../ui/aura/aura.gyp:aura',
         '../ui/aura/aura.gyp:aura_test_support',
         '../ui/base/ime/ui_base_ime.gyp:ui_base_ime',
@@ -1280,7 +1283,7 @@
         '../third_party/icu/icu.gyp:icui18n',
         '../third_party/icu/icu.gyp:icuuc',
         '../ui/app_list/app_list.gyp:app_list',
-        '../ui/app_list/shower/app_list_shower.gyp:app_list_shower',
+        '../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter',
         '../ui/aura/aura.gyp:aura',
         '../ui/base/ime/ui_base_ime.gyp:ui_base_ime',
         '../ui/base/ui_base.gyp:ui_base',
diff --git a/ash/ash_touch_exploration_manager_chromeos.cc b/ash/ash_touch_exploration_manager_chromeos.cc
index ca5fa94..2319c70 100644
--- a/ash/ash_touch_exploration_manager_chromeos.cc
+++ b/ash/ash_touch_exploration_manager_chromeos.cc
@@ -9,11 +9,13 @@
 #include "ash/root_window_controller.h"
 #include "ash/shell.h"
 #include "ash/system/tray/system_tray_notifier.h"
+#include "ash/wm/window_util.h"
 #include "base/command_line.h"
 #include "chromeos/audio/chromeos_sounds.h"
 #include "chromeos/audio/cras_audio_handler.h"
 #include "chromeos/chromeos_switches.h"
 #include "ui/chromeos/touch_exploration_controller.h"
+#include "ui/wm/public/activation_client.h"
 
 namespace ash {
 
@@ -22,6 +24,7 @@
     : root_window_controller_(root_window_controller),
       audio_handler_(chromeos::CrasAudioHandler::Get()) {
   Shell::GetInstance()->system_tray_notifier()->AddAccessibilityObserver(this);
+  ash::Shell::GetInstance()->activation_client()->AddObserver(this);
   UpdateTouchExplorationState();
 }
 
@@ -30,6 +33,7 @@
       Shell::GetInstance()->system_tray_notifier();
   if (system_tray_notifier)
     system_tray_notifier->RemoveAccessibilityObserver(this);
+  ash::Shell::GetInstance()->activation_client()->RemoveObserver(this);
 }
 
 void AshTouchExplorationManager::OnAccessibilityModeChanged(
@@ -80,15 +84,31 @@
       chromeos::SOUND_ENTER_SCREEN);
 }
 
+void AshTouchExplorationManager::OnWindowActivated(
+    aura::client::ActivationChangeObserver::ActivationReason reason,
+    aura::Window* gained_active,
+    aura::Window* lost_active) {
+  UpdateTouchExplorationState();
+}
+
 void AshTouchExplorationManager::UpdateTouchExplorationState() {
+  // Comes from components/exo/shell_surface.cc.
+  const char kExoShellSurfaceWindowName[] = "ExoShellSurface";
+
+  // See crbug.com/603745 for more details.
+  bool pass_through_surface =
+      wm::GetActiveWindow() &&
+      wm::GetActiveWindow()->name() == kExoShellSurfaceWindowName;
+
   AccessibilityDelegate* delegate =
       Shell::GetInstance()->accessibility_delegate();
   bool enabled = delegate->IsSpokenFeedbackEnabled();
 
-  if (enabled && !touch_exploration_controller_.get()) {
+  if (!pass_through_surface && enabled &&
+      !touch_exploration_controller_.get()) {
     touch_exploration_controller_.reset(new ui::TouchExplorationController(
         root_window_controller_->GetRootWindow(), this));
-  } else if (!enabled) {
+  } else if (!enabled || pass_through_surface) {
     touch_exploration_controller_.reset();
   }
 }
diff --git a/ash/ash_touch_exploration_manager_chromeos.h b/ash/ash_touch_exploration_manager_chromeos.h
index 1c2288c..6301e74 100644
--- a/ash/ash_touch_exploration_manager_chromeos.h
+++ b/ash/ash_touch_exploration_manager_chromeos.h
@@ -11,6 +11,7 @@
 #include "ash/system/tray_accessibility.h"
 #include "base/macros.h"
 #include "ui/chromeos/touch_exploration_controller.h"
+#include "ui/wm/public/activation_change_observer.h"
 
 namespace chromeos {
 class CrasAudioHandler;
@@ -25,7 +26,8 @@
 // the system.
 class ASH_EXPORT AshTouchExplorationManager
     : public ash::AccessibilityObserver,
-      public ui::TouchExplorationControllerDelegate {
+      public ui::TouchExplorationControllerDelegate,
+      public aura::client::ActivationChangeObserver {
  public:
   explicit AshTouchExplorationManager(
       RootWindowController* root_window_controller);
@@ -43,6 +45,12 @@
   void PlayExitScreenEarcon() override;
   void PlayEnterScreenEarcon() override;
 
+  // aura::client::ActivationChangeObserver overrides:
+  void OnWindowActivated(
+      aura::client::ActivationChangeObserver::ActivationReason reason,
+      aura::Window* gained_active,
+      aura::Window* lost_active) override;
+
  private:
   void UpdateTouchExplorationState();
   bool VolumeAdjustSoundEnabled();
diff --git a/ash/mus/BUILD.gn b/ash/mus/BUILD.gn
index bd6a7069..4b491d6d 100644
--- a/ash/mus/BUILD.gn
+++ b/ash/mus/BUILD.gn
@@ -42,7 +42,7 @@
     "//services/shell/public/cpp",
     "//services/tracing/public/cpp",
     "//skia/public",
-    "//ui/app_list/shower",
+    "//ui/app_list/presenter",
     "//ui/aura",
     "//ui/events",
     "//ui/events/devices",
diff --git a/ash/mus/shelf_delegate_mus.cc b/ash/mus/shelf_delegate_mus.cc
index 2dc106e..3e53ad87 100644
--- a/ash/mus/shelf_delegate_mus.cc
+++ b/ash/mus/shelf_delegate_mus.cc
@@ -116,6 +116,7 @@
     : model_(model), binding_(this) {
   ::shell::Connector* connector =
       views::WindowManagerConnection::Get()->connector();
+  connector->ConnectToInterface("mojo:desktop_wm", &shelf_layout_);
   connector->ConnectToInterface("mojo:desktop_wm", &user_window_controller_);
   user_window_controller_->AddUserWindowObserver(
       binding_.CreateInterfacePtrAndBind());
@@ -124,19 +125,7 @@
 ShelfDelegateMus::~ShelfDelegateMus() {}
 
 void ShelfDelegateMus::OnShelfCreated(Shelf* shelf) {
-  ShelfWidget* widget = shelf->shelf_widget();
-  ShelfLayoutManager* layout_manager = widget->shelf_layout_manager();
-  mus::Window* window = aura::GetMusWindow(widget->GetNativeWindow());
-  gfx::Size size = layout_manager->GetIdealBounds().size();
-  window->SetSharedProperty<gfx::Size>(
-      mus::mojom::WindowManager::kPreferredSize_Property, size);
-
-  StatusAreaWidget* status_widget = widget->status_area_widget();
-  mus::Window* status_window =
-      aura::GetMusWindow(status_widget->GetNativeWindow());
-  gfx::Size status_size = status_widget->GetWindowBoundsInScreen().size();
-  status_window->SetSharedProperty<gfx::Size>(
-      mus::mojom::WindowManager::kPreferredSize_Property, status_size);
+  SetShelfPreferredSizes(shelf);
 }
 
 void ShelfDelegateMus::OnShelfDestroyed(Shelf* shelf) {
@@ -144,18 +133,27 @@
 }
 
 void ShelfDelegateMus::OnShelfAlignmentChanged(Shelf* shelf) {
-  observers_.ForAllPtrs([shelf](mash::shelf::mojom::ShelfObserver* observer) {
-    observer->OnAlignmentChanged(
-        static_cast<mash::shelf::mojom::Alignment>(shelf->GetAlignment()));
-  });
+  SetShelfPreferredSizes(shelf);
+  mash::shelf::mojom::Alignment alignment =
+      static_cast<mash::shelf::mojom::Alignment>(shelf->GetAlignment());
+  shelf_layout_->SetAlignment(alignment);
+
+  observers_.ForAllPtrs(
+      [alignment](mash::shelf::mojom::ShelfObserver* observer) {
+        observer->OnAlignmentChanged(alignment);
+      });
 }
 
 void ShelfDelegateMus::OnShelfAutoHideBehaviorChanged(Shelf* shelf) {
-  observers_.ForAllPtrs([shelf](mash::shelf::mojom::ShelfObserver* observer) {
-    observer->OnAutoHideBehaviorChanged(
-        static_cast<mash::shelf::mojom::AutoHideBehavior>(
-            shelf->auto_hide_behavior()));
-  });
+  mash::shelf::mojom::AutoHideBehavior behavior =
+      static_cast<mash::shelf::mojom::AutoHideBehavior>(
+          shelf->auto_hide_behavior());
+  shelf_layout_->SetAutoHideBehavior(behavior);
+
+  observers_.ForAllPtrs(
+      [behavior](mash::shelf::mojom::ShelfObserver* observer) {
+        observer->OnAutoHideBehaviorChanged(behavior);
+      });
 }
 
 ShelfID ShelfDelegateMus::GetShelfIDForAppID(const std::string& app_id) {
@@ -321,5 +319,21 @@
   model_->Set(index, item);
 }
 
+void ShelfDelegateMus::SetShelfPreferredSizes(Shelf* shelf) {
+  ShelfWidget* widget = shelf->shelf_widget();
+  ShelfLayoutManager* layout_manager = widget->shelf_layout_manager();
+  mus::Window* window = aura::GetMusWindow(widget->GetNativeWindow());
+  gfx::Size size = layout_manager->GetIdealBounds().size();
+  window->SetSharedProperty<gfx::Size>(
+      mus::mojom::WindowManager::kPreferredSize_Property, size);
+
+  StatusAreaWidget* status_widget = widget->status_area_widget();
+  mus::Window* status_window =
+      aura::GetMusWindow(status_widget->GetNativeWindow());
+  gfx::Size status_size = status_widget->GetWindowBoundsInScreen().size();
+  status_window->SetSharedProperty<gfx::Size>(
+      mus::mojom::WindowManager::kPreferredSize_Property, status_size);
+}
+
 }  // namespace sysui
 }  // namespace ash
diff --git a/ash/mus/shelf_delegate_mus.h b/ash/mus/shelf_delegate_mus.h
index 2708df3..c936592 100644
--- a/ash/mus/shelf_delegate_mus.h
+++ b/ash/mus/shelf_delegate_mus.h
@@ -9,6 +9,7 @@
 
 #include "ash/shelf/shelf_delegate.h"
 #include "mash/shelf/public/interfaces/shelf.mojom.h"
+#include "mash/wm/public/interfaces/shelf_layout.mojom.h"
 #include "mash/wm/public/interfaces/user_window_controller.mojom.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/interface_ptr_set.h"
@@ -61,10 +62,14 @@
                                   mojo::Array<uint8_t> app_icon) override;
   void OnUserWindowFocusChanged(uint32_t window_id, bool has_focus) override;
 
+  // Set the Mus window preferred sizes, needed by mash::wm::ShelfLayout.
+  void SetShelfPreferredSizes(Shelf* shelf);
+
   ShelfModel* model_;
 
   mojo::AssociatedInterfacePtrSet<mash::shelf::mojom::ShelfObserver> observers_;
 
+  mash::wm::mojom::ShelfLayoutPtr shelf_layout_;
   mash::wm::mojom::UserWindowControllerPtr user_window_controller_;
   mojo::Binding<mash::wm::mojom::UserWindowObserver> binding_;
   std::map<uint32_t, ShelfID> window_id_to_shelf_id_;
diff --git a/ash/mus/shell_delegate_mus.cc b/ash/mus/shell_delegate_mus.cc
index 080212d..8aa0d332 100644
--- a/ash/mus/shell_delegate_mus.cc
+++ b/ash/mus/shell_delegate_mus.cc
@@ -14,7 +14,7 @@
 #include "ash/system/tray/default_system_tray_delegate.h"
 #include "base/strings/string16.h"
 #include "components/user_manager/user_info_impl.h"
-#include "ui/app_list/shower/app_list_shower.h"
+#include "ui/app_list/presenter/app_list_presenter.h"
 #include "ui/gfx/image/image.h"
 
 namespace ash {
@@ -94,12 +94,12 @@
   DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub);
 };
 
-class AppListShowerMus : public app_list::AppListShower {
+class AppListPresenterMus : public app_list::AppListPresenter {
  public:
-  AppListShowerMus() {}
-  ~AppListShowerMus() override {}
+  AppListPresenterMus() {}
+  ~AppListPresenterMus() override {}
 
-  // app_list::AppListShower:
+  // app_list::AppListPresenter:
   void Show(aura::Window* window) override { NOTIMPLEMENTED(); }
   void Dismiss() override { NOTIMPLEMENTED(); }
   bool IsVisible() const override {
@@ -112,12 +112,13 @@
   }
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(AppListShowerMus);
+  DISALLOW_COPY_AND_ASSIGN(AppListPresenterMus);
 };
 
 }  // namespace
 
-ShellDelegateMus::ShellDelegateMus() : app_list_shower_(new AppListShowerMus) {}
+ShellDelegateMus::ShellDelegateMus()
+    : app_list_presenter_(new AppListPresenterMus) {}
 
 ShellDelegateMus::~ShellDelegateMus() {}
 
@@ -186,8 +187,8 @@
   NOTIMPLEMENTED();
 }
 
-app_list::AppListShower* ShellDelegateMus::GetAppListShower() {
-  return app_list_shower_.get();
+app_list::AppListPresenter* ShellDelegateMus::GetAppListPresenter() {
+  return app_list_presenter_.get();
 }
 
 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) {
diff --git a/ash/mus/shell_delegate_mus.h b/ash/mus/shell_delegate_mus.h
index c86349f..61874934 100644
--- a/ash/mus/shell_delegate_mus.h
+++ b/ash/mus/shell_delegate_mus.h
@@ -40,7 +40,7 @@
   void RemoveVirtualKeyboardStateObserver(
       VirtualKeyboardStateObserver* observer) override;
   void OpenUrl(const GURL& url) override;
-  app_list::AppListShower* GetAppListShower() override;
+  app_list::AppListPresenter* GetAppListPresenter() override;
   ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override;
   ash::SystemTrayDelegate* CreateSystemTrayDelegate() override;
   ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() override;
@@ -55,7 +55,7 @@
   gfx::Image GetDeprecatedAcceleratorImage() const override;
 
  private:
-  std::unique_ptr<app_list::AppListShower> app_list_shower_;
+  std::unique_ptr<app_list::AppListPresenter> app_list_presenter_;
 
   DISALLOW_COPY_AND_ASSIGN(ShellDelegateMus);
 };
diff --git a/ash/screenshot_delegate.h b/ash/screenshot_delegate.h
index 9e7af06..14217e3 100644
--- a/ash/screenshot_delegate.h
+++ b/ash/screenshot_delegate.h
@@ -29,6 +29,9 @@
   virtual void HandleTakePartialScreenshot(
       aura::Window* window, const gfx::Rect& rect) = 0;
 
+  // The actual task of taking screenshot for the given window.
+  virtual void HandleTakeWindowScreenshot(aura::Window* window) = 0;
+
   // Returns true if the system is ready to take screenshot.
   virtual bool CanTakeScreenshot() = 0;
 };
diff --git a/ash/shell.cc b/ash/shell.cc
index b0c8c4c..55f13e6 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -84,7 +84,7 @@
 #include "base/bind.h"
 #include "base/memory/ptr_util.h"
 #include "base/trace_event/trace_event.h"
-#include "ui/app_list/shower/app_list_shower.h"
+#include "ui/app_list/presenter/app_list_presenter.h"
 #include "ui/aura/client/aura_constants.h"
 #include "ui/aura/env.h"
 #include "ui/aura/layout_manager.h"
@@ -308,15 +308,15 @@
   // If the context window is not given, show it on the target root window.
   if (!window)
     window = GetTargetRootWindow();
-  delegate_->GetAppListShower()->Show(window);
+  delegate_->GetAppListPresenter()->Show(window);
 }
 
 void Shell::DismissAppList() {
-  delegate_->GetAppListShower()->Dismiss();
+  delegate_->GetAppListPresenter()->Dismiss();
 }
 
 void Shell::ToggleAppList(aura::Window* window) {
-  if (delegate_->GetAppListShower()->IsVisible()) {
+  if (delegate_->GetAppListPresenter()->IsVisible()) {
     DismissAppList();
     return;
   }
@@ -325,7 +325,7 @@
 }
 
 bool Shell::GetAppListTargetVisibility() const {
-  return delegate_->GetAppListShower()->GetTargetVisibility();
+  return delegate_->GetAppListPresenter()->GetTargetVisibility();
 }
 
 bool Shell::IsSystemModalWindowOpen() const {
@@ -771,9 +771,8 @@
   mru_window_tracker_.reset();
 
   // Chrome implementation of shelf delegate depends on FocusClient,
-  // so must be deleted before |focus_client_|.
+  // so must be deleted before |focus_client_| (below).
   shelf_delegate_.reset();
-  focus_client_.reset();
 
   // Destroy SystemTrayNotifier after destroying SystemTray as TrayItems
   // needs to remove observers from it.
@@ -817,8 +816,11 @@
   // of its owned RootWindowControllers relies on the value.
   display_manager_->CreateScreenForShutdown();
   display_configuration_controller_.reset();
+
+  // Depends on |focus_client_|, so must be destroyed before.
   window_tree_host_manager_->Shutdown();
   window_tree_host_manager_.reset();
+  focus_client_.reset();
   screen_position_controller_.reset();
   accessibility_delegate_.reset();
   new_window_delegate_.reset();
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc
index 0671bf6..0ebe950b 100644
--- a/ash/shell/shell_delegate_impl.cc
+++ b/ash/shell/shell_delegate_impl.cc
@@ -5,7 +5,7 @@
 #include "ash/shell/shell_delegate_impl.h"
 
 #include "ash/accessibility_delegate.h"
-#include "ash/app_list/app_list_shower_delegate_factory.h"
+#include "ash/app_list/app_list_presenter_delegate_factory.h"
 #include "ash/app_list/app_list_view_delegate_factory.h"
 #include "ash/default_accessibility_delegate.h"
 #include "ash/default_user_wallpaper_delegate.h"
@@ -26,7 +26,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "components/user_manager/user_info_impl.h"
 #include "ui/app_list/app_list_view_delegate.h"
-#include "ui/app_list/shower/app_list_shower_impl.h"
+#include "ui/app_list/presenter/app_list_presenter_impl.h"
 #include "ui/aura/window.h"
 #include "ui/gfx/image/image.h"
 #include "ui/gfx/image/image_skia.h"
@@ -160,7 +160,7 @@
 
 ShellDelegateImpl::ShellDelegateImpl()
     : shelf_delegate_(nullptr),
-      app_list_shower_delegate_factory_(new AppListShowerDelegateFactory(
+      app_list_presenter_delegate_factory_(new AppListPresenterDelegateFactory(
           base::WrapUnique(new AppListViewDelegateFactoryImpl))) {}
 
 ShellDelegateImpl::~ShellDelegateImpl() {}
@@ -216,12 +216,12 @@
 
 void ShellDelegateImpl::OpenUrl(const GURL& url) {}
 
-app_list::AppListShower* ShellDelegateImpl::GetAppListShower() {
-  if (!app_list_shower_) {
-    app_list_shower_.reset(new app_list::AppListShowerImpl(
-        app_list_shower_delegate_factory_.get()));
+app_list::AppListPresenter* ShellDelegateImpl::GetAppListPresenter() {
+  if (!app_list_presenter_) {
+    app_list_presenter_.reset(new app_list::AppListPresenterImpl(
+        app_list_presenter_delegate_factory_.get()));
   }
-  return app_list_shower_.get();
+  return app_list_presenter_.get();
 }
 
 ShelfDelegate* ShellDelegateImpl::CreateShelfDelegate(ShelfModel* model) {
diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h
index 6c39567..daead26 100644
--- a/ash/shell/shell_delegate_impl.h
+++ b/ash/shell/shell_delegate_impl.h
@@ -13,8 +13,8 @@
 #include "base/macros.h"
 
 namespace app_list {
-class AppListShowerDelegateFactory;
-class AppListShowerImpl;
+class AppListPresenterDelegateFactory;
+class AppListPresenterImpl;
 }
 
 namespace keyboard {
@@ -47,7 +47,7 @@
   void RemoveVirtualKeyboardStateObserver(
       VirtualKeyboardStateObserver* observer) override;
   void OpenUrl(const GURL& url) override;
-  app_list::AppListShower* GetAppListShower() override;
+  app_list::AppListPresenter* GetAppListPresenter() override;
   ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override;
   ash::SystemTrayDelegate* CreateSystemTrayDelegate() override;
   ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() override;
@@ -63,9 +63,9 @@
 
  private:
   ShelfDelegateImpl* shelf_delegate_;
-  std::unique_ptr<app_list::AppListShowerDelegateFactory>
-      app_list_shower_delegate_factory_;
-  std::unique_ptr<app_list::AppListShowerImpl> app_list_shower_;
+  std::unique_ptr<app_list::AppListPresenterDelegateFactory>
+      app_list_presenter_delegate_factory_;
+  std::unique_ptr<app_list::AppListPresenterImpl> app_list_presenter_;
 
   DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl);
 };
diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h
index 9224629..e3c6f5f 100644
--- a/ash/shell_delegate.h
+++ b/ash/shell_delegate.h
@@ -15,7 +15,7 @@
 class GURL;
 
 namespace app_list {
-class AppListShower;
+class AppListPresenter;
 class AppListViewDelegate;
 }
 
@@ -113,8 +113,8 @@
   // Opens the |url| in a new browser tab.
   virtual void OpenUrl(const GURL& url) = 0;
 
-  // Get the AppListShower. Ownership stays with Chrome.
-  virtual app_list::AppListShower* GetAppListShower() = 0;
+  // Get the AppListPresenter. Ownership stays with Chrome.
+  virtual app_list::AppListPresenter* GetAppListPresenter() = 0;
 
   // Creates a new ShelfDelegate. Shell takes ownership of the returned
   // value.
diff --git a/ash/test/shell_test_api.cc b/ash/test/shell_test_api.cc
index 9be1561..b042e47 100644
--- a/ash/test/shell_test_api.cc
+++ b/ash/test/shell_test_api.cc
@@ -44,8 +44,8 @@
   return shell_->drag_drop_controller_.get();
 }
 
-app_list::AppListShower* ShellTestApi::app_list_shower() {
-  return shell_->delegate_->GetAppListShower();
+app_list::AppListPresenter* ShellTestApi::app_list_presenter() {
+  return shell_->delegate_->GetAppListPresenter();
 }
 
 void ShellTestApi::DisableDisplayAnimator() {
diff --git a/ash/test/shell_test_api.h b/ash/test/shell_test_api.h
index 54c8684..56bc96f 100644
--- a/ash/test/shell_test_api.h
+++ b/ash/test/shell_test_api.h
@@ -8,7 +8,7 @@
 #include "base/macros.h"
 
 namespace app_list {
-class AppListShower;
+class AppListPresenter;
 }
 
 namespace ash {
@@ -38,7 +38,7 @@
   AshNativeCursorManager* ash_native_cursor_manager();
   ShelfModel* shelf_model();
   DragDropController* drag_drop_controller();
-  app_list::AppListShower* app_list_shower();
+  app_list::AppListPresenter* app_list_presenter();
   MaximizeModeWindowManager* maximize_mode_window_manager();
   void DisableDisplayAnimator();
 
diff --git a/ash/test/test_screenshot_delegate.cc b/ash/test/test_screenshot_delegate.cc
index 7ade6ba..a5d86ae 100644
--- a/ash/test/test_screenshot_delegate.cc
+++ b/ash/test/test_screenshot_delegate.cc
@@ -10,6 +10,7 @@
 TestScreenshotDelegate::TestScreenshotDelegate()
     : handle_take_screenshot_count_(0),
       handle_take_partial_screenshot_count_(0),
+      handle_take_window_screenshot_count_(0),
       can_take_screenshot_(true) {
 }
 
@@ -26,6 +27,10 @@
   last_rect_ = rect;
 }
 
+void TestScreenshotDelegate::HandleTakeWindowScreenshot(aura::Window* window) {
+  handle_take_window_screenshot_count_++;
+}
+
 bool TestScreenshotDelegate::CanTakeScreenshot() {
   return can_take_screenshot_;
 }
diff --git a/ash/test/test_screenshot_delegate.h b/ash/test/test_screenshot_delegate.h
index 2ada0ab..6b94940 100644
--- a/ash/test/test_screenshot_delegate.h
+++ b/ash/test/test_screenshot_delegate.h
@@ -22,6 +22,7 @@
   void HandleTakeScreenshotForAllRootWindows() override;
   void HandleTakePartialScreenshot(aura::Window* window,
                                    const gfx::Rect& rect) override;
+  void HandleTakeWindowScreenshot(aura::Window* window) override;
   bool CanTakeScreenshot() override;
 
   int handle_take_screenshot_count() const {
@@ -32,6 +33,10 @@
     return handle_take_partial_screenshot_count_;
   }
 
+  int handle_take_window_screenshot_count() const {
+    return handle_take_window_screenshot_count_;
+  }
+
   const gfx::Rect& last_rect() const { return last_rect_; }
 
   void set_can_take_screenshot(bool can_take_screenshot) {
@@ -41,6 +46,7 @@
  private:
   int handle_take_screenshot_count_;
   int handle_take_partial_screenshot_count_;
+  int handle_take_window_screenshot_count_;
   gfx::Rect last_rect_;
   bool can_take_screenshot_;
 
diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc
index ca44f6ed..90100e3 100644
--- a/ash/test/test_shell_delegate.cc
+++ b/ash/test/test_shell_delegate.cc
@@ -6,8 +6,8 @@
 
 #include <limits>
 
-#include "ash/app_list/app_list_shower_delegate.h"
-#include "ash/app_list/app_list_shower_delegate_factory.h"
+#include "ash/app_list/app_list_presenter_delegate.h"
+#include "ash/app_list/app_list_presenter_delegate_factory.h"
 #include "ash/app_list/app_list_view_delegate_factory.h"
 #include "ash/default_accessibility_delegate.h"
 #include "ash/gpu_support_stub.h"
@@ -25,7 +25,7 @@
 #include "ash/wm/window_util.h"
 #include "base/logging.h"
 #include "base/memory/ptr_util.h"
-#include "ui/app_list/shower/app_list_shower_impl.h"
+#include "ui/app_list/presenter/app_list_presenter_impl.h"
 #include "ui/app_list/test/app_list_test_view_delegate.h"
 #include "ui/aura/window.h"
 #include "ui/gfx/image/image.h"
@@ -105,7 +105,7 @@
     : num_exit_requests_(0),
       multi_profiles_enabled_(false),
       force_maximize_on_first_run_(false),
-      app_list_shower_delegate_factory_(new AppListShowerDelegateFactory(
+      app_list_presenter_delegate_factory_(new AppListPresenterDelegateFactory(
           base::WrapUnique(new AppListViewDelegateFactoryImpl))) {}
 
 TestShellDelegate::~TestShellDelegate() {
@@ -167,12 +167,12 @@
 
 void TestShellDelegate::OpenUrl(const GURL& url) {}
 
-app_list::AppListShower* TestShellDelegate::GetAppListShower() {
-  if (!app_list_shower_) {
-    app_list_shower_.reset(new app_list::AppListShowerImpl(
-        app_list_shower_delegate_factory_.get()));
+app_list::AppListPresenter* TestShellDelegate::GetAppListPresenter() {
+  if (!app_list_presenter_) {
+    app_list_presenter_.reset(new app_list::AppListPresenterImpl(
+        app_list_presenter_delegate_factory_.get()));
   }
-  return app_list_shower_.get();
+  return app_list_presenter_.get();
 }
 
 ShelfDelegate* TestShellDelegate::CreateShelfDelegate(ShelfModel* model) {
diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h
index e43cef6..2c3a633 100644
--- a/ash/test/test_shell_delegate.h
+++ b/ash/test/test_shell_delegate.h
@@ -16,8 +16,8 @@
 #include "base/observer_list.h"
 
 namespace app_list {
-class AppListShowerDelegateFactory;
-class AppListShowerImpl;
+class AppListPresenterDelegateFactory;
+class AppListPresenterImpl;
 }
 
 namespace keyboard {
@@ -53,7 +53,7 @@
   void RemoveVirtualKeyboardStateObserver(
       VirtualKeyboardStateObserver* observer) override;
   void OpenUrl(const GURL& url) override;
-  app_list::AppListShower* GetAppListShower() override;
+  app_list::AppListPresenter* GetAppListPresenter() override;
   ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override;
   SystemTrayDelegate* CreateSystemTrayDelegate() override;
   UserWallpaperDelegate* CreateUserWallpaperDelegate() override;
@@ -69,8 +69,8 @@
 
   int num_exit_requests() const { return num_exit_requests_; }
 
-  app_list::AppListShowerImpl* app_list_shower() {
-    return app_list_shower_.get();
+  app_list::AppListPresenterImpl* app_list_presenter() {
+    return app_list_presenter_.get();
   }
 
   void SetMediaCaptureState(MediaCaptureState state);
@@ -83,9 +83,9 @@
   bool multi_profiles_enabled_;
   bool force_maximize_on_first_run_;
 
-  std::unique_ptr<app_list::AppListShowerDelegateFactory>
-      app_list_shower_delegate_factory_;
-  std::unique_ptr<app_list::AppListShowerImpl> app_list_shower_;
+  std::unique_ptr<app_list::AppListPresenterDelegateFactory>
+      app_list_presenter_delegate_factory_;
+  std::unique_ptr<app_list::AppListPresenterImpl> app_list_presenter_;
 
   base::ObserverList<ash::VirtualKeyboardStateObserver>
       keyboard_state_observer_list_;
diff --git a/ash/wm/aura/aura_layout_manager_adapter.cc b/ash/wm/aura/aura_layout_manager_adapter.cc
new file mode 100644
index 0000000..3bc0bc8
--- /dev/null
+++ b/ash/wm/aura/aura_layout_manager_adapter.cc
@@ -0,0 +1,51 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/wm/aura/aura_layout_manager_adapter.h"
+
+#include "ash/wm/aura/wm_window_aura.h"
+#include "ash/wm/common/wm_layout_manager.h"
+
+namespace ash {
+namespace wm {
+
+AuraLayoutManagerAdapter::AuraLayoutManagerAdapter(
+    std::unique_ptr<WmLayoutManager> wm_layout_manager)
+    : wm_layout_manager_(std::move(wm_layout_manager)) {}
+
+AuraLayoutManagerAdapter::~AuraLayoutManagerAdapter() {}
+
+void AuraLayoutManagerAdapter::OnWindowResized() {
+  wm_layout_manager_->OnWindowResized();
+}
+
+void AuraLayoutManagerAdapter::OnWindowAddedToLayout(aura::Window* child) {
+  wm_layout_manager_->OnWindowAddedToLayout(WmWindowAura::Get(child));
+}
+
+void AuraLayoutManagerAdapter::OnWillRemoveWindowFromLayout(
+    aura::Window* child) {
+  wm_layout_manager_->OnWillRemoveWindowFromLayout(WmWindowAura::Get(child));
+}
+
+void AuraLayoutManagerAdapter::OnWindowRemovedFromLayout(aura::Window* child) {
+  wm_layout_manager_->OnWindowRemovedFromLayout(WmWindowAura::Get(child));
+}
+
+void AuraLayoutManagerAdapter::OnChildWindowVisibilityChanged(
+    aura::Window* child,
+    bool visible) {
+  wm_layout_manager_->OnChildWindowVisibilityChanged(WmWindowAura::Get(child),
+                                                     visible);
+}
+
+void AuraLayoutManagerAdapter::SetChildBounds(
+    aura::Window* child,
+    const gfx::Rect& requested_bounds) {
+  wm_layout_manager_->SetChildBounds(WmWindowAura::Get(child),
+                                     requested_bounds);
+}
+
+}  // namespace wm
+}  // namespace ash
diff --git a/ash/wm/aura/aura_layout_manager_adapter.h b/ash/wm/aura/aura_layout_manager_adapter.h
new file mode 100644
index 0000000..88a0514
--- /dev/null
+++ b/ash/wm/aura/aura_layout_manager_adapter.h
@@ -0,0 +1,47 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_WM_AURA_AURA_LAYOUT_MANAGER_ADAPTER_H_
+#define ASH_WM_AURA_AURA_LAYOUT_MANAGER_ADAPTER_H_
+
+#include <memory>
+
+#include "ash/ash_export.h"
+#include "base/macros.h"
+#include "ui/aura/layout_manager.h"
+
+namespace ash {
+namespace wm {
+
+class WmLayoutManager;
+
+// AuraLayoutManagerAdapter is an aura::LayoutManager that calls to
+// WmLayoutManager. Use it when you have a WmLayoutManager you want to use
+// with an aura::Window.
+class ASH_EXPORT AuraLayoutManagerAdapter : public aura::LayoutManager {
+ public:
+  explicit AuraLayoutManagerAdapter(
+      std::unique_ptr<WmLayoutManager> wm_layout_manager);
+  ~AuraLayoutManagerAdapter() override;
+
+  // aura::LayoutManager:
+  void OnWindowResized() override;
+  void OnWindowAddedToLayout(aura::Window* child) override;
+  void OnWillRemoveWindowFromLayout(aura::Window* child) override;
+  void OnWindowRemovedFromLayout(aura::Window* child) override;
+  void OnChildWindowVisibilityChanged(aura::Window* child,
+                                      bool visible) override;
+  void SetChildBounds(aura::Window* child,
+                      const gfx::Rect& requested_bounds) override;
+
+ private:
+  std::unique_ptr<WmLayoutManager> wm_layout_manager_;
+
+  DISALLOW_COPY_AND_ASSIGN(AuraLayoutManagerAdapter);
+};
+
+}  // namespace wm
+}  // namespace ash
+
+#endif  // ASH_WM_AURA_AURA_LAYOUT_MANAGER_ADAPTER_H_
diff --git a/ash/wm/common/wm_event.h b/ash/wm/common/wm_event.h
index f9a18b42..642160b 100644
--- a/ash/wm/common/wm_event.h
+++ b/ash/wm/common/wm_event.h
@@ -6,7 +6,7 @@
 #define ASH_WM_COMMON_WM_EVENT_H_
 
 #include "ash/ash_export.h"
-#include "ash/wm/wm_types.h"
+#include "ash/wm/common/wm_types.h"
 #include "base/macros.h"
 #include "ui/gfx/geometry/rect.h"
 
diff --git a/ash/wm/common/wm_layout_manager.h b/ash/wm/common/wm_layout_manager.h
new file mode 100644
index 0000000..d8be091f
--- /dev/null
+++ b/ash/wm/common/wm_layout_manager.h
@@ -0,0 +1,57 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_WM_COMMON_WM_LAYOUT_MANAGER_H_
+#define ASH_WM_COMMON_WM_LAYOUT_MANAGER_H_
+
+#include "ash/ash_export.h"
+
+namespace gfx {
+class Rect;
+}
+
+namespace ash {
+namespace wm {
+
+class WmWindow;
+
+// Used to position the child WmWindows of a WmWindow. WmLayoutManager is called
+// at key points in a WmWindows life cycle thats allow sthe WmLayoutManager to
+// position or change child WmWindows.
+class ASH_EXPORT WmLayoutManager {
+ public:
+  virtual ~WmLayoutManager() {}
+
+  // Invoked when the window the WmLayoutManager is associated with is resized.
+  virtual void OnWindowResized() = 0;
+
+  // Invoked when a window is added to the window the WmLayoutManager is
+  // associated with.
+  virtual void OnWindowAddedToLayout(WmWindow* child) = 0;
+
+  // Invoked prior to removing |child|.
+  virtual void OnWillRemoveWindowFromLayout(WmWindow* child) = 0;
+
+  // Invoked after removing |child|.
+  virtual void OnWindowRemovedFromLayout(WmWindow* child) = 0;
+
+  // Invoked when SetVisible() is invoked on |child|. |visible| is the value
+  // supplied to SetVisible(). If |visible| is true, child->IsVisible() may
+  // still return false. See description in aura::Window::IsVisible() for
+  // details.
+  virtual void OnChildWindowVisibilityChanged(WmWindow* child,
+                                              bool visibile) = 0;
+
+  // Invoked when WmWindow::SetBounds() is called on |child|. This allows the
+  // WmLayoutManager to modify the bounds as appropriate before processing the
+  // request, including ignoring the request. Implementation must call
+  // SetChildBoundsDirect() so that an infinite loop does not result.
+  virtual void SetChildBounds(WmWindow* child,
+                              const gfx::Rect& requested_bounds) = 0;
+};
+
+}  // namespace wm
+}  // namespace ash
+
+#endif  // ASH_WM_COMMON_WM_LAYOUT_MANAGER_H_
diff --git a/ash/wm/wm_types.cc b/ash/wm/common/wm_types.cc
similarity index 94%
rename from ash/wm/wm_types.cc
rename to ash/wm/common/wm_types.cc
index 6677faf..b7ea734 100644
--- a/ash/wm/wm_types.cc
+++ b/ash/wm/common/wm_types.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 "ash/wm/wm_types.h"
+#include "ash/wm/common/wm_types.h"
 
 #include "base/logging.h"
 
@@ -47,7 +47,7 @@
 
 bool IsMaximizedOrFullscreenWindowStateType(WindowStateType type) {
   return type == WINDOW_STATE_TYPE_MAXIMIZED ||
-      type == WINDOW_STATE_TYPE_FULLSCREEN;
+         type == WINDOW_STATE_TYPE_FULLSCREEN;
 }
 
 }  // namespace wm
diff --git a/ash/wm/wm_types.h b/ash/wm/common/wm_types.h
similarity index 94%
rename from ash/wm/wm_types.h
rename to ash/wm/common/wm_types.h
index f5f0551..8ad694e1 100644
--- a/ash/wm/wm_types.h
+++ b/ash/wm/common/wm_types.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef ASH_WM_WM_TYPES_H_
-#define ASH_WM_WM_TYPES_H_
+#ifndef ASH_WM_COMMON_WM_TYPES_H_
+#define ASH_WM_COMMON_WM_TYPES_H_
 
 #include "ash/ash_export.h"
 #include "ui/base/ui_base_types.h"
@@ -57,4 +57,4 @@
 }  // namespace wm
 }  // namespace ash
 
-#endif  // ASH_WM_WM_TYPES_H_
+#endif  // ASH_WM_COMMON_WM_TYPES_H_
diff --git a/ash/wm/drag_details.h b/ash/wm/drag_details.h
index 60e6d116..eb52bd5a 100644
--- a/ash/wm/drag_details.h
+++ b/ash/wm/drag_details.h
@@ -6,7 +6,7 @@
 #define ASH_WM_DRAG_DETAILS_H_
 
 #include "ash/ash_export.h"
-#include "ash/wm/wm_types.h"
+#include "ash/wm/common/wm_types.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/wm/public/window_move_client.h"
 
diff --git a/ash/wm/lock_layout_manager.h b/ash/wm/lock_layout_manager.h
index 65609b2d..bbc6f37 100644
--- a/ash/wm/lock_layout_manager.h
+++ b/ash/wm/lock_layout_manager.h
@@ -8,7 +8,7 @@
 #include "ash/ash_export.h"
 #include "ash/shell_delegate.h"
 #include "ash/snap_to_pixel_layout_manager.h"
-#include "ash/wm/wm_types.h"
+#include "ash/wm/common/wm_types.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "ui/aura/layout_manager.h"
diff --git a/ash/wm/toplevel_window_event_handler.h b/ash/wm/toplevel_window_event_handler.h
index eef8c1e9..bd04902e 100644
--- a/ash/wm/toplevel_window_event_handler.h
+++ b/ash/wm/toplevel_window_event_handler.h
@@ -10,7 +10,7 @@
 
 #include "ash/ash_export.h"
 #include "ash/display/window_tree_host_manager.h"
-#include "ash/wm/wm_types.h"
+#include "ash/wm/common/wm_types.h"
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
diff --git a/ash/wm/window_state.h b/ash/wm/window_state.h
index cac6e54..acc0b0e 100644
--- a/ash/wm/window_state.h
+++ b/ash/wm/window_state.h
@@ -9,8 +9,8 @@
 
 #include "ash/ash_export.h"
 #include "ash/wm/aura/wm_window_aura.h"
+#include "ash/wm/common/wm_types.h"
 #include "ash/wm/drag_details.h"
-#include "ash/wm/wm_types.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/observer_list.h"
diff --git a/ash/wm/window_state_observer.h b/ash/wm/window_state_observer.h
index 0191017..e381a8c 100644
--- a/ash/wm/window_state_observer.h
+++ b/ash/wm/window_state_observer.h
@@ -6,7 +6,7 @@
 #define ASH_WM_WINDOW_STATE_OBSERVER_H_
 
 #include "ash/ash_export.h"
-#include "ash/wm/wm_types.h"
+#include "ash/wm/common/wm_types.h"
 
 namespace ash {
 namespace wm {
diff --git a/ash/wm/workspace/workspace_layout_manager.h b/ash/wm/workspace/workspace_layout_manager.h
index cfe5034..b5881a5 100644
--- a/ash/wm/workspace/workspace_layout_manager.h
+++ b/ash/wm/workspace/workspace_layout_manager.h
@@ -10,8 +10,8 @@
 
 #include "ash/ash_export.h"
 #include "ash/shell_observer.h"
+#include "ash/wm/common/wm_types.h"
 #include "ash/wm/window_state_observer.h"
-#include "ash/wm/wm_types.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "ui/aura/layout_manager.h"
diff --git a/ash/wm/workspace/workspace_layout_manager_backdrop_delegate.h b/ash/wm/workspace/workspace_layout_manager_backdrop_delegate.h
index c994a1c..1c63eef 100644
--- a/ash/wm/workspace/workspace_layout_manager_backdrop_delegate.h
+++ b/ash/wm/workspace/workspace_layout_manager_backdrop_delegate.h
@@ -6,7 +6,7 @@
 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_BACKDROP_DELEGATE_H_
 
 #include "ash/ash_export.h"
-#include "ash/wm/wm_types.h"
+#include "ash/wm/common/wm_types.h"
 
 namespace aura {
 class Window;
diff --git a/base/BUILD.gn b/base/BUILD.gn
index b810399..8bec3f9 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -2031,7 +2031,8 @@
     if (is_win) {
       data += [ "$root_out_dir/base_unittests.exe.pdb" ]
     } else if (is_mac) {
-      data += [ "$root_out_dir/base_unittests.dSYM/" ]
+      # TODO(crbug.com/330301): make this conditional on mac_strip_release.
+      # data += [ "$root_out_dir/base_unittests.dSYM/" ]
     }
   }
 }
diff --git a/base/message_loop/message_loop_unittest.cc b/base/message_loop/message_loop_unittest.cc
index da7cad0..e0e46e2202 100644
--- a/base/message_loop/message_loop_unittest.cc
+++ b/base/message_loop/message_loop_unittest.cc
@@ -583,9 +583,6 @@
 RUN_MESSAGE_LOOP_TESTS(IO, &TypeIOMessagePumpFactory);
 
 #if defined(OS_WIN)
-// Additional set of tests for GPU version of UI message loop.
-RUN_MESSAGE_LOOP_TESTS(GPU, &MessagePumpForGpu::CreateMessagePumpForGpu);
-
 TEST(MessageLoopTest, PostDelayedTask_SharedTimer_SubPump) {
   RunTest_PostDelayedTask_SharedTimer_SubPump();
 }
diff --git a/base/message_loop/message_pump_win.cc b/base/message_loop/message_pump_win.cc
index 03e2336e..04e76e8b 100644
--- a/base/message_loop/message_pump_win.cc
+++ b/base/message_loop/message_pump_win.cc
@@ -9,7 +9,6 @@
 
 #include <limits>
 
-#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/metrics/histogram.h"
 #include "base/strings/stringprintf.h"
@@ -36,9 +35,6 @@
 // task (a series of such messages creates a continuous task pump).
 static const int kMsgHaveWork = WM_USER + 1;
 
-// The application-defined code passed to the hook procedure.
-static const int kMessageFilterCode = 0x5001;
-
 //-----------------------------------------------------------------------------
 // MessagePumpWin public:
 
@@ -97,7 +93,7 @@
 }
 
 void MessagePumpForUI::ScheduleWork() {
-  if (InterlockedExchange(&work_state_, HAVE_WORK) != READY)
+  if (InterlockedExchange(&have_work_, 1))
     return;  // Someone else continued the pumping.
 
   // Make sure the MessagePump does some work for us.
@@ -114,9 +110,7 @@
   // common (queue is full, of about 2000 messages), so we'll do a near-graceful
   // recovery.  Nested loops are pretty transient (we think), so this will
   // probably be recoverable.
-
-  // Clarify that we didn't really insert.
-  InterlockedExchange(&work_state_, READY);
+  InterlockedExchange(&have_work_, 0);  // Clarify that we didn't really insert.
   UMA_HISTOGRAM_ENUMERATION("Chrome.MessageLoopProblem", MESSAGE_POST_ERROR,
                             MESSAGE_LOOP_PROBLEM_MAX);
 }
@@ -259,7 +253,7 @@
   // sort.
   if (!state_) {
     // Since we handled a kMsgHaveWork message, we must still update this flag.
-    InterlockedExchange(&work_state_, READY);
+    InterlockedExchange(&have_work_, 0);
     return;
   }
 
@@ -402,8 +396,8 @@
          msg.hwnd != message_hwnd_);
 
   // Since we discarded a kMsgHaveWork message, we must update the flag.
-  int old_work_state_ = InterlockedExchange(&work_state_, READY);
-  DCHECK_EQ(HAVE_WORK, old_work_state_);
+  int old_have_work = InterlockedExchange(&have_work_, 0);
+  DCHECK(old_have_work);
 
   // We don't need a special time slice if we didn't have_message to process.
   if (!have_message)
@@ -418,143 +412,6 @@
 }
 
 //-----------------------------------------------------------------------------
-// MessagePumpForGpu public:
-
-MessagePumpForGpu::MessagePumpForGpu() : thread_id_(GetCurrentThreadId()) {
-  // Init the message queue.
-  MSG msg;
-  PeekMessage(&msg, nullptr, 0, 0, PM_NOREMOVE);
-}
-
-MessagePumpForGpu::~MessagePumpForGpu() {}
-
-// static
-void MessagePumpForGpu::InitFactory() {
-  bool init_result = MessageLoop::InitMessagePumpForUIFactory(
-      &MessagePumpForGpu::CreateMessagePumpForGpu);
-  DCHECK(init_result);
-}
-
-// static
-std::unique_ptr<MessagePump> MessagePumpForGpu::CreateMessagePumpForGpu() {
-  return WrapUnique<MessagePump>(new MessagePumpForGpu);
-}
-
-void MessagePumpForGpu::ScheduleWork() {
-  if (InterlockedExchange(&work_state_, HAVE_WORK) != READY)
-    return;  // Someone else continued the pumping.
-
-  // Make sure the MessagePump does some work for us.
-  BOOL ret = PostThreadMessage(thread_id_, kMsgHaveWork, 0, 0);
-  if (ret)
-    return;  // There was room in the Window Message queue.
-
-  // See comment in MessagePumpForUI::ScheduleWork.
-  InterlockedExchange(&work_state_, READY);
-  UMA_HISTOGRAM_ENUMERATION("Chrome.MessageLoopProblem", MESSAGE_POST_ERROR,
-                            MESSAGE_LOOP_PROBLEM_MAX);
-}
-
-void MessagePumpForGpu::ScheduleDelayedWork(
-    const TimeTicks& delayed_work_time) {
-  // We know that we can't be blocked right now since this method can only be
-  // called on the same thread as Run, so we only need to update our record of
-  // how long to sleep when we do sleep.
-  delayed_work_time_ = delayed_work_time;
-}
-
-//-----------------------------------------------------------------------------
-// MessagePumpForGpu private:
-
-void MessagePumpForGpu::DoRunLoop() {
-  while (!state_->should_quit) {
-    // Indicate that the loop is handling the work.
-    // If there is a race condition between switching to WORKING state here and
-    // the producer thread setting the HAVE_WORK state after exiting the wait,
-    // the event might remain in the signalled state. That might be less than
-    // optimal but wouldn't result in failing to handle the work.
-    InterlockedExchange(&work_state_, WORKING);
-
-    bool more_work_is_plausible = state_->delegate->DoWork();
-    if (state_->should_quit)
-      break;
-
-    more_work_is_plausible |=
-        state_->delegate->DoDelayedWork(&delayed_work_time_);
-    if (state_->should_quit)
-      break;
-
-    if (more_work_is_plausible)
-      continue;
-
-    more_work_is_plausible = state_->delegate->DoIdleWork();
-    if (state_->should_quit)
-      break;
-
-    if (more_work_is_plausible)
-      continue;
-
-    // Switch that working state to READY to indicate that the loop is
-    // waiting for accepting new work if it is still in WORKING state and hasn't
-    // been signalled. Otherwise if it is in HAVE_WORK state skip the wait
-    // and proceed to handing the work.
-    if (InterlockedCompareExchange(&work_state_, READY, WORKING) == HAVE_WORK)
-      continue;  // Skip wait, more work was requested.
-
-    WaitForWork();  // Wait (sleep) until we have work to do again.
-  }
-}
-
-void MessagePumpForGpu::WaitForWork() {
-  // Wait until a message is available, up to the time needed by the timer
-  // manager to fire the next set of timers.
-  int delay;
-
-  // The while loop handles the situation where on Windows 7 and later versions
-  // MsgWaitForMultipleObjectsEx might time out slightly earlier (less than one
-  // ms) than the specified |delay|. In that situation it is more optimal to
-  // just wait again rather than waste a DoRunLoop cycle.
-  while ((delay = GetCurrentDelay()) != 0) {
-    if (delay < 0)  // Negative value means no timers waiting.
-      delay = INFINITE;
-
-    DWORD result = MsgWaitForMultipleObjectsEx(0, NULL, delay, QS_ALLINPUT, 0);
-    if (result == WAIT_OBJECT_0) {
-      // A WM_* message is available.
-      if (ProcessMessages())
-        return;
-    }
-
-    DCHECK_NE(WAIT_FAILED, result) << GetLastError();
-  }
-}
-
-bool MessagePumpForGpu::ProcessMessages() {
-  MSG msg;
-  bool have_work = false;
-  while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) {
-    if (msg.message == WM_QUIT) {
-      // Repost the QUIT message so that it will be retrieved by the primary
-      // GetMessage() loop.
-      state_->should_quit = true;
-      PostQuitMessage(static_cast<int>(msg.wParam));
-      return true;
-    }
-
-    if (msg.hwnd == nullptr && msg.message == kMsgHaveWork) {
-      have_work = true;
-    } else {
-      if (!CallMsgFilter(const_cast<MSG*>(&msg), kMessageFilterCode)) {
-        TranslateMessage(&msg);
-        DispatchMessage(&msg);
-      }
-    }
-  }
-
-  return have_work;
-}
-
-//-----------------------------------------------------------------------------
 // MessagePumpForIO public:
 
 MessagePumpForIO::MessagePumpForIO() {
@@ -566,7 +423,7 @@
 }
 
 void MessagePumpForIO::ScheduleWork() {
-  if (InterlockedExchange(&work_state_, HAVE_WORK) != READY)
+  if (InterlockedExchange(&have_work_, 1))
     return;  // Someone else continued the pumping.
 
   // Make sure the MessagePump does some work for us.
@@ -577,7 +434,7 @@
     return;  // Post worked perfectly.
 
   // See comment in MessagePumpForUI::ScheduleWork() for this error recovery.
-  InterlockedExchange(&work_state_, READY);  // Clarify that we didn't succeed.
+  InterlockedExchange(&have_work_, 0);  // Clarify that we didn't succeed.
   UMA_HISTOGRAM_ENUMERATION("Chrome.MessageLoopProblem", COMPLETION_POST_ERROR,
                             MESSAGE_LOOP_PROBLEM_MAX);
 }
@@ -722,7 +579,7 @@
       reinterpret_cast<void*>(this) == reinterpret_cast<void*>(item.handler)) {
     // This is our internal completion.
     DCHECK(!item.bytes_transfered);
-    InterlockedExchange(&work_state_, READY);
+    InterlockedExchange(&have_work_, 0);
     return true;
   }
   return false;
diff --git a/base/message_loop/message_pump_win.h b/base/message_loop/message_pump_win.h
index ac9f68a..6f4b699 100644
--- a/base/message_loop/message_pump_win.h
+++ b/base/message_loop/message_pump_win.h
@@ -8,7 +8,6 @@
 #include <windows.h>
 
 #include <list>
-#include <memory>
 
 #include "base/base_export.h"
 #include "base/message_loop/message_pump.h"
@@ -23,7 +22,7 @@
 // controlling the lifetime of the message pump.
 class BASE_EXPORT MessagePumpWin : public MessagePump {
  public:
-  MessagePumpWin() : work_state_(READY), state_(NULL) {}
+  MessagePumpWin() : have_work_(0), state_(NULL) {}
 
   // MessagePump methods:
   void Run(Delegate* delegate) override;
@@ -40,23 +39,16 @@
     int run_depth;
   };
 
-  // State used with |work_state_| variable.
-  enum WorkState {
-    READY = 0,      // Ready to accept new work.
-    HAVE_WORK = 1,  // New work has been signalled.
-    WORKING = 2     // Handling the work.
-  };
-
   virtual void DoRunLoop() = 0;
   int GetCurrentDelay() const;
 
   // The time at which delayed work should run.
   TimeTicks delayed_work_time_;
 
-  // A value used to indicate if there is a kMsgDoWork message pending
+  // A boolean value used to indicate if there is a kMsgDoWork message pending
   // in the Windows Message queue.  There is at most one such message, and it
   // can drive execution of tasks when a native message pump is running.
-  LONG work_state_;
+  LONG have_work_;
 
   // State for the current invocation of Run.
   RunState* state_;
@@ -112,6 +104,9 @@
 //
 class BASE_EXPORT MessagePumpForUI : public MessagePumpWin {
  public:
+  // The application-defined code passed to the hook procedure.
+  static const int kMessageFilterCode = 0x5001;
+
   MessagePumpForUI();
   ~MessagePumpForUI() override;
 
@@ -142,35 +137,6 @@
 };
 
 //-----------------------------------------------------------------------------
-// MessagePumpForGpu is a simplified version of UI message pump that is
-// optimized for the GPU process. Unlike MessagePumpForUI it doesn't have a
-// hidden window and doesn't handle a situation where a native message pump
-// might take over message processing.
-//
-class BASE_EXPORT MessagePumpForGpu : public MessagePumpWin {
- public:
-  MessagePumpForGpu();
-  ~MessagePumpForGpu() override;
-
-  // Factory methods.
-  static void InitFactory();
-  static std::unique_ptr<MessagePump> CreateMessagePumpForGpu();
-
-  // MessagePump methods:
-  void ScheduleWork() override;
-  void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override;
-
- private:
-  // MessagePumpWin methods:
-  void DoRunLoop() override;
-
-  void WaitForWork();
-  bool ProcessMessages();
-
-  const DWORD thread_id_;
-};
-
-//-----------------------------------------------------------------------------
 // MessagePumpForIO extends MessagePumpWin with methods that are particular to a
 // MessageLoop instantiated with TYPE_IO. This version of MessagePump does not
 // deal with Windows mesagges, and instead has a Run loop based on Completion
diff --git a/base/metrics/field_trial.cc b/base/metrics/field_trial.cc
index 78862fa..4d4fdce 100644
--- a/base/metrics/field_trial.cc
+++ b/base/metrics/field_trial.cc
@@ -7,6 +7,7 @@
 #include <algorithm>
 
 #include "base/build_time.h"
+#include "base/lazy_instance.h"
 #include "base/logging.h"
 #include "base/rand_util.h"
 #include "base/strings/string_util.h"
@@ -115,6 +116,17 @@
   }
 }
 
+// A second copy of FieldTrialList::seen_states_ that is meant to outlive the
+// FieldTrialList object to determine if the inconsistency happens because there
+// might be multiple FieldTrialList objects.
+// TODO(asvitkine): Remove when crbug.com/359406 is resolved.
+base::LazyInstance<std::map<std::string, std::string>>::Leaky g_seen_states =
+    LAZY_INSTANCE_INITIALIZER;
+
+// Tracks whether |g_seen_states| is used. Defaults to false, because unit tests
+// will create multiple FieldTrialList instances.
+bool g_use_global_check_states = false;
+
 }  // namespace
 
 // statics
@@ -338,6 +350,12 @@
 }
 
 // static
+void FieldTrialList::EnableGlobalStateChecks() {
+  CHECK(!g_use_global_check_states);
+  g_use_global_check_states = true;
+}
+
+// static
 FieldTrial* FieldTrialList::FactoryGetFieldTrial(
     const std::string& trial_name,
     FieldTrial::Probability total_probability,
@@ -489,8 +507,13 @@
     trial.group_name.AppendToString(output);
     output->append(1, kPersistentStringSeparator);
 
+    // TODO(asvitkine): Remove these when http://crbug.com/359406 is fixed.
     CheckTrialGroup(trial.trial_name.as_string(), trial.group_name.as_string(),
                     &global_->seen_states_);
+    if (g_use_global_check_states) {
+      CheckTrialGroup(trial.trial_name.as_string(),
+                      trial.group_name.as_string(), &g_seen_states.Get());
+    }
   }
 }
 
@@ -615,10 +638,15 @@
   if (!field_trial->enable_field_trial_)
     return;
 
+  // TODO(asvitkine): Remove this block when http://crbug.com/359406 is fixed.
   {
     AutoLock auto_lock(global_->lock_);
     CheckTrialGroup(field_trial->trial_name(),
                     field_trial->group_name_internal(), &global_->seen_states_);
+    if (g_use_global_check_states) {
+      CheckTrialGroup(field_trial->trial_name(),
+                      field_trial->group_name_internal(), &g_seen_states.Get());
+    }
   }
   global_->observer_list_->Notify(
       FROM_HERE, &FieldTrialList::Observer::OnFieldTrialGroupFinalized,
diff --git a/base/metrics/field_trial.h b/base/metrics/field_trial.h
index ef35385..a937683 100644
--- a/base/metrics/field_trial.h
+++ b/base/metrics/field_trial.h
@@ -347,6 +347,14 @@
   // Destructor Release()'s references to all registered FieldTrial instances.
   ~FieldTrialList();
 
+  // TODO(asvitkine): Temporary function to diagnose http://crbug.com/359406.
+  // Remove when that bug is fixed. This enables using a global map that checks
+  // the state of field trials between possible FieldTrialList instances. If
+  // enabled, a CHECK will be hit if it's seen that a field trial is given a
+  // different state then what was specified to a renderer process launch
+  // command line.
+  static void EnableGlobalStateChecks();
+
   // Get a FieldTrial instance from the factory.
   //
   // |name| is used to register the instance with the FieldTrialList class,
diff --git a/base/task_scheduler/scheduler_thread_pool.cc b/base/task_scheduler/scheduler_thread_pool.cc
index cc62728..c43b1d7 100644
--- a/base/task_scheduler/scheduler_thread_pool.cc
+++ b/base/task_scheduler/scheduler_thread_pool.cc
@@ -11,6 +11,7 @@
 #include "base/lazy_instance.h"
 #include "base/logging.h"
 #include "base/memory/ptr_util.h"
+#include "base/sequenced_task_runner.h"
 #include "base/task_scheduler/utils.h"
 #include "base/threading/thread_local.h"
 
@@ -58,6 +59,50 @@
   DISALLOW_COPY_AND_ASSIGN(SchedulerParallelTaskRunner);
 };
 
+// A task runner that runs tasks with the SEQUENCED ExecutionMode.
+class SchedulerSequencedTaskRunner : public SequencedTaskRunner {
+ public:
+  // Constructs a SchedulerParallelTaskRunner which can be used to post tasks so
+  // long as |executor| is alive.
+  // TODO(robliao): Find a concrete way to manage |executor|'s memory.
+  SchedulerSequencedTaskRunner(const TaskTraits& traits,
+                               TaskTracker* task_tracker,
+                               SchedulerTaskExecutor* executor)
+      : traits_(traits), task_tracker_(task_tracker), executor_(executor) {}
+
+  // SequencedTaskRunner:
+  bool PostDelayedTask(const tracked_objects::Location& from_here,
+                       const Closure& closure,
+                       TimeDelta delay) override {
+    // Post the task as part of |sequence|.
+    return PostTaskToExecutor(from_here, closure, traits_, delay, sequence_,
+                              executor_, task_tracker_);
+  }
+
+  bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
+                                  const Closure& closure,
+                                  base::TimeDelta delay) override {
+    // Tasks are never nested within the task scheduler.
+    return PostDelayedTask(from_here, closure, delay);
+  }
+
+  bool RunsTasksOnCurrentThread() const override {
+    return tls_current_thread_pool.Get().Get() == executor_;
+  }
+
+ private:
+  ~SchedulerSequencedTaskRunner() override = default;
+
+  // Sequence for all Tasks posted through this TaskRunner.
+  const scoped_refptr<Sequence> sequence_ = new Sequence;
+
+  const TaskTraits traits_;
+  TaskTracker* const task_tracker_;
+  SchedulerTaskExecutor* const executor_;
+
+  DISALLOW_COPY_AND_ASSIGN(SchedulerSequencedTaskRunner);
+};
+
 }  // namespace
 
 class SchedulerThreadPool::SchedulerWorkerThreadDelegateImpl
@@ -108,8 +153,11 @@
           new SchedulerParallelTaskRunner(traits, task_tracker_, this));
 
     case ExecutionMode::SEQUENCED:
+      return make_scoped_refptr(
+          new SchedulerSequencedTaskRunner(traits, task_tracker_, this));
+
     case ExecutionMode::SINGLE_THREADED:
-      // TODO(fdoray): Support SEQUENCED and SINGLE_THREADED TaskRunners.
+      // TODO(fdoray): Support SINGLE_THREADED TaskRunners.
       NOTREACHED();
       return nullptr;
   }
diff --git a/base/task_scheduler/scheduler_thread_pool_unittest.cc b/base/task_scheduler/scheduler_thread_pool_unittest.cc
index f390f1e..462c5b9 100644
--- a/base/task_scheduler/scheduler_thread_pool_unittest.cc
+++ b/base/task_scheduler/scheduler_thread_pool_unittest.cc
@@ -34,7 +34,8 @@
 const size_t kNumThreadsPostingTasks = 4;
 const size_t kNumTasksPostedPerThread = 150;
 
-class TaskSchedulerThreadPoolTest : public testing::Test {
+class TaskSchedulerThreadPoolTest
+    : public testing::TestWithParam<ExecutionMode> {
  protected:
   TaskSchedulerThreadPoolTest() = default;
 
@@ -70,19 +71,23 @@
 
 class TaskFactory {
  public:
-  TaskFactory() : cv_(&lock_) {}
+  // Constructs a TaskFactory that posts tasks with |execution_mode| to
+  // |thread_pool|.
+  TaskFactory(SchedulerThreadPool* thread_pool, ExecutionMode execution_mode)
+      : cv_(&lock_),
+        task_runner_(thread_pool->CreateTaskRunnerWithTraits(TaskTraits(),
+                                                             execution_mode)),
+        execution_mode_(execution_mode) {}
 
-  // Posts a task through |task_runner|. If |post_nested_task| is true, the task
-  // will post a new task through |task_runner| when it runs. If |event| is set,
-  // the task will block until it is signaled.
-  void PostTestTask(scoped_refptr<TaskRunner> task_runner,
-                    bool post_nested_task,
-                    WaitableEvent* event) {
+  // Posts a task through |task_runner_|. If |post_nested_task| is true, the
+  // task will post a new task when it runs. If |event| is set, the task will
+  // block until it is signaled.
+  void PostTestTask(bool post_nested_task, WaitableEvent* event) {
     AutoLock auto_lock(lock_);
-    EXPECT_TRUE(task_runner->PostTask(
-        FROM_HERE, Bind(&TaskFactory::RunTaskCallback, Unretained(this),
-                        num_created_tasks_++, task_runner, post_nested_task,
-                        Unretained(event))));
+    EXPECT_TRUE(task_runner_->PostTask(
+        FROM_HERE,
+        Bind(&TaskFactory::RunTaskCallback, Unretained(this),
+             num_created_tasks_++, post_nested_task, Unretained(event))));
   }
 
   // Waits for all tasks posted by PostTestTask() to start running. It is not
@@ -98,19 +103,25 @@
     return ran_tasks_.size();
   }
 
+  const TaskRunner* task_runner() const { return task_runner_.get(); }
+
  private:
   void RunTaskCallback(size_t task_index,
-                       scoped_refptr<TaskRunner> task_runner,
                        bool post_nested_task,
                        WaitableEvent* event) {
     if (post_nested_task)
-      PostTestTask(task_runner, false, nullptr);
+      PostTestTask(false, nullptr);
 
-    EXPECT_TRUE(task_runner->RunsTasksOnCurrentThread());
+    EXPECT_TRUE(task_runner_->RunsTasksOnCurrentThread());
 
     {
       AutoLock auto_lock(lock_);
 
+      if (execution_mode_ == ExecutionMode::SEQUENCED &&
+          task_index != ran_tasks_.size()) {
+        ADD_FAILURE() << "A SEQUENCED task didn't run in the expected order.";
+      }
+
       if (ran_tasks_.find(task_index) != ran_tasks_.end())
         ADD_FAILURE() << "A task ran more than once.";
       ran_tasks_.insert(task_index);
@@ -128,6 +139,12 @@
   // Condition variable signaled when a task runs.
   mutable ConditionVariable cv_;
 
+  // Task runner through which this factory posts tasks.
+  const scoped_refptr<TaskRunner> task_runner_;
+
+  // Execution mode of |task_runner_|.
+  const ExecutionMode execution_mode_;
+
   // Number of tasks posted by PostTestTask().
   size_t num_created_tasks_ = 0;
 
@@ -150,10 +167,9 @@
                      bool post_nested_task)
       : SimpleThread("ThreadPostingTasks"),
         thread_pool_(thread_pool),
-        task_runner_(thread_pool_->CreateTaskRunnerWithTraits(TaskTraits(),
-                                                              execution_mode)),
         wait_for_all_threads_idle_(wait_for_all_threads_idle),
-        post_nested_task_(post_nested_task) {
+        post_nested_task_(post_nested_task),
+        factory_(thread_pool_, execution_mode) {
     DCHECK(thread_pool_);
   }
 
@@ -161,12 +177,12 @@
 
  private:
   void Run() override {
-    EXPECT_FALSE(task_runner_->RunsTasksOnCurrentThread());
+    EXPECT_FALSE(factory_.task_runner()->RunsTasksOnCurrentThread());
 
     for (size_t i = 0; i < kNumTasksPostedPerThread; ++i) {
       if (wait_for_all_threads_idle_)
         thread_pool_->WaitForAllWorkerThreadsIdleForTesting();
-      factory_.PostTestTask(task_runner_, post_nested_task_, nullptr);
+      factory_.PostTestTask(post_nested_task_, nullptr);
     }
   }
 
@@ -179,14 +195,14 @@
   DISALLOW_COPY_AND_ASSIGN(ThreadPostingTasks);
 };
 
-TEST_F(TaskSchedulerThreadPoolTest, PostParallelTasks) {
-  // Create threads to post tasks to PARALLEL TaskRunners.
+TEST_P(TaskSchedulerThreadPoolTest, PostTasks) {
+  // Create threads to post tasks.
   std::vector<std::unique_ptr<ThreadPostingTasks>> threads_posting_tasks;
   for (size_t i = 0; i < kNumThreadsPostingTasks; ++i) {
     const bool kWaitForAllThreadIdle = false;
     const bool kPostNestedTasks = false;
     threads_posting_tasks.push_back(WrapUnique(
-        new ThreadPostingTasks(thread_pool_.get(), ExecutionMode::PARALLEL,
+        new ThreadPostingTasks(thread_pool_.get(), GetParam(),
                                kWaitForAllThreadIdle, kPostNestedTasks)));
     threads_posting_tasks.back()->Start();
   }
@@ -204,16 +220,16 @@
   thread_pool_->WaitForAllWorkerThreadsIdleForTesting();
 }
 
-TEST_F(TaskSchedulerThreadPoolTest, PostParallelTasksWaitAllThreadsIdle) {
-  // Create threads to post tasks to PARALLEL TaskRunners. To verify that
-  // worker threads can sleep and be woken up when new tasks are posted, wait
-  // for all threads to become idle before posting a new task.
+TEST_P(TaskSchedulerThreadPoolTest, PostTasksWaitAllThreadsIdle) {
+  // Create threads to post tasks. To verify that worker threads can sleep and
+  // be woken up when new tasks are posted, wait for all threads to become idle
+  // before posting a new task.
   std::vector<std::unique_ptr<ThreadPostingTasks>> threads_posting_tasks;
   for (size_t i = 0; i < kNumThreadsPostingTasks; ++i) {
     const bool kWaitForAllThreadIdle = true;
     const bool kPostNestedTasks = false;
     threads_posting_tasks.push_back(WrapUnique(
-        new ThreadPostingTasks(thread_pool_.get(), ExecutionMode::PARALLEL,
+        new ThreadPostingTasks(thread_pool_.get(), GetParam(),
                                kWaitForAllThreadIdle, kPostNestedTasks)));
     threads_posting_tasks.back()->Start();
   }
@@ -231,15 +247,15 @@
   thread_pool_->WaitForAllWorkerThreadsIdleForTesting();
 }
 
-TEST_F(TaskSchedulerThreadPoolTest, NestedPostParallelTasks) {
-  // Create threads to post tasks to PARALLEL TaskRunners. Each task posted by
-  // these threads will post another task when it runs.
+TEST_P(TaskSchedulerThreadPoolTest, NestedPostTasks) {
+  // Create threads to post tasks. Each task posted by these threads will post
+  // another task when it runs.
   std::vector<std::unique_ptr<ThreadPostingTasks>> threads_posting_tasks;
   for (size_t i = 0; i < kNumThreadsPostingTasks; ++i) {
     const bool kWaitForAllThreadIdle = false;
     const bool kPostNestedTasks = true;
     threads_posting_tasks.push_back(WrapUnique(
-        new ThreadPostingTasks(thread_pool_.get(), ExecutionMode::PARALLEL,
+        new ThreadPostingTasks(thread_pool_.get(), GetParam(),
                                kWaitForAllThreadIdle, kPostNestedTasks)));
     threads_posting_tasks.back()->Start();
   }
@@ -257,51 +273,63 @@
   thread_pool_->WaitForAllWorkerThreadsIdleForTesting();
 }
 
-TEST_F(TaskSchedulerThreadPoolTest, PostParallelTasksWithOneAvailableThread) {
-  TaskFactory factory;
-
+TEST_P(TaskSchedulerThreadPoolTest, PostTasksWithOneAvailableThread) {
   // Post tasks to keep all threads busy except one until |event| is signaled.
+  // Use different factories so that tasks are added to different sequences and
+  // can run simultaneously when the execution mode is SEQUENCED.
   WaitableEvent event(true, false);
-  auto task_runner = thread_pool_->CreateTaskRunnerWithTraits(
-      TaskTraits(), ExecutionMode::PARALLEL);
-  for (size_t i = 0; i < (kNumThreadsInThreadPool - 1); ++i)
-    factory.PostTestTask(task_runner, false, &event);
-  factory.WaitForAllTasksToRun();
+  std::vector<std::unique_ptr<TaskFactory>> blocked_task_factories;
+  for (size_t i = 0; i < (kNumThreadsInThreadPool - 1); ++i) {
+    blocked_task_factories.push_back(
+        WrapUnique(new TaskFactory(thread_pool_.get(), GetParam())));
+    blocked_task_factories.back()->PostTestTask(false, &event);
+    blocked_task_factories.back()->WaitForAllTasksToRun();
+  }
 
   // Post |kNumTasksPostedPerThread| tasks that should all run despite the fact
   // that only one thread in |thread_pool_| isn't busy.
+  TaskFactory short_task_factory(thread_pool_.get(), GetParam());
   for (size_t i = 0; i < kNumTasksPostedPerThread; ++i)
-    factory.PostTestTask(task_runner, false, nullptr);
-  factory.WaitForAllTasksToRun();
+    short_task_factory.PostTestTask(false, nullptr);
+  short_task_factory.WaitForAllTasksToRun();
 
   // Release tasks waiting on |event|.
   event.Signal();
 
   // Wait until all worker threads are idle to be sure that no task accesses
-  // |factory| after it is destroyed.
+  // its TaskFactory after it is destroyed.
   thread_pool_->WaitForAllWorkerThreadsIdleForTesting();
 }
 
-TEST_F(TaskSchedulerThreadPoolTest, Saturate) {
-  TaskFactory factory;
-
-  // Verify that it is possible to have |kNumThreadsInThreadPool| tasks running
-  // simultaneously.
+TEST_P(TaskSchedulerThreadPoolTest, Saturate) {
+  // Verify that it is possible to have |kNumThreadsInThreadPool|
+  // tasks/sequences running simultaneously. Use different factories so that
+  // tasks are added to different sequences and can run simultaneously when the
+  // execution mode is SEQUENCED.
   WaitableEvent event(true, false);
-  auto task_runner = thread_pool_->CreateTaskRunnerWithTraits(
-      TaskTraits(), ExecutionMode::PARALLEL);
-  for (size_t i = 0; i < kNumThreadsInThreadPool; ++i)
-    factory.PostTestTask(task_runner, false, &event);
-  factory.WaitForAllTasksToRun();
+  std::vector<std::unique_ptr<TaskFactory>> factories;
+  for (size_t i = 0; i < kNumThreadsInThreadPool; ++i) {
+    factories.push_back(
+        WrapUnique(new TaskFactory(thread_pool_.get(), GetParam())));
+    factories.back()->PostTestTask(false, &event);
+    factories.back()->WaitForAllTasksToRun();
+  }
 
   // Release tasks waiting on |event|.
   event.Signal();
 
   // Wait until all worker threads are idle to be sure that no task accesses
-  // |factory| after it is destroyed.
+  // its TaskFactory after it is destroyed.
   thread_pool_->WaitForAllWorkerThreadsIdleForTesting();
 }
 
+INSTANTIATE_TEST_CASE_P(Parallel,
+                        TaskSchedulerThreadPoolTest,
+                        ::testing::Values(ExecutionMode::PARALLEL));
+INSTANTIATE_TEST_CASE_P(Sequenced,
+                        TaskSchedulerThreadPoolTest,
+                        ::testing::Values(ExecutionMode::SEQUENCED));
+
 }  // namespace
 }  // namespace internal
 }  // namespace base
diff --git a/base/tuple.h b/base/tuple.h
index 78dfd75..df69bf0 100644
--- a/base/tuple.h
+++ b/base/tuple.h
@@ -94,7 +94,7 @@
   using Type = IndexSequence<0,1,2,3,4,5,6,7,8,9,10,11,12>;
 };
 
-#else  // defined(WIN) && defined(_PREFAST_)
+#else  // defined(OS_WIN) && defined(_PREFAST_)
 
 template <size_t... Ns>
 struct MakeIndexSequenceImpl<0, Ns...> {
@@ -105,7 +105,7 @@
 struct MakeIndexSequenceImpl<N, Ns...>
     : MakeIndexSequenceImpl<N - 1, N - 1, Ns...> {};
 
-#endif  // defined(WIN) && defined(_PREFAST_)
+#endif  // defined(OS_WIN) && defined(_PREFAST_)
 
 template <size_t N>
 using MakeIndexSequence = typename MakeIndexSequenceImpl<N>::Type;
diff --git a/blimp/client/BUILD.gn b/blimp/client/BUILD.gn
index 9490cbd..e21efee 100644
--- a/blimp/client/BUILD.gn
+++ b/blimp/client/BUILD.gn
@@ -362,6 +362,7 @@
       "//blimp/common/proto",
       "//blimp/net:blimp_net",
       "//components/safe_json/android:safe_json_jni_headers",
+      "//components/url_formatter",
       "//skia",
       "//ui/base/ime:text_input_types",
       "//ui/gfx/geometry",
diff --git a/blimp/client/DEPS b/blimp/client/DEPS
index 82d0d9cb..aa784bd4 100644
--- a/blimp/client/DEPS
+++ b/blimp/client/DEPS
@@ -4,6 +4,7 @@
   "-cc/blink",
   "-chrome",
   "+components/safe_json",
+  "+components/url_formatter",
   "-content",
   "+gpu",
   "+jni",
diff --git a/blimp/client/app/android/toolbar.cc b/blimp/client/app/android/toolbar.cc
index 849592d..72f6f96 100644
--- a/blimp/client/app/android/toolbar.cc
+++ b/blimp/client/app/android/toolbar.cc
@@ -6,6 +6,7 @@
 
 #include "base/android/jni_string.h"
 #include "blimp/client/app/android/blimp_client_session_android.h"
+#include "components/url_formatter/url_fixer.h"
 #include "jni/Toolbar_jni.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "ui/gfx/android/java_bitmap.h"
@@ -56,8 +57,14 @@
 void Toolbar::OnUrlTextEntered(JNIEnv* env,
                                const JavaParamRef<jobject>& jobj,
                                const JavaParamRef<jstring>& text) {
-  navigation_feature_->NavigateToUrlText(
-      kDummyTabId, base::android::ConvertJavaStringToUTF8(env, text));
+  std::string url = base::android::ConvertJavaStringToUTF8(env, text);
+
+  // Build a search query, if |url| doesn't have a '.' anywhere.
+  if (url.find(".") == std::string::npos)
+    url = "http://www.google.com/search?q=" + url;
+
+  GURL fixed_url = url_formatter::FixupURL(url, std::string());
+  navigation_feature_->NavigateToUrlText(kDummyTabId, fixed_url.spec());
 }
 
 void Toolbar::OnReloadPressed(JNIEnv* env, const JavaParamRef<jobject>& jobj) {
diff --git a/blimp/client/feature/compositor/blimp_context_provider.cc b/blimp/client/feature/compositor/blimp_context_provider.cc
index bfb6e8f..a1ee746 100644
--- a/blimp/client/feature/compositor/blimp_context_provider.cc
+++ b/blimp/client/feature/compositor/blimp_context_provider.cc
@@ -10,7 +10,7 @@
 #include "gpu/command_buffer/client/gl_in_process_context.h"
 #include "gpu/command_buffer/client/gles2_implementation.h"
 #include "gpu/command_buffer/client/gles2_lib.h"
-#include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h"
+#include "gpu/skia_bindings/grcontext_for_gles2_interface.h"
 #include "third_party/skia/include/gpu/GrContext.h"
 #include "third_party/skia/include/gpu/gl/GrGLInterface.h"
 
@@ -52,8 +52,6 @@
 BlimpContextProvider::~BlimpContextProvider() {
   DCHECK(main_thread_checker_.CalledOnValidThread() ||
          context_thread_checker_.CalledOnValidThread());
-  if (gr_context_)
-    gr_context_->releaseResourcesAndAbandonContext();
 }
 
 bool BlimpContextProvider::BindToCurrentThread() {
@@ -86,22 +84,18 @@
   DCHECK(context_thread_checker_.CalledOnValidThread());
 
   if (gr_context_)
-    return gr_context_.get();
+    return gr_context_->get();
 
-  sk_sp<GrGLInterface> interface(
-      skia_bindings::CreateGLES2InterfaceBindings(ContextGL()));
+  gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(ContextGL()));
 
-  gr_context_ = skia::AdoptRef(GrContext::Create(
-      // GrContext takes ownership of |interface|.
-      kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(interface.get())));
-  return gr_context_.get();
+  return gr_context_->get();
 }
 
 void BlimpContextProvider::InvalidateGrContext(uint32_t state) {
   DCHECK(context_thread_checker_.CalledOnValidThread());
 
   if (gr_context_)
-    gr_context_->resetContext(state);
+    gr_context_->ResetContext(state);
 }
 
 void BlimpContextProvider::SetupLock() {
@@ -116,7 +110,7 @@
   DCHECK(context_thread_checker_.CalledOnValidThread());
 
   if (gr_context_)
-    gr_context_->freeGpuResources();
+    gr_context_->FreeGpuResources();
 }
 
 void BlimpContextProvider::SetLostContextCallback(
@@ -130,7 +124,7 @@
   if (!lost_context_callback_.is_null())
     lost_context_callback_.Run();
   if (gr_context_)
-    gr_context_->abandonContext();
+    gr_context_->OnLostContext();
 }
 
 }  // namespace client
diff --git a/blimp/client/feature/compositor/blimp_context_provider.h b/blimp/client/feature/compositor/blimp_context_provider.h
index ef48637..a1a01dc 100644
--- a/blimp/client/feature/compositor/blimp_context_provider.h
+++ b/blimp/client/feature/compositor/blimp_context_provider.h
@@ -17,6 +17,10 @@
 #include "skia/ext/refptr.h"
 #include "ui/gl/gl_surface.h"
 
+namespace skia_bindings {
+class GrContextForGLES2Interface;
+}  // namespace skia_bindings
+
 namespace blimp {
 namespace client {
 
@@ -55,7 +59,7 @@
 
   base::Lock context_lock_;
   std::unique_ptr<gpu::GLInProcessContext> context_;
-  skia::RefPtr<class GrContext> gr_context_;
+  std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_;
 
   cc::ContextProvider::Capabilities capabilities_;
 
diff --git a/blimp/engine/common/blimp_browser_context.cc b/blimp/engine/common/blimp_browser_context.cc
index 8e8baa81..6a2a7ec0 100644
--- a/blimp/engine/common/blimp_browser_context.cc
+++ b/blimp/engine/common/blimp_browser_context.cc
@@ -105,23 +105,6 @@
   return system_context_getter_.get();
 }
 
-net::URLRequestContextGetter* BlimpBrowserContext::GetMediaRequestContext() {
-  return resource_context_->url_request_context_getter().get();
-}
-
-net::URLRequestContextGetter*
-BlimpBrowserContext::GetMediaRequestContextForRenderProcess(
-    int renderer_child_id) {
-  return resource_context_->url_request_context_getter().get();
-}
-
-net::URLRequestContextGetter*
-BlimpBrowserContext::GetMediaRequestContextForStoragePartition(
-    const base::FilePath& partition_path,
-    bool in_memory) {
-  return resource_context_->url_request_context_getter().get();
-}
-
 content::ResourceContext* BlimpBrowserContext::GetResourceContext() {
   return resource_context_.get();
 }
@@ -178,5 +161,16 @@
   return nullptr;
 }
 
+net::URLRequestContextGetter* BlimpBrowserContext::CreateMediaRequestContext() {
+  return resource_context_->url_request_context_getter().get();
+}
+
+net::URLRequestContextGetter*
+BlimpBrowserContext::CreateMediaRequestContextForStoragePartition(
+    const base::FilePath& partition_path,
+    bool in_memory) {
+  return nullptr;
+}
+
 }  // namespace engine
 }  // namespace blimp
diff --git a/blimp/engine/common/blimp_browser_context.h b/blimp/engine/common/blimp_browser_context.h
index 5902f665..e02f831 100644
--- a/blimp/engine/common/blimp_browser_context.h
+++ b/blimp/engine/common/blimp_browser_context.h
@@ -37,12 +37,6 @@
       const base::FilePath& partition_path) override;
   base::FilePath GetPath() const override;
   bool IsOffTheRecord() const override;
-  net::URLRequestContextGetter* GetMediaRequestContext() override;
-  net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
-      int renderer_child_id) override;
-  net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
-      const base::FilePath& partition_path,
-      bool in_memory) override;
   content::ResourceContext* GetResourceContext() override;
   content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
   content::BrowserPluginGuestManager* GetGuestManager() override;
@@ -59,6 +53,10 @@
       bool in_memory,
       content::ProtocolHandlerMap* protocol_handlers,
       content::URLRequestInterceptorScopedVector request_interceptors) override;
+  net::URLRequestContextGetter* CreateMediaRequestContext() override;
+  net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
+      const base::FilePath& partition_path,
+      bool in_memory) override;
 
   // Provides a URLRequestContextGetter for system requests (e.g. metrics
   // uploads).
diff --git a/build/all.gyp b/build/all.gyp
index 95d9256..7760325c 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -473,7 +473,7 @@
           'dependencies': [
             '../ash/ash.gyp:ash_unittests',
             '../ui/app_list/app_list.gyp:app_list_unittests',
-            '../ui/app_list/shower/app_list_shower.gyp:app_list_shower_unittests',
+            '../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter_unittests',
             '../ui/aura/aura.gyp:aura_unittests',
             '../ui/compositor/compositor.gyp:compositor_unittests',
           ],
diff --git a/build/android/download_doclava.py b/build/android/download_doclava.py
new file mode 100755
index 0000000..f9f9ea2
--- /dev/null
+++ b/build/android/download_doclava.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+# 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.
+
+"""Minimal tool to download doclava from Google storage when building for
+Android."""
+
+import os
+import subprocess
+import sys
+
+
+# Its existence signifies an Android checkout.
+ANDROID_ONLY_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+                                os.pardir, os.pardir,
+                                'third_party', 'android_tools')
+
+
+def main():
+  # Some Windows bots inadvertently have third_party/android_tools installed,
+  # but are unable to run download_from_google_storage because depot_tools
+  # is not in their path, so avoid failure and bail.
+  if sys.platform == 'win32':
+    return 0
+  if not os.path.exists(ANDROID_ONLY_DIR):
+    return 0
+  subprocess.check_call([
+      'download_from_google_storage',
+      '--no_resume',
+      '--no_auth',
+      '--bucket', 'chromium-doclava',
+      '--extract',
+      '-s',
+      os.path.join('src', 'buildtools', 'android', 'doclava.tar.gz.sha1')])
+  return 0
+
+if __name__ == '__main__':
+  sys.exit(main())
diff --git a/build/config/mac/rules.gni b/build/config/mac/rules.gni
index 4e9ea68f..f8ec361 100644
--- a/build/config/mac/rules.gni
+++ b/build/config/mac/rules.gni
@@ -172,3 +172,94 @@
     deps += [ ":$_info_plist_bundle_data" ]
   }
 }
+
+# Template to create a Mac executable application bundle.
+#
+# Arguments
+#
+#     info_plist:
+#         string, path to the Info.plist file that will be used for the bundle.
+#
+#     output_name:
+#         (optional) string, name of the generated app without the
+#         .app suffix. If omitted, defaults to target_name.
+template("mac_app_bundle") {
+  assert(defined(invoker.info_plist),
+         "The Info.plist file must be specified for $target_name")
+
+  _target_name = target_name
+  _output_name = target_name
+  if (defined(invoker.output_name)) {
+    _output_name = invoker.output_name
+  }
+
+  _executable_target = target_name + "_executable"
+  _executable_bundle_data = _executable_target + "_bundle_data"
+
+  executable(_executable_target) {
+    visibility = [ ":$_executable_bundle_data" ]
+    forward_variables_from(invoker,
+                           "*",
+                           [
+                             "assert_no_deps",
+                             "data_deps",
+                             "info_plist",
+                             "output_name",
+                             "visibility",
+                           ])
+    output_name = _output_name
+    output_dir = "$target_out_dir/$_executable_target"
+  }
+
+  bundle_data(_executable_bundle_data) {
+    visibility = [ ":$_target_name" ]
+    forward_variables_from(invoker, [ "testonly" ])
+    sources = [
+      "$target_out_dir/$_executable_target/$_output_name",
+    ]
+    outputs = [
+      "{{bundle_executable_dir}}/$_output_name",
+    ]
+    public_deps = [
+      ":$_executable_target",
+    ]
+  }
+
+  _info_plist_target = target_name + "_info_plist"
+
+  # TODO(rsesek): Process Info.plist variables.
+
+  _info_plist_bundle_data = _info_plist_target + "_bundle_data"
+
+  bundle_data(_info_plist_bundle_data) {
+    forward_variables_from(invoker, [ "testonly" ])
+    visibility = [ ":$_target_name" ]
+    sources = [
+      invoker.info_plist,
+    ]
+    outputs = [
+      "{{bundle_root_dir}}/Info.plist",
+    ]
+  }
+
+  create_bundle(_target_name) {
+    forward_variables_from(invoker,
+                           [
+                             "data_deps",
+                             "deps",
+                             "public_deps",
+                             "testonly",
+                           ])
+    if (!defined(deps)) {
+      deps = []
+    }
+    deps += [
+      ":$_executable_bundle_data",
+      ":$_info_plist_bundle_data",
+    ]
+
+    bundle_root_dir = "$root_out_dir/${_output_name}.app/Contents"
+    bundle_resources_dir = "$bundle_root_dir/Resources"
+    bundle_executable_dir = "$bundle_root_dir/MacOS"
+  }
+}
diff --git a/build/gn_migration.gypi b/build/gn_migration.gypi
index 26ec59a..83cf2de 100644
--- a/build/gn_migration.gypi
+++ b/build/gn_migration.gypi
@@ -619,7 +619,7 @@
             }],
             ['use_aura==1', {
               'dependencies': [
-                '../ui/app_list/shower/app_list_shower.gyp:app_list_shower_unittests_run',
+                '../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter_unittests_run',
                 '../ui/aura/aura.gyp:aura_unittests_run',
                 '../ui/wm/wm.gyp:wm_unittests_run',
               ],
diff --git a/build/secondary/third_party/crashpad/crashpad/tools/BUILD.gn b/build/secondary/third_party/crashpad/crashpad/tools/BUILD.gn
index 94fe0b4..1ba14ed93 100644
--- a/build/secondary/third_party/crashpad/crashpad/tools/BUILD.gn
+++ b/build/secondary/third_party/crashpad/crashpad/tools/BUILD.gn
@@ -18,3 +18,19 @@
     "tool_support.h",
   ]
 }
+
+executable("crashpad_database_util") {
+  sources = [
+    "crashpad_database_util.cc",
+  ]
+
+  include_dirs = [ ".." ]
+
+  deps = [
+    ":tool_support",
+    "//base",
+    "//third_party/crashpad/crashpad/client",
+    "//third_party/crashpad/crashpad/compat",
+    "//third_party/crashpad/crashpad/util",
+  ]
+}
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
index 0b29fce..e2458e2 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -150,9 +150,10 @@
       outputs = [
         # Ignore {{output_extension}} and always use .lib, there's no reason to
         # allow targets to override this extension on Windows.
-        "{{target_out_dir}}/{{target_output_name}}.lib",
+        "{{output_dir}}/{{target_output_name}}.lib",
       ]
       default_output_extension = ".lib"
+      default_output_dir = "{{target_out_dir}}"
 
       # The use of inputs_newline is to work around a fixed per-line buffer
       # size in the linker.
@@ -160,18 +161,14 @@
     }
 
     tool("solink") {
-      dllname = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}"  # e.g. foo.dll
+      dllname = "{{output_dir}}/{{target_output_name}}{{output_extension}}"  # e.g. foo.dll
       libname = "${dllname}.lib"  # e.g. foo.dll.lib
       rspfile = "${dllname}.rsp"
 
-      link_command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile"
-
-      # TODO(brettw) support manifests
-      #manifest_command = "$python_path gyp-win-tool manifest-wrapper $env mt.exe -nologo -manifest $manifests -out:${dllname}.manifest"
-      #command = "cmd /c $link_command && $manifest_command"
-      command = link_command
+      command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile"
 
       default_output_extension = ".dll"
+      default_output_dir = "{{root_out_dir}}"
       description = "LINK(DLL) {{output}}"
       outputs = [
         dllname,
@@ -192,14 +189,13 @@
     }
 
     tool("solink_module") {
-      dllname = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}"  # e.g. foo.dll
+      dllname = "{{output_dir}}/{{target_output_name}}{{output_extension}}"  # e.g. foo.dll
       rspfile = "${dllname}.rsp"
 
-      link_command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo /DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile"
-
-      command = link_command
+      command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo /DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile"
 
       default_output_extension = ".dll"
+      default_output_dir = "{{root_out_dir}}"
       description = "LINK_MODULE(DLL) {{output}}"
       outputs = [
         dllname,
@@ -213,17 +209,13 @@
     tool("link") {
       rspfile = "{{output}}.rsp"
 
-      link_command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo /OUT:{{output}} /PDB:{{output}}.pdb @$rspfile"
-
-      # TODO(brettw) support manifests
-      #manifest_command = "$python_path gyp-win-tool manifest-wrapper $env mt.exe -nologo -manifest $manifests -out:{{output}}.manifest"
-      #command = "cmd /c $link_command && $manifest_command"
-      command = link_command
+      command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo /OUT:{{output}} /PDB:{{output}}.pdb @$rspfile"
 
       default_output_extension = ".exe"
+      default_output_dir = "{{root_out_dir}}"
       description = "LINK {{output}}"
       outputs = [
-        "{{root_out_dir}}/{{target_output_name}}{{output_extension}}",
+        "{{output_dir}}/{{target_output_name}}{{output_extension}}",
       ]
 
       # The use of inputs_newline is to work around a fixed per-line buffer
diff --git a/build/win/copy_cdb_to_output.py b/build/win/copy_cdb_to_output.py
index d41dd40a..5cb52b23 100755
--- a/build/win/copy_cdb_to_output.py
+++ b/build/win/copy_cdb_to_output.py
@@ -27,7 +27,7 @@
   return hasher.hexdigest()
 
 
-def _CopyImpl(file_name, target_dir, source_dir, verbose=True):
+def _CopyImpl(file_name, target_dir, source_dir, verbose=False):
   """Copy |source| to |target| if it doesn't already exist or if it
   needs to be updated.
   """
diff --git a/cc/test/DEPS b/cc/test/DEPS
index 87f889eb..a5dc1df 100644
--- a/cc/test/DEPS
+++ b/cc/test/DEPS
@@ -5,5 +5,5 @@
   "+gpu/command_buffer/client/gles2_lib.h",
   "+gpu/command_buffer/common/gles2_cmd_utils.h",
   "+gpu/command_buffer/service/image_factory.h",
-  "+gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h",
+  "+gpu/skia_bindings/grcontext_for_gles2_interface.h",
 ]
diff --git a/cc/test/test_in_process_context_provider.cc b/cc/test/test_in_process_context_provider.cc
index c3a02ad..490e5bb5 100644
--- a/cc/test/test_in_process_context_provider.cc
+++ b/cc/test/test_in_process_context_provider.cc
@@ -15,7 +15,7 @@
 #include "gpu/command_buffer/client/gles2_implementation.h"
 #include "gpu/command_buffer/client/gles2_lib.h"
 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
-#include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h"
+#include "gpu/skia_bindings/grcontext_for_gles2_interface.h"
 #include "third_party/khronos/GLES2/gl2.h"
 #include "third_party/khronos/GLES2/gl2ext.h"
 #include "third_party/skia/include/gpu/GrContext.h"
@@ -66,8 +66,6 @@
           (shared_context ? shared_context->context_.get() : nullptr))) {}
 
 TestInProcessContextProvider::~TestInProcessContextProvider() {
-  if (gr_context_)
-    gr_context_->releaseResourcesAndAbandonContext();
 }
 
 bool TestInProcessContextProvider::BindToCurrentThread() { return true; }
@@ -82,20 +80,15 @@
 
 class GrContext* TestInProcessContextProvider::GrContext() {
   if (gr_context_)
-    return gr_context_.get();
+    return gr_context_->get();
 
-  sk_sp<GrGLInterface> interface(
-      skia_bindings::CreateGLES2InterfaceBindings(ContextGL()));
-
-  gr_context_ = skia::AdoptRef(GrContext::Create(
-      // GrContext takes ownership of |interface|.
-      kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(interface.get())));
-  return gr_context_.get();
+  gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(ContextGL()));
+  return gr_context_->get();
 }
 
 void TestInProcessContextProvider::InvalidateGrContext(uint32_t state) {
   if (gr_context_)
-    gr_context_->resetContext(state);
+    gr_context_->ResetContext(state);
 }
 
 void TestInProcessContextProvider::SetupLock() {
@@ -126,7 +119,7 @@
 
 void TestInProcessContextProvider::DeleteCachedResources() {
   if (gr_context_)
-    gr_context_->freeGpuResources();
+    gr_context_->FreeGpuResources();
 }
 
 void TestInProcessContextProvider::SetLostContextCallback(
diff --git a/cc/test/test_in_process_context_provider.h b/cc/test/test_in_process_context_provider.h
index 3205cc2..3e5bd25 100644
--- a/cc/test/test_in_process_context_provider.h
+++ b/cc/test/test_in_process_context_provider.h
@@ -19,6 +19,10 @@
 class GLInProcessContext;
 }
 
+namespace skia_bindings {
+class GrContextForGLES2Interface;
+}
+
 namespace cc {
 
 std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext();
@@ -52,7 +56,7 @@
   TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
   TestImageFactory image_factory_;
   std::unique_ptr<gpu::GLInProcessContext> context_;
-  skia::RefPtr<class GrContext> gr_context_;
+  std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_;
   base::Lock context_lock_;
 };
 
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc
index 91dd5c7..6c0bf01 100644
--- a/cc/trees/property_tree.cc
+++ b/cc/trees/property_tree.cc
@@ -1462,6 +1462,9 @@
 
   currently_scrolling_node_id_ = data.currently_scrolling_node_id();
 
+  // TODO(khushalsagar): This should probably be removed if the copy constructor
+  // for ScrollTree copies the |layer_id_to_scroll_offset_map_| as well.
+  layer_id_to_scroll_offset_map_.clear();
   for (int i = 0; i < data.layer_id_to_scroll_offset_map_size(); ++i) {
     const proto::ScrollOffsetMapEntry entry =
         data.layer_id_to_scroll_offset_map(i);
diff --git a/cc/trees/property_tree_unittest.cc b/cc/trees/property_tree_unittest.cc
index 6cc1cf1..33bb1f7 100644
--- a/cc/trees/property_tree_unittest.cc
+++ b/cc/trees/property_tree_unittest.cc
@@ -281,6 +281,17 @@
   result.FromProtobuf(proto);
 
   EXPECT_EQ(original, result);
+
+  original.clear();
+  original.set_currently_scrolling_node(0);
+  original.SetScrollOffset(2, gfx::ScrollOffset(1, 2));
+
+  proto::PropertyTree proto2;
+  original.ToProtobuf(&proto2);
+  result = ScrollTree();
+  result.FromProtobuf(proto2);
+
+  EXPECT_EQ(original, result);
 }
 
 TEST(PropertyTreeSerializationTest, PropertyTrees) {
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index c628823..e20c709a 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -134,6 +134,8 @@
         "//chrome/browser:chrome_process_finder",
         "//chrome/chrome_watcher",
         "//chrome/chrome_watcher:client",
+        "//chrome/common:constants",
+        "//chrome/common:metrics_constants_util_win",
         "//chrome/installer/util:with_no_strings",
         "//chrome_elf",
         "//components/browser_watcher:browser_watcher_client",
@@ -495,6 +497,7 @@
     public_deps += [
       "//chrome/browser/devtools",
       "//chrome/child",
+      "//chrome/gpu",
       "//chrome/renderer",
       "//chrome/utility",
       "//content/public/child",
@@ -1012,6 +1015,7 @@
       "//chrome/browser/ui",
       "//chrome/child",
       "//chrome/common",
+      "//chrome/gpu",
       "//chrome/renderer",
       "//chrome/utility",
       "//components/safe_browsing_db:safe_browsing_db_mobile",
diff --git a/chrome/VERSION b/chrome/VERSION
index c8328ce..fd788fa 100644
--- a/chrome/VERSION
+++ b/chrome/VERSION
@@ -1,4 +1,4 @@
 MAJOR=52
 MINOR=0
-BUILD=2710
+BUILD=2711
 PATCH=0
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
index b782255..9a6ff54 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -194,6 +194,7 @@
       "//components/dom_distiller/android:dom_distiller_content_java",
       "//components/dom_distiller/android:dom_distiller_core_java",
       "//components/gcm_driver/android:gcm_driver_java",
+      "//components/gcm_driver/instance_id/android:instance_id_driver_java",
       "//components/invalidation/impl:java",
       "//components/navigation_interception/android:navigation_interception_java",
       "//components/policy/android:policy_java",
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java
index 2905511..6c8c6fb 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java
@@ -119,12 +119,7 @@
         }
 
         // Start or stop Physical Web
-        if (PhysicalWeb.shouldStartOnLaunch(application)) {
-            PhysicalWeb.startPhysicalWeb(application);
-            PhysicalWeb.uploadDeferredMetrics(application);
-        } else {
-            PhysicalWeb.stopPhysicalWeb(application);
-        }
+        PhysicalWeb.onChromeStart(application);
 
         mDeferredStartupComplete = true;
     }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/UrlConstants.java b/chrome/android/java/src/org/chromium/chrome/browser/UrlConstants.java
index d38ac24b..aafa9a0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/UrlConstants.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/UrlConstants.java
@@ -30,4 +30,6 @@
     public static final String INTERESTS_HOST = "interests";
     public static final String PHYSICAL_WEB_URL = "chrome-native://physical-web/";
     public static final String PHYSICAL_WEB_HOST = "physical-web";
+    public static final String ABOUT_BLANK = "about:blank";
+
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java
index da07d0f..6fa50928 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java
@@ -463,6 +463,9 @@
         mUpdateHost.startHiding(nextTabId, hintAtTabSelection);
         mIsHiding = true;
         mNextTabId = nextTabId;
+        for (int i = 0; i < mSceneOverlays.size(); i++) {
+            mSceneOverlays.get(i).onHideLayout();
+        }
     }
 
     /**
@@ -738,6 +741,10 @@
      * @return Whether or not the layout consumed the event.
      */
     public boolean onBackPressed() {
+        for (int i = 0; i < mSceneOverlays.size(); i++) {
+            // If the back button was consumed by any overlays, return true.
+            if (mSceneOverlays.get(i).onBackPressed()) return true;
+        }
         return false;
     }
 
@@ -1070,6 +1077,15 @@
      * @return Whether the layout is handling the model updates when a tab is creating.
      */
     public boolean handlesTabCreating() {
+        if (mLayoutTabs == null || mLayoutTabs.length != 1) return false;
+        for (int i = 0; i < mSceneOverlays.size(); i++) {
+            if (mSceneOverlays.get(i).handlesTabCreating()) {
+                // Prevent animation from happening if the overlay handles creation.
+                startHiding(mLayoutTabs[0].getId(), false);
+                doneHiding();
+                return true;
+            }
+        }
         return false;
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/StaticLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/StaticLayout.java
index 1cba75a..15ecbc9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/StaticLayout.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/StaticLayout.java
@@ -191,7 +191,7 @@
 
     @Override
     public boolean handlesTabCreating() {
-        return mHandlesTabLifecycles;
+        return super.handlesTabCreating() || mHandlesTabLifecycles;
     }
 
     @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/SceneOverlay.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/SceneOverlay.java
index 79648802..be165a9d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/SceneOverlay.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/SceneOverlay.java
@@ -62,6 +62,22 @@
     boolean updateOverlay(long time, long dt);
 
     /**
+     * Notification that the system back button was pressed.
+     * @return True if system back button press was consumed by this overlay.
+     */
+    boolean onBackPressed();
+
+    /**
+     * A notification to the overlay that the containing layout is being hidden.
+     */
+    void onHideLayout();
+
+    /**
+     * @return True if this overlay handles tab creation.
+     */
+    boolean handlesTabCreating();
+
+    /**
      * Notify the a title has changed.
      *
      * @param tabId     The id of the tab that has changed.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java
index a03e4f8e9..4995334b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java
@@ -257,6 +257,19 @@
     }
 
     @Override
+    public boolean onBackPressed() {
+        return false;
+    }
+
+    @Override
+    public void onHideLayout() {}
+
+    @Override
+    public boolean handlesTabCreating() {
+        return false;
+    }
+
+    @Override
     public void tabStateInitialized() {
         updateModelSwitcherButton();
     }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
index 89ccf368..e6ad1ca 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
@@ -362,17 +362,16 @@
                     mDownloadItem.getSystemDownloadId()));
             int statusIndex = c.getColumnIndex(DownloadManager.COLUMN_STATUS);
             int reasonIndex = c.getColumnIndex(DownloadManager.COLUMN_REASON);
-            int filenameIndex = c.getColumnIndex(DownloadManager.COLUMN_LOCAL_FILENAME);
+            int titleIndex = c.getColumnIndex(DownloadManager.COLUMN_TITLE);
             int status = DownloadManager.STATUS_FAILED;
             Boolean canResolve = false;
             if (c.moveToNext()) {
                 status = c.getInt(statusIndex);
-                String path = c.getString(filenameIndex);
-                String fileName = TextUtils.isEmpty(path) ? null : new File(path).getName();
+                String title = c.getString(titleIndex);
                 if (mDownloadInfo == null) {
                     // Chrome has been killed, reconstruct a DownloadInfo.
                     mDownloadInfo = new DownloadInfo.Builder()
-                            .setFileName(fileName)
+                            .setFileName(title)
                             .setDescription(c.getString(
                                     c.getColumnIndex(DownloadManager.COLUMN_DESCRIPTION)))
                             .setMimeType(c.getString(
@@ -383,7 +382,7 @@
                 }
                 if (status == DownloadManager.STATUS_SUCCESSFUL) {
                     mDownloadInfo = DownloadInfo.Builder.fromDownloadInfo(mDownloadInfo)
-                            .setFileName(fileName)
+                            .setFileName(title)
                             .build();
                     mDownloadItem.setDownloadInfo(mDownloadInfo);
                     canResolve = canResolveDownloadItem(mContext, mDownloadItem);
@@ -846,6 +845,7 @@
                 description = info.getFileName();
             }
             request.setDescription(description);
+            request.setTitle(info.getFileName());
             request.addRequestHeader("Cookie", info.getCookie());
             request.addRequestHeader("Referer", info.getReferer());
             request.addRequestHeader("User-Agent", info.getUserAgent());
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
index ac5bff8..30f8b42 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
@@ -135,6 +135,7 @@
         NotificationCompat.Builder builder = buildNotification(
                 android.R.drawable.stat_sys_download, fileName, null);
         builder.setOngoing(true).setProgress(100, percentage, indeterminate);
+        builder.setPriority(Notification.PRIORITY_HIGH);
         if (!indeterminate) {
             NumberFormat formatter = NumberFormat.getPercentInstance(Locale.getDefault());
             String percentText = formatter.format(percentage / 100.0);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlContainer.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlContainer.java
index eac34ed..27a28b6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlContainer.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlContainer.java
@@ -220,8 +220,7 @@
                 mTrailingTextShownWhileFocused = true;
                 mTrailingTextHiddenWhileFocused = false;
             } else {
-                assert mTrailingTextShownWhileFocused;
-                mTrailingTextHiddenWhileFocused = true;
+                mTrailingTextHiddenWhileFocused = mTrailingTextShownWhileFocused;
             }
             return;
         }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java
index 0ae107c..67a74ed 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java
@@ -55,17 +55,6 @@
     }
 
     /**
-     * Evaluate whether the Physical Web should be enabled when the application starts.
-     *
-     * @param context An instance of android.content.Context
-     * @return true if the Physical Web should be started at launch
-     */
-    public static boolean shouldStartOnLaunch(Context context) {
-        return featureIsEnabled()
-                && (isPhysicalWebPreferenceEnabled(context) || isOnboarding(context));
-    }
-
-    /**
      * Start the Physical Web feature.
      * At the moment, this only enables URL discovery over BLE.
      * @param application An instance of {@link ChromeApplication}, used to get the
@@ -89,15 +78,6 @@
     }
 
     /**
-     * Upload the collected UMA stats.
-     * This method should be called only when the native library is loaded.
-     * @param context A valid instance of Context.
-     */
-    public static void uploadDeferredMetrics(final Context context) {
-        PhysicalWebUma.uploadDeferredMetrics(context);
-    }
-
-    /**
      * Increments a value tracking how many times we've shown the Physical Web
      * opt-in notification.
      *
@@ -123,6 +103,22 @@
         return sharedPreferences.getInt(PREF_PHYSICAL_WEB_NOTIFY_COUNT, 0);
     }
 
+    /**
+     * Perform various Physical Web operations that should happen on startup.
+     * @param application An instance of {@link ChromeApplication}.
+     */
+    public static void onChromeStart(ChromeApplication application) {
+        // The PhysicalWebUma calls in this method should be called only when the native library is
+        // loaded.  This is always the case on chrome startup.
+        if (featureIsEnabled()
+                && (isPhysicalWebPreferenceEnabled(application) || isOnboarding(application))) {
+            startPhysicalWeb(application);
+            PhysicalWebUma.uploadDeferredMetrics(application);
+        } else {
+            stopPhysicalWeb(application);
+        }
+    }
+
     private static void clearUrlsAsync(final Context context) {
         Runnable task = new Runnable() {
             @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
index 0095f4a7..b7450d8 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
@@ -45,7 +45,6 @@
             "contextual_search_last_animation_time";
     private static final String ENABLE_CUSTOM_TABS = "enable_custom_tabs";
     private static final String HERB_FLAVOR_KEY = "herb_flavor";
-    private static final String FORCED_TO_MIGRATE_KEY = "forced_to_migrate";
 
     private static final String SUCCESS_UPLOAD_SUFFIX = "_crash_success_upload";
     private static final String FAILURE_UPLOAD_SUFFIX = "_crash_failure_upload";
@@ -341,22 +340,6 @@
     }
 
     /**
-     * @return Whether or not the user is being forced to migrate to tabbed mode.
-     */
-    public boolean getCachedIsForcedToMigrate() {
-        return mSharedPreferences.getBoolean(FORCED_TO_MIGRATE_KEY, false);
-    }
-
-    /**
-     * Caches whether or not the user is being forced to migrate to tabbed mode.
-     */
-    public void setCachedIsForcedToMigrate(boolean state) {
-        SharedPreferences.Editor ed = mSharedPreferences.edit();
-        ed.putBoolean(FORCED_TO_MIGRATE_KEY, state);
-        ed.apply();
-    }
-
-    /**
      * Writes the given int value to the named shared preference.
      *
      * @param key The name of the preference to modify.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
index eceb3d6..380f4753 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
@@ -27,6 +27,7 @@
 import org.chromium.base.ThreadUtils;
 import org.chromium.base.VisibleForTesting;
 import org.chromium.chrome.R;
+import org.chromium.chrome.browser.UrlConstants;
 import org.chromium.chrome.browser.WindowDelegate;
 import org.chromium.chrome.browser.appmenu.AppMenuButtonHelper;
 import org.chromium.chrome.browser.dom_distiller.DomDistillerServiceFactory;
@@ -265,18 +266,18 @@
             mTitleBar.setText("");
             return;
         }
+        String title = currentTab.getTitle();
 
         // It takes some time to parse the title of the webcontent, and before that Tab#getTitle
         // always return the url. We postpone the title animation until the title is authentic.
-        // TODO(yusufo): Clear the explicit references to about:blank here and for domain.
-        if (mState == STATE_DOMAIN_AND_TITLE
-                && !TextUtils.equals(currentTab.getTitle(), currentTab.getUrl())
-                && !TextUtils.equals(currentTab.getTitle(), "about:blank")) {
+        if ((mState == STATE_DOMAIN_AND_TITLE || mState == STATE_TITLE_ONLY)
+                && !title.equals(currentTab.getUrl())
+                && !title.equals(UrlConstants.ABOUT_BLANK)) {
             // Delay the title animation until security icon animation finishes.
             ThreadUtils.postOnUiThreadDelayed(mTitleAnimationStarter, TITLE_ANIM_DELAY_MS);
         }
 
-        mTitleBar.setText(currentTab.getTitle());
+        mTitleBar.setText(title);
     }
 
     @Override
@@ -307,7 +308,7 @@
         // If we have taken a pre-initialized WebContents, then the starting URL
         // is "about:blank". We should not display it.
         if (NativePageFactory.isNativePageUrl(url, getCurrentTab().isIncognito())
-                || "about:blank".equals(url)) {
+                || UrlConstants.ABOUT_BLANK.equals(url)) {
             mUrlBar.setUrl("", null);
             return;
         }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/util/UrlUtilitiesTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/util/UrlUtilitiesTest.java
index 10a35fb..bb46d648 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/util/UrlUtilitiesTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/util/UrlUtilitiesTest.java
@@ -44,7 +44,7 @@
                 "https://user:pass@:awesome.com:9000/bad-scheme:#fake:"));
         assertTrue(UrlUtilities.isDownloadableScheme("http://awesome.example.com/"));
         assertTrue(UrlUtilities.isDownloadableScheme("filesystem://awesome.example.com/"));
-        assertTrue(UrlUtilities.isDownloadableScheme("blob:https%3A//awesome.example.com/"));
+        assertTrue(UrlUtilities.isDownloadableScheme("blob:https://awesome.example.com/"));
         assertTrue(UrlUtilities.isDownloadableScheme("file://awesome.example.com/"));
 
         assertFalse(UrlUtilities.isDownloadableScheme("inline:skates.co.uk"));
diff --git a/chrome/app/BUILD.gn b/chrome/app/BUILD.gn
index 2c0c46e..76048f7 100644
--- a/chrome/app/BUILD.gn
+++ b/chrome/app/BUILD.gn
@@ -326,6 +326,7 @@
     "//chrome/browser/policy:path_parser",
     "//chrome/child",
     "//chrome/common",
+    "//chrome/gpu",
     "//chrome/renderer",
     "//chrome/utility",
     "//components/crash/content/app",
diff --git a/chrome/app/DEPS b/chrome/app/DEPS
index a8f00e9b..7d70e40 100644
--- a/chrome/app/DEPS
+++ b/chrome/app/DEPS
@@ -6,6 +6,7 @@
   "+chrome/common/chrome_features.h",
   "+chrome/grit",  # For generated headers
   "+chrome/installer",
+  "+chrome/gpu/chrome_content_gpu_client.h",
   "+chrome/renderer/chrome_content_renderer_client.h",
   "+chrome/utility/chrome_content_utility_client.h",
   "+chrome_elf/chrome_elf_main.h",
diff --git a/chrome/app/chrome_crash_reporter_client.cc b/chrome/app/chrome_crash_reporter_client.cc
index e7a0103f..2a8db668 100644
--- a/chrome/app/chrome_crash_reporter_client.cc
+++ b/chrome/app/chrome_crash_reporter_client.cc
@@ -12,7 +12,6 @@
 #include "base/strings/string_split.h"
 #include "base/strings/utf_string_conversions.h"
 #include "build/build_config.h"
-#include "chrome/common/chrome_constants.h"
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_paths_internal.h"
 #include "chrome/common/chrome_result_codes.h"
@@ -26,6 +25,7 @@
 
 #include "base/file_version_info.h"
 #include "base/win/registry.h"
+#include "chrome/common/metrics_constants_util_win.h"
 #include "chrome/installer/util/google_chrome_sxs_distribution.h"
 #include "chrome/installer/util/install_util.h"
 #include "chrome/installer/util/util_constants.h"
@@ -194,9 +194,7 @@
 #if !defined(NACL_WIN64)
   if (GetCollectStatsConsent()){
     crash_reporting_metrics_.reset(new browser_watcher::CrashReportingMetrics(
-        InstallUtil::IsChromeSxSProcess()
-            ? chrome::kBrowserCrashDumpAttemptsRegistryPathSxS
-            : chrome::kBrowserCrashDumpAttemptsRegistryPath));
+        chrome::GetBrowserCrashDumpAttemptsRegistryPath()));
   }
 #endif
 }
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index 2b8afc6..4479230 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -40,6 +40,7 @@
 #include "chrome/common/switch_utils.h"
 #include "chrome/common/trace_event_args_whitelist.h"
 #include "chrome/common/url_constants.h"
+#include "chrome/gpu/chrome_content_gpu_client.h"
 #include "chrome/renderer/chrome_content_renderer_client.h"
 #include "chrome/utility/chrome_content_utility_client.h"
 #include "components/component_updater/component_updater_paths.h"
@@ -141,6 +142,8 @@
 #if !defined(CHROME_MULTIPLE_DLL_BROWSER)
 #include "chrome/child/pdf_child_init.h"
 
+base::LazyInstance<ChromeContentGpuClient> g_chrome_content_gpu_client =
+    LAZY_INSTANCE_INITIALIZER;
 base::LazyInstance<ChromeContentRendererClient>
     g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER;
 base::LazyInstance<ChromeContentUtilityClient>
@@ -977,6 +980,14 @@
 #endif
 }
 
+content::ContentGpuClient* ChromeMainDelegate::CreateContentGpuClient() {
+#if defined(CHROME_MULTIPLE_DLL_BROWSER)
+  return nullptr;
+#else
+  return g_chrome_content_gpu_client.Pointer();
+#endif
+}
+
 content::ContentRendererClient*
 ChromeMainDelegate::CreateContentRendererClient() {
 #if defined(CHROME_MULTIPLE_DLL_BROWSER)
diff --git a/chrome/app/chrome_main_delegate.h b/chrome/app/chrome_main_delegate.h
index fc56a6f..1cb0821b 100644
--- a/chrome/app/chrome_main_delegate.h
+++ b/chrome/app/chrome_main_delegate.h
@@ -46,6 +46,7 @@
   bool ShouldEnableProfilerRecording() override;
 
   content::ContentBrowserClient* CreateContentBrowserClient() override;
+  content::ContentGpuClient* CreateContentGpuClient() override;
   content::ContentRendererClient* CreateContentRendererClient() override;
   content::ContentUtilityClient* CreateContentUtilityClient() override;
 
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp
index 35d4fa1..e8bfe3d 100644
--- a/chrome/app/chromeos_strings.grdp
+++ b/chrome/app/chromeos_strings.grdp
@@ -4775,6 +4775,9 @@
   <message name="IDS_KEYBOARD_OVERLAY_SCREENSHOT_REGION" desc="The text in the keyboard overlay to explain the shortcut (take a screenshot of the selected region).">
     Screenshot region
   </message>
+  <message name="IDS_KEYBOARD_OVERLAY_SCREENSHOT_WINDOW" desc="The text in the keyboard overlay to explain the shortcut.">
+    Screenshot window
+  </message>
   <message name="IDS_KEYBOARD_OVERLAY_SCROLL_UP_ONE_PAGE" desc="The text in the keyboard overlay to explain the shortcut.">
     Scroll up one page
   </message>
diff --git a/chrome/app/main_dll_loader_win.cc b/chrome/app/main_dll_loader_win.cc
index 83415401..6118f444f 100644
--- a/chrome/app/main_dll_loader_win.cc
+++ b/chrome/app/main_dll_loader_win.cc
@@ -36,6 +36,7 @@
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_result_codes.h"
 #include "chrome/common/chrome_switches.h"
+#include "chrome/common/metrics_constants_util_win.h"
 #include "chrome/installer/util/google_update_constants.h"
 #include "chrome/installer/util/google_update_settings.h"
 #include "chrome/installer/util/install_util.h"
@@ -164,8 +165,8 @@
         reinterpret_cast<ChromeWatcherMainFunction>(
             ::GetProcAddress(watcher_dll, kChromeWatcherDLLEntrypoint));
     return watcher_main(
-        chrome::kBrowserExitCodesRegistryPath, parent_process.Take(),
-        main_thread_id, on_initialized_event.Take(),
+        chrome::GetBrowserExitCodesRegistryPath().c_str(),
+        parent_process.Take(), main_thread_id, on_initialized_event.Take(),
         watcher_data_directory.value().c_str(), channel_name.c_str());
   }
 
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
index 4203604..76dc943 100644
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -115,6 +115,9 @@
   <message name="IDS_SETTINGS_BASIC" desc="Name of the settings page which displays advanced preferences.">
     Basic
   </message>
+  <message name="IDS_SETTINGS_INTERNAL_SEARCH" desc="Label for input field to search within settings.">
+    Search
+  </message>
   <message name="IDS_SETTINGS_SETTINGS" desc="The settings page title.">
     Settings
   </message>
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 8b8b293..db3ca85 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -439,9 +439,6 @@
       "//chrome/browser/apps/app_shim",
     ]
   }
-  if (is_win) {
-    deps += [ "//chrome:file_pre_reader" ]
-  }
   if (is_mac || is_android) {
     sources += rebase_path(
             gypi_values.chrome_browser_password_manager_mac_android_sources,
@@ -836,8 +833,10 @@
     ]
     deps += [
       ":chrome_process_finder",
+      "//chrome:file_pre_reader",
       "//chrome/chrome_watcher:client",
       "//chrome/chrome_watcher:kasko_util",
+      "//chrome/common:metrics_constants_util_win",
       "//chrome/common:version_header",
       "//chrome/installer/util:strings",
       "//chrome_elf",
diff --git a/chrome/browser/android/chrome_jni_registrar.cc b/chrome/browser/android/chrome_jni_registrar.cc
index 715659c..cc3ce907 100644
--- a/chrome/browser/android/chrome_jni_registrar.cc
+++ b/chrome/browser/android/chrome_jni_registrar.cc
@@ -162,6 +162,7 @@
 #include "components/bookmarks/common/android/component_jni_registrar.h"
 #include "components/dom_distiller/android/component_jni_registrar.h"
 #include "components/gcm_driver/android/component_jni_registrar.h"
+#include "components/gcm_driver/instance_id/android/component_jni_registrar.h"
 #include "components/invalidation/impl/android/component_jni_registrar.h"
 #include "components/navigation_interception/component_jni_registrar.h"
 #include "components/policy/core/browser/android/component_jni_registrar.h"
@@ -187,6 +188,7 @@
     {"DomDistiller", dom_distiller::android::RegisterDomDistiller},
     {"ChromeDownloadDelegate", RegisterChromeDownloadDelegate},
     {"GCMDriver", gcm::android::RegisterGCMDriverJni},
+    {"InstanceID", instance_id::android::RegisterInstanceIDJni},
     {"Invalidation", invalidation::android::RegisterInvalidationJni},
     {"NavigationInterception",
      navigation_interception::RegisterNavigationInterceptionJni},
diff --git a/chrome/browser/apps/custom_launcher_page_browsertest_views.cc b/chrome/browser/apps/custom_launcher_page_browsertest_views.cc
index 9cbd71dd..0fd89d7 100644
--- a/chrome/browser/apps/custom_launcher_page_browsertest_views.cc
+++ b/chrome/browser/apps/custom_launcher_page_browsertest_views.cc
@@ -31,7 +31,7 @@
 
 #if defined(OS_CHROMEOS)
 #include "chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h"
-#include "ui/app_list/shower/app_list_shower_impl.h"
+#include "ui/app_list/presenter/app_list_presenter_impl.h"
 #endif
 
 namespace {
@@ -81,7 +81,7 @@
 #if defined(OS_CHROMEOS)
     AppListServiceAshTestApi service_test;
     app_list_view = service_test.GetAppListView();
-    EXPECT_TRUE(service_test.GetAppListShower()->GetTargetVisibility());
+    EXPECT_TRUE(service_test.GetAppListPresenter()->GetTargetVisibility());
 #else
     AppListServiceViews* service =
         static_cast<AppListServiceViews*>(AppListService::Get());
diff --git a/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
index 2d907918..dc903ea5 100644
--- a/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
@@ -51,42 +51,6 @@
 using guest_view::TestGuestViewManager;
 using guest_view::TestGuestViewManagerFactory;
 
-namespace {
-// A helper class which polls the text input state of the given WebContents.
-class TextInputStateHelper {
- public:
-  using Predicate =
-      base::Callback<bool(const content::TextInputStateTestExport&)>;
-
-  static void WaitForDesiredState(content::WebContents* web_contents,
-                                  const Predicate& predicate) {
-    content::TextInputStateTestExport state =
-        content::TextInputStateTestExport::FromWebContents(web_contents);
-    while (!predicate.Run(state)) {
-      scoped_refptr<content::MessageLoopRunner> loop =
-          new content::MessageLoopRunner();
-      content::BrowserThread::PostDelayedTask(
-          content::BrowserThread::UI, FROM_HERE, loop->QuitClosure(),
-          base::TimeDelta::FromMilliseconds(100LL));
-      loop->Run();
-      state = content::TextInputStateTestExport::FromWebContents(web_contents);
-    }
-  }
-
-  static bool IsStateOfGivenType(
-      ui::TextInputType type,
-      const content::TextInputStateTestExport& state) {
-    return type == state.type();
-  }
-
-  static bool HasGivenValue(const std::string& value,
-                            const content::TextInputStateTestExport& state) {
-    return value == state.value();
-  }
-};
-
-}  // namespace
-
 class WebViewInteractiveTestBase : public extensions::PlatformAppBrowserTest {
  public:
   WebViewInteractiveTestBase()
@@ -547,9 +511,6 @@
 class WebViewContextMenuInteractiveTest : public WebViewInteractiveTestBase {};
 class WebViewPointerLockInteractiveTest : public WebViewInteractiveTestBase {};
 class WebViewDragDropInteractiveTest : public WebViewInteractiveTestBase {};
-// TODO(ekaramad): The following tests fail of OOPIF due to focus issues.
-// see crbug.com/61060.
-class WebViewTextInputStateInteractiveTest : public WebViewInteractiveTest {};
 
 INSTANTIATE_TEST_CASE_P(WebViewInteractiveTests,
                         WebViewInteractiveTest,
@@ -559,10 +520,6 @@
                         WebViewNewWindowInteractiveTest,
                         testing::Bool());
 
-INSTANTIATE_TEST_CASE_P(WebViewInteractiveTests,
-                        WebViewTextInputStateInteractiveTest,
-                        testing::Values(false));
-
 // ui_test_utils::SendMouseMoveSync doesn't seem to work on OS_MACOSX, and
 // likely won't work on many other platforms as well, so for now this test
 // is for Windows and Linux only. As of Sept 17th, 2013 this test is disabled
@@ -1375,110 +1332,3 @@
   SendMessageToEmbedder("verify");
   EXPECT_TRUE(webview_button_not_focused_listener.WaitUntilSatisfied());
 }
-
-// TODO(crbug.com/602954) Test is flaky.
-#if defined(OS_WIN) || defined(OS_MACOSX)
-#define MAYBE_TopLevelWebContentsTracksCorrectly \
-  DISABLED_TopLevelWebContentsTracksCorrectly
-#else
-#define MAYBE_TopLevelWebContentsTracksCorrectly \
-  TopLevelWebContentsTracksCorrectly
-#endif
-IN_PROC_BROWSER_TEST_P(WebViewTextInputStateInteractiveTest,
-                       MAYBE_TopLevelWebContentsTracksCorrectly) {
-  SetupTest("web_view/text_input_state",
-            "/extensions/platform_apps/web_view/text_input_state/guest.html");
-
-  auto press_tab_to_focus = [](WebViewTextInputStateInteractiveTest* test,
-                               const std::string& message) {
-    ExtensionTestMessageListener listener(message, false);
-    test->SendKeyPressToPlatformApp(ui::VKEY_TAB);
-    listener.WaitUntilSatisfied();
-  };
-
-  auto get_type_checker = [](ui::TextInputType target) {
-    return base::Bind(&TextInputStateHelper::IsStateOfGivenType, target);
-  };
-
-  // Press the tab key. The <input> in the embedder should get focused.
-  // Top level state type should be number.
-  press_tab_to_focus(this, "EMBEDDER-FOCUSED-1");
-  TextInputStateHelper::WaitForDesiredState(
-      embedder_web_contents(), get_type_checker(ui::TEXT_INPUT_TYPE_NUMBER));
-
-  // Press the tab key again and the <input> inside <webview> gets focused. The
-  // input type should text now.
-  press_tab_to_focus(this, "GUEST-FOCUSED");
-  TextInputStateHelper::WaitForDesiredState(
-      embedder_web_contents(), get_type_checker(ui::TEXT_INPUT_TYPE_TEXT));
-
-  // Press the tab key one more time to get back to embedder's second <input>.
-  // The value should be "last one".
-  press_tab_to_focus(this, "EMBEDDER-FOCUSED-2");
-  TextInputStateHelper::WaitForDesiredState(
-      embedder_web_contents(),
-      base::Bind(&TextInputStateHelper::HasGivenValue, "last one"));
-}
-
-IN_PROC_BROWSER_TEST_P(WebViewTextInputStateInteractiveTest,
-                       CrashingWebViewResetsState) {
-  SetupTest("web_view/text_input_state",
-            "/extensions/platform_apps/web_view/text_input_state/guest.html");
-
-  // Press tab key twice to end up in the <input> of the <webview>.
-  ExtensionTestMessageListener listener("GUEST-FOCUSED", false);
-  for (size_t i = 0; i < 2; ++i)
-    SendKeyPressToPlatformApp(ui::VKEY_TAB);
-
-  listener.WaitUntilSatisfied();
-
-  // Now wait for a text input state change.
-  TextInputStateHelper::WaitForDesiredState(
-      embedder_web_contents(),
-      base::Bind(&TextInputStateHelper::HasGivenValue, "guest"));
-
-  // Now crash the <webview>.
-  guest_web_contents()->GetRenderProcessHost()->Shutdown(false, 0);
-
-  // Wait for the outer WebContentsImpl |text_input_state_->type| to be reset to
-  // none.
-  TextInputStateHelper::WaitForDesiredState(
-      embedder_web_contents(),
-      base::Bind(&TextInputStateHelper::IsStateOfGivenType,
-                 ui::TEXT_INPUT_TYPE_NONE));
-}
-
-// This test creates a <webview> with a text input field inside, gives focus to
-// the input field, and then detaches the <webview>. It monitors the embedder
-// WebContents text input state to make sure it tracks the state properly.
-IN_PROC_BROWSER_TEST_P(WebViewTextInputStateInteractiveTest,
-                       OuterWebContentsResetsStateAfterDetach) {
-  SetupTest("web_view/text_input_state",
-            "/extensions/platform_apps/web_view/text_input_state/guest.html");
-
-  // Press tab key twice to end up in the <input> of the <webview>.
-  ExtensionTestMessageListener listener("GUEST-FOCUSED", false);
-  for (size_t i = 0; i < 2; ++i)
-    SendKeyPressToPlatformApp(ui::VKEY_TAB);
-
-  listener.WaitUntilSatisfied();
-
-  // Now wait for a text input state change.
-  TextInputStateHelper::WaitForDesiredState(
-      embedder_web_contents(),
-      base::Bind(&TextInputStateHelper::HasGivenValue, "guest"));
-
-  // Now detach the <webview>.
-  ExtensionTestMessageListener detach_listener("detached", false);
-  detach_listener.set_failure_message("failed-to-detach");
-  EXPECT_TRUE(
-      content::ExecuteScript(embedder_web_contents(), "detachWebView();"));
-  detach_listener.WaitUntilSatisfied();
-
-  // Wait for the outer WebContentsImpl |text_input_state_->type| to be reset to
-  // none.
-  TextInputStateHelper::WaitForDesiredState(
-      embedder_web_contents(),
-      base::Bind(&TextInputStateHelper::IsStateOfGivenType,
-                 ui::TEXT_INPUT_TYPE_NONE));
-}
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 273252e..c3e48db 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -671,6 +671,8 @@
   metrics::MetricsService* metrics = browser_process_->metrics_service();
   // TODO(asvitkine): Turn into a DCHECK after http://crbug.com/359406 is fixed.
   CHECK(!field_trial_list_);
+  // TODO(asvitkine): Remove this after http://crbug.com/359406 is fixed.
+  base::FieldTrialList::EnableGlobalStateChecks();
   field_trial_list_.reset(
       new base::FieldTrialList(metrics->CreateEntropyProvider().release()));
 
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc
index 3a996d66..05463bd5 100644
--- a/chrome/browser/chrome_browser_main_win.cc
+++ b/chrome/browser/chrome_browser_main_win.cc
@@ -312,6 +312,15 @@
 
 void ChromeBrowserMainPartsWin::PostProfileInit() {
   ChromeBrowserMainParts::PostProfileInit();
+
+  // TODO(kulshin): remove this cleanup code in 2017. http://crbug.com/603718
+  // Attempt to delete the font cache and ignore any errors.
+  base::FilePath path(
+      profile()->GetPath().AppendASCII("ChromeDWriteFontCache"));
+  content::BrowserThread::PostAfterStartupTask(
+      FROM_HERE, content::BrowserThread::GetMessageLoopProxyForThread(
+                     content::BrowserThread::FILE),
+      base::Bind(base::IgnoreResult(&base::DeleteFile), path, false));
 }
 
 void ChromeBrowserMainPartsWin::PostBrowserStart() {
diff --git a/chrome/browser/chromeos/arc/arc_service_launcher.cc b/chrome/browser/chromeos/arc/arc_service_launcher.cc
index ccc8c565..bc459c2 100644
--- a/chrome/browser/chromeos/arc/arc_service_launcher.cc
+++ b/chrome/browser/chromeos/arc/arc_service_launcher.cc
@@ -10,6 +10,7 @@
 #include "chrome/browser/chromeos/arc/arc_policy_bridge.h"
 #include "chrome/browser/chromeos/arc/arc_process_service.h"
 #include "chrome/browser/chromeos/arc/arc_settings_service.h"
+#include "chrome/browser/chromeos/arc/gpu_arc_video_service_host.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/session_manager_client.h"
 #include "components/arc/arc_bridge_service.h"
@@ -31,8 +32,10 @@
       new ArcProcessService(arc_service_manager_->arc_bridge_service())));
   arc_service_manager_->AddService(base::WrapUnique(
       new ArcSettingsService(arc_service_manager_->arc_bridge_service())));
+  arc_service_manager_->AddService(base::WrapUnique(
+      new GpuArcVideoServiceHost(arc_service_manager_->arc_bridge_service())));
 
-  // Detect availiability.
+  // Detect availability.
   chromeos::SessionManagerClient* session_manager_client =
       chromeos::DBusThreadManager::Get()->GetSessionManagerClient();
   session_manager_client->CheckArcAvailability(base::Bind(
diff --git a/chrome/browser/chromeos/arc/gpu_arc_video_service_host.cc b/chrome/browser/chromeos/arc/gpu_arc_video_service_host.cc
new file mode 100644
index 0000000..488bcc15
--- /dev/null
+++ b/chrome/browser/chromeos/arc/gpu_arc_video_service_host.cc
@@ -0,0 +1,72 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/arc/gpu_arc_video_service_host.h"
+
+#include "base/location.h"
+#include "base/logging.h"
+#include "base/message_loop/message_loop.h"
+#include "base/thread_task_runner_handle.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/gpu_service_registry.h"
+#include "content/public/common/service_registry.h"
+
+namespace {
+
+mojo::InterfacePtrInfo<arc::VideoHost> GetServiceOnIOThread() {
+  arc::VideoHostPtr host_ptr;
+  content::ServiceRegistry* registry = content::GetGpuServiceRegistry();
+  registry->ConnectToRemoteService(mojo::GetProxy(&host_ptr));
+
+  // Unbind and reply back to UI thread.
+  return host_ptr.PassInterface();
+}
+
+}  // namespace
+
+namespace arc {
+
+GpuArcVideoServiceHost::GpuArcVideoServiceHost(
+    arc::ArcBridgeService* bridge_service)
+    : ArcService(bridge_service), binding_(this), weak_factory_(this) {
+  arc_bridge_service()->AddObserver(this);
+}
+
+GpuArcVideoServiceHost::~GpuArcVideoServiceHost() {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  arc_bridge_service()->RemoveObserver(this);
+}
+
+void GpuArcVideoServiceHost::OnVideoInstanceReady() {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  auto video_instance = arc_bridge_service()->video_instance();
+  DCHECK(video_instance);
+  video_instance->Init(binding_.CreateInterfacePtrAndBind());
+}
+
+void GpuArcVideoServiceHost::OnVideoInstanceClosed() {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  service_ptr_.reset();
+}
+
+void GpuArcVideoServiceHost::OnRequestArcVideoAcceleratorChannel(
+    const OnRequestArcVideoAcceleratorChannelCallback& callback) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  content::BrowserThread::PostTaskAndReplyWithResult(
+      content::BrowserThread::IO, FROM_HERE, base::Bind(&GetServiceOnIOThread),
+      base::Bind(&GpuArcVideoServiceHost::BindServiceAndCreateChannel,
+                 weak_factory_.GetWeakPtr(), callback));
+}
+
+void GpuArcVideoServiceHost::BindServiceAndCreateChannel(
+    const OnRequestArcVideoAcceleratorChannelCallback& callback,
+    mojo::InterfacePtrInfo<arc::VideoHost> ptr_info) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  service_ptr_.Bind(std::move(ptr_info));
+  service_ptr_->OnRequestArcVideoAcceleratorChannel(callback);
+}
+
+}  // namespace arc
diff --git a/chrome/browser/chromeos/arc/gpu_arc_video_service_host.h b/chrome/browser/chromeos/arc/gpu_arc_video_service_host.h
new file mode 100644
index 0000000..5a666c6
--- /dev/null
+++ b/chrome/browser/chromeos/arc/gpu_arc_video_service_host.h
@@ -0,0 +1,58 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_
+#define CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/threading/thread_checker.h"
+#include "components/arc/arc_bridge_service.h"
+#include "components/arc/arc_service.h"
+#include "components/arc/common/video.mojom.h"
+#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/interface_ptr_info.h"
+
+namespace arc {
+
+// This class takes requests for creating channels of video accelerators from
+// arc::VideoInstance and forwards these requests to GpuArcVideoServce. It also
+// returns the created channels back to the arc::VideoInstance.
+//
+// This class is the proxy end of GpuArcVideoService and runs in the browser
+// process. The corresponding end "GpuArcVideoService" runs in the GPU process.
+class GpuArcVideoServiceHost : public arc::ArcService,
+                               public arc::ArcBridgeService::Observer,
+                               public arc::VideoHost {
+ public:
+  explicit GpuArcVideoServiceHost(arc::ArcBridgeService* bridge_service);
+  ~GpuArcVideoServiceHost() override;
+
+  // arc::ArcBridgeService::Observer implementation.
+  void OnVideoInstanceReady() override;
+  void OnVideoInstanceClosed() override;
+
+  // arc::VideoHost implementation.
+  void OnRequestArcVideoAcceleratorChannel(
+      const OnRequestArcVideoAcceleratorChannelCallback& callback) override;
+
+ private:
+  void BindServiceAndCreateChannel(
+      const OnRequestArcVideoAcceleratorChannelCallback& callback,
+      mojo::InterfacePtrInfo<arc::VideoHost> ptr_info);
+
+  base::ThreadChecker thread_checker_;
+
+  mojo::Binding<arc::VideoHost> binding_;
+
+  arc::VideoHostPtr service_ptr_;
+
+  base::WeakPtrFactory<GpuArcVideoServiceHost> weak_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost);
+};
+
+}  // namespace arc
+
+#endif  // CHROME_BROWSER_CHROMEOS_ARC_GPU_ARC_VIDEO_SERVICE_HOST_H_
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
index 908c9d0..524c376 100644
--- a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
+++ b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
@@ -954,6 +954,14 @@
 }
 
 void LoginDisplayHostImpl::ScheduleFadeOutAnimation(int animation_speed_ms) {
+  // login window might have been closed by OnBrowserCreated() at this moment.
+  // This may happen when adding another user into the session, and a browser
+  // is created before session start, which triggers the close of the login
+  // window. In this case, we should shut down the display host directly.
+  if (!login_window_) {
+    ShutdownDisplayHost(false);
+    return;
+  }
   ui::Layer* layer = login_window_->GetLayer();
   ui::ScopedLayerAnimationSettings animation(layer->GetAnimator());
   animation.AddObserver(new AnimationObserver(
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc
index d2d78e2..a74b1c9 100644
--- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc
+++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.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 <queue>
+#include <array>
 
 #include "base/command_line.h"
 #include "base/macros.h"
@@ -56,7 +56,9 @@
             gfx::NativeWindow parent,
             const base::string16& app_name,
             const base::string16& target_name,
-            std::unique_ptr<DesktopMediaList> model,
+            std::unique_ptr<DesktopMediaList> screen_list,
+            std::unique_ptr<DesktopMediaList> window_list,
+            std::unique_ptr<DesktopMediaList> tab_list,
             bool request_audio,
             const DoneCallback& done_callback) override {
     if (!expectation_->cancelled) {
@@ -98,18 +100,28 @@
   }
 
   // DesktopCaptureChooseDesktopMediaFunction::PickerFactory interface.
-  std::unique_ptr<DesktopMediaList> CreateModel(bool show_screens,
-                                                bool show_windows,
-                                                bool show_tabs,
-                                                bool show_audio) override {
+  MediaListArray CreateModel(
+      bool show_screens,
+      bool show_windows,
+      bool show_tabs,
+      bool show_audio) override {
     EXPECT_LE(current_test_, tests_count_);
-    if (current_test_ >= tests_count_)
-      return std::unique_ptr<DesktopMediaList>();
+    MediaListArray media_lists;
+    if (current_test_ >= tests_count_) {
+      return media_lists;
+    }
     EXPECT_EQ(test_flags_[current_test_].expect_screens, show_screens);
     EXPECT_EQ(test_flags_[current_test_].expect_windows, show_windows);
     EXPECT_EQ(test_flags_[current_test_].expect_tabs, show_tabs);
     EXPECT_EQ(test_flags_[current_test_].expect_audio, show_audio);
-    return std::unique_ptr<DesktopMediaList>(new FakeDesktopMediaList());
+
+    media_lists[0] = std::unique_ptr<DesktopMediaList>(
+        show_screens ? new FakeDesktopMediaList() : nullptr);
+    media_lists[1] = std::unique_ptr<DesktopMediaList>(
+        show_windows ? new FakeDesktopMediaList() : nullptr);
+    media_lists[2] = std::unique_ptr<DesktopMediaList>(
+        show_tabs ? new FakeDesktopMediaList() : nullptr);
+    return media_lists;
   }
 
   std::unique_ptr<DesktopMediaPicker> CreatePicker() override {
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
index 8c0c170..dbdec76 100644
--- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
+++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
@@ -12,7 +12,6 @@
 #include "base/strings/utf_string_conversions.h"
 #include "build/build_config.h"
 #include "chrome/browser/extensions/extension_tab_util.h"
-#include "chrome/browser/media/combined_desktop_media_list.h"
 #include "chrome/browser/media/desktop_media_list_ash.h"
 #include "chrome/browser/media/desktop_streams_registry.h"
 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
@@ -127,46 +126,62 @@
 
   const gfx::NativeWindow parent_window =
       web_contents->GetTopLevelNativeWindow();
-  std::unique_ptr<DesktopMediaList> media_list;
+  std::unique_ptr<DesktopMediaList> screen_list;
+  std::unique_ptr<DesktopMediaList> window_list;
+  std::unique_ptr<DesktopMediaList> tab_list;
   if (g_picker_factory) {
-    media_list = g_picker_factory->CreateModel(show_screens, show_windows,
-                                               show_tabs, request_audio);
+    PickerFactory::MediaListArray media_lists =
+        g_picker_factory->CreateModel(show_screens, show_windows, show_tabs,
+                                      request_audio);
+    screen_list = std::move(media_lists[0]);
+    window_list = std::move(media_lists[1]);
+    tab_list = std::move(media_lists[2]);
     picker_ = g_picker_factory->CreatePicker();
   } else {
-    std::vector<std::unique_ptr<DesktopMediaList>> media_lists;
-    // Create a screens/windows list and push it into media_lists.
-    if (show_screens || show_windows) {
+    // Create a screens list.
+    if (show_screens) {
 #if defined(USE_ASH)
       if (chrome::IsNativeWindowInAsh(parent_window)) {
-        media_lists.push_back(base::WrapUnique(new DesktopMediaListAsh(
-            (show_screens ? DesktopMediaListAsh::SCREENS : 0) |
-            (show_windows ? DesktopMediaListAsh::WINDOWS : 0))));
+        screen_list = base::WrapUnique(
+            new DesktopMediaListAsh(DesktopMediaListAsh::SCREENS));
       }
 #endif
-      if (media_lists.empty()) {
+      if (!screen_list) {
         webrtc::DesktopCaptureOptions options =
             webrtc::DesktopCaptureOptions::CreateDefault();
         options.set_disable_effects(false);
         std::unique_ptr<webrtc::ScreenCapturer> screen_capturer(
-            show_screens ? webrtc::ScreenCapturer::Create(options) : NULL);
-        std::unique_ptr<webrtc::WindowCapturer> window_capturer(
-            show_windows ? webrtc::WindowCapturer::Create(options) : NULL);
+            webrtc::ScreenCapturer::Create(options));
 
-        media_lists.push_back(base::WrapUnique(new NativeDesktopMediaList(
-            std::move(screen_capturer), std::move(window_capturer))));
+        screen_list = base::WrapUnique(
+            new NativeDesktopMediaList(std::move(screen_capturer), nullptr));
+      }
+    }
+
+    // Create a windows list.
+    if (show_windows) {
+#if defined(USE_ASH)
+      if (chrome::IsNativeWindowInAsh(parent_window)) {
+        window_list = base::WrapUnique(
+            new DesktopMediaListAsh(DesktopMediaListAsh::WINDOWS));
+      }
+#endif
+      if (!window_list) {
+        webrtc::DesktopCaptureOptions options =
+            webrtc::DesktopCaptureOptions::CreateDefault();
+        options.set_disable_effects(false);
+        std::unique_ptr<webrtc::WindowCapturer> window_capturer(
+            webrtc::WindowCapturer::Create(options));
+
+        window_list = base::WrapUnique(
+            new NativeDesktopMediaList(nullptr, std::move(window_capturer)));
       }
     }
 
     if (show_tabs)
-      media_lists.push_back(base::WrapUnique(new TabDesktopMediaList()));
+      tab_list = base::WrapUnique(new TabDesktopMediaList());
 
-    DCHECK(!media_lists.empty());
-
-    if (media_lists.size() == 1) {
-      media_list = std::move(media_lists[0]);
-    } else {
-      media_list.reset(new CombinedDesktopMediaList(media_lists));
-    }
+    DCHECK(screen_list || window_list || tab_list);
 
     // DesktopMediaPicker is implemented only for Windows, OSX and
     // Aura Linux builds.
@@ -184,7 +199,8 @@
 
   picker_->Show(web_contents, parent_window, parent_window,
                 base::UTF8ToUTF16(extension()->name()), target_name,
-                std::move(media_list), request_audio, callback);
+                std::move(screen_list), std::move(window_list),
+                std::move(tab_list), request_audio, callback);
   origin_ = origin;
   return true;
 }
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h
index 57286fa..db00555 100644
--- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h
+++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_EXTENSIONS_API_DESKTOP_CAPTURE_DESKTOP_CAPTURE_BASE_H_
 #define CHROME_BROWSER_EXTENSIONS_API_DESKTOP_CAPTURE_DESKTOP_CAPTURE_BASE_H_
 
+#include <array>
 #include <map>
 
 #include "base/macros.h"
@@ -26,10 +27,12 @@
   // Used for tests to supply fake picker.
   class PickerFactory {
    public:
-    virtual std::unique_ptr<DesktopMediaList> CreateModel(bool show_screens,
-                                                          bool show_windows,
-                                                          bool show_tabs,
-                                                          bool show_audio) = 0;
+    typedef std::array<std::unique_ptr<DesktopMediaList>, 3> MediaListArray;
+    virtual MediaListArray CreateModel(
+        bool show_screens,
+        bool show_windows,
+        bool show_tabs,
+        bool show_audio) = 0;
     virtual std::unique_ptr<DesktopMediaPicker> CreatePicker() = 0;
 
    protected:
diff --git a/chrome/browser/extensions/installed_loader.cc b/chrome/browser/extensions/installed_loader.cc
index 93fdc59..197410b5 100644
--- a/chrome/browser/extensions/installed_loader.cc
+++ b/chrome/browser/extensions/installed_loader.cc
@@ -21,7 +21,6 @@
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/extensions/chrome_manifest_url_handlers.h"
-#include "components/crx_file/id_util.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/user_metrics.h"
@@ -423,31 +422,15 @@
                                 NUM_BACKGROUND_PAGE_TYPES);
 
       if (GetBackgroundPageType(extension) == EVENT_PAGE) {
-        size_t num_registered_events =
-            EventRouter::Get(extension_service_->profile())
-                ->GetRegisteredEvents(extension->id())
-                .size();
         // Count extension event pages with no registered events. Either the
         // event page is badly designed, or there may be a bug where the event
         // page failed to start after an update (crbug.com/469361).
-        if (num_registered_events == 0u) {
+        if (EventRouter::Get(extension_service_->profile())->
+                GetRegisteredEvents(extension->id()).size() == 0) {
           ++eventless_event_pages_count;
           VLOG(1) << "Event page without registered event listeners: "
                   << extension->id() << " " << extension->name();
         }
-        // Count the number of event listeners the Enhanced Bookmarks Manager
-        // has for crbug.com/469361, but only if it's using an event page (not
-        // necessarily the case). This should always be > 0, because that's how
-        // the bookmarks extension works, but Chrome may have a bug - it has in
-        // the past. In fact, this metric may generally be useful for tracking
-        // the frequency of event page bugs.
-        std::string hashed_id =
-            crx_file::id_util::HashedIdInHex(extension->id());
-        if (hashed_id == "D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2") {
-          UMA_HISTOGRAM_CUSTOM_COUNTS(
-              "Extensions.EnhancedBookmarksManagerNumEventListeners",
-              num_registered_events, 1, 10, 10);
-        }
       }
     }
 
diff --git a/chrome/browser/media/desktop_media_picker.h b/chrome/browser/media/desktop_media_picker.h
index cb144c5..3312037f 100644
--- a/chrome/browser/media/desktop_media_picker.h
+++ b/chrome/browser/media/desktop_media_picker.h
@@ -33,14 +33,17 @@
   virtual ~DesktopMediaPicker() {}
 
   // Shows dialog with list of desktop media sources (screens, windows, tabs)
-  // provided by |list| and calls |done_callback| when user chooses one of the
+  // provided by |screen_list|, |window_list| and |tab_list|.
+  // Dialog window will call |done_callback| when user chooses one of the
   // sources or closes the dialog.
   virtual void Show(content::WebContents* web_contents,
                     gfx::NativeWindow context,
                     gfx::NativeWindow parent,
                     const base::string16& app_name,
                     const base::string16& target_name,
-                    std::unique_ptr<DesktopMediaList> list,
+                    std::unique_ptr<DesktopMediaList> screen_list,
+                    std::unique_ptr<DesktopMediaList> window_list,
+                    std::unique_ptr<DesktopMediaList> tab_list,
                     bool request_audio,
                     const DoneCallback& done_callback) = 0;
 
diff --git a/chrome/browser/media/router/mojo/media_router.mojom b/chrome/browser/media/router/mojo/media_router.mojom
index 68390412..1f25a95 100644
--- a/chrome/browser/media/router/mojo/media_router.mojom
+++ b/chrome/browser/media/router/mojo/media_router.mojom
@@ -286,6 +286,9 @@
   // Calling this will trigger a firewall prompt on Windows if there is not
   // already a firewall rule for mDNS.
   EnableMdnsDiscovery();
+
+  // Updates media sinks capable of displaying |media_source|.
+  UpdateMediaSinks(string media_source);
 };
 
 // Interface for a service which observes state changes across media
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
index d9c822cc..c2cacff 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
@@ -20,6 +20,7 @@
 #include "chrome/browser/media/router/media_router_factory.h"
 #include "chrome/browser/media/router/media_routes_observer.h"
 #include "chrome/browser/media/router/media_sinks_observer.h"
+#include "chrome/browser/media/router/media_source_helper.h"
 #include "chrome/browser/media/router/mojo/media_route_provider_util_win.h"
 #include "chrome/browser/media/router/mojo/media_router_mojo_metrics.h"
 #include "chrome/browser/media/router/mojo/media_router_type_converters.h"
@@ -429,6 +430,10 @@
 }
 
 void MediaRouterMojoImpl::OnUserGesture() {
+  // Allow MRPM to intelligently update sinks and observers by passing in a
+  // media source.
+  UpdateMediaSinks(MediaSourceForDesktop().id());
+
 #if defined(OS_WIN)
   EnsureMdnsDiscoveryEnabled();
 #endif
@@ -988,4 +993,17 @@
 }
 #endif
 
+void MediaRouterMojoImpl::UpdateMediaSinks(
+    const MediaSource::Id& source_id) {
+  SetWakeReason(MediaRouteProviderWakeReason::UPDATE_MEDIA_SINKS);
+  RunOrDefer(base::Bind(&MediaRouterMojoImpl::DoUpdateMediaSinks,
+                        base::Unretained(this), source_id));
+}
+
+void MediaRouterMojoImpl::DoUpdateMediaSinks(
+    const MediaSource::Id& source_id) {
+  DVLOG_WITH_INSTANCE(1) << "DoUpdateMediaSinks" << source_id;
+  media_route_provider_->UpdateMediaSinks(source_id);
+}
+
 }  // namespace media_router
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.h b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
index 9b14874..fc8c6c3 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl.h
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
@@ -335,6 +335,12 @@
   void OnFirewallCheckComplete(bool firewall_can_use_local_ports);
 #endif
 
+  // Requests MRPM to update media sinks.  This allows MRPs that only do
+  // discovery on sink queries an opportunity to update discovery results
+  // even if the MRP SinkAvailability is marked UNAVAILABLE.
+  void UpdateMediaSinks(const MediaSource::Id& source_id);
+  void DoUpdateMediaSinks(const MediaSource::Id& source_id);
+
   // Pending requests queued to be executed once component extension
   // becomes ready.
   std::deque<base::Closure> pending_requests_;
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc b/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
index 9079344..02d50f87 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
@@ -20,6 +20,7 @@
 #include "base/thread_task_runner_handle.h"
 #include "chrome/browser/media/router/issue.h"
 #include "chrome/browser/media/router/media_route.h"
+#include "chrome/browser/media/router/media_source_helper.h"
 #include "chrome/browser/media/router/mock_media_router.h"
 #include "chrome/browser/media/router/mojo/media_router_mojo_metrics.h"
 #include "chrome/browser/media/router/mojo/media_router_mojo_test.h"
@@ -1472,7 +1473,10 @@
                   run_loop.Quit();
                 }));
   EXPECT_CALL(*process_manager_, IsEventPageSuspended(extension_->id()))
-      .WillOnce(Return(false));
+      .WillOnce(Return(false)).WillOnce(Return(false));
+  EXPECT_CALL(mock_media_route_provider_,
+              UpdateMediaSinks(mojo::String(MediaSourceForDesktop().id())))
+      .Times(2);
   // EnableMdnsDisocvery() is never called except on Windows.
   EXPECT_CALL(mock_media_route_provider_, EnableMdnsDiscovery())
       .WillOnce(InvokeWithoutArgs([&run_loop2]() {
@@ -1481,47 +1485,91 @@
   RegisterMediaRouteProvider();
   run_loop.Run();
   run_loop2.Run();
-  // Always a no-op at this point.
+  // Should not call EnableMdnsDiscovery, but will call UpdateMediaSinks
   media_router_->OnUserGesture();
+  base::RunLoop run_loop3;
+  run_loop3.RunUntilIdle();
 
   // Reset the extension by "suspending" and notifying MR.
-  base::RunLoop run_loop3;
+  base::RunLoop run_loop4;
   ResetMediaRouteProvider();
   EXPECT_CALL(*process_manager_, IsEventPageSuspended(extension_->id()))
       .WillOnce(Return(true));
   EXPECT_CALL(*process_manager_, WakeEventPage(extension_->id(), _))
       .WillOnce(testing::DoAll(
           media::RunCallback<1>(true),
-          InvokeWithoutArgs([&run_loop3]() { run_loop3.Quit(); }),
+          InvokeWithoutArgs([&run_loop4]() { run_loop4.Quit(); }),
           Return(true)));
   // Use DetachRoute because it unconditionally calls RunOrDefer().
   media_router_->DetachRoute(kRouteId);
-  run_loop3.Run();
+  run_loop4.Run();
 
-  base::RunLoop run_loop4;
   base::RunLoop run_loop5;
+  base::RunLoop run_loop6;
   // RegisterMediaRouteProvider() is called.
   // The queued DetachRoute(kRouteId) call should be executed.
   EXPECT_CALL(provide_handler_, Invoke(testing::Not("")))
-      .WillOnce(InvokeWithoutArgs([&run_loop4]() {
-                  run_loop4.Quit();
-                }));
-  EXPECT_CALL(*process_manager_, IsEventPageSuspended(extension_->id()))
-      .WillOnce(Return(false));
-  // Expected because it was used to wake up the page.
-  EXPECT_CALL(mock_media_route_provider_, DetachRoute(mojo::String(kRouteId)));
-  // EnableMdnsDisocvery() is never called except on Windows.
-  EXPECT_CALL(mock_media_route_provider_, EnableMdnsDiscovery())
       .WillOnce(InvokeWithoutArgs([&run_loop5]() {
                   run_loop5.Quit();
                 }));
+  EXPECT_CALL(*process_manager_, IsEventPageSuspended(extension_->id()))
+      .WillOnce(Return(false)).WillOnce(Return(false));
+  // Expected because it was used to wake up the page.
+  EXPECT_CALL(mock_media_route_provider_, DetachRoute(mojo::String(kRouteId)));
+  EXPECT_CALL(mock_media_route_provider_,
+              UpdateMediaSinks(mojo::String(MediaSourceForDesktop().id())));
+  // EnableMdnsDisocvery() is never called except on Windows.
+  EXPECT_CALL(mock_media_route_provider_, EnableMdnsDiscovery())
+      .WillOnce(InvokeWithoutArgs([&run_loop6]() {
+                  run_loop6.Quit();
+                }));
   BindMediaRouteProvider();
   RegisterMediaRouteProvider();
-  run_loop4.Run();
   run_loop5.Run();
-  // Always a no-op at this point.
+  run_loop6.Run();
+  // Should not call EnableMdnsDiscovery, but will call UpdateMediaSinks
   media_router_->OnUserGesture();
+  base::RunLoop run_loop7;
+  run_loop7.RunUntilIdle();
 }
 #endif
 
+TEST_F(MediaRouterMojoExtensionTest, UpdateMediaSinksOnUserGesture) {
+  BindMediaRouteProvider();
+
+  base::RunLoop run_loop;
+  EXPECT_CALL(provide_handler_, Invoke(testing::Not("")))
+      .WillOnce(InvokeWithoutArgs([&run_loop]() {
+                  run_loop.Quit();
+                }));
+  EXPECT_CALL(*process_manager_, IsEventPageSuspended(extension_->id()))
+#if defined(OS_WIN)
+      // Windows calls once for EnableMdnsDiscovery
+      .Times(3)
+#else
+      // All others call once for registration, and once for the user gesture.
+      .Times(2)
+#endif
+      .WillRepeatedly(Return(false));
+
+
+  RegisterMediaRouteProvider();
+  run_loop.Run();
+
+  media_router_->OnUserGesture();
+
+  base::RunLoop run_loop2;
+
+#if defined(OS_WIN)
+  EXPECT_CALL(mock_media_route_provider_, EnableMdnsDiscovery());
+#endif
+  EXPECT_CALL(mock_media_route_provider_,
+              UpdateMediaSinks(mojo::String(MediaSourceForDesktop().id())))
+      .WillOnce(InvokeWithoutArgs([&run_loop2]() {
+        run_loop2.Quit();
+      }));
+
+  run_loop2.Run();
+}
+
 }  // namespace media_router
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_metrics.h b/chrome/browser/media/router/mojo/media_router_mojo_metrics.h
index d5e72aa..9f82ccc 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_metrics.h
+++ b/chrome/browser/media/router/mojo/media_router_mojo_metrics.h
@@ -40,9 +40,10 @@
   REGISTER_MEDIA_ROUTE_PROVIDER = 13,
   CONNECT_ROUTE_BY_ROUTE_ID = 14,
   ENABLE_MDNS_DISCOVERY = 15,
+  UPDATE_MEDIA_SINKS = 16,
 
   // NOTE: Add entries only immediately above this line.
-  TOTAL_COUNT = 16
+  TOTAL_COUNT = 17
 };
 
 // The install status of the Media Router component extension.
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_test.h b/chrome/browser/media/router/mojo/media_router_mojo_test.h
index 6bd1ae1..e8f3eb42 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_test.h
+++ b/chrome/browser/media/router/mojo/media_router_mojo_test.h
@@ -84,6 +84,7 @@
   MOCK_METHOD1(StartObservingMediaRoutes, void(const mojo::String& source));
   MOCK_METHOD1(StopObservingMediaRoutes, void(const mojo::String& source));
   MOCK_METHOD0(EnableMdnsDiscovery, void());
+  MOCK_METHOD1(UpdateMediaSinks, void(const mojo::String& source));
 
  private:
   DISALLOW_COPY_AND_ASSIGN(MockMediaRouteProvider);
diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc
index b5af63a..9d05aded 100644
--- a/chrome/browser/metrics/chrome_metrics_service_client.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
@@ -30,7 +30,6 @@
 #include "chrome/browser/sync/chrome_sync_client.h"
 #include "chrome/browser/ui/browser_otr_state.h"
 #include "chrome/common/channel_info.h"
-#include "chrome/common/chrome_constants.h"
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/crash_keys.h"
@@ -85,6 +84,7 @@
 #if defined(OS_WIN)
 #include <windows.h>
 #include "chrome/browser/metrics/google_update_metrics_provider_win.h"
+#include "chrome/common/metrics_constants_util_win.h"
 #include "chrome/installer/util/browser_distribution.h"
 #include "components/browser_watcher/watcher_metrics_provider_win.h"
 #endif
@@ -424,7 +424,7 @@
   metrics_service_->RegisterMetricsProvider(
       std::unique_ptr<metrics::MetricsProvider>(
           new browser_watcher::WatcherMetricsProviderWin(
-              chrome::kBrowserExitCodesRegistryPath,
+              chrome::GetBrowserExitCodesRegistryPath(),
               content::BrowserThread::GetBlockingPool())));
 #endif  // defined(OS_WIN)
 
diff --git a/chrome/browser/metrics/chrome_stability_metrics_provider.cc b/chrome/browser/metrics/chrome_stability_metrics_provider.cc
index c8145ab3..3c94a839 100644
--- a/chrome/browser/metrics/chrome_stability_metrics_provider.cc
+++ b/chrome/browser/metrics/chrome_stability_metrics_provider.cc
@@ -11,7 +11,6 @@
 #include "base/metrics/sparse_histogram.h"
 #include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
-#include "chrome/common/chrome_constants.h"
 #include "content/public/browser/child_process_data.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/render_process_host.h"
@@ -26,7 +25,7 @@
 
 #if defined(OS_WIN)
 #include <windows.h>  // Needed for STATUS_* codes
-#include "chrome/installer/util/install_util.h"
+#include "chrome/common/metrics_constants_util_win.h"
 #include "components/browser_watcher/crash_reporting_metrics_win.h"
 #endif
 
@@ -43,9 +42,7 @@
 
   browser_watcher::CrashReportingMetrics::Values metrics =
       browser_watcher::CrashReportingMetrics(
-          InstallUtil::IsChromeSxSProcess()
-              ? chrome::kBrowserCrashDumpAttemptsRegistryPathSxS
-              : chrome::kBrowserCrashDumpAttemptsRegistryPath)
+          chrome::GetBrowserCrashDumpAttemptsRegistryPath())
           .RetrieveAndResetMetrics();
 
   for (int i = 0; i < metrics.crash_dump_attempts; ++i) {
diff --git a/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.cc
index 423c8d8..a26c8ba 100644
--- a/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.cc
+++ b/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.cc
@@ -8,33 +8,37 @@
 
 namespace internal {
 const char kHistogramDocWriteFirstContentfulPaint[] =
-    "PageLoad.Clients.DocWrite.Evaluator.NavigationToFirstContentfulPaint";
+    "PageLoad.Clients.DocWrite.Evaluator.Timing2."
+    "NavigationToFirstContentfulPaint";
 const char kHistogramDocWriteParseStartToFirstContentfulPaint[] =
-    "PageLoad.Clients.DocWrite.Evaluator.ParseStartToFirstContentfulPaint";
+    "PageLoad.Clients.DocWrite.Evaluator.Timing2."
+    "ParseStartToFirstContentfulPaint";
 const char kHistogramDocWriteParseDuration[] =
-    "PageLoad.Clients.DocWrite.Evaluator.ParseDuration";
+    "PageLoad.Clients.DocWrite.Evaluator.Timing2.ParseDuration";
 const char kHistogramDocWriteParseBlockedOnScript[] =
-    "PageLoad.Clients.DocWrite.Evaluator.ParseBlockedOnScriptLoad";
+    "PageLoad.Clients.DocWrite.Evaluator.Timing2.ParseBlockedOnScriptLoad";
 const char kHistogramDocWriteParseBlockedOnScriptParseComplete[] =
-    "PageLoad.Clients.DocWrite.Evaluator.ParseBlockedOnScriptLoad."
+    "PageLoad.Clients.DocWrite.Evaluator.Timing2.ParseBlockedOnScriptLoad."
     "ParseComplete";
 const char kHistogramDocWriteParseBlockedOnScriptLoadDocumentWrite[] =
-    "PageLoad.Clients.DocWrite.Evaluator."
+    "PageLoad.Clients.DocWrite.Evaluator.Timing2."
     "ParseBlockedOnScriptLoadFromDocumentWrite";
 const char
     kHistogramDocWriteParseBlockedOnScriptLoadDocumentWriteParseComplete[] =
-        "PageLoad.Clients.DocWrite.Evaluator."
+        "PageLoad.Clients.DocWrite.Evaluator.Timing2."
         "ParseBlockedOnScriptLoadFromDocumentWrite.ParseComplete";
 
 const char kBackgroundHistogramDocWriteFirstContentfulPaint[] =
-    "PageLoad.Clients.DocWrite.Evaluator.NavigationToFirstContentfulPaint."
+    "PageLoad.Clients.DocWrite.Evaluator.Timing2."
+    "NavigationToFirstContentfulPaint."
     "Background";
 const char kBackgroundHistogramDocWriteParseDuration[] =
-    "PageLoad.Clients.DocWrite.Evaluator.ParseDuration.Background";
+    "PageLoad.Clients.DocWrite.Evaluator.Timing2.ParseDuration.Background";
 const char kBackgroundHistogramDocWriteParseBlockedOnScript[] =
-    "PageLoad.Clients.DocWrite.Evaluator.ParseBlockedOnScriptLoad.Background";
+    "PageLoad.Clients.DocWrite.Evaluator.Timing2.ParseBlockedOnScriptLoad."
+    "Background";
 const char kBackgroundHistogramDocWriteParseBlockedOnScriptLoadDocumentWrite[] =
-    "PageLoad.Clients.DocWrite.Evaluator."
+    "PageLoad.Clients.DocWrite.Evaluator.Timing2."
     "ParseBlockedOnScriptLoadFromDocumentWrite.Background";
 
 }  // namespace internal
diff --git a/chrome/browser/profile_resetter/brandcode_config_fetcher.h b/chrome/browser/profile_resetter/brandcode_config_fetcher.h
index 4308700..2388499 100644
--- a/chrome/browser/profile_resetter/brandcode_config_fetcher.h
+++ b/chrome/browser/profile_resetter/brandcode_config_fetcher.h
@@ -9,6 +9,7 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/timer/timer.h"
 #include "net/url_request/url_fetcher_delegate.h"
 
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 3b7fd65..1c9ae68 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -323,21 +323,13 @@
 }
 
 net::URLRequestContextGetter*
-    OffTheRecordProfileImpl::GetMediaRequestContext() {
+    OffTheRecordProfileImpl::CreateMediaRequestContext() {
   // In OTR mode, media request context is the same as the original one.
   return GetRequestContext();
 }
 
 net::URLRequestContextGetter*
-    OffTheRecordProfileImpl::GetMediaRequestContextForRenderProcess(
-        int renderer_child_id) {
-  // In OTR mode, media request context is the same as the original one.
-  return content::RenderProcessHost::FromID(renderer_child_id)->
-      GetStoragePartition()->GetURLRequestContext();
-}
-
-net::URLRequestContextGetter*
-OffTheRecordProfileImpl::GetMediaRequestContextForStoragePartition(
+OffTheRecordProfileImpl::CreateMediaRequestContextForStoragePartition(
     const base::FilePath& partition_path,
     bool in_memory) {
   return io_data_->GetIsolatedAppRequestContextGetter(partition_path, in_memory)
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.h b/chrome/browser/profiles/off_the_record_profile_impl.h
index a7a9ac1..9e9dc71 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.h
+++ b/chrome/browser/profiles/off_the_record_profile_impl.h
@@ -63,6 +63,10 @@
       bool in_memory,
       content::ProtocolHandlerMap* protocol_handlers,
       content::URLRequestInterceptorScopedVector request_interceptors) override;
+  net::URLRequestContextGetter* CreateMediaRequestContext() override;
+  net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
+      const base::FilePath& partition_path,
+      bool in_memory) override;
   net::SSLConfigService* GetSSLConfigService() override;
   bool IsSameProfile(Profile* profile) override;
   Time GetStartTime() const override;
@@ -94,12 +98,6 @@
   scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override;
   bool IsOffTheRecord() const override;
   content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
-  net::URLRequestContextGetter* GetMediaRequestContext() override;
-  net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
-      int renderer_child_id) override;
-  net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
-      const base::FilePath& partition_path,
-      bool in_memory) override;
   content::ResourceContext* GetResourceContext() override;
   content::BrowserPluginGuestManager* GetGuestManager() override;
   storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
diff --git a/chrome/browser/profiles/profile_browsertest.cc b/chrome/browser/profiles/profile_browsertest.cc
index ecc7b08..2dc8064 100644
--- a/chrome/browser/profiles/profile_browsertest.cc
+++ b/chrome/browser/profiles/profile_browsertest.cc
@@ -36,6 +36,7 @@
 #include "components/prefs/pref_service.h"
 #include "components/version_info/version_info.h"
 #include "content/public/browser/browser_thread.h"
+#include "content/public/browser/storage_partition.h"
 #include "content/public/test/test_utils.h"
 #include "net/base/net_errors.h"
 #include "net/test/url_request/url_request_failed_job.h"
@@ -524,7 +525,8 @@
 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest,
                        URLFetcherUsingMediaContextDuringShutdown) {
   StartActiveFetcherDuringProfileShutdownTest(
-      browser()->profile()->GetMediaRequestContext());
+      content::BrowserContext::GetDefaultStoragePartition(
+          browser()->profile())->GetMediaURLRequestContext());
 }
 
 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest,
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index e525297..1697d45 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -915,29 +915,6 @@
   return otr_prefs_.get();
 }
 
-net::URLRequestContextGetter* ProfileImpl::GetMediaRequestContext() {
-  // Return the default media context.
-  return io_data_.GetMediaRequestContextGetter().get();
-}
-
-net::URLRequestContextGetter*
-ProfileImpl::GetMediaRequestContextForRenderProcess(
-    int renderer_child_id) {
-  content::RenderProcessHost* rph = content::RenderProcessHost::FromID(
-      renderer_child_id);
-  content::StoragePartition* storage_partition = rph->GetStoragePartition();
-
-  return storage_partition->GetMediaURLRequestContext();
-}
-
-net::URLRequestContextGetter*
-ProfileImpl::GetMediaRequestContextForStoragePartition(
-    const base::FilePath& partition_path,
-    bool in_memory) {
-  return io_data_
-      .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get();
-}
-
 content::ResourceContext* ProfileImpl::GetResourceContext() {
   return io_data_.GetResourceContext();
 }
@@ -1021,6 +998,18 @@
       .get();
 }
 
+net::URLRequestContextGetter* ProfileImpl::CreateMediaRequestContext() {
+  return io_data_.GetMediaRequestContextGetter().get();
+}
+
+net::URLRequestContextGetter*
+ProfileImpl::CreateMediaRequestContextForStoragePartition(
+    const base::FilePath& partition_path,
+    bool in_memory) {
+  return io_data_
+      .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get();
+}
+
 bool ProfileImpl::IsSameProfile(Profile* profile) {
   if (profile == static_cast<Profile*>(this))
     return true;
diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h
index 25db5b7f..1c7a296 100644
--- a/chrome/browser/profiles/profile_impl.h
+++ b/chrome/browser/profiles/profile_impl.h
@@ -82,12 +82,6 @@
       const base::FilePath& partition_path) override;
   base::FilePath GetPath() const override;
   content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
-  net::URLRequestContextGetter* GetMediaRequestContext() override;
-  net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
-      int renderer_child_id) override;
-  net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
-      const base::FilePath& partition_path,
-      bool in_memory) override;
   content::ResourceContext* GetResourceContext() override;
   content::BrowserPluginGuestManager* GetGuestManager() override;
   storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
@@ -103,6 +97,10 @@
       bool in_memory,
       content::ProtocolHandlerMap* protocol_handlers,
       content::URLRequestInterceptorScopedVector request_interceptors) override;
+  net::URLRequestContextGetter* CreateMediaRequestContext() override;
+  net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
+      const base::FilePath& partition_path,
+      bool in_memory) override;
 
   // Profile implementation:
   scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override;
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
index 757ec01..66ba92f 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
@@ -178,7 +178,11 @@
  */
 AutomationPredicate.element = function(node) {
   return (node.state .focusable && node.role != RoleType.rootWebArea) ||
-      AutomationPredicate.leafDomNode(node);
+      (AutomationPredicate.leafDomNode(node) &&
+       (/\S+/.test(node.name) ||
+        (node.role != RoleType.lineBreak &&
+         node.role != RoleType.staticText &&
+         node.role != RoleType.inlineTextBox)));
 };
 
 /**
diff --git a/chrome/browser/resources/chromeos/keyboard_overlay.js b/chrome/browser/resources/chromeos/keyboard_overlay.js
index 3447f7d..70a2d64 100644
--- a/chrome/browser/resources/chromeos/keyboard_overlay.js
+++ b/chrome/browser/resources/chromeos/keyboard_overlay.js
@@ -101,6 +101,23 @@
 };
 
 /**
+ * When the top row keys setting is changed so that they're treated as function
+ * keys, their labels should change as well.
+ */
+var TOP_ROW_KEY_LABEL_TO_FUNCTION_LABEL = {
+  'back' : 'f1',
+  'forward' : 'f2',
+  'reload' : 'f3',
+  'full screen' : 'f4',
+  'switch window' : 'f5',
+  'bright down' : 'f6',
+  'bright up' : 'f7',
+  'mute' : 'f8',
+  'vol. down' : 'f9',
+  'vol. up' : 'f10',
+};
+
+/**
  * Some key labels define actions (like for example 'vol. up' or 'mute').
  * These labels should be localized. (crbug.com/471025).
  */
@@ -128,6 +145,16 @@
   'right' : 'keyboardOverlayRightKeyLabel',
   'up' : 'keyboardOverlayUpKeyLabel',
   'down' : 'keyboardOverlayDownKeyLabel',
+  'f1' : 'keyboardOverlayF1',
+  'f2' : 'keyboardOverlayF2',
+  'f3' : 'keyboardOverlayF3',
+  'f4' : 'keyboardOverlayF4',
+  'f5' : 'keyboardOverlayF5',
+  'f6' : 'keyboardOverlayF6',
+  'f7' : 'keyboardOverlayF7',
+  'f8' : 'keyboardOverlayF8',
+  'f9' : 'keyboardOverlayF9',
+  'f10' : 'keyboardOverlayF10',
 };
 
 var IME_ID_PREFIX = '_comp_ime_';
@@ -199,6 +226,14 @@
 }
 
 /**
+ * Tests if the top row keys are set to be treated as function keys.
+ * @return {boolean} True if the top row keys are set to be function keys.
+ */
+function topRowKeysAreFunctionKeys() {
+  return loadTimeData.getBoolean('keyboardOverlayTopRowKeysAreFunctionKeys');
+}
+
+/**
  * Converts a single hex number to a character.
  * @param {string} hex Hexadecimal string.
  * @return {string} Unicode values of hexadecimal string.
@@ -393,6 +428,11 @@
     return '';
   }
   if (keyData.label) {
+    if (topRowKeysAreFunctionKeys()) {
+      var topRowKeyLabel = TOP_ROW_KEY_LABEL_TO_FUNCTION_LABEL[keyData.label];
+      if (topRowKeyLabel)
+        return topRowKeyLabel;
+    }
     return keyData.label;
   }
   var keyLabel = '';
@@ -450,11 +490,26 @@
     if (keyData.label == 'space') {
       return '';
     }
+
     // some key labels define actions such as 'mute' or 'vol. up'. Those actions
     // should be localized (crbug.com/471025).
-    var localizedLabel = LABEL_TO_LOCALIZED_LABEL_ID[keyData.label];
-    if (localizedLabel)
-      return loadTimeData.getString(localizedLabel);
+    var localizedLabelId = null;
+    var labelToBeLocalized = keyData.label;
+    if (topRowKeysAreFunctionKeys()) {
+      // If this is a top row key label, we need to convert that label to
+      // function-keys label (i.e. mute --> f8), and then use that label to get
+      // a localized one.
+      var topRowKeyAsFunctionLabel =
+        TOP_ROW_KEY_LABEL_TO_FUNCTION_LABEL[labelToBeLocalized];
+
+      labelToBeLocalized =
+        topRowKeyAsFunctionLabel ? topRowKeyAsFunctionLabel : keyData.label;
+    }
+
+    localizedLabelId = LABEL_TO_LOCALIZED_LABEL_ID[labelToBeLocalized];
+
+    if (localizedLabelId)
+      return loadTimeData.getString(localizedLabelId);
 
     return keyData.label;
   }
diff --git a/chrome/browser/resources/chromeos/keyboard_overlay_data.js b/chrome/browser/resources/chromeos/keyboard_overlay_data.js
index be046e0..ce6e4a04 100644
--- a/chrome/browser/resources/chromeos/keyboard_overlay_data.js
+++ b/chrome/browser/resources/chromeos/keyboard_overlay_data.js
@@ -15850,6 +15850,28 @@
     'esc<>SEARCH': 'keyboardOverlayTaskManager',
     'f<>ALT': 'keyboardOverlayShowWrenchMenu',
     'f<>CTRL': 'keyboardOverlayFindText',
+    'f1<>CTRL<>SEARCH': 'keyboardOverlayFocusPreviousPane',
+    'f1<>SEARCH': 'keyboardOverlayBackKeyLabel',
+    'f2<>CTRL<>SEARCH': 'keyboardOverlayFocusNextPane',
+    'f2<>SEARCH': 'keyboardOverlayForwardKeyLabel',
+    'f3<>CTRL<>SEARCH<>SHIFT': 'keyboardOverlayRotateScreen',
+    'f3<>SEARCH': 'keyboardOverlayReloadKeyLabel',
+    'f4<>ALT<>SEARCH': 'keyboardOverlaySwapPrimaryMonitor',
+    'f4<>CTRL<>SEARCH': 'keyboardOverlayMirrorMonitors',
+    'f4<>SEARCH': 'keyboardOverlayFullScreenKeyLabel',
+    'f5<>CTRL<>SEARCH': 'keyboardOverlayTakeScreenshot',
+    'f5<>CTRL<>SEARCH<>SHIFT': 'keyboardOverlayScreenshotRegion',
+    'f5<>SEARCH': 'keyboardOverlaySwitchWinKeyLabel',
+    'f6<>ALT<>SEARCH': 'keyboardOverlayDecreaseKeyBrightness',
+    'f6<>ALT<>CTRL<>SEARCH': 'keyboardOverlayMagnifierDecreaseZoom',
+    'f6<>SEARCH': 'keyboardOverlayBrightDownKeyLabel',
+    'f7<>ALT<>SEARCH': 'keyboardOverlayIncreaseKeyBrightness',
+    'f7<>ALT<>CTRL<>SEARCH': 'keyboardOverlayMagnifierIncreaseZoom',
+    'f7<>SEARCH': 'keyboardOverlayBrightUpKeyLabel',
+    'f8<>SEARCH': 'keyboardOverlayMuteKeyLabel',
+    'f9<>SEARCH': 'keyboardOverlayVolDownKeyLabel',
+    'f10<>SEARCH': 'keyboardOverlayVolUpKeyLabel',
+    'f10<>SHIFT': 'keyboardOverlayContextMenu',
     'forward<>CTRL': 'keyboardOverlayFocusNextPane',
     'forward<>SEARCH': 'keyboardOverlayF2',
     'full screen<>ALT': 'keyboardOverlaySwapPrimaryMonitor',
@@ -15895,6 +15917,7 @@
     'space<>CTRL': 'keyboardOverlaySelectPreviousInputMethod',
     'space<>CTRL<>SHIFT': 'keyboardOverlayCycleThroughInputMethods',
     'space<>SHIFT': 'keyboardOverlayScrollUpOnePage',
+    'switch window<>ALT<>CTRL': 'keyboardOverlayScreenshotWindow',
     'switch window<>CTRL': 'keyboardOverlayTakeScreenshot',
     'switch window<>CTRL<>SHIFT': 'keyboardOverlayScreenshotRegion',
     'switch window<>SEARCH': 'keyboardOverlayF5',
diff --git a/chrome/browser/resources/chromeos/login/offline_gaia.html b/chrome/browser/resources/chromeos/login/offline_gaia.html
index cd430de9..b5adc63 100644
--- a/chrome/browser/resources/chromeos/login/offline_gaia.html
+++ b/chrome/browser/resources/chromeos/login/offline_gaia.html
@@ -23,6 +23,7 @@
 
   Attributes:
     'showEnterpriseMessage' - If the "manged by" message should be shown.
+    'domain' - The enterprise domain the device is managed by.
     'emailDomain' - autocomplete domain for the email input.
 
   Events:
@@ -53,8 +54,8 @@
         <gaia-card class="fit">
           <div class="header flex vertical layout end-justified start">
             <h1 class="welcome-message" i18n-content="loginWelcomeMessage"></h1>
-            <p class="enterprise-info"  hidden$="[[!showEnterpriseMessage]]"
-               i18n-content="enterpriseInfoMessage">
+            <p id="managedBy" class="enterprise-info"
+               hidden$="[[!showEnterpriseMessage]]">
             </p>
           </div>
           <div class="footer flex vertical layout justified">
diff --git a/chrome/browser/resources/chromeos/login/offline_gaia.js b/chrome/browser/resources/chromeos/login/offline_gaia.js
index 1bdb2d4..2b61208bb 100644
--- a/chrome/browser/resources/chromeos/login/offline_gaia.js
+++ b/chrome/browser/resources/chromeos/login/offline_gaia.js
@@ -25,6 +25,11 @@
         value: false
       },
 
+      domain: {
+        type: String,
+        observer: 'onDomainChanged_'
+      },
+
       emailDomain: String
     },
 
@@ -51,6 +56,12 @@
       this.switchToEmailCard(true /* animated */);
     },
 
+    onDomainChanged_: function() {
+      this.$.managedBy.textContent =
+        loadTimeData.getStringF('enterpriseInfoMessage', this.domain);
+      this.showEnterpriseMessage = !!this.domain.length;
+    },
+
     onAnimationFinish_: function() {
       this.fire('backButton', !this.isEmailSectionActive_());
       this.focus();
diff --git a/chrome/browser/resources/chromeos/login/saml_interstitial.html b/chrome/browser/resources/chromeos/login/saml_interstitial.html
index 6a2ed0e..7e70dc23 100644
--- a/chrome/browser/resources/chromeos/login/saml_interstitial.html
+++ b/chrome/browser/resources/chromeos/login/saml_interstitial.html
@@ -42,8 +42,7 @@
       <h1 class="welcome-message" i18n-content="loginWelcomeMessage">
       </h1>
       <p id="managedBy" class="enterprise-info"
-          i18n-content="enterpriseInfoMessage"
-          hidden$="[[!showDomainMessages_]]">
+         hidden$="[[!showDomainMessages_]]">
       </p>
     </div>
 
diff --git a/chrome/browser/resources/chromeos/login/saml_interstitial.js b/chrome/browser/resources/chromeos/login/saml_interstitial.js
index 4f1deba..543058a 100644
--- a/chrome/browser/resources/chromeos/login/saml_interstitial.js
+++ b/chrome/browser/resources/chromeos/login/saml_interstitial.js
@@ -27,6 +27,8 @@
     this.$.samlInterstitialForm.submit();
   },
   onDomainChanged_: function() {
+    this.$.managedBy.textContent =
+      loadTimeData.getStringF('enterpriseInfoMessage', this.domain);
     this.$.message.content =
       loadTimeData.getStringF('samlInterstitialMessage', this.domain);
     this.showDomainMessages_ = !!this.domain.length;
diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
index d403ec6..1114ba2 100644
--- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
+++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
@@ -249,6 +249,9 @@
       }.bind(this));
       $('saml-interstitial').addEventListener('samlPageChangeAccountClicked',
                                               function() {
+        // The user requests to change the account. We must clear the email
+        // field of the auth params.
+        this.gaiaAuthParams_.email = '';
         this.screenMode = ScreenMode.DEFAULT;
         this.loadGaiaAuthHost_(false /* doSamlRedirect */);
       }.bind(this));
@@ -955,7 +958,8 @@
       this.loading = true;
       this.startLoadingTimer_();
       var offlineLogin = $('offline-gaia');
-      offlineLogin.showEnterpriseMessage = !!('enterpriseDomain' in params);
+      if ('enterpriseDomain' in params)
+        offlineLogin.domain = params['enterpriseDomain'];
       if ('emailDomain' in params)
         offlineLogin.emailDomain = '@' + params['emailDomain'];
       offlineLogin.setEmail(params.email);
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
index 46bf89b..5cdbb30e 100644
--- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
+++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
@@ -382,7 +382,7 @@
     if (!cr.isMac)
       this.$$('#focus-placeholder').remove();
 
-    document.addEventListener('keydown', this.onKeydown_.bind(this));
+    document.addEventListener('keydown', this.onKeydown_.bind(this), true);
     this.setSearchFocusHandlers_();
     this.showSinkList_();
   },
@@ -1119,6 +1119,35 @@
   },
 
   /**
+   * If an element in the search results list has keyboard focus when we are
+   * transitioning from the filter view to the sink list view, give focus to the
+   * same sink in the sink list. Otherwise we leave the keyboard focus where it
+   * is.
+   * @private
+   */
+  maybeUpdateFocusOnFilterViewExit_: function() {
+    var searchSinks = this.$$('#search-results').querySelectorAll('paper-item');
+    var focusedElem = Array.prototype.find.call(searchSinks, function(sink) {
+      return sink.focused;
+    });
+    if (!focusedElem) {
+      return;
+    }
+    var focusedSink =
+        this.$$('#searchResults').itemForElement(focusedElem).sinkItem;
+    setTimeout(function() {
+      var sinkList = this.$$('#sinkList');
+      var sinks = this.$['sink-list-view'].querySelectorAll('paper-item');
+      Array.prototype.some.call(sinks, function(sink) {
+        if (sinkList.itemForElement(sink).id == focusedSink.id) {
+          sink.focus();
+          return true;
+        }
+      });
+    }.bind(this));
+  },
+
+  /**
    * May update |populatedSinkListSeenTimeMs_| depending on |currentView| and
    * |sinksToShow|.
    * Called when |currentView_| or |sinksToShow_| is updated.
@@ -1272,10 +1301,15 @@
     // handled on the C++ side instead of the JS side on non-mac platforms,
     // which uses toolkit-views. Handle the expected behavior on all platforms
     // here.
-    if (e.keyCode == media_router.KEYCODE_ESC && !e.shiftKey &&
+    if (e.key == media_router.KEY_ESC && !e.shiftKey &&
         !e.ctrlKey && !e.altKey && !e.metaKey) {
       // When searching, allow ESC as a mechanism to leave the filter view.
       if (this.isUserSearching_) {
+        // If the user tabbed to an item in the search results, or otherwise has
+        // an item in the list focused, focus will seem to vanish when we
+        // transition back to the sink list. Instead we should move focus to the
+        // appropriate item in the sink list.
+        this.maybeUpdateFocusOnFilterViewExit_();
         this.showSinkList_();
         e.preventDefault();
       } else {
diff --git a/chrome/browser/resources/media_router/media_router_data.js b/chrome/browser/resources/media_router/media_router_data.js
index 15b07e72..b359ae1 100644
--- a/chrome/browser/resources/media_router/media_router_data.js
+++ b/chrome/browser/resources/media_router/media_router_data.js
@@ -24,10 +24,10 @@
 };
 
 /**
- * The ESC key maps to keycode '27'.
- * @const {number}
+ * The ESC key maps to KeyboardEvent.key value 'Escape'.
+ * @const {string}
  */
-media_router.KEYCODE_ESC = 27;
+media_router.KEY_ESC = 'Escape';
 
 /**
  * This corresponds to the C++ MediaRouterMetrics
diff --git a/chrome/browser/resources/safe_browsing/gen_file_type_proto.py b/chrome/browser/resources/safe_browsing/gen_file_type_proto.py
index 6700142..3c4b5081 100755
--- a/chrome/browser/resources/safe_browsing/gen_file_type_proto.py
+++ b/chrome/browser/resources/safe_browsing/gen_file_type_proto.py
@@ -12,10 +12,11 @@
 
 
 def ConvertProto(opts):
-
   # Find the proto code
   for path in opts.path:
-    sys.path.append(path)
+    # Put the path to our proto libraries in front, so that we don't use system
+    # protobuf.
+    sys.path.insert(1, path)
 
   import download_file_types_pb2 as config_pb2
   import google.protobuf.text_format as text_format
diff --git a/chrome/browser/resources/settings/icons.html b/chrome/browser/resources/settings/icons.html
index d4b7ee25..785741c 100644
--- a/chrome/browser/resources/settings/icons.html
+++ b/chrome/browser/resources/settings/icons.html
@@ -4,16 +4,21 @@
 <iron-iconset-svg name="md-settings-icons" size="48">
   <svg>
     <defs>
+      <g id="cancel" stroke="none" stroke-width="1">
+      <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>
+        <path d="M0 0h48v48H0z" fill="none"></path>
+      </g>
+
       <!-- Cookie SVG obtained from rolfe@ -->
-      <g id="cookie" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
-        <g id="SVG-versions" transform="translate(-85.000000, -221.000000)" fill="#000000">
+      <g id="cookie" stroke="none" stroke-width="1" fill-rule="evenodd">
+        <g id="SVG-versions" transform="translate(-85.000000, -221.000000)">
           <g id="accessed_cookies" transform="translate(85.000000, 221.000000)">
             <path d="M31.0002118,15 L31.0002118,14 C31.0002118,12.042 30.0002118,11 28.0002118,11 L27.0002118,11 C26.4482118,11 26.0002118,10.552 26.0002118,10 L26.0002118,6 C26.0002118,4.042 24.0002118,4 24.0002118,4 C12.5972118,4 3.42421177,13.542 4.02821177,25.077 C4.55821177,35.172 12.8282118,43.442 22.9232118,43.972 C34.4582118,44.577 44.0002118,35.403 44.0002118,24 L44.0002118,22 C44.0002118,20.895 43.1052118,20 42.0002118,20 L38.0032118,20 C37.4492118,20 37.0002118,19.551 37.0002118,18.997 L37.0002118,18 C37.0002118,16.125 36.0422118,15.042 34.0002118,15 L31.0002118,15 L31.0002118,15 Z M11.5872118,24.944 C9.47421177,25.345 7.65521177,23.526 8.05621177,21.412 C8.27921177,20.238 9.23921177,19.278 10.4132118,19.056 C12.5262118,18.655 14.3452118,20.474 13.9442118,22.587 C13.7222118,23.761 12.7622118,24.722 11.5872118,24.944 L11.5872118,24.944 Z M15.0562118,14.587 C14.6552118,12.474 16.4742118,10.655 18.5872118,11.056 C19.7612118,11.278 20.7212118,12.238 20.9442118,13.412 C21.3452118,15.526 19.5272118,17.345 17.4132118,16.944 C16.2392118,16.722 15.2782118,15.761 15.0562118,14.587 L15.0562118,14.587 Z M22.5872118,38.944 C20.4732118,39.345 18.6552118,37.526 19.0562118,35.412 C19.2792118,34.238 20.2392118,33.278 21.4132118,33.056 C23.5272118,32.656 25.3452118,34.474 24.9442118,36.587 C24.7222118,37.761 23.7612118,38.722 22.5872118,38.944 L22.5872118,38.944 Z M23.0002118,28 C21.3432118,28 20.0002118,26.657 20.0002118,25 C20.0002118,23.343 21.3432118,22 23.0002118,22 C24.6572118,22 26.0002118,23.343 26.0002118,25 C26.0002118,26.657 24.6572118,28 23.0002118,28 L23.0002118,28 Z M33.0002118,32 C31.3432118,32 30.0002118,30.657 30.0002118,29 C30.0002118,27.343 31.3432118,26 33.0002118,26 C34.6572118,26 36.0002118,27.343 36.0002118,29 C36.0002118,30.657 34.6572118,32 33.0002118,32 L33.0002118,32 Z" id="Imported-Layers"></path>
           </g>
         </g>
       </g>
 
-      <g id="search" stroke="none" stroke-width="1" fill="#ffffff">
+      <g id="search" stroke="none" stroke-width="1">
         <path d="M31 28h-1.59l-.55-.55C30.82 25.18 32 22.23 32 19c0-7.18-5.82-13-13-13S6 11.82 6 19s5.82 13 13 13c3.23 0 6.18-1.18 8.45-3.13l.55.55V31l10 9.98L40.98 38 31 28zm-12 0c-4.97 0-9-4.03-9-9s4.03-9 9-9 9 4.03 9 9-4.03 9-9 9z"></path>
         <path d="M0 0h48v48H0z" fill="none"></path>
       </g>
diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.html b/chrome/browser/resources/settings/settings_menu/settings_menu.html
index 0e6dcbe..e0957cf 100644
--- a/chrome/browser/resources/settings/settings_menu/settings_menu.html
+++ b/chrome/browser/resources/settings/settings_menu/settings_menu.html
@@ -18,6 +18,7 @@
   <template>
     <style include="settings-shared">
       iron-icon {
+        --iron-icon-fill-color: var(--settings-nav-grey);
         -webkit-margin-end: 16px;
       }
 
diff --git a/chrome/browser/resources/settings/settings_shared_css.html b/chrome/browser/resources/settings/settings_shared_css.html
index ee62edbd..8c5d18e 100644
--- a/chrome/browser/resources/settings/settings_shared_css.html
+++ b/chrome/browser/resources/settings/settings_shared_css.html
@@ -35,6 +35,7 @@
 
         --settings-title-bar-background-color: rgb(52, 73, 94);
         --settings-title-bar-color: rgb(255, 255, 255);
+        --settings-title-search-color: rgb(192, 199, 205);
       }
 
       h2 {
diff --git a/chrome/browser/resources/settings/settings_ui/settings_ui.html b/chrome/browser/resources/settings/settings_ui/settings_ui.html
index e7fb648..30e7b38 100644
--- a/chrome/browser/resources/settings/settings_ui/settings_ui.html
+++ b/chrome/browser/resources/settings/settings_ui/settings_ui.html
@@ -1,8 +1,8 @@
 <link rel="import" href="chrome://resources/html/polymer.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-drawer-panel/paper-drawer-panel.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-header-panel/paper-header-panel.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html">
-<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.html">
-<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/typography.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toolbar/paper-toolbar.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classes/iron-flex-layout.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
@@ -24,52 +24,129 @@
         background-color: var(--settings-background-color);
       }
 
-      iron-icon {
-       --iron-icon-fill-color: var(--settings-title-bar-color);
-      }
-
-      paper-toolbar {
-        @apply(--shadow-elevation-4dp);
-        --paper-toolbar-title: {
-          font-size: 123.08%;
-        };
-        background-color: var(--settings-title-bar-background-color);
-        min-height: 56px;
-        position: relative;
-        z-index: 10;
-      }
-
       paper-drawer-panel {
         @apply(--layout-center);
         --paper-drawer-panel-left-drawer-container: {
           background-color: var(--settings-background-color);
-          margin-top: 8px;
         };
         --paper-drawer-panel-right-drawer-container: {
           background-color: var(--settings-background-color);
-          margin-top: 8px;
         };
         position: relative;
       }
 
-      settings-main paper-icon-button {
-        z-index: 10;
+      paper-icon-button {
+        --iron-icon-fill-color: var(--settings-title-bar-color);
+      }
+
+      paper-icon-button[suffix] {
+        --iron-icon-fill-color: var(--settings-title-search-color);
+        height: 32px; /* After padding, the icon size is 16px. */
+        width: 32px;
+      }
+
+      paper-input {
+        @apply(--layout-center);
+        --paper-input-container: {
+          padding-top: 0;
+        };
+        --paper-input-container-color: var(--settings-title-search-color);
+        --paper-input-container-focus-color: var(--settings-title-search-color);
+        --paper-input-container-input: {
+          font-size: 81.25%; /* go to 13px from 16px */
+          position: relative;
+          top: 3px; /* Special positioning needed for UX design. */
+        };
+
+        /*
+         * The button in the input suffix needs special positioning for the UX
+         * design. The hit box extends right and down from the paper-input
+         * underline.
+         */
+        --paper-input-suffix: {
+          left: 8px;
+          line-height: 16px;
+          position: relative;
+          top: 4px;
+        };
+        --paper-input-container-input-color: var(--settings-title-bar-color);
+        --paper-input-container-label: {
+          font-size: 81.25%; /* go to 13px from 16px */
+          top: 3px; /* Special positioning needed for UX design. */
+        };
+        --paper-input-max-width: 200px;
+      }
+
+      paper-toolbar {
+        --paper-toolbar-height: 56px;
+        --paper-toolbar-sm-height: 56px;
+        --paper-toolbar-content: {
+          font-size: 123.08%; /* go to 16px from 13px */
+        }
+        --paper-toolbar: {
+          background-color: var(--settings-title-bar-background-color);
+        };
+      }
+
+      /* Prevent paper-toolbar from setting the margin-right to 24px. */
+      paper-icon-button#menu-button {
+        /*
+         * TODO(dschuyler): this margin is on the right regardless of language
+         * direction (e.g. rtl). Make a patch for paper-toolbar in Polymer.
+         */
+        margin-right: 0;
+      }
+
+      .heading {
+        -webkit-margin-start: 8px;
+      }
+
+      paper-drawer-panel:not([narrow]) #main-title {
+        display: none;
+      }
+
+      paper-icon-button[toggles]:not([active]) + #search-input {
+        display: none;
+      }
+
+      .last {
+        display: flex;
+        justify-content: flex-end;
+        width: 100%;
       }
     </style>
     <settings-router current-route="{{currentRoute}}"
         current-route-titles="{{currentRouteTitles}}">
     </settings-router>
-    <paper-toolbar>
-      <div class="title" i18n-content="settings"></div>
-      <!-- TODO(dschuyler): implement internal search. -->
-      <iron-icon icon="md-settings-icons:search"></iron-icon>
-    </paper-toolbar>
-    <paper-drawer-panel drawer-width="256px" id="panel">
-      <settings-menu drawer class="flex" current-route="{{currentRoute}}">
-      </settings-menu>
-      <settings-main main prefs="{{prefs}}" current-route="{{currentRoute}}">
-        <paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
-      </settings-main>
+    <paper-drawer-panel drawer-width="256px" id="panel" narrow="{{isNarrow_}}">
+      <paper-header-panel drawer>
+        <paper-toolbar class="toolbar">
+          <div class="heading flex">$i18n{settings}</div>
+        </paper-toolbar>
+        <settings-menu current-route="{{currentRoute}}">
+        </settings-menu>
+      </paper-header-panel>
+      <paper-header-panel main>
+        <paper-toolbar class="toolbar">
+          <paper-icon-button icon="menu" id="menu-button" paper-drawer-toggle>
+          </paper-icon-button>
+          <div class="heading" id="main-title">
+            $i18n{settings}
+          </div>
+          <div class="last">
+            <paper-icon-button icon="md-settings-icons:search" toggles>
+            </paper-icon-button>
+            <paper-input id="search-input" label="$i18n{internalSearch}"
+                no-label-float>
+              <!-- TODO(dschuyler): implement internal search. -->
+              <paper-icon-button suffix icon="md-settings-icons:cancel">
+              </paper-icon-button>
+            </paper-input>
+          </div>
+        </paper-toolbar>
+        <settings-main prefs="{{prefs}}" current-route="{{currentRoute}}">
+        </paper-icon-button>
+      </paper-header-panel>
     </paper-drawer-panel>
   </template>
   <script src="settings_ui.js"></script>
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index f4ce963..218fe3f 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -1213,7 +1213,7 @@
 
   ui_test_utils::NavigateToURL(
       browser(),
-      GURL("blob:chrome%3A//newtab/49a463bb-fac8-476c-97bf-5d7076c3ea1a"));
+      GURL("blob:chrome://newtab/49a463bb-fac8-476c-97bf-5d7076c3ea1a"));
   EXPECT_EQ(security_state::SecurityStateModel::NONE,
             model_client->GetSecurityInfo().security_level);
 }
diff --git a/chrome/browser/themes/theme_service_unittest.cc b/chrome/browser/themes/theme_service_unittest.cc
index 1cdabab6..339cc0f 100644
--- a/chrome/browser/themes/theme_service_unittest.cc
+++ b/chrome/browser/themes/theme_service_unittest.cc
@@ -8,6 +8,7 @@
 #include "base/files/file_util.h"
 #include "base/macros.h"
 #include "base/path_service.h"
+#include "base/strings/stringprintf.h"
 #include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/extensions/extension_service.h"
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 3fc52ec..4d802a9 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -119,6 +119,7 @@
     "//ui/accessibility",
     "//ui/base",
     "//ui/content_accelerators",
+    "//ui/display",
     "//ui/events",
     "//ui/events:gesture_detection",
     "//ui/gfx",
@@ -259,7 +260,7 @@
       "//ash:ash_with_content",
       "//ash/strings",
       "//components/user_manager",
-      "//ui/app_list/shower",
+      "//ui/app_list/presenter",
       "//ui/keyboard:mojom",
     ]
     if (!is_chromeos) {
diff --git a/chrome/browser/ui/app_list/test/fake_profile.cc b/chrome/browser/ui/app_list/test/fake_profile.cc
index cbaf706f..c58cab7 100644
--- a/chrome/browser/ui/app_list/test/fake_profile.cc
+++ b/chrome/browser/ui/app_list/test/fake_profile.cc
@@ -41,23 +41,6 @@
   return nullptr;
 }
 
-net::URLRequestContextGetter* FakeProfile::GetMediaRequestContext() {
-  return nullptr;
-}
-
-net::URLRequestContextGetter*
-FakeProfile::GetMediaRequestContextForRenderProcess(
-    int renderer_child_id) {
-  return nullptr;
-}
-
-net::URLRequestContextGetter*
-FakeProfile::GetMediaRequestContextForStoragePartition(
-        const base::FilePath& partition_path,
-        bool in_memory) {
-  return nullptr;
-}
-
 content::ResourceContext* FakeProfile::GetResourceContext() {
   return nullptr;
 }
@@ -101,6 +84,17 @@
   return nullptr;
 }
 
+net::URLRequestContextGetter* FakeProfile::CreateMediaRequestContext() {
+  return nullptr;
+}
+
+net::URLRequestContextGetter*
+FakeProfile::CreateMediaRequestContextForStoragePartition(
+    const base::FilePath& partition_path,
+    bool in_memory) {
+  return nullptr;
+}
+
 scoped_refptr<base::SequencedTaskRunner>
 FakeProfile::GetIOTaskRunner() {
   return scoped_refptr<base::SequencedTaskRunner>();
diff --git a/chrome/browser/ui/app_list/test/fake_profile.h b/chrome/browser/ui/app_list/test/fake_profile.h
index 1b39286f..edb373b 100644
--- a/chrome/browser/ui/app_list/test/fake_profile.h
+++ b/chrome/browser/ui/app_list/test/fake_profile.h
@@ -39,12 +39,6 @@
       const base::FilePath& partition_path) override;
   bool IsOffTheRecord() const override;
   content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
-  net::URLRequestContextGetter* GetMediaRequestContext() override;
-  net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
-      int renderer_child_id) override;
-  net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
-      const base::FilePath& partition_path,
-      bool in_memory) override;
   content::ResourceContext* GetResourceContext() override;
   content::BrowserPluginGuestManager* GetGuestManager() override;
   storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
@@ -60,6 +54,10 @@
       bool in_memory,
       content::ProtocolHandlerMap* protocol_handlers,
       content::URLRequestInterceptorScopedVector request_interceptors) override;
+  net::URLRequestContextGetter* CreateMediaRequestContext() override;
+  net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
+      const base::FilePath& partition_path,
+      bool in_memory) override;
   scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override;
   Profile* GetOffTheRecordProfile() override;
   void DestroyOffTheRecordProfile() override;
diff --git a/chrome/browser/ui/ash/app_list/app_list_controller_ash.cc b/chrome/browser/ui/ash/app_list/app_list_controller_ash.cc
index 18bf54e..b9b8ee4 100644
--- a/chrome/browser/ui/ash/app_list/app_list_controller_ash.cc
+++ b/chrome/browser/ui/ash/app_list/app_list_controller_ash.cc
@@ -10,25 +10,25 @@
 #include "chrome/browser/ui/browser_navigator.h"
 #include "chrome/browser/ui/browser_navigator_params.h"
 #include "extensions/common/extension.h"
-#include "ui/app_list/shower/app_list_shower_impl.h"
+#include "ui/app_list/presenter/app_list_presenter_impl.h"
 #include "ui/app_list/views/app_list_view.h"
 
 AppListControllerDelegateAsh::AppListControllerDelegateAsh(
-    app_list::AppListShowerImpl* app_list_shower)
-    : app_list_shower_(app_list_shower) {}
+    app_list::AppListPresenterImpl* app_list_presenter)
+    : app_list_presenter_(app_list_presenter) {}
 
 AppListControllerDelegateAsh::~AppListControllerDelegateAsh() {}
 
 void AppListControllerDelegateAsh::DismissView() {
-  app_list_shower_->Dismiss();
+  app_list_presenter_->Dismiss();
 }
 
 gfx::NativeWindow AppListControllerDelegateAsh::GetAppListWindow() {
-  return app_list_shower_->GetWindow();
+  return app_list_presenter_->GetWindow();
 }
 
 gfx::Rect AppListControllerDelegateAsh::GetAppListBounds() {
-  app_list::AppListView* app_list_view = app_list_shower_->GetView();
+  app_list::AppListView* app_list_view = app_list_presenter_->GetView();
   if (app_list_view)
     return app_list_view->GetBoundsInScreen();
   return gfx::Rect();
@@ -55,13 +55,13 @@
 }
 
 void AppListControllerDelegateAsh::OnShowChildDialog() {
-  app_list::AppListView* app_list_view = app_list_shower_->GetView();
+  app_list::AppListView* app_list_view = app_list_presenter_->GetView();
   if (app_list_view)
     app_list_view->SetAppListOverlayVisible(true);
 }
 
 void AppListControllerDelegateAsh::OnCloseChildDialog() {
-  app_list::AppListView* app_list_view = app_list_shower_->GetView();
+  app_list::AppListView* app_list_view = app_list_presenter_->GetView();
   if (app_list_view)
     app_list_view->SetAppListOverlayVisible(false);
 }
diff --git a/chrome/browser/ui/ash/app_list/app_list_controller_ash.h b/chrome/browser/ui/ash/app_list/app_list_controller_ash.h
index f24a90b..1c88e14 100644
--- a/chrome/browser/ui/ash/app_list/app_list_controller_ash.h
+++ b/chrome/browser/ui/ash/app_list/app_list_controller_ash.h
@@ -11,12 +11,12 @@
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h"
 
 namespace app_list {
-class AppListShowerImpl;
+class AppListPresenterImpl;
 }
 
 class AppListControllerDelegateAsh : public AppListControllerDelegate {
  public:
-  explicit AppListControllerDelegateAsh(app_list::AppListShowerImpl*);
+  explicit AppListControllerDelegateAsh(app_list::AppListPresenterImpl*);
   ~AppListControllerDelegateAsh() override;
 
  private:
@@ -52,7 +52,7 @@
   ash::LaunchSource AppListSourceToLaunchSource(AppListSource source);
 
   // Not owned.
-  app_list::AppListShowerImpl* app_list_shower_;
+  app_list::AppListPresenterImpl* app_list_presenter_;
 
   DISALLOW_COPY_AND_ASSIGN(AppListControllerDelegateAsh);
 };
diff --git a/chrome/browser/ui/ash/app_list/app_list_service_ash.cc b/chrome/browser/ui/ash/app_list/app_list_service_ash.cc
index b420c882..bce86d32 100644
--- a/chrome/browser/ui/ash/app_list/app_list_service_ash.cc
+++ b/chrome/browser/ui/ash/app_list/app_list_service_ash.cc
@@ -4,8 +4,8 @@
 
 #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h"
 
-#include "ash/app_list/app_list_shower_delegate.h"
-#include "ash/app_list/app_list_shower_delegate_factory.h"
+#include "ash/app_list/app_list_presenter_delegate.h"
+#include "ash/app_list/app_list_presenter_delegate_factory.h"
 #include "ash/app_list/app_list_view_delegate_factory.h"
 #include "ash/shell.h"
 #include "base/files/file_path.h"
@@ -19,8 +19,8 @@
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
 #include "chrome/browser/ui/ash/session_util.h"
 #include "ui/app_list/app_list_switches.h"
-#include "ui/app_list/shower/app_list_shower_delegate_factory.h"
-#include "ui/app_list/shower/app_list_shower_impl.h"
+#include "ui/app_list/presenter/app_list_presenter_delegate_factory.h"
+#include "ui/app_list/presenter/app_list_presenter_impl.h"
 #include "ui/app_list/views/app_list_main_view.h"
 #include "ui/app_list/views/app_list_view.h"
 #include "ui/app_list/views/contents_view.h"
@@ -54,19 +54,19 @@
 }
 
 AppListServiceAsh::AppListServiceAsh()
-    : shower_delegate_factory_(new ash::AppListShowerDelegateFactory(
+    : presenter_delegate_factory_(new ash::AppListPresenterDelegateFactory(
           base::WrapUnique(new ViewDelegateFactoryImpl(this)))) {
-  app_list_shower_.reset(
-      new app_list::AppListShowerImpl(shower_delegate_factory_.get()));
+  app_list_presenter_.reset(
+      new app_list::AppListPresenterImpl(presenter_delegate_factory_.get()));
   controller_delegate_.reset(
-      new AppListControllerDelegateAsh(app_list_shower_.get()));
+      new AppListControllerDelegateAsh(app_list_presenter_.get()));
 }
 
 AppListServiceAsh::~AppListServiceAsh() {
 }
 
-app_list::AppListShower* AppListServiceAsh::GetAppListShower() {
-  return app_list_shower_.get();
+app_list::AppListPresenter* AppListServiceAsh::GetAppListPresenter() {
+  return app_list_presenter_.get();
 }
 
 void AppListServiceAsh::Init(Profile* initial_profile) {
@@ -84,14 +84,14 @@
 void AppListServiceAsh::ShowAndSwitchToState(
     app_list::AppListModel::State state) {
   bool app_list_was_open = true;
-  app_list::AppListView* app_list_view = app_list_shower_->GetView();
+  app_list::AppListView* app_list_view = app_list_presenter_->GetView();
   if (!app_list_view) {
     // TODO(calamity): This may cause the app list to show briefly before the
     // state change. If this becomes an issue, add the ability to ash::Shell to
     // load the app list without showing it.
-    app_list_shower_->Show(ash::Shell::GetTargetRootWindow());
+    app_list_presenter_->Show(ash::Shell::GetTargetRootWindow());
     app_list_was_open = false;
-    app_list_view = app_list_shower_->GetView();
+    app_list_view = app_list_presenter_->GetView();
     DCHECK(app_list_view);
   }
 
@@ -112,7 +112,7 @@
   // This may not work correctly if the profile passed in is different from the
   // one the ash Shell is currently using.
   // TODO(ananta): Handle profile changes correctly when !defined(OS_CHROMEOS).
-  app_list_shower_->Show(ash::Shell::GetTargetRootWindow());
+  app_list_presenter_->Show(ash::Shell::GetTargetRootWindow());
 }
 
 void AppListServiceAsh::ShowForAppInstall(Profile* profile,
@@ -130,7 +130,7 @@
 }
 
 void AppListServiceAsh::HideCustomLauncherPage() {
-  app_list::AppListView* app_list_view = app_list_shower_->GetView();
+  app_list::AppListView* app_list_view = app_list_presenter_->GetView();
   if (!app_list_view)
     return;
 
@@ -143,18 +143,18 @@
 }
 
 bool AppListServiceAsh::IsAppListVisible() const {
-  return app_list_shower_->GetTargetVisibility();
+  return app_list_presenter_->GetTargetVisibility();
 }
 
 void AppListServiceAsh::DismissAppList() {
-  app_list_shower_->Dismiss();
+  app_list_presenter_->Dismiss();
 }
 
 void AppListServiceAsh::EnableAppList(Profile* initial_profile,
                                       AppListEnableSource enable_source) {}
 
 gfx::NativeWindow AppListServiceAsh::GetAppListWindow() {
-  return app_list_shower_->GetWindow();
+  return app_list_presenter_->GetWindow();
 }
 
 Profile* AppListServiceAsh::GetCurrentAppListProfile() {
diff --git a/chrome/browser/ui/ash/app_list/app_list_service_ash.h b/chrome/browser/ui/ash/app_list/app_list_service_ash.h
index ffde548..02dcf00 100644
--- a/chrome/browser/ui/ash/app_list/app_list_service_ash.h
+++ b/chrome/browser/ui/ash/app_list/app_list_service_ash.h
@@ -12,9 +12,9 @@
 #include "ui/app_list/app_list_model.h"
 
 namespace app_list {
-class AppListShower;
-class AppListShowerImpl;
-class AppListShowerDelegateFactory;
+class AppListPresenter;
+class AppListPresenterImpl;
+class AppListPresenterDelegateFactory;
 }
 
 namespace base {
@@ -29,7 +29,7 @@
  public:
   static AppListServiceAsh* GetInstance();
 
-  app_list::AppListShower* GetAppListShower();
+  app_list::AppListPresenter* GetAppListPresenter();
 
   // AppListService overrides:
   void Init(Profile* initial_profile) override;
@@ -71,9 +71,9 @@
   void CreateForProfile(Profile* default_profile) override;
   void DestroyAppList() override;
 
-  std::unique_ptr<app_list::AppListShowerDelegateFactory>
-      shower_delegate_factory_;
-  std::unique_ptr<app_list::AppListShowerImpl> app_list_shower_;
+  std::unique_ptr<app_list::AppListPresenterDelegateFactory>
+      presenter_delegate_factory_;
+  std::unique_ptr<app_list::AppListPresenterImpl> app_list_presenter_;
   std::unique_ptr<AppListControllerDelegateAsh> controller_delegate_;
 
   DISALLOW_COPY_AND_ASSIGN(AppListServiceAsh);
diff --git a/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.cc b/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.cc
index 2bf5197..023fc31 100644
--- a/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.cc
+++ b/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.cc
@@ -5,7 +5,7 @@
 #include "chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h"
 
 #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h"
-#include "ui/app_list/shower/test/app_list_shower_impl_test_api.h"
+#include "ui/app_list/presenter/test/app_list_presenter_impl_test_api.h"
 #include "ui/app_list/views/app_list_main_view.h"
 #include "ui/app_list/views/app_list_view.h"
 #include "ui/app_list/views/apps_container_view.h"
@@ -15,14 +15,15 @@
 
 AppListServiceAshTestApi::AppListServiceAshTestApi() {}
 
-app_list::AppListShowerImpl* AppListServiceAshTestApi::GetAppListShower()
+app_list::AppListPresenterImpl* AppListServiceAshTestApi::GetAppListPresenter()
     const {
-  return AppListServiceAsh::GetInstance()->app_list_shower_.get();
+  return AppListServiceAsh::GetInstance()->app_list_presenter_.get();
 }
 
 app_list::AppListView* AppListServiceAshTestApi::GetAppListView() const {
-  app_list::test::AppListShowerImplTestApi shower_test_api(GetAppListShower());
-  return shower_test_api.view();
+  app_list::test::AppListPresenterImplTestApi presenter_test_api(
+      GetAppListPresenter());
+  return presenter_test_api.view();
 }
 
 app_list::AppsGridView* AppListServiceAshTestApi::GetRootGridView() const {
diff --git a/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h b/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h
index f51bb83..39d998f 100644
--- a/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h
+++ b/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h
@@ -8,19 +8,19 @@
 #include "base/macros.h"
 
 namespace app_list {
-class AppListShowerImpl;
+class AppListPresenterImpl;
 class AppListView;
 class AppsGridView;
 class StartPageView;
 }
 
-// Accesses private data from an AppListServiceAsh and AppListShowerImpl
+// Accesses private data from an AppListServiceAsh and AppListPresenterImpl
 // for testing.
 class AppListServiceAshTestApi {
  public:
   AppListServiceAshTestApi();
 
-  app_list::AppListShowerImpl* GetAppListShower() const;
+  app_list::AppListPresenterImpl* GetAppListPresenter() const;
 
   app_list::AppListView* GetAppListView() const;
 
diff --git a/chrome/browser/ui/ash/chrome_screenshot_grabber.cc b/chrome/browser/ui/ash/chrome_screenshot_grabber.cc
index 9392cd73..91a3ebe 100644
--- a/chrome/browser/ui/ash/chrome_screenshot_grabber.cc
+++ b/chrome/browser/ui/ash/chrome_screenshot_grabber.cc
@@ -351,6 +351,29 @@
   content::RecordAction(base::UserMetricsAction("Screenshot_TakePartial"));
 }
 
+void ChromeScreenshotGrabber::HandleTakeWindowScreenshot(aura::Window* window) {
+  if (ScreenshotsDisabled()) {
+    screenshot_grabber_->NotifyScreenshotCompleted(
+        ui::ScreenshotGrabberObserver::SCREENSHOTS_DISABLED, base::FilePath());
+    return;
+  }
+
+  base::FilePath screenshot_directory;
+  if (!GetScreenshotDirectory(&screenshot_directory)) {
+    screenshot_grabber_->NotifyScreenshotCompleted(
+        ui::ScreenshotGrabberObserver::SCREENSHOT_GET_DIR_FAILED,
+        base::FilePath());
+    return;
+  }
+
+  base::FilePath screenshot_path =
+      screenshot_directory.AppendASCII(GetScreenshotBaseFilename() + ".png");
+  screenshot_grabber_->TakeScreenshot(window,
+                                      gfx::Rect(window->bounds().size()),
+                                      screenshot_path);
+  content::RecordAction(base::UserMetricsAction("Screenshot_TakeWindow"));
+}
+
 bool ChromeScreenshotGrabber::CanTakeScreenshot() {
   return screenshot_grabber_->CanTakeScreenshot();
 }
diff --git a/chrome/browser/ui/ash/chrome_screenshot_grabber.h b/chrome/browser/ui/ash/chrome_screenshot_grabber.h
index aa45ddc..52a94ac 100644
--- a/chrome/browser/ui/ash/chrome_screenshot_grabber.h
+++ b/chrome/browser/ui/ash/chrome_screenshot_grabber.h
@@ -34,6 +34,7 @@
   void HandleTakeScreenshotForAllRootWindows() override;
   void HandleTakePartialScreenshot(aura::Window* window,
                                    const gfx::Rect& rect) override;
+  void HandleTakeWindowScreenshot(aura::Window* window) override;
   bool CanTakeScreenshot() override;
 
   // ui::ScreenshotGrabberDelegate:
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index f3da988..6d60f3e 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -32,7 +32,7 @@
 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
 #include "chrome/grit/chromium_strings.h"
 #include "grit/theme_resources.h"
-#include "ui/app_list/shower/app_list_shower.h"
+#include "ui/app_list/presenter/app_list_presenter.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
 
@@ -140,9 +140,9 @@
       displayer.browser()->window()->GetNativeWindow());
 }
 
-app_list::AppListShower* ChromeShellDelegate::GetAppListShower() {
+app_list::AppListPresenter* ChromeShellDelegate::GetAppListPresenter() {
   DCHECK(ash::Shell::HasInstance());
-  return AppListServiceAsh::GetInstance()->GetAppListShower();
+  return AppListServiceAsh::GetInstance()->GetAppListPresenter();
 }
 
 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate(
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.h b/chrome/browser/ui/ash/chrome_shell_delegate.h
index 2fc09d9..fe69109 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.h
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.h
@@ -52,7 +52,7 @@
   void RemoveVirtualKeyboardStateObserver(
       ash::VirtualKeyboardStateObserver* observer) override;
   void OpenUrl(const GURL& url) override;
-  app_list::AppListShower* GetAppListShower() override;
+  app_list::AppListPresenter* GetAppListPresenter() override;
   ash::ShelfDelegate* CreateShelfDelegate(ash::ShelfModel* model) override;
   ash::SystemTrayDelegate* CreateSystemTrayDelegate() override;
   ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() override;
diff --git a/chrome/browser/ui/cocoa/app_menu/app_menu_controller.mm b/chrome/browser/ui/cocoa/app_menu/app_menu_controller.mm
index 7ac9484e..f7c7d57 100644
--- a/chrome/browser/ui/cocoa/app_menu/app_menu_controller.mm
+++ b/chrome/browser/ui/cocoa/app_menu/app_menu_controller.mm
@@ -361,6 +361,14 @@
       [self appMenuModel]->GetLabelForCommandId(IDC_ZOOM_PERCENT_DISPLAY));
   [[[buttonViewController_ zoomItem] viewWithTag:IDC_ZOOM_PERCENT_DISPLAY]
       setTitle:title];
+  [[[[buttonViewController_ zoomItem]
+      viewWithTag:IDC_ZOOM_MINUS] image]
+          setAccessibilityDescription:l10n_util::GetNSString(
+              IDS_TEXT_SMALLER_MAC)];
+  [[[[buttonViewController_ zoomItem]
+      viewWithTag:IDC_ZOOM_PLUS] image]
+        setAccessibilityDescription:l10n_util::GetNSString(
+              IDS_TEXT_BIGGER_MAC)];
   content::RecordAction(UserMetricsAction("ShowAppMenu"));
 
   NSImage* icon = [self appMenuModel]->browser()->window()->IsFullscreen()
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h
index 7dc2e3d5..39ae0b8 100644
--- a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h
+++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h
@@ -24,7 +24,9 @@
             gfx::NativeWindow parent,
             const base::string16& app_name,
             const base::string16& target_name,
-            std::unique_ptr<DesktopMediaList> media_list,
+            std::unique_ptr<DesktopMediaList> screen_list,
+            std::unique_ptr<DesktopMediaList> window_list,
+            std::unique_ptr<DesktopMediaList> tab_list,
             bool request_audio,
             const DoneCallback& done_callback) override;
 
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm
index e46f2ac..d777da4 100644
--- a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm
+++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm
@@ -14,21 +14,26 @@
 DesktopMediaPickerCocoa::~DesktopMediaPickerCocoa() {
 }
 
-void DesktopMediaPickerCocoa::Show(content::WebContents* web_contents,
-                                   gfx::NativeWindow context,
-                                   gfx::NativeWindow parent,
-                                   const base::string16& app_name,
-                                   const base::string16& target_name,
-                                   std::unique_ptr<DesktopMediaList> media_list,
-                                   bool request_audio,
-                                   const DoneCallback& done_callback) {
+void DesktopMediaPickerCocoa::Show(
+    content::WebContents* web_contents,
+    gfx::NativeWindow context,
+    gfx::NativeWindow parent,
+    const base::string16& app_name,
+    const base::string16& target_name,
+    std::unique_ptr<DesktopMediaList> screen_list,
+    std::unique_ptr<DesktopMediaList> window_list,
+    std::unique_ptr<DesktopMediaList> tab_list,
+    bool request_audio,
+    const DoneCallback& done_callback) {
   controller_.reset([[DesktopMediaPickerController alloc]
-      initWithMediaList:std::move(media_list)
-                 parent:parent
-               callback:done_callback
-                appName:app_name
-             targetName:target_name
-           requestAudio:request_audio]);
+      initWithScreenList:std::move(screen_list)
+              windowList:std::move(window_list)
+                 tabList:std::move(tab_list)
+                  parent:parent
+                callback:done_callback
+                 appName:app_name
+              targetName:target_name
+            requestAudio:request_audio]);
   [controller_ showWindow:nil];
 }
 
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h
index fd4a575..f0931e0 100644
--- a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h
+++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h
@@ -62,12 +62,14 @@
 // appears as the initiator of the request.
 // |targetName| will be used to format the dialog's label and appear as the
 // consumer of the requested stream.
-- (id)initWithMediaList:(std::unique_ptr<DesktopMediaList>)media_list
-                 parent:(NSWindow*)parent
-               callback:(const DesktopMediaPicker::DoneCallback&)callback
-                appName:(const base::string16&)appName
-             targetName:(const base::string16&)targetName
-           requestAudio:(bool)requestAudio;
+- (id)initWithScreenList:(std::unique_ptr<DesktopMediaList>)screen_list
+              windowList:(std::unique_ptr<DesktopMediaList>)window_list
+                 tabList:(std::unique_ptr<DesktopMediaList>)tab_list
+                  parent:(NSWindow*)parent
+                callback:(const DesktopMediaPicker::DoneCallback&)callback
+                 appName:(const base::string16&)appName
+              targetName:(const base::string16&)targetName
+            requestAudio:(bool)requestAudio;
 
 @end
 
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.mm b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.mm
index 7c03f91..964d9dd 100644
--- a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.mm
+++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.mm
@@ -10,6 +10,7 @@
 #include "base/command_line.h"
 #import "base/mac/bundle_locations.h"
 #include "base/strings/sys_string_conversions.h"
+#include "chrome/browser/media/combined_desktop_media_list.h"
 #import "chrome/browser/ui/cocoa/key_equivalent_constants.h"
 #import "chrome/browser/ui/cocoa/media_picker/desktop_media_picker_item.h"
 #include "chrome/common/chrome_switches.h"
@@ -63,12 +64,14 @@
 
 @implementation DesktopMediaPickerController
 
-- (id)initWithMediaList:(std::unique_ptr<DesktopMediaList>)media_list
-                 parent:(NSWindow*)parent
-               callback:(const DesktopMediaPicker::DoneCallback&)callback
-                appName:(const base::string16&)appName
-             targetName:(const base::string16&)targetName
-           requestAudio:(bool)requestAudio {
+- (id)initWithScreenList:(std::unique_ptr<DesktopMediaList>)screen_list
+              windowList:(std::unique_ptr<DesktopMediaList>)window_list
+                 tabList:(std::unique_ptr<DesktopMediaList>)tab_list
+                  parent:(NSWindow*)parent
+                callback:(const DesktopMediaPicker::DoneCallback&)callback
+                 appName:(const base::string16&)appName
+              targetName:(const base::string16&)targetName
+            requestAudio:(bool)requestAudio {
   const NSUInteger kStyleMask =
       NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask;
   base::scoped_nsobject<NSWindow> window(
@@ -83,7 +86,20 @@
     [self initializeContentsWithAppName:appName
                              targetName:targetName
                            requestAudio:requestAudio];
-    media_list_ = std::move(media_list);
+    std::vector<std::unique_ptr<DesktopMediaList>> media_lists;
+    if (screen_list)
+      media_lists.push_back(std::move(screen_list));
+
+    if (window_list)
+      media_lists.push_back(std::move(window_list));
+
+    if (tab_list)
+      media_lists.push_back(std::move(tab_list));
+
+    if (media_lists.size() > 1)
+      media_list_.reset(new CombinedDesktopMediaList(media_lists));
+    else
+      media_list_ = std::move(media_lists[0]);
     media_list_->SetViewDialogWindowId(content::DesktopMediaID(
        content::DesktopMediaID::TYPE_WINDOW, [window windowNumber]));
     doneCallback_ = callback;
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller_unittest.mm b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller_unittest.mm
index e586bd2..663d5d9 100644
--- a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller_unittest.mm
@@ -44,26 +44,28 @@
 
 class DesktopMediaPickerControllerTest : public CocoaTest {
  public:
-  DesktopMediaPickerControllerTest()
-      : callback_called_(false), media_list_(NULL) {
-  }
+  DesktopMediaPickerControllerTest() {}
 
   void SetUp() override {
     CocoaTest::SetUp();
 
-    media_list_ = new FakeDesktopMediaList();
+    screen_list_ = new FakeDesktopMediaList();
+    window_list_ = new FakeDesktopMediaList();
+    tab_list_ = new FakeDesktopMediaList();
 
     DesktopMediaPicker::DoneCallback callback =
         base::Bind(&DesktopMediaPickerControllerTest::OnResult,
                    base::Unretained(this));
 
     controller_.reset([[DesktopMediaPickerController alloc]
-        initWithMediaList:std::unique_ptr<DesktopMediaList>(media_list_)
-                   parent:nil
-                 callback:callback
-                  appName:base::ASCIIToUTF16("Screenshare Test")
-               targetName:base::ASCIIToUTF16("https://foo.com")
-             requestAudio:true]);
+        initWithScreenList:std::unique_ptr<DesktopMediaList>(screen_list_)
+                windowList:std::unique_ptr<DesktopMediaList>(window_list_)
+                   tabList:std::unique_ptr<DesktopMediaList>(tab_list_)
+                    parent:nil
+                  callback:callback
+                   appName:base::ASCIIToUTF16("Screenshare Test")
+                targetName:base::ASCIIToUTF16("https://foo.com")
+              requestAudio:true]);
   }
 
   void TearDown() override {
@@ -86,18 +88,20 @@
   }
 
   content::TestBrowserThreadBundle thread_bundle_;
-  bool callback_called_;
+  bool callback_called_ = false;
   content::DesktopMediaID source_reported_;
-  FakeDesktopMediaList* media_list_;
+  FakeDesktopMediaList* screen_list_ = nullptr;
+  FakeDesktopMediaList* window_list_ = nullptr;
+  FakeDesktopMediaList* tab_list_ = nullptr;
   base::scoped_nsobject<DesktopMediaPickerController> controller_;
 };
 
 TEST_F(DesktopMediaPickerControllerTest, ShowAndDismiss) {
   [controller_ showWindow:nil];
 
-  media_list_->AddSource(0);
-  media_list_->AddSource(1);
-  media_list_->SetSourceThumbnail(1);
+  window_list_->AddSource(0);
+  window_list_->AddSource(1);
+  window_list_->SetSourceThumbnail(1);
 
   NSArray* items = [controller_ items];
   EXPECT_EQ(2U, [items count]);
@@ -110,10 +114,10 @@
 TEST_F(DesktopMediaPickerControllerTest, ClickShare) {
   [controller_ showWindow:nil];
 
-  media_list_->AddSource(0);
-  media_list_->SetSourceThumbnail(0);
-  media_list_->AddSource(1);
-  media_list_->SetSourceThumbnail(1);
+  window_list_->AddSource(0);
+  window_list_->SetSourceThumbnail(0);
+  window_list_->AddSource(1);
+  window_list_->SetSourceThumbnail(1);
 
   EXPECT_EQ(2U, [[controller_ items] count]);
   EXPECT_FALSE([[controller_ shareButton] isEnabled]);
@@ -125,16 +129,16 @@
 
   [[controller_ shareButton] performClick:nil];
   EXPECT_TRUE(WaitForCallback());
-  EXPECT_EQ(media_list_->GetSource(1).id, source_reported_);
+  EXPECT_EQ(window_list_->GetSource(1).id, source_reported_);
 }
 
 TEST_F(DesktopMediaPickerControllerTest, ClickCancel) {
   [controller_ showWindow:nil];
 
-  media_list_->AddSource(0);
-  media_list_->SetSourceThumbnail(0);
-  media_list_->AddSource(1);
-  media_list_->SetSourceThumbnail(1);
+  window_list_->AddSource(0);
+  window_list_->SetSourceThumbnail(0);
+  window_list_->AddSource(1);
+  window_list_->SetSourceThumbnail(1);
 
   [[controller_ cancelButton] performClick:nil];
   EXPECT_TRUE(WaitForCallback());
@@ -144,10 +148,10 @@
 TEST_F(DesktopMediaPickerControllerTest, CloseWindow) {
   [controller_ showWindow:nil];
 
-  media_list_->AddSource(0);
-  media_list_->SetSourceThumbnail(0);
-  media_list_->AddSource(1);
-  media_list_->SetSourceThumbnail(1);
+  window_list_->AddSource(0);
+  window_list_->SetSourceThumbnail(0);
+  window_list_->AddSource(1);
+  window_list_->SetSourceThumbnail(1);
 
   [controller_ close];
   EXPECT_TRUE(WaitForCallback());
@@ -157,42 +161,42 @@
 TEST_F(DesktopMediaPickerControllerTest, UpdateThumbnail) {
   [controller_ showWindow:nil];
 
-  media_list_->AddSource(0);
-  media_list_->SetSourceThumbnail(0);
-  media_list_->AddSource(1);
-  media_list_->SetSourceThumbnail(1);
+  window_list_->AddSource(0);
+  window_list_->SetSourceThumbnail(0);
+  window_list_->AddSource(1);
+  window_list_->SetSourceThumbnail(1);
 
   NSArray* items = [controller_ items];
   EXPECT_EQ(2U, [items count]);
   NSUInteger version = [[items objectAtIndex:0] imageVersion];
 
-  media_list_->SetSourceThumbnail(0);
+  window_list_->SetSourceThumbnail(0);
   EXPECT_NE(version, [[items objectAtIndex:0] imageVersion]);
 }
 
 TEST_F(DesktopMediaPickerControllerTest, UpdateName) {
   [controller_ showWindow:nil];
 
-  media_list_->AddSource(0);
-  media_list_->SetSourceThumbnail(0);
-  media_list_->AddSource(1);
-  media_list_->SetSourceThumbnail(1);
+  window_list_->AddSource(0);
+  window_list_->SetSourceThumbnail(0);
+  window_list_->AddSource(1);
+  window_list_->SetSourceThumbnail(1);
 
   NSArray* items = [controller_ items];
   EXPECT_EQ(2U, [items count]);
   NSUInteger version = [[items objectAtIndex:0] imageVersion];
 
-  media_list_->SetSourceThumbnail(0);
+  window_list_->SetSourceThumbnail(0);
   EXPECT_NE(version, [[items objectAtIndex:0] imageVersion]);
 }
 
 TEST_F(DesktopMediaPickerControllerTest, RemoveSource) {
   [controller_ showWindow:nil];
 
-  media_list_->AddSource(0);
-  media_list_->AddSource(1);
-  media_list_->AddSource(2);
-  media_list_->SetSourceName(1, base::ASCIIToUTF16("foo"));
+  window_list_->AddSource(0);
+  window_list_->AddSource(1);
+  window_list_->AddSource(2);
+  window_list_->SetSourceName(1, base::ASCIIToUTF16("foo"));
 
   NSArray* items = [controller_ items];
   EXPECT_EQ(3U, [items count]);
@@ -202,16 +206,16 @@
 TEST_F(DesktopMediaPickerControllerTest, MoveSource) {
   [controller_ showWindow:nil];
 
-  media_list_->AddSource(0);
-  media_list_->AddSource(1);
-  media_list_->SetSourceName(1, base::ASCIIToUTF16("foo"));
+  window_list_->AddSource(0);
+  window_list_->AddSource(1);
+  window_list_->SetSourceName(1, base::ASCIIToUTF16("foo"));
   NSArray* items = [controller_ items];
   EXPECT_NSEQ(@"foo", [[items objectAtIndex:1] imageTitle]);
 
-  media_list_->MoveSource(1, 0);
+  window_list_->MoveSource(1, 0);
   EXPECT_NSEQ(@"foo", [[items objectAtIndex:0] imageTitle]);
 
-  media_list_->MoveSource(0, 1);
+  window_list_->MoveSource(0, 1);
   EXPECT_NSEQ(@"foo", [[items objectAtIndex:1] imageTitle]);
 }
 
@@ -221,11 +225,11 @@
 TEST_F(DesktopMediaPickerControllerTest, AudioShareCheckboxState) {
   [controller_ showWindow:nil];
 
-  media_list_->AddSourceByFullMediaID(
+  screen_list_->AddSourceByFullMediaID(
       content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, 0));
-  media_list_->AddSourceByFullMediaID(
+  window_list_->AddSourceByFullMediaID(
       content::DesktopMediaID(content::DesktopMediaID::TYPE_WINDOW, 1));
-  media_list_->AddSourceByFullMediaID(
+  tab_list_->AddSourceByFullMediaID(
       content::DesktopMediaID(content::DesktopMediaID::TYPE_WEB_CONTENTS, 2));
 
   NSButton* checkbox = [controller_ audioShareCheckbox];
diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc
index 9413acf..67ab3ce 100644
--- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc
@@ -496,7 +496,7 @@
 
 // Per http://crbug.com/603744, MaxSessionsAndRecenty fails intermittently on
 // windows and linux.
-#if defined(WIN) || defined(LINUX)
+#if defined(OS_WIN) || defined(OS_LINUX)
 #define MAYBE_MaxSessionsAndRecency DISABLED_MaxSessionsAndRecency
 #else
 #define MAYBE_MaxSessionsAndRecency MaxSessionsAndRecency
diff --git a/chrome/browser/ui/views/desktop_media_picker_views.cc b/chrome/browser/ui/views/desktop_media_picker_views.cc
index 065247cf..046e6fd 100644
--- a/chrome/browser/ui/views/desktop_media_picker_views.cc
+++ b/chrome/browser/ui/views/desktop_media_picker_views.cc
@@ -11,6 +11,7 @@
 #include "base/command_line.h"
 #include "base/strings/utf_string_conversions.h"
 #include "build/build_config.h"
+#include "chrome/browser/media/combined_desktop_media_list.h"
 #include "chrome/browser/media/desktop_media_list.h"
 #include "chrome/browser/ui/ash/ash_util.h"
 #include "chrome/common/chrome_switches.h"
@@ -395,16 +396,33 @@
     DesktopMediaPickerViews* parent,
     const base::string16& app_name,
     const base::string16& target_name,
-    std::unique_ptr<DesktopMediaList> media_list,
+    std::unique_ptr<DesktopMediaList> screen_list,
+    std::unique_ptr<DesktopMediaList> window_list,
+    std::unique_ptr<DesktopMediaList> tab_list,
     bool request_audio)
     : parent_(parent),
       app_name_(app_name),
       description_label_(new views::Label()),
       audio_share_checkbox_(nullptr),
       audio_share_checked_(true),
-      sources_scroll_view_(views::ScrollView::CreateScrollViewWithBorder()),
-      sources_list_view_(
-          new DesktopMediaListView(this, std::move(media_list))) {
+      sources_scroll_view_(views::ScrollView::CreateScrollViewWithBorder()) {
+  std::vector<std::unique_ptr<DesktopMediaList>> media_lists;
+  if (screen_list)
+    media_lists.push_back(std::move(screen_list));
+  if (window_list)
+    media_lists.push_back(std::move(window_list));
+  if (tab_list)
+    media_lists.push_back(std::move(tab_list));
+
+  std::unique_ptr<DesktopMediaList> media_list;
+  if (media_lists.size() > 1)
+    media_list.reset(new CombinedDesktopMediaList(media_lists));
+  else
+    media_list = std::move(media_lists[0]);
+
+  DCHECK(media_list != nullptr);
+  sources_list_view_ = new DesktopMediaListView(this, std::move(media_list));
+
   // TODO(estade): we should be getting the inside-border spacing by default as
   // a DialogDelegateView subclass, via default BubbleFrameView content margins.
   SetLayoutManager(new views::BoxLayout(
@@ -615,17 +633,21 @@
   }
 }
 
-void DesktopMediaPickerViews::Show(content::WebContents* web_contents,
-                                   gfx::NativeWindow context,
-                                   gfx::NativeWindow parent,
-                                   const base::string16& app_name,
-                                   const base::string16& target_name,
-                                   std::unique_ptr<DesktopMediaList> media_list,
-                                   bool request_audio,
-                                   const DoneCallback& done_callback) {
+void DesktopMediaPickerViews::Show(
+    content::WebContents* web_contents,
+    gfx::NativeWindow context,
+    gfx::NativeWindow parent,
+    const base::string16& app_name,
+    const base::string16& target_name,
+    std::unique_ptr<DesktopMediaList> screen_list,
+    std::unique_ptr<DesktopMediaList> window_list,
+    std::unique_ptr<DesktopMediaList> tab_list,
+    bool request_audio,
+    const DoneCallback& done_callback) {
   callback_ = done_callback;
   dialog_ = new DesktopMediaPickerDialogView(
-      web_contents, context, this, app_name, target_name, std::move(media_list),
+      web_contents, context, this, app_name, target_name,
+      std::move(screen_list), std::move(window_list), std::move(tab_list),
       request_audio);
 }
 
diff --git a/chrome/browser/ui/views/desktop_media_picker_views.h b/chrome/browser/ui/views/desktop_media_picker_views.h
index de4554b..ef6ff26 100644
--- a/chrome/browser/ui/views/desktop_media_picker_views.h
+++ b/chrome/browser/ui/views/desktop_media_picker_views.h
@@ -119,7 +119,9 @@
                                DesktopMediaPickerViews* parent,
                                const base::string16& app_name,
                                const base::string16& target_name,
-                               std::unique_ptr<DesktopMediaList> media_list,
+                               std::unique_ptr<DesktopMediaList> screen_list,
+                               std::unique_ptr<DesktopMediaList> window_list,
+                               std::unique_ptr<DesktopMediaList> tab_list,
                                bool request_audio);
   ~DesktopMediaPickerDialogView() override;
 
@@ -178,7 +180,9 @@
             gfx::NativeWindow parent,
             const base::string16& app_name,
             const base::string16& target_name,
-            std::unique_ptr<DesktopMediaList> media_list,
+            std::unique_ptr<DesktopMediaList> screen_list,
+            std::unique_ptr<DesktopMediaList> window_list,
+            std::unique_ptr<DesktopMediaList> tab_list,
             bool request_audio,
             const DoneCallback& done_callback) override;
 
diff --git a/chrome/browser/ui/views/desktop_media_picker_views_unittest.cc b/chrome/browser/ui/views/desktop_media_picker_views_unittest.cc
index 7ec7fc38..ea3e4bf 100644
--- a/chrome/browser/ui/views/desktop_media_picker_views_unittest.cc
+++ b/chrome/browser/ui/views/desktop_media_picker_views_unittest.cc
@@ -29,14 +29,19 @@
   ~DesktopMediaPickerViewsTest() override {}
 
   void SetUp() override {
-    media_list_ = new FakeDesktopMediaList();
-    std::unique_ptr<FakeDesktopMediaList> media_list(media_list_);
+    screen_list_ = new FakeDesktopMediaList();
+    window_list_ = new FakeDesktopMediaList();
+    tab_list_ = new FakeDesktopMediaList();
+    std::unique_ptr<FakeDesktopMediaList> screen_list(screen_list_);
+    std::unique_ptr<FakeDesktopMediaList> window_list(window_list_);
+    std::unique_ptr<FakeDesktopMediaList> tab_list(tab_list_);
 
     base::string16 app_name = base::ASCIIToUTF16("foo");
 
     picker_views_.reset(new DesktopMediaPickerViews());
     picker_views_->Show(NULL, test_helper_.GetContext(), NULL, app_name,
-                        app_name, std::move(media_list), false,
+                        app_name, std::move(screen_list),
+                        std::move(window_list), std::move(tab_list), false,
                         base::Bind(&DesktopMediaPickerViewsTest::OnPickerDone,
                                    base::Unretained(this)));
   }
@@ -57,7 +62,9 @@
  protected:
   content::TestBrowserThreadBundle thread_bundle_;
   views::ScopedViewsTestHelper test_helper_;
-  FakeDesktopMediaList* media_list_;
+  FakeDesktopMediaList* screen_list_;
+  FakeDesktopMediaList* window_list_;
+  FakeDesktopMediaList* tab_list_;
   std::unique_ptr<DesktopMediaPickerViews> picker_views_;
 };
 
@@ -73,7 +80,7 @@
   EXPECT_CALL(*this,
               OnPickerDone(content::DesktopMediaID(
                   content::DesktopMediaID::TYPE_WINDOW, kFakeId)));
-  media_list_->AddSource(kFakeId);
+  window_list_->AddSource(kFakeId);
 
   EXPECT_FALSE(
       GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK));
@@ -89,8 +96,8 @@
 // Verifies that a MediaSourceView is selected with mouse left click and
 // original selected MediaSourceView gets unselected.
 TEST_F(DesktopMediaPickerViewsTest, SelectMediaSourceViewOnSingleClick) {
-  media_list_->AddSource(0);
-  media_list_->AddSource(1);
+  window_list_->AddSource(0);
+  window_list_->AddSource(1);
 
   DesktopMediaSourceView* source_view_0 =
       GetPickerDialogView()->GetMediaSourceViewForTesting(0);
@@ -124,7 +131,7 @@
               OnPickerDone(content::DesktopMediaID(
                   content::DesktopMediaID::TYPE_WINDOW, kFakeId)));
 
-  media_list_->AddSource(kFakeId);
+  window_list_->AddSource(kFakeId);
 
   ui::MouseEvent double_click(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(),
                               ui::EventTimeForNow(),
@@ -142,7 +149,7 @@
               OnPickerDone(content::DesktopMediaID(
                   content::DesktopMediaID::TYPE_WINDOW, kFakeId)));
 
-  media_list_->AddSource(kFakeId);
+  window_list_->AddSource(kFakeId);
   ui::GestureEventDetails details(ui::ET_GESTURE_TAP);
   details.set_tap_count(2);
   ui::GestureEvent double_tap(10, 10, 0, base::TimeDelta(), details);
@@ -164,12 +171,12 @@
   EXPECT_EQ(NULL, GetPickerDialogView()->GetMediaSourceViewForTesting(0));
 
   for (int i = 0; i < 3; ++i) {
-    media_list_->AddSource(i);
+    window_list_->AddSource(i);
     EXPECT_TRUE(GetPickerDialogView()->GetMediaSourceViewForTesting(i));
   }
 
   for (int i = 2; i >= 0; --i) {
-    media_list_->RemoveSource(i);
+    window_list_->RemoveSource(i);
     EXPECT_EQ(NULL, GetPickerDialogView()->GetMediaSourceViewForTesting(i));
   }
 }
@@ -177,8 +184,8 @@
 // Verifies that focusing the MediaSourceView marks it selected and the
 // original selected MediaSourceView gets unselected.
 TEST_F(DesktopMediaPickerViewsTest, FocusMediaSourceViewToSelect) {
-  media_list_->AddSource(0);
-  media_list_->AddSource(1);
+  window_list_->AddSource(0);
+  window_list_->AddSource(1);
 
   DesktopMediaSourceView* source_view_0 =
       GetPickerDialogView()->GetMediaSourceViewForTesting(0);
@@ -202,7 +209,7 @@
 }
 
 TEST_F(DesktopMediaPickerViewsTest, OkButtonDisabledWhenNoSelection) {
-  media_list_->AddSource(111);
+  window_list_->AddSource(111);
 
   EXPECT_FALSE(
       GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK));
@@ -211,7 +218,7 @@
   EXPECT_TRUE(
       GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK));
 
-  media_list_->RemoveSource(0);
+  window_list_->RemoveSource(0);
   EXPECT_FALSE(
       GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK));
 }
diff --git a/chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc b/chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc
index e65a08d..78ad7f9 100644
--- a/chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc
+++ b/chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc
@@ -12,6 +12,7 @@
 #include "chrome/browser/extensions/extension_icon_manager.h"
 #include "chrome/browser/extensions/extension_install_prompt.h"
 #include "chrome/browser/extensions/extension_install_prompt_test_helper.h"
+#include "chrome/browser/platform_util.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_window.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -164,7 +165,9 @@
     views::DialogDelegateView* delegate_view = dialog.get();
 
     views::Widget* modal_dialog = views::DialogDelegate::CreateDialogWidget(
-        dialog.release(), nullptr, browser()->window()->GetNativeWindow());
+        dialog.release(), nullptr,
+        platform_util::GetViewForWindow(
+            browser()->window()->GetNativeWindow()));
     modal_dialog->Show();
 
     return delegate_view;
diff --git a/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc b/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc
index 372482c..49957a8 100644
--- a/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc
+++ b/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc
@@ -20,7 +20,7 @@
 #include "chrome/browser/ui/views/tabs/tab_strip.h"
 #include "chrome/common/chrome_constants.h"
 #include "ui/base/theme_provider.h"
-#include "ui/gfx/win/dpi.h"
+#include "ui/display/win/screen_win.h"
 #include "ui/views/controls/menu/native_menu_win.h"
 
 namespace {
@@ -285,7 +285,8 @@
     if (!browser_view_->IsFullscreen()) {
       gfx::Rect tabstrip_bounds(
           browser_frame_->GetBoundsForTabStrip(browser_view_->tabstrip()));
-      tabstrip_bounds = gfx::win::DIPToScreenRect(tabstrip_bounds);
+      tabstrip_bounds =
+          display::win::ScreenWin::DIPToClientRect(GetHWND(), tabstrip_bounds);
       margins.cyTopHeight = tabstrip_bounds.bottom();
 
       // On pre-Win 10, we need to offset the DWM frame into the toolbar so that
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 68ea806..287ad82 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -72,7 +72,7 @@
 #include "ui/views/window/non_client_view.h"
 
 #if defined(OS_WIN)
-#include "ui/gfx/win/dpi.h"
+#include "ui/display/win/screen_win.h"
 #include "ui/gfx/win/hwnd_util.h"
 #include "ui/views/widget/monitor_win.h"
 #include "ui/views/win/hwnd_util.h"
@@ -345,7 +345,7 @@
   if (event.IsOnlyRightMouseButton()) {
     gfx::Point point = event.location();
     views::View::ConvertPointToScreen(this, &point);
-    point = gfx::win::DIPToScreenPoint(point);
+    point = display::win::ScreenWin::DIPToScreenPoint(point);
     bool destroyed = false;
     destroyed_ = &destroyed;
     gfx::ShowSystemMenuAtPoint(views::HWNDForView(this), point);
diff --git a/chrome/browser/ui/views/tabs/window_finder_win.cc b/chrome/browser/ui/views/tabs/window_finder_win.cc
index 5b4e528..09839a68 100644
--- a/chrome/browser/ui/views/tabs/window_finder_win.cc
+++ b/chrome/browser/ui/views/tabs/window_finder_win.cc
@@ -10,8 +10,8 @@
 #include "base/win/scoped_gdi_object.h"
 #include "base/win/windows_version.h"
 #include "ui/aura/window.h"
+#include "ui/display/win/screen_win.h"
 #include "ui/gfx/screen.h"
-#include "ui/gfx/win/dpi.h"
 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
 #include "ui/views/win/hwnd_util.h"
 
@@ -126,7 +126,7 @@
         target_(window),
         is_top_most_(false),
         tmp_region_(CreateRectRgn(0, 0, 0, 0)) {
-    screen_loc_ = gfx::win::DIPToScreenPoint(screen_loc);
+    screen_loc_ = display::win::ScreenWin::DIPToScreenPoint(screen_loc);
     EnumWindows(WindowCallbackProc, as_lparam());
   }
 
@@ -203,7 +203,7 @@
       CHECK(SUCCEEDED(virtual_desktop_manager_.CreateInstance(
           __uuidof(VirtualDesktopManager))));
     }
-    screen_loc_ = gfx::win::DIPToScreenPoint(screen_loc);
+    screen_loc_ = display::win::ScreenWin::DIPToScreenPoint(screen_loc);
     EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, as_lparam());
   }
 
diff --git a/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc b/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc
index e07ee50..6f2c7686 100644
--- a/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc
@@ -233,6 +233,8 @@
   { "keyboardOverlaySave", IDS_KEYBOARD_OVERLAY_SAVE },
   { "keyboardOverlayScreenshotRegion",
     IDS_KEYBOARD_OVERLAY_SCREENSHOT_REGION },
+  { "keyboardOverlayScreenshotWindow",
+    IDS_KEYBOARD_OVERLAY_SCREENSHOT_WINDOW },
   { "keyboardOverlayScrollUpOnePage",
     IDS_KEYBOARD_OVERLAY_SCROLL_UP_ONE_PAGE },
   { "keyboardOverlaySelectAll", IDS_KEYBOARD_OVERLAY_SELECT_ALL },
@@ -268,6 +270,14 @@
   { "keyboardOverlayZoomScreenOut", IDS_KEYBOARD_OVERLAY_ZOOM_SCREEN_OUT },
 };
 
+bool TopRowKeysAreFunctionKeys(Profile* profile) {
+  if (!profile)
+    return false;
+
+  const PrefService* prefs = profile->GetPrefs();
+  return prefs ? prefs->GetBoolean(prefs::kLanguageSendFunctionKeys) : false;
+}
+
 std::string ModifierKeyToLabel(ModifierKey modifier) {
   for (size_t i = 0; i < arraysize(kModifierToLabels); ++i) {
     if (modifier == kModifierToLabels[i].modifier) {
@@ -277,7 +287,7 @@
   return "";
 }
 
-content::WebUIDataSource* CreateKeyboardOverlayUIHTMLSource() {
+content::WebUIDataSource* CreateKeyboardOverlayUIHTMLSource(Profile* profile) {
   content::WebUIDataSource* source =
       content::WebUIDataSource::Create(chrome::kChromeUIKeyboardOverlayHost);
 
@@ -291,6 +301,8 @@
   source->AddBoolean("keyboardOverlayHasChromeOSDiamondKey",
                      base::CommandLine::ForCurrentProcess()->HasSwitch(
                          chromeos::switches::kHasChromeOSDiamondKey));
+  source->AddBoolean("keyboardOverlayTopRowKeysAreFunctionKeys",
+                     TopRowKeysAreFunctionKeys(profile));
   ash::Shell* shell = ash::Shell::GetInstance();
   ash::DisplayManager* display_manager = shell->display_manager();
   source->AddBoolean("keyboardOverlayIsDisplayUIScalingEnabled",
@@ -410,5 +422,6 @@
   web_ui->AddMessageHandler(handler);
 
   // Set up the chrome://keyboardoverlay/ source.
-  content::WebUIDataSource::Add(profile, CreateKeyboardOverlayUIHTMLSource());
+  content::WebUIDataSource::Add(profile,
+                                CreateKeyboardOverlayUIHTMLSource(profile));
 }
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
index f8fdedee..d2a48b5 100644
--- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
@@ -348,9 +348,7 @@
   builder->Add("offlineLoginForgotPasswordDlg",
                IDS_OFFLINE_LOGIN_FORGOT_PASSWORD_DIALOG_TEXT);
   builder->Add("offlineLoginCloseBtn", IDS_OFFLINE_LOGIN_CLOSE_BUTTON_TEXT);
-  builder->AddF("enterpriseInfoMessage",
-                IDS_LOGIN_DEVICE_MANAGED_BY_NOTICE,
-                base::UTF8ToUTF16(GetEnterpriseDomain()));
+  builder->Add("enterpriseInfoMessage", IDS_LOGIN_DEVICE_MANAGED_BY_NOTICE);
   builder->Add("samlInterstitialMessage",
                 IDS_LOGIN_SAML_INTERSTITIAL_MESSAGE);
   builder->Add("samlInterstitialChangeAccountLink",
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui.cc b/chrome/browser/ui/webui/media_router/media_router_ui.cc
index a962fc1..1b19dc9 100644
--- a/chrome/browser/ui/webui/media_router/media_router_ui.cc
+++ b/chrome/browser/ui/webui/media_router/media_router_ui.cc
@@ -252,9 +252,8 @@
   TRACE_EVENT_NESTABLE_ASYNC_INSTANT1("media_router", "UI", initiator,
                                       "MediaRouterUI::InitCommon", this);
 
-#if defined(OS_WIN)
   router_->OnUserGesture();
-#endif
+
   // Create |collator_| before |query_result_manager_| so that |collator_| is
   // already set up when we get a callback from |query_result_manager_|.
   UErrorCode error = U_ZERO_ERROR;
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index f928f76b..644bf46 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -58,6 +58,7 @@
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/notification_details.h"
 #include "content/public/browser/resource_dispatcher_host.h"
+#include "content/public/browser/storage_partition.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_ui.h"
 #include "content/public/browser/web_ui_data_source.h"
@@ -401,7 +402,9 @@
 
   proxy_ = new IOThreadImpl(this->AsWeakPtr(), g_browser_process->io_thread(),
                             profile->GetRequestContext());
-  proxy_->AddRequestContextGetter(profile->GetMediaRequestContext());
+  proxy_->AddRequestContextGetter(
+      content::BrowserContext::GetDefaultStoragePartition(profile)->
+          GetMediaURLRequestContext());
 #if defined(ENABLE_EXTENSIONS)
   proxy_->AddRequestContextGetter(profile->GetRequestContextForExtensions());
 #endif
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 22f7274..4521713 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -16,6 +16,7 @@
 #include "base/i18n/rtl.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram.h"
+#include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
 #include "chrome/browser/browser_process.h"
@@ -720,7 +721,8 @@
   }
 
   std::unique_ptr<AppInstallInfo> install_info(new AppInstallInfo());
-  install_info->title = title;
+  install_info->title = base::CollapseWhitespace(
+      title, /* trim_sequences_with_line_breaks */ false);
   install_info->app_url = launch_url;
   install_info->page_ordinal = page_ordinal;
 
diff --git a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
index f90fbf7c..0ae9744 100644
--- a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
@@ -69,6 +69,7 @@
       {"save", IDS_SAVE},
       {"advancedPageTitle", IDS_SETTINGS_ADVANCED},
       {"basicPageTitle", IDS_SETTINGS_BASIC},
+      {"internalSearch", IDS_SETTINGS_INTERNAL_SEARCH},
       {"settings", IDS_SETTINGS_SETTINGS},
       {"restart", IDS_SETTINGS_RESTART},
   };
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index d17c2cb..c358cac 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -32,6 +32,7 @@
         ],
         'chromium_child_dependencies': [
           'child',
+          'gpu',
           'renderer',
           'utility',
           '../content/content.gyp:content_gpu',
@@ -112,6 +113,7 @@
         'chrome_debugger.gypi',
         'chrome_dll.gypi',
         'chrome_exe.gypi',
+        'chrome_gpu.gypi',
         'chrome_installer.gypi',
         'chrome_renderer.gypi',
         'chrome_tests.gypi',
@@ -569,6 +571,7 @@
             '../components/components.gyp:dom_distiller_core_java',
             '../components/components.gyp:gcm_driver_java',
             '../components/components.gyp:infobar_delegate_java',
+            '../components/components.gyp:instance_id_driver_java',
             '../components/components.gyp:invalidation_java',
             '../components/components.gyp:investigated_scenario_java',
             '../components/components.gyp:navigation_interception_java',
diff --git a/chrome/chrome_android.gypi b/chrome/chrome_android.gypi
index 9b33eb0..c7849303 100644
--- a/chrome/chrome_android.gypi
+++ b/chrome/chrome_android.gypi
@@ -14,6 +14,7 @@
         'chrome.gyp:browser',
         'chrome.gyp:browser_ui',
         'chrome.gyp:child',
+        'chrome.gyp:gpu',
         'chrome_features.gyp:chrome_common_features',
         'chrome.gyp:renderer',
         'chrome.gyp:utility',
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index d396379..eef88877 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3314,12 +3314,12 @@
             '../components/components.gyp:guest_view_browser',
             '../components/components.gyp:history_content_browser',
             '../components/components.gyp:keyed_service_content',
-            '../components/components.gyp:navigation_interception',
-            '../components/components.gyp:network_hints_common',
             '../components/components.gyp:metrics_gpu',
             '../components/components.gyp:metrics_profiler',
             '../components/components.gyp:metrics_profiler_content',
+            '../components/components.gyp:navigation_interception',
             '../components/components.gyp:net_log',
+            '../components/components.gyp:network_hints_common',
             '../components/components.gyp:ntp_snippets',
             '../components/components.gyp:packed_ct_ev_whitelist',
             '../components/components.gyp:password_manager_content_browser',
@@ -3332,8 +3332,8 @@
             '../components/components.gyp:safe_json',
             '../components/components.gyp:security_state',
             '../components/components.gyp:sessions_content',
-            '../components/components.gyp:storage_monitor',
             '../components/components.gyp:ssl_config',
+            '../components/components.gyp:storage_monitor',
             '../components/components.gyp:syncable_prefs',
             '../components/components.gyp:translate_content_browser',
             '../components/components.gyp:upload_list',
@@ -3367,10 +3367,10 @@
             '../services/shell/shell.gyp:shell_public',
             '../storage/storage_browser.gyp:storage',
             '../storage/storage_common.gyp:storage_common',
-            '../third_party/re2/re2.gyp:re2',
             '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
             '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput',
             '../third_party/libyuv/libyuv.gyp:libyuv',
+            '../third_party/re2/re2.gyp:re2',
             '../third_party/smhasher/smhasher.gyp:cityhash',
             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
             '../ui/base/ime/ui_base_ime.gyp:ui_base_ime',
@@ -3465,11 +3465,6 @@
           ],
           'sources': [ '<@(chrome_browser_mac_sources)' ]
         }],
-        ['OS=="win"', {
-          'dependencies': [
-            'file_pre_reader',
-          ],
-        }],
         ['OS=="mac" or OS=="android"', {
           'sources': [
             '<@(chrome_browser_password_manager_mac_android_sources)',
@@ -3841,8 +3836,10 @@
           'dependencies': [
             'chrome_process_finder',
             'chrome_watcher_client',
+            'file_pre_reader',
             'installer_util_strings',
             'kasko_util',
+            'metrics_constants_util_win',
             '../chrome/common_constants.gyp:version_header',
             '../chrome_elf/chrome_elf.gyp:chrome_elf',
             '../chrome_elf/chrome_elf.gyp:chrome_elf_constants',
diff --git a/chrome/chrome_browser_chromeos.gypi b/chrome/chrome_browser_chromeos.gypi
index 8940a1e..e659a43 100644
--- a/chrome/chrome_browser_chromeos.gypi
+++ b/chrome/chrome_browser_chromeos.gypi
@@ -69,6 +69,8 @@
         'browser/chromeos/arc/arc_process_service.h',
         'browser/chromeos/arc/arc_settings_service.cc',
         'browser/chromeos/arc/arc_settings_service.h',
+        'browser/chromeos/arc/gpu_arc_video_service_host.cc',
+        'browser/chromeos/arc/gpu_arc_video_service_host.h',
         'browser/chromeos/arc/arc_optin_uma.cc',
         'browser/chromeos/arc/arc_optin_uma.h',
         'browser/chromeos/attestation/attestation_ca_client.cc',
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index 7f78cf8..0713b83 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -2625,7 +2625,7 @@
       'browser/ui/app_list/app_list_service_impl.h',
       'browser/ui/app_list/app_list_service_mac.h',
       'browser/ui/app_list/app_list_service_mac.mm',
-      'browser/ui/app_list/app_list_shower_delegate.h',
+      'browser/ui/app_list/app_list_presenter_delegate.h',
       'browser/ui/app_list/app_list_syncable_service.cc',
       'browser/ui/app_list/app_list_syncable_service.h',
       'browser/ui/app_list/app_list_syncable_service_factory.cc',
@@ -2911,6 +2911,7 @@
         '../ui/accessibility/accessibility.gyp:accessibility',
         '../ui/base/ui_base.gyp:ui_base',
         '../ui/content_accelerators/ui_content_accelerators.gyp:ui_content_accelerators',
+        '../ui/display/display.gyp:display',
         '../ui/events/events.gyp:events',
         '../ui/events/events.gyp:gesture_detection',
         '../ui/gfx/gfx.gyp:gfx',
@@ -3047,7 +3048,7 @@
             '../ash/ash.gyp:ash_with_content',
             '../ash/ash_strings.gyp:ash_strings',
             '../components/components.gyp:user_manager',
-            '../ui/app_list/shower/app_list_shower.gyp:app_list_shower',
+            '../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter',
           ],
           'conditions': [
             ['chromeos == 0', {
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi
index c53545f..725df230 100644
--- a/chrome/chrome_common.gypi
+++ b/chrome/chrome_common.gypi
@@ -657,4 +657,23 @@
       ],
     },
   ],
+  'conditions': [
+    ['OS == "win"', {
+      'targets': [
+        {
+          # GN version: //chrome/common:metrics_constants_util_win
+          'target_name': 'metrics_constants_util_win',
+          'type': 'static_library',
+          'sources': [
+            'common/metrics_constants_util_win.cc',
+            'common/metrics_constants_util_win.h',
+          ],
+          'dependencies': [
+            'installer_util',
+            '../base/base.gyp:base',
+          ],
+        },
+      ],
+    }],
+  ],
 }
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi
index 534f0c8..930c839e 100644
--- a/chrome/chrome_exe.gypi
+++ b/chrome/chrome_exe.gypi
@@ -98,23 +98,6 @@
             }],
           ]
         }],
-        ['OS == "win"', {
-          'dependencies': [
-            'chrome_watcher',
-            'chrome_watcher_client',
-            '../components/components.gyp:browser_watcher_client',
-            '../components/components.gyp:crash_component',
-          ],
-          'sources': [
-            'app/chrome_crash_reporter_client.cc',
-            'app/chrome_crash_reporter_client.h',
-          ],
-          'conditions': [
-            ['win_console_app==1', {
-              'defines': ['WIN_CONSOLE_APP'],
-            }],
-          ],
-        }],
         ['OS == "android"', {
           # Don't put the 'chrome' target in 'all' on android
           'suppress_wildcard': 1,
@@ -409,18 +392,23 @@
             'chrome_nacl_win64',
             'chrome_process_finder',
             'chrome_version_resources',
-            'installer_util',
+            'chrome_watcher',
+            'chrome_watcher_client',
             'file_pre_reader',
+            'installer_util',
+            'metrics_constants_util_win',
             '../base/base.gyp:base',
-            '../crypto/crypto.gyp:crypto',
             '../breakpad/breakpad.gyp:breakpad_handler',
             '../breakpad/breakpad.gyp:breakpad_sender',
+            '../chrome/common_constants.gyp:common_constants',
             '../chrome_elf/chrome_elf.gyp:chrome_elf',
+            '../components/components.gyp:browser_watcher_client',
             '../components/components.gyp:crash_component',
             '../components/components.gyp:crash_core_common',
             '../components/components.gyp:flags_ui_switches',
             '../components/components.gyp:policy',
             '../components/components.gyp:startup_metric_utils_common',
+            '../crypto/crypto.gyp:crypto',
             '../sandbox/sandbox.gyp:sandbox',
             '../third_party/kasko/kasko.gyp:kasko_features',
             '../ui/gfx/gfx.gyp:gfx',
@@ -428,6 +416,8 @@
           ],
           'sources': [
             '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_exe_version.rc',
+            'app/chrome_crash_reporter_client.cc',
+            'app/chrome_crash_reporter_client.h',
             'app/chrome_exe.rc',
             'common/crash_keys.cc',
             'common/crash_keys.h',
@@ -436,6 +426,11 @@
             # We still want the _win entry point for sandbox, etc.
             'app/chrome_exe_main_aura.cc',
           ],
+          'conditions': [
+            ['win_console_app==1', {
+              'defines': ['WIN_CONSOLE_APP'],
+            }],
+          ],
           'msvs_settings': {
             'VCLinkerTool': {
               'OutputFile': '$(OutDir)\\initialexe\\chrome.exe',
diff --git a/chrome/chrome_gpu.gypi b/chrome/chrome_gpu.gypi
new file mode 100644
index 0000000..a661c72
--- /dev/null
+++ b/chrome/chrome_gpu.gypi
@@ -0,0 +1,33 @@
+# 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.
+
+{
+  'targets': [
+    {
+      # GN version: //chrome/gpu
+      'target_name': 'gpu',
+      'type': 'static_library',
+      'include_dirs': [
+        '..',
+        '<(grit_out_dir)',
+      ],
+      'sources': [
+        'gpu/chrome_content_gpu_client.cc',
+        'gpu/chrome_content_gpu_client.h',
+      ],
+      'conditions': [
+        ['chromeos==1', {
+          'dependencies': [
+            '../components/components.gyp:arc_mojo_bindings',
+          ],
+          'sources': [
+            'gpu/arc_video_accelerator.h',
+            'gpu/gpu_arc_video_service.cc',
+            'gpu/gpu_arc_video_service.h',
+          ],
+        }],
+      ],
+    },
+  ],
+}
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 63bb68e..5992552 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -1338,6 +1338,8 @@
       'test/chromedriver/net/sync_websocket_factory.h',
       'test/chromedriver/net/sync_websocket_impl.cc',
       'test/chromedriver/net/sync_websocket_impl.h',
+      'test/chromedriver/net/timeout.cc',
+      'test/chromedriver/net/timeout.h',
       'test/chromedriver/net/url_request_context_getter.cc',
       'test/chromedriver/net/url_request_context_getter.h',
       'test/chromedriver/net/websocket.cc',
@@ -1440,6 +1442,7 @@
       'test/chromedriver/command_listener_proxy_unittest.cc',
       'test/chromedriver/commands_unittest.cc',
       'test/chromedriver/logging_unittest.cc',
+      'test/chromedriver/net/timeout_unittest.cc',
       'test/chromedriver/performance_logger_unittest.cc',
       'test/chromedriver/server/http_handler_unittest.cc',
       'test/chromedriver/session_commands_unittest.cc',
@@ -2401,7 +2404,7 @@
                 '<@(chrome_browser_app_list_ash_test_support_sources)'
               ],
               'dependencies': [
-                '../ui/app_list/shower/app_list_shower.gyp:app_list_shower_test_support',
+                '../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter_test_support',
               ],
             }],
           ],
@@ -2634,6 +2637,9 @@
         ['toolkit_views==1 and OS!="mac" and chromeos == 0', {
           'sources': [ '<@(chrome_browser_tests_views_non_cros_or_mac_sources)' ],
         }],
+        ['OS=="linux" or OS=="win"', {
+          'sources': [ '<@(chrome_browser_tests_non_mac_desktop_sources)' ],
+        }],
         ['OS=="ios"', {
           'sources!': [
             # TODO(dbeam): log webui URLs on iOS and test them.
@@ -3288,13 +3294,11 @@
             }],
             ['OS=="mac" or OS=="win"', {
               'dependencies': [
-                # TODO(kbr): port this dependency to GN.
                 '../third_party/crashpad/crashpad/tools/tools.gyp:crashpad_database_util',
               ],
             }],
             ['OS=="win"', {
               'dependencies': [
-                # TODO(kbr): port this dependency to GN.
                 'copy_cdb_to_output',
               ],
             }],
@@ -3457,7 +3461,6 @@
         ['OS=="win"', {
           'targets': [
             {
-              # TODO(kbr): port this target to GN.
               'target_name': 'copy_cdb_to_output',
               'type': 'none',
               'actions': [
diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi
index 2f507b5..302525b 100644
--- a/chrome/chrome_tests_unit.gypi
+++ b/chrome/chrome_tests_unit.gypi
@@ -1866,6 +1866,7 @@
         ['OS!="ios"', {
           'dependencies': [
             'child',
+            'gpu',
             'renderer',
             'utility',
             '../content/content.gyp:content_gpu',
diff --git a/chrome/chrome_watcher/BUILD.gn b/chrome/chrome_watcher/BUILD.gn
index 67c993d..a3b2d6b7 100644
--- a/chrome/chrome_watcher/BUILD.gn
+++ b/chrome/chrome_watcher/BUILD.gn
@@ -57,6 +57,7 @@
     "//base",
     "//base:base_static",
     "//build/config/sanitizers:deps",
+    "//chrome/common:metrics_constants_util_win",
     "//chrome/installer/util:with_no_strings",
     "//components/browser_watcher",
   ]
diff --git a/chrome/chrome_watcher/chrome_watcher_main.cc b/chrome/chrome_watcher/chrome_watcher_main.cc
index 8e00079..3a6174df 100644
--- a/chrome/chrome_watcher/chrome_watcher_main.cc
+++ b/chrome/chrome_watcher/chrome_watcher_main.cc
@@ -57,14 +57,13 @@
 // an exit funnel, for reporting the next time Chrome runs.
 class BrowserMonitor {
  public:
-  BrowserMonitor(base::RunLoop* run_loop, const base::char16* registry_path);
+  BrowserMonitor(base::StringPiece16 registry_path, base::RunLoop* run_loop);
   ~BrowserMonitor();
 
   // Initiates the asynchronous monitoring process, returns true on success.
   // |on_initialized_event| will be signaled immediately before blocking on the
   // exit of |process|.
-  bool StartWatching(const base::char16* registry_path,
-                     base::Process process,
+  bool StartWatching(base::Process process,
                      base::win::ScopedHandle on_initialized_event);
 
  private:
@@ -95,8 +94,8 @@
   DISALLOW_COPY_AND_ASSIGN(BrowserMonitor);
 };
 
-BrowserMonitor::BrowserMonitor(base::RunLoop* run_loop,
-                               const base::char16* registry_path)
+BrowserMonitor::BrowserMonitor(base::StringPiece16 registry_path,
+                               base::RunLoop* run_loop)
     : exit_code_watcher_(registry_path),
       end_session_watcher_window_(
           base::Bind(&BrowserMonitor::OnEndSessionMessage,
@@ -104,14 +103,12 @@
       background_thread_("BrowserWatcherThread"),
       browser_exited_(true, false),  // manual reset, initially non-signalled.
       run_loop_(run_loop),
-      main_thread_(base::ThreadTaskRunnerHandle::Get()) {
-}
+      main_thread_(base::ThreadTaskRunnerHandle::Get()) {}
 
 BrowserMonitor::~BrowserMonitor() {
 }
 
 bool BrowserMonitor::StartWatching(
-    const base::char16* registry_path,
     base::Process process,
     base::win::ScopedHandle on_initialized_event) {
   if (!exit_code_watcher_.Initialize(std::move(process)))
@@ -183,7 +180,6 @@
 }
 
 void OnWindowEvent(
-    const base::string16& registry_path,
     base::Process process,
     const base::Callback<void(const base::Process&)>& on_hung_callback,
     browser_watcher::WindowHangMonitor::WindowEvent window_event) {
@@ -238,8 +234,8 @@
   msg_loop.set_thread_name("WatcherMainThread");
 
   base::RunLoop run_loop;
-  BrowserMonitor monitor(&run_loop, registry_path);
-  if (!monitor.StartWatching(registry_path, process.Duplicate(),
+  BrowserMonitor monitor(registry_path, &run_loop);
+  if (!monitor.StartWatching(process.Duplicate(),
                              std::move(on_initialized_event))) {
     return 1;
   }
@@ -248,8 +244,8 @@
     // Scoped to force |hang_monitor| destruction before Kasko is shut down.
     browser_watcher::WindowHangMonitor hang_monitor(
         base::TimeDelta::FromSeconds(60), base::TimeDelta::FromSeconds(20),
-        base::Bind(&OnWindowEvent, registry_path,
-                   base::Passed(process.Duplicate()), on_hung_callback));
+        base::Bind(&OnWindowEvent, base::Passed(process.Duplicate()),
+                   on_hung_callback));
     hang_monitor.Initialize(process.Duplicate());
 
     run_loop.Run();
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
index 7f197ce..64911e1 100644
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -351,6 +351,21 @@
   }
 }
 
+if (is_win) {
+  # GYP version: chrome/chrome_common.gypi:metrics_constants_util_win
+  source_set("metrics_constants_util_win") {
+    sources = [
+      "metrics_constants_util_win.cc",
+      "metrics_constants_util_win.h",
+    ]
+
+    deps = [
+      "//base",
+      "//chrome/installer/util:with_no_strings",
+    ]
+  }
+}
+
 source_set("test_support") {
   testonly = true
   visibility = [ "//chrome/test:test_support" ]
@@ -382,7 +397,7 @@
   }
 }
 
-# GN version: chrome/chrome.gyp:app_mode_app_support
+# GYP version: chrome/chrome.gyp:app_mode_app_support
 source_set("app_mode_app_support") {
   sources = [
     "mac/app_mode_chrome_locator.h",
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc
index a48b5cc..3a868c0a 100644
--- a/chrome/common/chrome_constants.cc
+++ b/chrome/common/chrome_constants.cc
@@ -2,8 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "build/build_config.h"
 #include "chrome/common/chrome_constants.h"
+
+#include "build/build_config.h"
 #include "chrome/common/chrome_version.h"
 
 #define FPL FILE_PATH_LITERAL
@@ -203,14 +204,6 @@
     L"CHROME_METRO_NAV_SEARCH_REQUEST";
 const wchar_t kMetroGetCurrentTabInfoMessage[] =
     L"CHROME_METRO_GET_CURRENT_TAB_INFO";
-// This is used by breakpad and the metrics reporting.
-const wchar_t kBrowserCrashDumpAttemptsRegistryPath[] =
-    L"Software\\" PRODUCT_STRING_PATH L"\\BrowserCrashDumpAttempts";
-const wchar_t kBrowserCrashDumpAttemptsRegistryPathSxS[] =
-    L"Software\\" PRODUCT_STRING_PATH L"\\BrowserCrashDumpAttemptsSxS";
-// This is used by browser exit code metrics reporting.
-const wchar_t kBrowserExitCodesRegistryPath[] =
-    L"Software\\" PRODUCT_STRING_PATH L"\\BrowserExitCodes";
 #endif
 
 #if defined(OS_CHROMEOS)
diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h
index 11182b26..2cd8a651 100644
--- a/chrome/common/chrome_constants.h
+++ b/chrome/common/chrome_constants.h
@@ -12,18 +12,6 @@
 #include "base/files/file_path.h"
 #include "build/build_config.h"
 
-#if defined(OS_WIN)
-// Do not use this, instead use BrowserDistribution's methods which will ensure
-// Google Chrome and Canary installs don't collide. http://crbug.com/577820
-#if defined(GOOGLE_CHROME_BUILD)
-#define PRODUCT_STRING_PATH L"Google\\Chrome"
-#elif defined(CHROMIUM_BUILD)
-#define PRODUCT_STRING_PATH L"Chromium"
-#else
-#error Unknown branding
-#endif
-#endif  // defined(OS_WIN)
-
 namespace chrome {
 
 extern const char kChromeVersion[];
@@ -114,14 +102,6 @@
 extern const wchar_t kMetroNavigationAndSearchMessage[];
 // Used by Metro Chrome to get information about the current tab.
 extern const wchar_t kMetroGetCurrentTabInfoMessage[];
-// Used to store crash report metrics using
-// content/browser_watcher/crash_reporting_metrics_win.h.
-extern const wchar_t kBrowserCrashDumpAttemptsRegistryPath[];
-extern const wchar_t kBrowserCrashDumpAttemptsRegistryPathSxS[];
-// Registry location where the browser watcher stores browser exit codes.
-// This is picked up and stored in histograms by the browser on the subsequent
-// launch.
-extern const wchar_t kBrowserExitCodesRegistryPath[];
 #endif
 
 #if defined(OS_CHROMEOS)
diff --git a/chrome/common/metrics_constants_util_win.cc b/chrome/common/metrics_constants_util_win.cc
new file mode 100644
index 0000000..21538d0
--- /dev/null
+++ b/chrome/common/metrics_constants_util_win.cc
@@ -0,0 +1,38 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/metrics_constants_util_win.h"
+
+#include "chrome/installer/util/browser_distribution.h"
+
+namespace {
+
+// Returns the registry path for this product with |suffix| appended to it.
+// |suffix| is expected to provide the separator.
+base::string16 GetSuffixedRegistryPath(const wchar_t* suffix) {
+  BrowserDistribution* chrome_distribution =
+      BrowserDistribution::GetDistribution();
+  DCHECK(chrome_distribution);
+  DCHECK_EQ(BrowserDistribution::CHROME_BROWSER,
+            chrome_distribution->GetType());
+
+  DCHECK_EQ(L'\\', *suffix);
+  DCHECK_NE(L'\\', chrome_distribution->GetRegistryPath().back());
+
+  return chrome_distribution->GetRegistryPath() + suffix;
+}
+
+}  // namespace
+
+namespace chrome {
+
+base::string16 GetBrowserCrashDumpAttemptsRegistryPath() {
+  return GetSuffixedRegistryPath(L"\\BrowserCrashDumpAttempts");
+}
+
+base::string16 GetBrowserExitCodesRegistryPath() {
+  return GetSuffixedRegistryPath(L"\\BrowserExitCodes");
+}
+
+}  // namespace chrome
diff --git a/chrome/common/metrics_constants_util_win.h b/chrome/common/metrics_constants_util_win.h
new file mode 100644
index 0000000..ab54561
--- /dev/null
+++ b/chrome/common/metrics_constants_util_win.h
@@ -0,0 +1,24 @@
+// 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.
+
+// A handful of resource-like constants related to the Chrome application.
+
+#ifndef CHROME_COMMON_METRICS_CONSTANTS_UTIL_WIN_H_
+#define CHROME_COMMON_METRICS_CONSTANTS_UTIL_WIN_H_
+
+#include "base/strings/string16.h"
+
+namespace chrome {
+
+// Returns the registry path where crash dump attempts are stored for this
+// product. This is used by metrics and crash reporting.
+base::string16 GetBrowserCrashDumpAttemptsRegistryPath();
+
+// Returns the registry path where exit code are stored for this product. This
+// is used by browser exit code metrics reporting.
+base::string16 GetBrowserExitCodesRegistryPath();
+
+}  // namespace chrome
+
+#endif  // CHROME_COMMON_METRICS_CONSTANTS_UTIL_WIN_H_
diff --git a/chrome/common/spellcheck_common.cc b/chrome/common/spellcheck_common.cc
index 1706349..58c3346 100644
--- a/chrome/common/spellcheck_common.cc
+++ b/chrome/common/spellcheck_common.cc
@@ -114,11 +114,10 @@
                         // crash.
     {"tg-TG", "-5-0"},  // Mar 4, 2014: Add Tajik dictionary.
 
-    // March 2016: Update from upstream
-    {"en-AU", "-7-0"},
-    {"en-CA", "-7-0"},
-    {"en-GB", "-7-0"},
-    {"en-US", "-7-0"},
+    // April 2016: Local fixes
+    {"en-CA", "-7-1"},
+    {"en-GB", "-7-1"},
+    {"en-US", "-7-1"},
 
     // March 2016: Initial check-in of Persian
     {"fa-IR", "-7-0"},
diff --git a/chrome/gpu/BUILD.gn b/chrome/gpu/BUILD.gn
new file mode 100644
index 0000000..d8c9405d
--- /dev/null
+++ b/chrome/gpu/BUILD.gn
@@ -0,0 +1,23 @@
+# 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.
+
+static_library("gpu") {
+  deps = [
+    "//content/public/gpu",
+  ]
+
+  sources = [
+    "chrome_content_gpu_client.cc",
+    "chrome_content_gpu_client.h",
+  ]
+
+  if (is_chromeos) {
+    deps += [ "//components/arc:arc_bindings" ]
+    sources += [
+      "arc_video_accelerator.h",
+      "gpu_arc_video_service.cc",
+      "gpu_arc_video_service.h",
+    ]
+  }
+}
diff --git a/chrome/gpu/DEPS b/chrome/gpu/DEPS
new file mode 100644
index 0000000..75bb0d7
--- /dev/null
+++ b/chrome/gpu/DEPS
@@ -0,0 +1,7 @@
+include_rules = [
+  "+components/arc/common",
+  "+content/public/gpu",
+  "+media/video",
+  "+media/base/video_frame.h",
+  "+mojo/edk/embedder",
+]
diff --git a/chrome/gpu/OWNERS b/chrome/gpu/OWNERS
new file mode 100644
index 0000000..9c106152
--- /dev/null
+++ b/chrome/gpu/OWNERS
@@ -0,0 +1,3 @@
+piman@chromium.org
+posciak@chromium.org
+sievers@chromium.org
diff --git a/chrome/gpu/arc_video_accelerator.h b/chrome/gpu/arc_video_accelerator.h
new file mode 100644
index 0000000..bb7fa62
--- /dev/null
+++ b/chrome/gpu/arc_video_accelerator.h
@@ -0,0 +1,151 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_
+#define CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_
+
+#include "base/files/scoped_file.h"
+
+namespace chromeos {
+namespace arc {
+
+enum HalPixelFormatExtension {
+  // The pixel formats defined in Android but are used here. They are defined
+  // in "system/core/include/system/graphics.h"
+  HAL_PIXEL_FORMAT_YCbCr_420_888 = 0x23,
+
+  // The following formats are not defined in Android, but used in
+  // ArcVideoAccelerator to identify the input format.
+  HAL_PIXEL_FORMAT_H264 = 0x34363248,
+  HAL_PIXEL_FORMAT_VP8 = 0x00385056,
+};
+
+enum PortType {
+  PORT_INPUT = 0,
+  PORT_OUTPUT = 1,
+  PORT_COUNT = 2,
+};
+
+enum BufferFlag {
+  BUFFER_FLAG_EOS = 1 << 0,
+};
+
+struct BufferMetadata {
+  int64_t timestamp = 0;  // in microseconds
+  uint32_t flags = 0;     // Flags defined in BufferFlag.
+  uint32_t bytes_used = 0;
+};
+
+struct VideoFormat {
+  uint32_t pixel_format = 0;
+  uint32_t buffer_size = 0;
+
+  // Minimum number of buffers required to decode/encode the stream.
+  uint32_t min_num_buffers = 0;
+  uint32_t coded_width = 0;
+  uint32_t coded_height = 0;
+  uint32_t crop_left = 0;
+  uint32_t crop_width = 0;
+  uint32_t crop_top = 0;
+  uint32_t crop_height = 0;
+};
+
+// The IPC interface between Android and Chromium for video decoding and
+// encoding. Input buffers are sent from Android side and get processed in
+// Chromium and the output buffers are returned back to Android side.
+class ArcVideoAccelerator {
+ public:
+  enum Error {
+    ILLEGAL_STATE = 1,
+    INVALID_ARGUMENT = 2,
+    UNREADABLE_INPUT = 3,
+    PLATFORM_FAILURE = 4,
+  };
+
+  struct Config {
+    enum DeviceType {
+      DEVICE_ENCODER = 0,
+      DEVICE_DECODER = 1,
+    };
+
+    DeviceType device_type = DEVICE_DECODER;
+    size_t num_input_buffers = 0;
+    uint32_t input_pixel_format = 0;
+    // TODO(owenlin): Add output_pixel_format. For now only the native pixel
+    //                format of each VDA on Chromium is supported.
+  };
+
+  // The callbacks of the ArcVideoAccelerator. The user of this class should
+  // implement this interface.
+  class Client {
+   public:
+    virtual ~Client() {}
+
+    // Called when an asynchronous error happens. The errors in Initialize()
+    // will not be reported here, but will be indicated by a false return value
+    // there.
+    virtual void OnError(Error error) = 0;
+
+    // Called when a buffer with the specified |index| and |port| has been
+    // processed and is no longer used in the accelerator. For input buffers,
+    // the Client may fill them with new content. For output buffers, indicates
+    // they are ready to be consumed by the client.
+    virtual void OnBufferDone(PortType port,
+                              uint32_t index,
+                              const BufferMetadata& metadata) = 0;
+
+    // Called when the output format has changed or the output format
+    // becomes available at beginning of the stream after initial parsing.
+    virtual void OnOutputFormatChanged(const VideoFormat& format) = 0;
+
+    // Called as a completion notification for Reset().
+    virtual void OnResetDone() = 0;
+  };
+
+  // Initializes the ArcVideoAccelerator with specific configuration. This
+  // must be called before any other methods. This call is synchronous and
+  // returns true iff initialization is successful.
+  virtual bool Initialize(const Config& config, Client* client) = 0;
+
+  // Assigns a shared memory to be used for the accelerator at the specified
+  // port and index. A buffer must be successfully bound before it can be passed
+  // to the accelerator via UseBuffer(). Already bound buffers may be reused
+  // multiple times without additional bindings.
+  virtual void BindSharedMemory(PortType port,
+                                uint32_t index,
+                                base::ScopedFD ashmem_fd,
+                                off_t offset,
+                                size_t length) = 0;
+
+  // Assigns a buffer to be used for the accelerator at the specified
+  // port and index. A buffer must be successfully bound before it can be
+  // passed to the accelerator via UseBuffer(). Already bound buffers may be
+  // reused multiple times without additional bindings.
+  virtual void BindDmabuf(PortType port,
+                          uint32_t index,
+                          base::ScopedFD dmabuf_fd) = 0;
+
+  // Passes a buffer to the accelerator. For input buffer, the accelerator
+  // will process it. For output buffer, the accelerator will output content
+  // to it.
+  virtual void UseBuffer(PortType port,
+                         uint32_t index,
+                         const BufferMetadata& metadata) = 0;
+
+  // Sets the number of output buffers. When it fails, Client::OnError() will
+  // be called.
+  virtual void SetNumberOfOutputBuffers(size_t number) = 0;
+
+  // Resets the accelerator. When it is done, Client::OnResetDone() will
+  // be called. Afterwards, all buffers won't be accessed by the accelerator
+  // and there won't be more callbacks.
+  virtual void Reset() = 0;
+
+  virtual ~ArcVideoAccelerator() {}
+};
+
+}  // namespace arc
+}  // namespace chromeos
+
+#endif  // CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_
diff --git a/chrome/gpu/chrome_content_gpu_client.cc b/chrome/gpu/chrome_content_gpu_client.cc
new file mode 100644
index 0000000..56d5886
--- /dev/null
+++ b/chrome/gpu/chrome_content_gpu_client.cc
@@ -0,0 +1,37 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/gpu/chrome_content_gpu_client.h"
+
+#include "content/public/common/service_registry.h"
+
+#if defined(OS_CHROMEOS)
+#include "chrome/gpu/gpu_arc_video_service.h"
+#endif
+
+#if defined(OS_CHROMEOS)
+namespace {
+
+void CreateGpuArcVideoService(
+    mojo::InterfaceRequest<::arc::VideoHost> request) {
+  // GpuArcVideoService is strongly bound to the Mojo message pipe it
+  // is connected to. When that message pipe is closed, either explicitly on the
+  // other end (in the browser process), or by a connection error, this object
+  // will be destroyed.
+  new chromeos::arc::GpuArcVideoService(std::move(request));
+}
+
+}  // namespace
+#endif
+
+ChromeContentGpuClient::ChromeContentGpuClient() {}
+
+ChromeContentGpuClient::~ChromeContentGpuClient() {}
+
+void ChromeContentGpuClient::RegisterMojoServices(
+    content::ServiceRegistry* registry) {
+#if defined(OS_CHROMEOS)
+  registry->AddService(base::Bind(&CreateGpuArcVideoService));
+#endif
+}
diff --git a/chrome/gpu/chrome_content_gpu_client.h b/chrome/gpu/chrome_content_gpu_client.h
new file mode 100644
index 0000000..4789cfb
--- /dev/null
+++ b/chrome/gpu/chrome_content_gpu_client.h
@@ -0,0 +1,23 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_
+#define CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_
+
+#include "base/macros.h"
+#include "content/public/gpu/content_gpu_client.h"
+
+class ChromeContentGpuClient : public content::ContentGpuClient {
+ public:
+  ChromeContentGpuClient();
+  ~ChromeContentGpuClient() override;
+
+  // content::ContentGpuClient implementation.
+  void RegisterMojoServices(content::ServiceRegistry* registry) override;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(ChromeContentGpuClient);
+};
+
+#endif  // CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_
diff --git a/chrome/gpu/gpu_arc_video_service.cc b/chrome/gpu/gpu_arc_video_service.cc
new file mode 100644
index 0000000..bb4c76ce
--- /dev/null
+++ b/chrome/gpu/gpu_arc_video_service.cc
@@ -0,0 +1,261 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/gpu/gpu_arc_video_service.h"
+
+#include <fcntl.h>
+
+#include <utility>
+
+#include "base/bind.h"
+#include "base/logging.h"
+#include "base/thread_task_runner_handle.h"
+#include "chrome/gpu/arc_video_accelerator.h"
+#include "components/arc/common/video_accelerator.mojom.h"
+#include "mojo/edk/embedder/embedder.h"
+#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/type_converter.h"
+
+namespace mojo {
+
+template <>
+struct TypeConverter<arc::BufferMetadataPtr, chromeos::arc::BufferMetadata> {
+  static arc::BufferMetadataPtr Convert(
+      const chromeos::arc::BufferMetadata& input) {
+    arc::BufferMetadataPtr result = arc::BufferMetadata::New();
+    result->timestamp = input.timestamp;
+    result->flags = input.flags;
+    result->bytes_used = input.bytes_used;
+    return result;
+  }
+};
+
+template <>
+struct TypeConverter<chromeos::arc::BufferMetadata, arc::BufferMetadataPtr> {
+  static chromeos::arc::BufferMetadata Convert(
+      const arc::BufferMetadataPtr& input) {
+    chromeos::arc::BufferMetadata result;
+    result.timestamp = input->timestamp;
+    result.flags = input->flags;
+    result.bytes_used = input->bytes_used;
+    return result;
+  }
+};
+
+template <>
+struct TypeConverter<arc::VideoFormatPtr, chromeos::arc::VideoFormat> {
+  static arc::VideoFormatPtr Convert(const chromeos::arc::VideoFormat& input) {
+    arc::VideoFormatPtr result = arc::VideoFormat::New();
+    result->pixel_format = input.pixel_format;
+    result->buffer_size = input.buffer_size;
+    result->min_num_buffers = input.min_num_buffers;
+    result->coded_width = input.coded_width;
+    result->coded_height = input.coded_height;
+    result->crop_left = input.crop_left;
+    result->crop_width = input.crop_width;
+    result->crop_top = input.crop_top;
+    result->crop_height = input.crop_height;
+    return result;
+  }
+};
+
+template <>
+struct TypeConverter<chromeos::arc::ArcVideoAccelerator::Config,
+                     arc::ArcVideoAcceleratorConfigPtr> {
+  static chromeos::arc::ArcVideoAccelerator::Config Convert(
+      const arc::ArcVideoAcceleratorConfigPtr& input) {
+    chromeos::arc::ArcVideoAccelerator::Config result;
+    result.device_type =
+        static_cast<chromeos::arc::ArcVideoAccelerator::Config::DeviceType>(
+            input->device_type);
+    result.num_input_buffers = input->num_input_buffers;
+    result.input_pixel_format = input->input_pixel_format;
+    return result;
+  }
+};
+
+}  // namespace mojo
+
+namespace chromeos {
+namespace arc {
+
+class GpuArcVideoService::AcceleratorStub
+    : public ::arc::VideoAcceleratorService,
+      public ArcVideoAccelerator::Client {
+ public:
+  // |owner| outlives AcceleratorStub.
+  explicit AcceleratorStub(GpuArcVideoService* owner)
+      : owner_(owner), binding_(this) {}
+
+  ~AcceleratorStub() override { DCHECK(thread_checker_.CalledOnValidThread()); }
+
+  bool Connect(const std::string& token) {
+    DVLOG(2) << "Connect";
+
+    mojo::ScopedMessagePipeHandle server_pipe =
+        mojo::edk::CreateParentMessagePipe(token);
+    if (!server_pipe.is_valid()) {
+      LOG(ERROR) << "Invalid pipe";
+      return false;
+    }
+
+    client_.Bind(mojo::InterfacePtrInfo<::arc::VideoAcceleratorServiceClient>(
+        std::move(server_pipe), 0u));
+
+    // base::Unretained is safe because we own |client_|
+    client_.set_connection_error_handler(
+        base::Bind(&GpuArcVideoService::AcceleratorStub::OnConnectionError,
+                   base::Unretained(this)));
+
+    // TODO(kcwu): create ArcGpuVideoDecodeAccelerator here.
+    // accelerator_.reset(new ArcGpuVideoDecodeAccelerator());
+
+    ::arc::VideoAcceleratorServicePtr service;
+    binding_.Bind(GetProxy(&service));
+    // base::Unretained is safe because we own |binding_|
+    binding_.set_connection_error_handler(
+        base::Bind(&GpuArcVideoService::AcceleratorStub::OnConnectionError,
+                   base::Unretained(this)));
+
+    client_->Init(std::move(service));
+    return true;
+  }
+
+  void OnConnectionError() {
+    DVLOG(2) << "OnConnectionError";
+    owner_->RemoveClient(this);
+    // |this| is deleted.
+  }
+
+  // ArcVideoAccelerator::Client implementation:
+  void OnError(ArcVideoAccelerator::Error error) override {
+    DVLOG(2) << "OnError " << error;
+    client_->OnError(
+        static_cast<::arc::VideoAcceleratorServiceClient::Error>(error));
+  }
+
+  void OnBufferDone(PortType port,
+                    uint32_t index,
+                    const BufferMetadata& metadata) override {
+    DVLOG(2) << "OnBufferDone " << port << "," << index;
+    client_->OnBufferDone(static_cast<::arc::PortType>(port), index,
+                          ::arc::BufferMetadata::From(metadata));
+  }
+
+  void OnResetDone() override {
+    DVLOG(2) << "OnResetDone";
+    client_->OnResetDone();
+  }
+
+  void OnOutputFormatChanged(const VideoFormat& format) override {
+    DVLOG(2) << "OnOutputFormatChanged";
+    client_->OnOutputFormatChanged(::arc::VideoFormat::From(format));
+  }
+
+  // ::arc::VideoAcceleratorService impementation.
+  void Initialize(::arc::ArcVideoAcceleratorConfigPtr config,
+                  const InitializeCallback& callback) override {
+    DVLOG(2) << "Initialize";
+    bool result = accelerator_->Initialize(
+        config.To<ArcVideoAccelerator::Config>(), this);
+    callback.Run(result);
+  }
+
+  void BindSharedMemory(::arc::PortType port,
+                        uint32_t index,
+                        mojo::ScopedHandle ashmem_handle,
+                        uint32_t offset,
+                        uint32_t length) override {
+    DVLOG(2) << "BindSharedMemoryCallback port=" << port << ", index=" << index
+             << ", offset=" << offset << ", length=" << length;
+
+    // TODO(kcwu) make sure do we need special care for invalid handle?
+    mojo::edk::ScopedPlatformHandle scoped_platform_handle;
+    MojoResult mojo_result = mojo::edk::PassWrappedPlatformHandle(
+        ashmem_handle.release().value(), &scoped_platform_handle);
+    DCHECK_EQ(mojo_result, MOJO_RESULT_OK);
+
+    auto fd = base::ScopedFD(scoped_platform_handle.release().handle);
+    accelerator_->BindSharedMemory(static_cast<PortType>(port), index,
+                                   std::move(fd), offset, length);
+  }
+
+  void BindDmabuf(::arc::PortType port,
+                  uint32_t index,
+                  mojo::ScopedHandle dmabuf_handle) override {
+    DVLOG(2) << "BindDmabuf port=" << port << ", index=" << index;
+    mojo::edk::ScopedPlatformHandle scoped_platform_handle;
+    MojoResult mojo_result = mojo::edk::PassWrappedPlatformHandle(
+        dmabuf_handle.release().value(), &scoped_platform_handle);
+    DCHECK_EQ(mojo_result, MOJO_RESULT_OK);
+
+    auto fd = base::ScopedFD(scoped_platform_handle.release().handle);
+    accelerator_->BindDmabuf(static_cast<PortType>(port), index, std::move(fd));
+  }
+
+  void UseBuffer(::arc::PortType port,
+                 uint32_t index,
+                 ::arc::BufferMetadataPtr metadata) override {
+    DVLOG(2) << "UseBuffer port=" << port << ", index=" << index;
+    accelerator_->UseBuffer(static_cast<PortType>(port), index,
+                            metadata.To<BufferMetadata>());
+  }
+
+  void SetNumberOfOutputBuffers(uint32_t number) override {
+    DVLOG(2) << "SetNumberOfOutputBuffers number=" << number;
+    accelerator_->SetNumberOfOutputBuffers(number);
+  }
+
+  void Reset() override { accelerator_->Reset(); }
+
+ private:
+  base::ThreadChecker thread_checker_;
+  GpuArcVideoService* const owner_;
+  std::unique_ptr<ArcVideoAccelerator> accelerator_;
+  ::arc::VideoAcceleratorServiceClientPtr client_;
+  mojo::Binding<::arc::VideoAcceleratorService> binding_;
+};
+
+GpuArcVideoService::GpuArcVideoService(
+    mojo::InterfaceRequest<::arc::VideoHost> request)
+    : binding_(this, std::move(request)) {}
+
+GpuArcVideoService::~GpuArcVideoService() {}
+
+void GpuArcVideoService::OnRequestArcVideoAcceleratorChannel(
+    const OnRequestArcVideoAcceleratorChannelCallback& callback) {
+  DVLOG(1) << "OnRequestArcVideoAcceleratorChannelCallback";
+
+  // Hardcode pid 0 since it is unused in mojo.
+  const base::ProcessHandle kUnusedChildProcessHandle = 0;
+  mojo::edk::ScopedPlatformHandle child_handle =
+      mojo::edk::ChildProcessLaunched(kUnusedChildProcessHandle);
+
+  MojoHandle wrapped_handle;
+  MojoResult wrap_result = mojo::edk::CreatePlatformHandleWrapper(
+      std::move(child_handle), &wrapped_handle);
+  if (wrap_result != MOJO_RESULT_OK) {
+    LOG(WARNING) << "Pipe failed to wrap handles. Closing: " << wrap_result;
+    callback.Run(mojo::ScopedHandle(), std::string());
+    return;
+  }
+
+  std::unique_ptr<AcceleratorStub> stub(new AcceleratorStub(this));
+
+  std::string token = mojo::edk::GenerateRandomToken();
+  if (!stub->Connect(token)) {
+    callback.Run(mojo::ScopedHandle(), std::string());
+    return;
+  }
+  accelerator_stubs_.insert(std::make_pair(stub.get(), std::move(stub)));
+
+  callback.Run(mojo::ScopedHandle(mojo::Handle(wrapped_handle)), token);
+}
+
+void GpuArcVideoService::RemoveClient(AcceleratorStub* stub) {
+  accelerator_stubs_.erase(stub);
+}
+
+}  // namespace arc
+}  // namespace chromeos
diff --git a/chrome/gpu/gpu_arc_video_service.h b/chrome/gpu/gpu_arc_video_service.h
new file mode 100644
index 0000000..951eb6e
--- /dev/null
+++ b/chrome/gpu/gpu_arc_video_service.h
@@ -0,0 +1,57 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
+#define CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
+
+#include <map>
+#include <memory>
+
+#include "base/macros.h"
+#include "components/arc/common/video.mojom.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+
+namespace chromeos {
+namespace arc {
+
+// GpuArcVideoService manages life-cycle and IPC message translation for
+// ArcVideoAccelerator.
+//
+// For each creation request from GpuArcVideoServiceHost, GpuArcVideoService
+// will create a new IPC channel.
+class GpuArcVideoService : public ::arc::VideoHost {
+ public:
+  class AcceleratorStub;
+
+  // |request| is mojo interface request of arc::VideoHost.
+  explicit GpuArcVideoService(mojo::InterfaceRequest<::arc::VideoHost> request);
+
+  // Upon deletion, all ArcVideoAccelerator will be deleted and the associated
+  // IPC channels are closed.
+  ~GpuArcVideoService() override;
+
+  // Removes the reference of |stub| (and trigger deletion) from this class.
+  void RemoveClient(AcceleratorStub* stub);
+
+ private:
+  // arc::VideoHost implementation.
+  void OnRequestArcVideoAcceleratorChannel(
+      const OnRequestArcVideoAcceleratorChannelCallback& callback) override;
+
+  base::ThreadChecker thread_checker_;
+
+  // Binding of arc::VideoHost. It also takes ownership of |this|.
+  mojo::StrongBinding<::arc::VideoHost> binding_;
+
+  // Bookkeeping all accelerator stubs.
+  std::map<AcceleratorStub*, std::unique_ptr<AcceleratorStub>>
+      accelerator_stubs_;
+
+  DISALLOW_COPY_AND_ASSIGN(GpuArcVideoService);
+};
+
+}  // namespace arc
+}  // namespace chromeos
+
+#endif  // CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
diff --git a/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc b/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
index 91725af..c563949 100644
--- a/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
+++ b/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
@@ -39,6 +39,8 @@
 #include "extensions/common/permissions/permissions_data.h"
 #include "extensions/common/switches.h"
 #include "extensions/renderer/dispatcher.h"
+#include "extensions/renderer/i18n_custom_bindings.h"
+#include "extensions/renderer/lazy_background_page_native_handler.h"
 #include "extensions/renderer/native_handler.h"
 #include "extensions/renderer/resource_bundle_source_map.h"
 #include "extensions/renderer/script_context.h"
@@ -124,6 +126,19 @@
       "automationInternal",
       std::unique_ptr<NativeHandler>(
           new extensions::AutomationInternalCustomBindings(context)));
+
+  // The following are native handlers that are defined in //extensions, but
+  // are only used for APIs defined in Chrome.
+  // TODO(devlin): We should clean this up. If an API is defined in Chrome,
+  // there's no reason to have its native handlers residing and being compiled
+  // in //extensions.
+  module_system->RegisterNativeHandler(
+      "i18n",
+      scoped_ptr<NativeHandler>(new extensions::I18NCustomBindings(context)));
+  module_system->RegisterNativeHandler(
+      "lazy_background_page",
+      scoped_ptr<NativeHandler>(
+          new extensions::LazyBackgroundPageNativeHandler(context)));
 }
 
 void ChromeExtensionsDispatcherDelegate::PopulateSourceMap(
diff --git a/chrome/renderer/extensions/tabs_custom_bindings.cc b/chrome/renderer/extensions/tabs_custom_bindings.cc
index 2459f96..206a9ee 100644
--- a/chrome/renderer/extensions/tabs_custom_bindings.cc
+++ b/chrome/renderer/extensions/tabs_custom_bindings.cc
@@ -18,9 +18,9 @@
 
 TabsCustomBindings::TabsCustomBindings(ScriptContext* context)
     : ObjectBackedNativeHandler(context) {
-  RouteFunction("OpenChannelToTab",
-      base::Bind(&TabsCustomBindings::OpenChannelToTab,
-                 base::Unretained(this)));
+  RouteFunction("OpenChannelToTab", "tabs",
+                base::Bind(&TabsCustomBindings::OpenChannelToTab,
+                           base::Unretained(this)));
 }
 
 void TabsCustomBindings::OpenChannelToTab(
diff --git a/chrome/renderer/extensions/webstore_bindings.cc b/chrome/renderer/extensions/webstore_bindings.cc
index e0bd2a9..3cdd6de7 100644
--- a/chrome/renderer/extensions/webstore_bindings.cc
+++ b/chrome/renderer/extensions/webstore_bindings.cc
@@ -52,7 +52,7 @@
 
 WebstoreBindings::WebstoreBindings(ScriptContext* context)
     : ObjectBackedNativeHandler(context) {
-  RouteFunction("Install",
+  RouteFunction("Install", "webstore",
                 base::Bind(&WebstoreBindings::Install, base::Unretained(this)));
 }
 
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 0a9ab3e..3f5d4d9c 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -600,7 +600,7 @@
 
       deps = [
         "//chrome/browser/ui",
-        "//ui/app_list/shower:test_support",
+        "//ui/app_list/presenter:test_support",
       ]
     }
   }
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 0685bb0..c801641c 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -796,23 +796,6 @@
   return NULL;
 }
 
-net::URLRequestContextGetter* TestingProfile::GetMediaRequestContext() {
-  return NULL;
-}
-
-net::URLRequestContextGetter*
-TestingProfile::GetMediaRequestContextForRenderProcess(
-    int renderer_child_id) {
-  return NULL;
-}
-
-net::URLRequestContextGetter*
-TestingProfile::GetMediaRequestContextForStoragePartition(
-    const base::FilePath& partition_path,
-    bool in_memory) {
-  return NULL;
-}
-
 net::URLRequestContextGetter* TestingProfile::GetRequestContext() {
   return GetDefaultStoragePartition(this)->GetURLRequestContext();
 }
@@ -951,6 +934,17 @@
   return GetRequestContext();
 }
 
+net::URLRequestContextGetter* TestingProfile::CreateMediaRequestContext() {
+  return NULL;
+}
+
+net::URLRequestContextGetter*
+TestingProfile::CreateMediaRequestContextForStoragePartition(
+    const base::FilePath& partition_path,
+    bool in_memory) {
+  return NULL;
+}
+
 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) {
   return true;
 }
diff --git a/chrome/test/base/testing_profile.h b/chrome/test/base/testing_profile.h
index f91e2797..915ed33 100644
--- a/chrome/test/base/testing_profile.h
+++ b/chrome/test/base/testing_profile.h
@@ -239,6 +239,10 @@
       bool in_memory,
       content::ProtocolHandlerMap* protocol_handlers,
       content::URLRequestInterceptorScopedVector request_interceptors) override;
+  net::URLRequestContextGetter* CreateMediaRequestContext() override;
+  net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
+      const base::FilePath& partition_path,
+      bool in_memory) override;
 
   TestingProfile* AsTestingProfile() override;
 
@@ -283,15 +287,8 @@
   PrefService* GetPrefs() override;
   const PrefService* GetPrefs() const override;
   ChromeZoomLevelPrefs* GetZoomLevelPrefs() override;
-
-  net::URLRequestContextGetter* GetMediaRequestContext() override;
-  net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
-      int renderer_child_id) override;
   net::URLRequestContextGetter* GetRequestContext() override;
   net::URLRequestContextGetter* GetRequestContextForExtensions() override;
-  net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
-      const base::FilePath& partition_path,
-      bool in_memory) override;
   net::SSLConfigService* GetSSLConfigService() override;
   void set_last_session_exited_cleanly(bool value) {
     last_session_exited_cleanly_ = value;
diff --git a/chrome/test/chromedriver/alert_commands.cc b/chrome/test/chromedriver/alert_commands.cc
index 6cf5c95..1846eac 100644
--- a/chrome/test/chromedriver/alert_commands.cc
+++ b/chrome/test/chromedriver/alert_commands.cc
@@ -11,6 +11,7 @@
 #include "chrome/test/chromedriver/chrome/javascript_dialog_manager.h"
 #include "chrome/test/chromedriver/chrome/status.h"
 #include "chrome/test/chromedriver/chrome/web_view.h"
+#include "chrome/test/chromedriver/net/timeout.h"
 #include "chrome/test/chromedriver/session.h"
 
 Status ExecuteAlertCommand(const AlertCommand& alert_command,
@@ -31,7 +32,7 @@
     return status;
 
   status = web_view->WaitForPendingNavigations(
-      session->GetCurrentFrameId(), session->page_load_timeout, true);
+      session->GetCurrentFrameId(), Timeout(session->page_load_timeout), true);
   if (status.IsError() && status.code() != kUnexpectedAlertOpen)
     return status;
 
diff --git a/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc b/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
index fb7fd07..30ab421 100644
--- a/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
+++ b/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
@@ -21,6 +21,7 @@
 #include "chrome/test/chromedriver/chrome/status.h"
 #include "chrome/test/chromedriver/chrome/web_view_impl.h"
 #include "chrome/test/chromedriver/net/port_server.h"
+#include "chrome/test/chromedriver/net/timeout.h"
 
 #if defined(OS_POSIX)
 #include <errno.h>
@@ -102,12 +103,12 @@
 
 Status ChromeDesktopImpl::WaitForPageToLoad(
     const std::string& url,
-    const base::TimeDelta& timeout,
+    const base::TimeDelta& timeout_raw,
     std::unique_ptr<WebView>* web_view) {
-  base::TimeTicks deadline = base::TimeTicks::Now() + timeout;
+  Timeout timeout(timeout_raw);
   std::string id;
   WebViewInfo::Type type = WebViewInfo::Type::kPage;
-  while (base::TimeTicks::Now() < deadline) {
+  while (timeout.GetRemainingTime() > base::TimeDelta()) {
     WebViewsInfo views_info;
     Status status = devtools_http_client_->GetWebViewsInfo(&views_info);
     if (status.IsError())
@@ -145,7 +146,7 @@
     return status;
 
   status = web_view_tmp->WaitForPendingNavigations(
-      std::string(), deadline - base::TimeTicks::Now(), false);
+      std::string(), timeout, false);
   if (status.IsOk())
     *web_view = std::move(web_view_tmp);
   return status;
diff --git a/chrome/test/chromedriver/chrome/devtools_client.h b/chrome/test/chromedriver/chrome/devtools_client.h
index 32aeb81..9365830 100644
--- a/chrome/test/chromedriver/chrome/devtools_client.h
+++ b/chrome/test/chromedriver/chrome/devtools_client.h
@@ -12,10 +12,10 @@
 
 namespace base {
 class DictionaryValue;
-class TimeDelta;
 }
 
 class DevToolsEventListener;
+class Timeout;
 class Status;
 
 // A DevTools client of a single DevTools debugger.
@@ -36,6 +36,11 @@
       const std::string& method,
       const base::DictionaryValue& params) = 0;
 
+  virtual Status SendCommandWithTimeout(
+      const std::string& method,
+      const base::DictionaryValue& params,
+      const Timeout* timeout) = 0;
+
   virtual Status SendAsyncCommand(
       const std::string& method,
       const base::DictionaryValue& params) = 0;
@@ -45,6 +50,12 @@
       const base::DictionaryValue& params,
       std::unique_ptr<base::DictionaryValue>* result) = 0;
 
+  virtual Status SendCommandAndGetResultWithTimeout(
+      const std::string& method,
+      const base::DictionaryValue& params,
+      const Timeout* timeout,
+      std::unique_ptr<base::DictionaryValue>* result) = 0;
+
   // Adds a listener. This must only be done when the client is disconnected.
   virtual void AddListener(DevToolsEventListener* listener) = 0;
 
@@ -54,7 +65,7 @@
   // If the condition is not met within |timeout|, kTimeout status
   // is returned eventually. If |timeout| is 0, this function will not block.
   virtual Status HandleEventsUntil(const ConditionalFunc& conditional_func,
-                                   const base::TimeDelta& timeout) = 0;
+                                   const Timeout& timeout) = 0;
 
   // Handles events that have been received but not yet handled.
   virtual Status HandleReceivedEvents() = 0;
diff --git a/chrome/test/chromedriver/chrome/devtools_client_impl.cc b/chrome/test/chromedriver/chrome/devtools_client_impl.cc
index 2ea3668..b49be56f 100644
--- a/chrome/test/chromedriver/chrome/devtools_client_impl.cc
+++ b/chrome/test/chromedriver/chrome/devtools_client_impl.cc
@@ -17,6 +17,7 @@
 #include "chrome/test/chromedriver/chrome/status.h"
 #include "chrome/test/chromedriver/chrome/util.h"
 #include "chrome/test/chromedriver/net/sync_websocket.h"
+#include "chrome/test/chromedriver/net/timeout.h"
 #include "chrome/test/chromedriver/net/url_request_context_getter.h"
 
 namespace {
@@ -171,24 +172,39 @@
 Status DevToolsClientImpl::SendCommand(
     const std::string& method,
     const base::DictionaryValue& params) {
+  return SendCommandWithTimeout(method, params, nullptr);
+}
+
+Status DevToolsClientImpl::SendCommandWithTimeout(
+    const std::string& method,
+    const base::DictionaryValue& params,
+    const Timeout* timeout) {
   std::unique_ptr<base::DictionaryValue> result;
-  return SendCommandInternal(method, params, &result, true);
+  return SendCommandInternal(method, params, &result, true, timeout);
 }
 
 Status DevToolsClientImpl::SendAsyncCommand(
     const std::string& method,
     const base::DictionaryValue& params) {
   std::unique_ptr<base::DictionaryValue> result;
-  return SendCommandInternal(method, params, &result, false);
+  return SendCommandInternal(method, params, &result, false, nullptr);
 }
 
 Status DevToolsClientImpl::SendCommandAndGetResult(
     const std::string& method,
     const base::DictionaryValue& params,
     std::unique_ptr<base::DictionaryValue>* result) {
+  return SendCommandAndGetResultWithTimeout(method, params, nullptr, result);
+}
+
+Status DevToolsClientImpl::SendCommandAndGetResultWithTimeout(
+    const std::string& method,
+    const base::DictionaryValue& params,
+    const Timeout* timeout,
+    std::unique_ptr<base::DictionaryValue>* result) {
   std::unique_ptr<base::DictionaryValue> intermediate_result;
   Status status = SendCommandInternal(
-      method, params, &intermediate_result, true);
+      method, params, &intermediate_result, true, timeout);
   if (status.IsError())
     return status;
   if (!intermediate_result)
@@ -203,16 +219,15 @@
 }
 
 Status DevToolsClientImpl::HandleReceivedEvents() {
-  return HandleEventsUntil(base::Bind(&ConditionIsMet), base::TimeDelta());
+  return HandleEventsUntil(base::Bind(&ConditionIsMet),
+                           Timeout(base::TimeDelta()));
 }
 
 Status DevToolsClientImpl::HandleEventsUntil(
-    const ConditionalFunc& conditional_func, const base::TimeDelta& timeout) {
+    const ConditionalFunc& conditional_func, const Timeout& timeout) {
   if (!socket_->IsConnected())
     return Status(kDisconnected, "not connected to DevTools");
 
-  base::TimeTicks deadline = base::TimeTicks::Now() + timeout;
-  base::TimeDelta next_message_timeout = timeout;
   while (true) {
     if (!socket_->HasNextMessage()) {
       bool is_condition_met = false;
@@ -223,10 +238,9 @@
         return Status(kOk);
     }
 
-    Status status = ProcessNextMessage(-1, next_message_timeout);
+    Status status = ProcessNextMessage(-1, timeout);
     if (status.IsError())
       return status;
-    next_message_timeout = deadline - base::TimeTicks::Now();
   }
 }
 
@@ -239,7 +253,8 @@
     const std::string& method,
     const base::DictionaryValue& params,
     std::unique_ptr<base::DictionaryValue>* result,
-    bool wait_for_response) {
+    bool wait_for_response,
+    const Timeout* timeout) {
   if (!socket_->IsConnected())
     return Status(kDisconnected, "not connected to DevTools");
 
@@ -262,7 +277,7 @@
     response_info_map_[command_id] = response_info;
     while (response_info->state == kWaiting) {
       Status status = ProcessNextMessage(
-          command_id, base::TimeDelta::FromMinutes(10));
+          command_id, Timeout(base::TimeDelta::FromMinutes(10), timeout));
       if (status.IsError()) {
         if (response_info->state == kReceived)
           response_info_map_.erase(command_id);
@@ -284,7 +299,7 @@
 
 Status DevToolsClientImpl::ProcessNextMessage(
     int expected_id,
-    const base::TimeDelta& timeout) {
+    const Timeout& timeout) {
   ScopedIncrementer increment_stack_count(&stack_count_);
 
   Status status = EnsureListenersNotifiedOfConnect();
@@ -321,7 +336,7 @@
     case SyncWebSocket::kTimeout: {
       std::string err =
           "Timed out receiving message from renderer: " +
-          base::StringPrintf("%.3lf", timeout.InSecondsF());
+          base::StringPrintf("%.3lf", timeout.GetDuration().InSecondsF());
       LOG(ERROR) << err;
       return Status(kTimeout, err);
     }
diff --git a/chrome/test/chromedriver/chrome/devtools_client_impl.h b/chrome/test/chromedriver/chrome/devtools_client_impl.h
index eb8448c..17d793a 100644
--- a/chrome/test/chromedriver/chrome/devtools_client_impl.h
+++ b/chrome/test/chromedriver/chrome/devtools_client_impl.h
@@ -87,6 +87,10 @@
   Status SendCommand(
       const std::string& method,
       const base::DictionaryValue& params) override;
+  Status SendCommandWithTimeout(
+      const std::string& method,
+      const base::DictionaryValue& params,
+      const Timeout* timeout) override;
   Status SendAsyncCommand(
       const std::string& method,
       const base::DictionaryValue& params) override;
@@ -94,9 +98,14 @@
       const std::string& method,
       const base::DictionaryValue& params,
       std::unique_ptr<base::DictionaryValue>* result) override;
+  Status SendCommandAndGetResultWithTimeout(
+      const std::string& method,
+      const base::DictionaryValue& params,
+      const Timeout* timeout,
+      std::unique_ptr<base::DictionaryValue>* result) override;
   void AddListener(DevToolsEventListener* listener) override;
   Status HandleEventsUntil(const ConditionalFunc& conditional_func,
-                           const base::TimeDelta& timeout) override;
+                           const Timeout& timeout) override;
   Status HandleReceivedEvents() override;
 
  private:
@@ -121,11 +130,13 @@
   };
   typedef std::map<int, linked_ptr<ResponseInfo> > ResponseInfoMap;
 
-  Status SendCommandInternal(const std::string& method,
-                             const base::DictionaryValue& params,
-                             std::unique_ptr<base::DictionaryValue>* result,
-                             bool wait_for_response);
-  Status ProcessNextMessage(int expected_id, const base::TimeDelta& timeout);
+  Status SendCommandInternal(
+      const std::string& method,
+      const base::DictionaryValue& params,
+      std::unique_ptr<base::DictionaryValue>* result,
+      bool wait_for_response,
+      const Timeout* timeout);
+  Status ProcessNextMessage(int expected_id, const Timeout& timeout);
   Status ProcessEvent(const internal::InspectorEvent& event);
   Status ProcessCommandResponse(
       const internal::InspectorCommandResponse& response);
diff --git a/chrome/test/chromedriver/chrome/devtools_client_impl_unittest.cc b/chrome/test/chromedriver/chrome/devtools_client_impl_unittest.cc
index 33b644e3..02a54c6 100644
--- a/chrome/test/chromedriver/chrome/devtools_client_impl_unittest.cc
+++ b/chrome/test/chromedriver/chrome/devtools_client_impl_unittest.cc
@@ -19,6 +19,7 @@
 #include "chrome/test/chromedriver/chrome/status.h"
 #include "chrome/test/chromedriver/net/sync_websocket.h"
 #include "chrome/test/chromedriver/net/sync_websocket_factory.h"
+#include "chrome/test/chromedriver/net/timeout.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
@@ -64,8 +65,8 @@
 
   SyncWebSocket::StatusCode ReceiveNextMessage(
       std::string* message,
-      const base::TimeDelta& timeout) override {
-    if (timeout <= base::TimeDelta())
+      const Timeout& timeout) override {
+    if (timeout.IsExpired())
       return SyncWebSocket::kTimeout;
     base::DictionaryValue response;
     response.SetInteger("id", id_);
@@ -144,7 +145,7 @@
 
   SyncWebSocket::StatusCode ReceiveNextMessage(
       std::string* message,
-      const base::TimeDelta& timeout) override {
+      const Timeout& timeout) override {
     EXPECT_TRUE(false);
     return SyncWebSocket::kDisconnected;
   }
@@ -180,7 +181,7 @@
 
   SyncWebSocket::StatusCode ReceiveNextMessage(
       std::string* message,
-      const base::TimeDelta& timeout) override {
+      const Timeout& timeout) override {
     EXPECT_TRUE(false);
     return SyncWebSocket::kDisconnected;
   }
@@ -221,7 +222,7 @@
 
   SyncWebSocket::StatusCode ReceiveNextMessage(
       std::string* message,
-      const base::TimeDelta& timeout) override {
+      const Timeout& timeout) override {
     return SyncWebSocket::kDisconnected;
   }
 
@@ -262,7 +263,7 @@
 
   SyncWebSocket::StatusCode ReceiveNextMessage(
       std::string* message,
-      const base::TimeDelta& timeout) override {
+      const Timeout& timeout) override {
     return SyncWebSocket::kOk;
   }
 
@@ -583,7 +584,7 @@
   client.AddListener(&listener);
   ASSERT_EQ(kOk, client.ConnectIfNecessary().code());
   Status status = client.HandleEventsUntil(base::Bind(&AlwaysTrue),
-                                           long_timeout_);
+                                           Timeout(long_timeout_));
   ASSERT_EQ(kOk, status.code());
 }
 
@@ -595,7 +596,7 @@
                             base::Bind(&ReturnEvent));
   ASSERT_EQ(kOk, client.ConnectIfNecessary().code());
   Status status = client.HandleEventsUntil(base::Bind(&AlwaysTrue),
-                                           base::TimeDelta());
+                                           Timeout(base::TimeDelta()));
   ASSERT_EQ(kTimeout, status.code());
 }
 
@@ -607,7 +608,7 @@
                             base::Bind(&ReturnCommand));
   ASSERT_EQ(kOk, client.ConnectIfNecessary().code());
   Status status = client.HandleEventsUntil(base::Bind(&AlwaysTrue),
-                                           long_timeout_);
+                                           Timeout(long_timeout_));
   ASSERT_EQ(kUnknownError, status.code());
 }
 
@@ -619,7 +620,7 @@
                             base::Bind(&ReturnError));
   ASSERT_EQ(kOk, client.ConnectIfNecessary().code());
   Status status = client.HandleEventsUntil(base::Bind(&AlwaysTrue),
-                                           long_timeout_);
+                                           Timeout(long_timeout_));
   ASSERT_EQ(kUnknownError, status.code());
 }
 
@@ -631,7 +632,7 @@
                             base::Bind(&ReturnEvent));
   ASSERT_EQ(kOk, client.ConnectIfNecessary().code());
   Status status = client.HandleEventsUntil(base::Bind(&AlwaysError),
-                                           long_timeout_);
+                                           Timeout(long_timeout_));
   ASSERT_EQ(kUnknownError, status.code());
 }
 
@@ -743,7 +744,7 @@
 
   SyncWebSocket::StatusCode ReceiveNextMessage(
       std::string* message,
-      const base::TimeDelta& timeout) override {
+      const Timeout& timeout) override {
     if (queued_response_.empty())
       return SyncWebSocket::kDisconnected;
     *message = queued_response_.front();
@@ -806,7 +807,7 @@
 
   SyncWebSocket::StatusCode ReceiveNextMessage(
       std::string* message,
-      const base::TimeDelta& timeout) override {
+      const Timeout& timeout) override {
     if (request_no_ == 0) {
       *message = "{\"method\": \"m\", \"params\": {}}";
     } else {
@@ -956,7 +957,7 @@
 
   SyncWebSocket::StatusCode ReceiveNextMessage(
       std::string* message,
-      const base::TimeDelta& timeout) override {
+      const Timeout& timeout) override {
     if (messages_->empty())
       return SyncWebSocket::kDisconnected;
     *message = messages_->front();
diff --git a/chrome/test/chromedriver/chrome/navigation_tracker.cc b/chrome/test/chromedriver/chrome/navigation_tracker.cc
index a017c53..db482fe8 100644
--- a/chrome/test/chromedriver/chrome/navigation_tracker.cc
+++ b/chrome/test/chromedriver/chrome/navigation_tracker.cc
@@ -17,6 +17,11 @@
 const std::string kDummyFrameUrl = "about:blank";
 const std::string kUnreachableWebDataURL = "data:text/html,chromewebdata";
 
+Status MakeNavigationCheckFailedStatus(Status command_status) {
+  return Status(command_status.code() == kTimeout ? kTimeout : kUnknownError,
+                "cannot determine loading status", command_status);
+}
+
 }  // namespace
 
 NavigationTracker::NavigationTracker(
@@ -51,6 +56,7 @@
 NavigationTracker::~NavigationTracker() {}
 
 Status NavigationTracker::IsPendingNavigation(const std::string& frame_id,
+                                              const Timeout* timeout,
                                               bool* is_pending) {
   if (!IsExpectingFrameLoadingEvents()) {
     // Some DevTools commands (e.g. Input.dispatchMouseEvent) are handled in the
@@ -61,8 +67,8 @@
     base::DictionaryValue params;
     params.SetString("expression", "1");
     std::unique_ptr<base::DictionaryValue> result;
-    Status status = client_->SendCommandAndGetResult(
-        "Runtime.evaluate", params, &result);
+    Status status = client_->SendCommandAndGetResultWithTimeout(
+        "Runtime.evaluate", params, timeout, &result);
     int value = 0;
     if (status.code() == kDisconnected) {
       // If we receive a kDisconnected status code from Runtime.evaluate, don't
@@ -80,7 +86,7 @@
     } else if (status.IsError() ||
                !result->GetInteger("result.value", &value) ||
                value != 1) {
-      return Status(kUnknownError, "cannot determine loading status", status);
+      return MakeNavigationCheckFailedStatus(status);
     }
   }
 
@@ -90,11 +96,11 @@
     // for the new window. In such case, the baseURL will be empty.
     base::DictionaryValue empty_params;
     std::unique_ptr<base::DictionaryValue> result;
-    Status status = client_->SendCommandAndGetResult(
-        "DOM.getDocument", empty_params, &result);
+    Status status = client_->SendCommandAndGetResultWithTimeout(
+        "DOM.getDocument", empty_params, timeout, &result);
     std::string base_url;
     if (status.IsError() || !result->GetString("root.baseURL", &base_url))
-      return Status(kUnknownError, "cannot determine loading status", status);
+      return MakeNavigationCheckFailedStatus(status);
     if (base_url.empty()) {
       *is_pending = true;
       loading_state_ = kLoading;
@@ -121,10 +127,10 @@
        "}";
     base::DictionaryValue params;
     params.SetString("expression", kStartLoadingIfMainFrameNotLoading);
-    status = client_->SendCommandAndGetResult(
-        "Runtime.evaluate", params, &result);
+    status = client_->SendCommandAndGetResultWithTimeout(
+        "Runtime.evaluate", params, timeout, &result);
     if (status.IsError())
-      return Status(kUnknownError, "cannot determine loading status", status);
+      return MakeNavigationCheckFailedStatus(status);
 
     // Between the time the JavaScript is evaluated and
     // SendCommandAndGetResult returns, OnEvent may have received info about
diff --git a/chrome/test/chromedriver/chrome/navigation_tracker.h b/chrome/test/chromedriver/chrome/navigation_tracker.h
index 53699bf..af96046 100644
--- a/chrome/test/chromedriver/chrome/navigation_tracker.h
+++ b/chrome/test/chromedriver/chrome/navigation_tracker.h
@@ -22,6 +22,7 @@
 class DevToolsClient;
 class JavaScriptDialogManager;
 class Status;
+class Timeout;
 
 // Tracks the navigation state of the page.
 class NavigationTracker : public DevToolsEventListener {
@@ -45,7 +46,9 @@
 
   // Gets whether a navigation is pending for the specified frame. |frame_id|
   // may be empty to signify the main frame.
-  Status IsPendingNavigation(const std::string& frame_id, bool* is_pending);
+  Status IsPendingNavigation(const std::string& frame_id,
+                             const Timeout* timeout,
+                             bool* is_pending);
 
   void set_timed_out(bool timed_out);
 
diff --git a/chrome/test/chromedriver/chrome/navigation_tracker_unittest.cc b/chrome/test/chromedriver/chrome/navigation_tracker_unittest.cc
index cf9eeae..699e437 100644
--- a/chrome/test/chromedriver/chrome/navigation_tracker_unittest.cc
+++ b/chrome/test/chromedriver/chrome/navigation_tracker_unittest.cc
@@ -20,7 +20,8 @@
                         const std::string& frame_id,
                         bool expected_is_pending) {
   bool is_pending = !expected_is_pending;
-  ASSERT_EQ(kOk, tracker->IsPendingNavigation(frame_id, &is_pending).code());
+  ASSERT_EQ(
+      kOk, tracker->IsPendingNavigation(frame_id, nullptr, &is_pending).code());
   ASSERT_EQ(expected_is_pending, is_pending);
 }
 
@@ -326,7 +327,7 @@
   NavigationTracker tracker(&client, &browser_info, &dialog_manager);
   bool is_pending;
   ASSERT_EQ(kUnknownError,
-            tracker.IsPendingNavigation("f", &is_pending).code());
+            tracker.IsPendingNavigation("f", nullptr, &is_pending).code());
 }
 
 TEST(NavigationTracker, UnknownStatePageNotLoadAtAll) {
diff --git a/chrome/test/chromedriver/chrome/stub_devtools_client.cc b/chrome/test/chromedriver/chrome/stub_devtools_client.cc
index 4e93ff0..288464682 100644
--- a/chrome/test/chromedriver/chrome/stub_devtools_client.cc
+++ b/chrome/test/chromedriver/chrome/stub_devtools_client.cc
@@ -32,6 +32,13 @@
   return SendCommandAndGetResult(method, params, &result);
 }
 
+Status StubDevToolsClient::SendCommandWithTimeout(
+    const std::string& method,
+    const base::DictionaryValue& params,
+    const Timeout* timeout) {
+  return SendCommand(method, params);
+}
+
 Status StubDevToolsClient::SendAsyncCommand(
     const std::string& method,
     const base::DictionaryValue& params) {
@@ -46,13 +53,21 @@
   return Status(kOk);
 }
 
+Status StubDevToolsClient::SendCommandAndGetResultWithTimeout(
+    const std::string& method,
+    const base::DictionaryValue& params,
+    const Timeout* timeout,
+    std::unique_ptr<base::DictionaryValue>* result) {
+  return SendCommandAndGetResult(method, params, result);
+}
+
 void StubDevToolsClient::AddListener(DevToolsEventListener* listener) {
   listeners_.push_back(listener);
 }
 
 Status StubDevToolsClient::HandleEventsUntil(
     const ConditionalFunc& conditional_func,
-    const base::TimeDelta& timeout) {
+    const Timeout& timeout) {
   return Status(kOk);
 }
 
diff --git a/chrome/test/chromedriver/chrome/stub_devtools_client.h b/chrome/test/chromedriver/chrome/stub_devtools_client.h
index 4b0ca67..e405e7f 100644
--- a/chrome/test/chromedriver/chrome/stub_devtools_client.h
+++ b/chrome/test/chromedriver/chrome/stub_devtools_client.h
@@ -31,6 +31,10 @@
   Status SendCommand(
       const std::string& method,
       const base::DictionaryValue& params) override;
+  Status SendCommandWithTimeout(
+      const std::string& method,
+      const base::DictionaryValue& params,
+      const Timeout* timeout) override;
   Status SendAsyncCommand(
       const std::string& method,
       const base::DictionaryValue& params) override;
@@ -38,9 +42,14 @@
       const std::string& method,
       const base::DictionaryValue& params,
       std::unique_ptr<base::DictionaryValue>* result) override;
+  Status SendCommandAndGetResultWithTimeout(
+      const std::string& method,
+      const base::DictionaryValue& params,
+      const Timeout* timeout,
+      std::unique_ptr<base::DictionaryValue>* result) override;
   void AddListener(DevToolsEventListener* listener) override;
   Status HandleEventsUntil(const ConditionalFunc& conditional_func,
-                           const base::TimeDelta& timeout) override;
+                           const Timeout& timeout) override;
   Status HandleReceivedEvents() override;
 
  protected:
diff --git a/chrome/test/chromedriver/chrome/stub_web_view.cc b/chrome/test/chromedriver/chrome/stub_web_view.cc
index f0ab4c8..df7b3f5e 100644
--- a/chrome/test/chromedriver/chrome/stub_web_view.cc
+++ b/chrome/test/chromedriver/chrome/stub_web_view.cc
@@ -32,7 +32,7 @@
   return Status(kOk);
 }
 
-Status StubWebView::Load(const std::string& url) {
+Status StubWebView::Load(const std::string& url, const Timeout* timeout) {
   return Status(kOk);
 }
 
@@ -108,12 +108,13 @@
 }
 
 Status StubWebView::WaitForPendingNavigations(const std::string& frame_id,
-                                              const base::TimeDelta& timeout,
+                                              const Timeout& timeout,
                                               bool stop_load_on_timeout) {
   return Status(kOk);
 }
 
 Status StubWebView::IsPendingNavigation(const std::string& frame_id,
+                                        const Timeout* timeout,
                                         bool* is_pending) {
   return Status(kOk);
 }
diff --git a/chrome/test/chromedriver/chrome/stub_web_view.h b/chrome/test/chromedriver/chrome/stub_web_view.h
index 006caa4b..710b4b5 100644
--- a/chrome/test/chromedriver/chrome/stub_web_view.h
+++ b/chrome/test/chromedriver/chrome/stub_web_view.h
@@ -23,7 +23,7 @@
   Status ConnectIfNecessary() override;
   Status HandleReceivedEvents() override;
   Status GetUrl(std::string* url) override;
-  Status Load(const std::string& url) override;
+  Status Load(const std::string& url, const Timeout* timeout) override;
   Status Reload() override;
   Status TraverseHistory(int delta) override;
   Status EvaluateScript(const std::string& frame,
@@ -55,9 +55,10 @@
   Status GetCookies(std::unique_ptr<base::ListValue>* cookies) override;
   Status DeleteCookie(const std::string& name, const std::string& url) override;
   Status WaitForPendingNavigations(const std::string& frame_id,
-                                   const base::TimeDelta& timeout,
+                                   const Timeout& timeout,
                                    bool stop_load_on_timeout) override;
   Status IsPendingNavigation(const std::string& frame_id,
+                             const Timeout* timeout,
                              bool* is_pending) override;
   JavaScriptDialogManager* GetJavaScriptDialogManager() override;
   Status OverrideGeolocation(const Geoposition& geoposition) override;
diff --git a/chrome/test/chromedriver/chrome/web_view.h b/chrome/test/chromedriver/chrome/web_view.h
index d7d36a2..59792b4 100644
--- a/chrome/test/chromedriver/chrome/web_view.h
+++ b/chrome/test/chromedriver/chrome/web_view.h
@@ -25,8 +25,9 @@
 struct KeyEvent;
 struct MouseEvent;
 struct NetworkConditions;
-struct TouchEvent;
 class Status;
+class Timeout;
+struct TouchEvent;
 
 class WebView {
  public:
@@ -48,7 +49,7 @@
   virtual Status GetUrl(std::string* url) = 0;
 
   // Load a given URL in the main frame.
-  virtual Status Load(const std::string& url) = 0;
+  virtual Status Load(const std::string& url, const Timeout* timeout) = 0;
 
   // Reload the current page.
   virtual Status Reload() = 0;
@@ -136,12 +137,13 @@
   // If |stop_load_on_timeout| is true, will attempt to stop the page load on
   // timeout before returning the timeout status.
   virtual Status WaitForPendingNavigations(const std::string& frame_id,
-                                           const base::TimeDelta& timeout,
+                                           const Timeout& timeout,
                                            bool stop_load_on_timeout) = 0;
 
   // Returns whether the frame is pending navigation.
-  virtual Status IsPendingNavigation(
-      const std::string& frame_id, bool* is_pending) = 0;
+  virtual Status IsPendingNavigation(const std::string& frame_id,
+                                     const Timeout* timeout,
+                                     bool* is_pending) = 0;
 
   // Returns the JavaScriptDialogManager. Never null.
   virtual JavaScriptDialogManager* GetJavaScriptDialogManager() = 0;
diff --git a/chrome/test/chromedriver/chrome/web_view_impl.cc b/chrome/test/chromedriver/chrome/web_view_impl.cc
index 581b261..063b450 100644
--- a/chrome/test/chromedriver/chrome/web_view_impl.cc
+++ b/chrome/test/chromedriver/chrome/web_view_impl.cc
@@ -30,6 +30,7 @@
 #include "chrome/test/chromedriver/chrome/network_conditions_override_manager.h"
 #include "chrome/test/chromedriver/chrome/status.h"
 #include "chrome/test/chromedriver/chrome/ui_events.h"
+#include "chrome/test/chromedriver/net/timeout.h"
 
 namespace {
 
@@ -178,7 +179,7 @@
   return Status(kOk);
 }
 
-Status WebViewImpl::Load(const std::string& url) {
+Status WebViewImpl::Load(const std::string& url, const Timeout* timeout) {
   // Javascript URLs will cause a hang while waiting for the page to stop
   // loading, so just disallow.
   if (base::StartsWith(url, "javascript:",
@@ -186,7 +187,7 @@
     return Status(kUnknownError, "unsupported protocol");
   base::DictionaryValue params;
   params.SetString("url", url);
-  return client_->SendCommand("Page.navigate", params);
+  return client_->SendCommandWithTimeout("Page.navigate", params, timeout);
 }
 
 Status WebViewImpl::Reload() {
@@ -423,34 +424,34 @@
 }
 
 Status WebViewImpl::WaitForPendingNavigations(const std::string& frame_id,
-                                              const base::TimeDelta& timeout,
+                                              const Timeout& timeout,
                                               bool stop_load_on_timeout) {
   VLOG(0) << "Waiting for pending navigations...";
-  Status status = client_->HandleEventsUntil(
-      base::Bind(&WebViewImpl::IsNotPendingNavigation,
-                 base::Unretained(this),
-                 frame_id),
-      timeout);
+  const auto not_pending_navigation =
+      base::Bind(&WebViewImpl::IsNotPendingNavigation, base::Unretained(this),
+                 frame_id, base::Unretained(&timeout));
+  Status status = client_->HandleEventsUntil(not_pending_navigation, timeout);
   if (status.code() == kTimeout && stop_load_on_timeout) {
     VLOG(0) << "Timed out. Stopping navigation...";
     std::unique_ptr<base::Value> unused_value;
     navigation_tracker_->set_timed_out(true);
     EvaluateScript(std::string(), "window.stop();", &unused_value);
-    Status new_status = client_->HandleEventsUntil(
-        base::Bind(&WebViewImpl::IsNotPendingNavigation, base::Unretained(this),
-                   frame_id),
-        base::TimeDelta::FromSeconds(10));
+    Status new_status =
+        client_->HandleEventsUntil(not_pending_navigation, timeout);
     navigation_tracker_->set_timed_out(false);
     if (new_status.IsError())
       status = new_status;
   }
-  VLOG(0) << "Done waiting for pending navigations";
+  VLOG(0) << "Done waiting for pending navigations. Status: "
+          << status.message();
   return status;
 }
 
 Status WebViewImpl::IsPendingNavigation(const std::string& frame_id,
+                                        const Timeout* timeout,
                                         bool* is_pending) {
-  return navigation_tracker_->IsPendingNavigation(frame_id, is_pending);
+  return
+      navigation_tracker_->IsPendingNavigation(frame_id, timeout, is_pending);
 }
 
 JavaScriptDialogManager* WebViewImpl::GetJavaScriptDialogManager() {
@@ -690,10 +691,11 @@
 }
 
 Status WebViewImpl::IsNotPendingNavigation(const std::string& frame_id,
+                                           const Timeout* timeout,
                                            bool* is_not_pending) {
   bool is_pending;
   Status status =
-      navigation_tracker_->IsPendingNavigation(frame_id, &is_pending);
+      navigation_tracker_->IsPendingNavigation(frame_id, timeout, &is_pending);
   if (status.IsError())
     return status;
   // An alert may block the pending navigation.
diff --git a/chrome/test/chromedriver/chrome/web_view_impl.h b/chrome/test/chromedriver/chrome/web_view_impl.h
index f9d2afa..58a3985 100644
--- a/chrome/test/chromedriver/chrome/web_view_impl.h
+++ b/chrome/test/chromedriver/chrome/web_view_impl.h
@@ -51,7 +51,7 @@
   Status ConnectIfNecessary() override;
   Status HandleReceivedEvents() override;
   Status GetUrl(std::string* url) override;
-  Status Load(const std::string& url) override;
+  Status Load(const std::string& url, const Timeout* timeout) override;
   Status Reload() override;
   Status TraverseHistory(int delta) override;
   Status EvaluateScript(const std::string& frame,
@@ -83,9 +83,10 @@
   Status GetCookies(std::unique_ptr<base::ListValue>* cookies) override;
   Status DeleteCookie(const std::string& name, const std::string& url) override;
   Status WaitForPendingNavigations(const std::string& frame_id,
-                                   const base::TimeDelta& timeout,
+                                   const Timeout& timeout,
                                    bool stop_load_on_timeout) override;
   Status IsPendingNavigation(const std::string& frame_id,
+                             const Timeout* timeout,
                              bool* is_pending) override;
   JavaScriptDialogManager* GetJavaScriptDialogManager() override;
   Status OverrideGeolocation(const Geoposition& geoposition) override;
@@ -117,6 +118,7 @@
                                    const base::TimeDelta& timeout,
                                    std::unique_ptr<base::Value>* result);
   Status IsNotPendingNavigation(const std::string& frame_id,
+                                const Timeout* timeout,
                                 bool* is_not_pending);
 
   Status InitProfileInternal();
diff --git a/chrome/test/chromedriver/chrome/web_view_impl_unittest.cc b/chrome/test/chromedriver/chrome/web_view_impl_unittest.cc
index 755f655..179a8bb3 100644
--- a/chrome/test/chromedriver/chrome/web_view_impl_unittest.cc
+++ b/chrome/test/chromedriver/chrome/web_view_impl_unittest.cc
@@ -36,12 +36,18 @@
   Status SendCommand(
       const std::string& method,
       const base::DictionaryValue& params) override {
-    return SendCommandAndGetResult(method, params, NULL);
+    return SendCommandAndGetResult(method, params, nullptr);
+  }
+  Status SendCommandWithTimeout(
+      const std::string& method,
+      const base::DictionaryValue& params,
+      const Timeout* timeout) override {
+    return SendCommandAndGetResult(method, params, nullptr);
   }
   Status SendAsyncCommand(
       const std::string& method,
       const base::DictionaryValue& params) override {
-    return SendCommandAndGetResult(method, params, NULL);
+    return SendCommandAndGetResult(method, params, nullptr);
   }
   Status SendCommandAndGetResult(
       const std::string& method,
@@ -52,9 +58,16 @@
     result->reset(result_.DeepCopy());
     return Status(kOk);
   }
+  Status SendCommandAndGetResultWithTimeout(
+      const std::string& method,
+      const base::DictionaryValue& params,
+      const Timeout* timeout,
+      std::unique_ptr<base::DictionaryValue>* result) override {
+    return SendCommandAndGetResult(method, params, result);
+  }
   void AddListener(DevToolsEventListener* listener) override {}
   Status HandleEventsUntil(const ConditionalFunc& conditional_func,
-                           const base::TimeDelta& timeout) override {
+                           const Timeout& timeout) override {
     return Status(kOk);
   }
   Status HandleReceivedEvents() override { return Status(kOk); }
diff --git a/chrome/test/chromedriver/commands_unittest.cc b/chrome/test/chromedriver/commands_unittest.cc
index ebb80b5..c33643e 100644
--- a/chrome/test/chromedriver/commands_unittest.cc
+++ b/chrome/test/chromedriver/commands_unittest.cc
@@ -448,7 +448,8 @@
   params.SetString("value", "a");
   std::unique_ptr<base::Value> result;
   ASSERT_EQ(kOk,
-            ExecuteFindElement(1, &session, &web_view, params, &result).code());
+            ExecuteFindElement(1, &session, &web_view, params, &result,
+                               nullptr).code());
   base::DictionaryValue param;
   param.SetString("id", "a");
   base::ListValue expected_args;
@@ -464,7 +465,8 @@
   params.SetString("value", "a");
   std::unique_ptr<base::Value> result;
   ASSERT_EQ(kNoSuchElement,
-            ExecuteFindElement(1, &session, &web_view, params, &result).code());
+            ExecuteFindElement(1, &session, &web_view, params, &result,
+                               nullptr).code());
 }
 
 TEST(CommandsTest, SuccessfulFindElements) {
@@ -476,9 +478,9 @@
   params.SetString("using", "name");
   params.SetString("value", "b");
   std::unique_ptr<base::Value> result;
-  ASSERT_EQ(
-      kOk,
-      ExecuteFindElements(1, &session, &web_view, params, &result).code());
+  ASSERT_EQ(kOk,
+            ExecuteFindElements(1, &session, &web_view, params, &result,
+                                nullptr).code());
   base::DictionaryValue param;
   param.SetString("name", "b");
   base::ListValue expected_args;
@@ -493,9 +495,9 @@
   params.SetString("using", "id");
   params.SetString("value", "a");
   std::unique_ptr<base::Value> result;
-  ASSERT_EQ(
-      kOk,
-      ExecuteFindElements(1, &session, &web_view, params, &result).code());
+  ASSERT_EQ(kOk,
+            ExecuteFindElements(1, &session, &web_view, params, &result,
+                                nullptr).code());
   base::ListValue* list;
   ASSERT_TRUE(result->GetAsList(&list));
   ASSERT_EQ(0U, list->GetSize());
@@ -590,7 +592,8 @@
   params.SetString("id", "1");
   std::unique_ptr<base::Value> result;
   ASSERT_EQ(kNoSuchElement,
-            ExecuteFindElement(1, &session, &web_view, params, &result).code());
+            ExecuteFindElement(1, &session, &web_view, params, &result,
+                               nullptr).code());
 }
 
 namespace {
@@ -623,9 +626,11 @@
   params.SetString("value", "a");
   std::unique_ptr<base::Value> value;
   ASSERT_EQ(kUnknownError,
-            ExecuteFindElement(1, &session, &web_view, params, &value).code());
+            ExecuteFindElement(1, &session, &web_view, params, &value,
+                               nullptr).code());
   ASSERT_EQ(kUnknownError,
-            ExecuteFindElements(1, &session, &web_view, params, &value).code());
+            ExecuteFindElements(1, &session, &web_view, params, &value,
+                                nullptr).code());
 }
 
 TEST(CommandsTest, ErrorFindChildElement) {
diff --git a/chrome/test/chromedriver/element_commands.cc b/chrome/test/chromedriver/element_commands.cc
index 9061884..a39b733 100644
--- a/chrome/test/chromedriver/element_commands.cc
+++ b/chrome/test/chromedriver/element_commands.cc
@@ -80,11 +80,13 @@
 
 }  // namespace
 
-Status ExecuteElementCommand(const ElementCommand& command,
-                             Session* session,
-                             WebView* web_view,
-                             const base::DictionaryValue& params,
-                             std::unique_ptr<base::Value>* value) {
+Status ExecuteElementCommand(
+    const ElementCommand& command,
+    Session* session,
+    WebView* web_view,
+    const base::DictionaryValue& params,
+    std::unique_ptr<base::Value>* value,
+    Timeout* timeout) {
   std::string id;
   if (params.GetString("id", &id) || params.GetString("element", &id))
     return command.Run(session, web_view, id, params, value);
diff --git a/chrome/test/chromedriver/element_commands.h b/chrome/test/chromedriver/element_commands.h
index 6fd7184..320c3ee 100644
--- a/chrome/test/chromedriver/element_commands.h
+++ b/chrome/test/chromedriver/element_commands.h
@@ -17,6 +17,7 @@
 
 struct Session;
 class Status;
+class Timeout;
 class WebView;
 
 typedef base::Callback<Status(Session* session,
@@ -27,11 +28,13 @@
     ElementCommand;
 
 // Execute a command on a specific element.
-Status ExecuteElementCommand(const ElementCommand& command,
-                             Session* session,
-                             WebView* web_view,
-                             const base::DictionaryValue& params,
-                             std::unique_ptr<base::Value>* value);
+Status ExecuteElementCommand(
+    const ElementCommand& command,
+    Session* session,
+    WebView* web_view,
+    const base::DictionaryValue& params,
+    std::unique_ptr<base::Value>* value,
+    Timeout* timeout);
 
 // Search for an element on the page, starting from the given element.
 Status ExecuteFindChildElement(int interval_ms,
diff --git a/chrome/test/chromedriver/net/sync_websocket.h b/chrome/test/chromedriver/net/sync_websocket.h
index 5dd59da5..d5833ff 100644
--- a/chrome/test/chromedriver/net/sync_websocket.h
+++ b/chrome/test/chromedriver/net/sync_websocket.h
@@ -7,9 +7,8 @@
 
 #include <string>
 
-#include "base/time/time.h"
-
 class GURL;
+class Timeout;
 
 // Proxy for using a WebSocket running on a background thread synchronously.
 class SyncWebSocket {
@@ -36,7 +35,7 @@
   // Returns StatusCode::kDisconnected if the socket is closed.
   virtual StatusCode ReceiveNextMessage(
       std::string* message,
-      const base::TimeDelta& timeout) = 0;
+      const Timeout& timeout) = 0;
 
   // Returns whether there are any messages that have been received and not yet
   // handled by ReceiveNextMessage.
diff --git a/chrome/test/chromedriver/net/sync_websocket_impl.cc b/chrome/test/chromedriver/net/sync_websocket_impl.cc
index 2451fca..3650ef0 100644
--- a/chrome/test/chromedriver/net/sync_websocket_impl.cc
+++ b/chrome/test/chromedriver/net/sync_websocket_impl.cc
@@ -9,6 +9,7 @@
 #include "base/location.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/waitable_event.h"
+#include "chrome/test/chromedriver/net/timeout.h"
 #include "net/base/net_errors.h"
 #include "net/url_request/url_request_context_getter.h"
 #include "url/gurl.h"
@@ -32,7 +33,7 @@
 }
 
 SyncWebSocket::StatusCode SyncWebSocketImpl::ReceiveNextMessage(
-    std::string* message, const base::TimeDelta& timeout) {
+    std::string* message, const Timeout& timeout) {
   return core_->ReceiveNextMessage(message, timeout);
 }
 
@@ -74,15 +75,13 @@
 
 SyncWebSocket::StatusCode SyncWebSocketImpl::Core::ReceiveNextMessage(
     std::string* message,
-    const base::TimeDelta& timeout) {
+    const Timeout& timeout) {
   base::AutoLock lock(lock_);
-  base::TimeTicks deadline = base::TimeTicks::Now() + timeout;
-  base::TimeDelta next_wait = timeout;
   while (received_queue_.empty() && is_connected_) {
+    base::TimeDelta next_wait = timeout.GetRemainingTime();
     if (next_wait <= base::TimeDelta())
       return SyncWebSocket::kTimeout;
     on_update_event_.TimedWait(next_wait);
-    next_wait = deadline - base::TimeTicks::Now();
   }
   if (!is_connected_)
     return SyncWebSocket::kDisconnected;
diff --git a/chrome/test/chromedriver/net/sync_websocket_impl.h b/chrome/test/chromedriver/net/sync_websocket_impl.h
index ab328f79..d6adeeb9 100644
--- a/chrome/test/chromedriver/net/sync_websocket_impl.h
+++ b/chrome/test/chromedriver/net/sync_websocket_impl.h
@@ -37,7 +37,7 @@
   bool Connect(const GURL& url) override;
   bool Send(const std::string& message) override;
   StatusCode ReceiveNextMessage(std::string* message,
-                                const base::TimeDelta& timeout) override;
+                                const Timeout& timeout) override;
   bool HasNextMessage() override;
 
  private:
@@ -52,7 +52,7 @@
     bool Send(const std::string& message);
     SyncWebSocket::StatusCode ReceiveNextMessage(
         std::string* message,
-        const base::TimeDelta& timeout);
+        const Timeout& timeout);
     bool HasNextMessage();
 
     // Overriden from WebSocketListener:
diff --git a/chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc b/chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc
index bcda092a..2637b52 100644
--- a/chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc
+++ b/chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc
@@ -13,6 +13,7 @@
 #include "base/time/time.h"
 #include "chrome/test/chromedriver/net/sync_websocket_impl.h"
 #include "chrome/test/chromedriver/net/test_http_server.h"
+#include "chrome/test/chromedriver/net/timeout.h"
 #include "chrome/test/chromedriver/net/url_request_context_getter.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
@@ -35,6 +36,8 @@
 
   void TearDown() override { server_.Stop(); }
 
+  Timeout long_timeout() const { return Timeout(long_timeout_); }
+
   base::Thread client_thread_;
   TestHttpServer server_;
   scoped_refptr<URLRequestContextGetter> context_getter_;
@@ -64,7 +67,7 @@
   std::string message;
   ASSERT_EQ(
       SyncWebSocket::kOk,
-      sock.ReceiveNextMessage(&message, long_timeout_));
+      sock.ReceiveNextMessage(&message, long_timeout()));
   ASSERT_STREQ("hi", message.c_str());
 }
 
@@ -83,13 +86,13 @@
   ASSERT_EQ(
       SyncWebSocket::kTimeout,
       sock.ReceiveNextMessage(
-          &message, base::TimeDelta()));
+          &message, Timeout(base::TimeDelta())));
 
   server_reply_allowed.Signal();
   // Receive the response to avoid possible deletion of the event while the
   // server thread has not yet returned from the call to Wait.
   EXPECT_EQ(SyncWebSocket::kOk,
-            sock.ReceiveNextMessage(&message, long_timeout_));
+            sock.ReceiveNextMessage(&message, long_timeout()));
 }
 
 TEST_F(SyncWebSocketImplTest, SendReceiveLarge) {
@@ -100,7 +103,7 @@
   std::string message;
   ASSERT_EQ(
       SyncWebSocket::kOk,
-      sock.ReceiveNextMessage(&message, long_timeout_));
+      sock.ReceiveNextMessage(&message, long_timeout()));
   ASSERT_EQ(wrote_message.length(), message.length());
   ASSERT_EQ(wrote_message, message);
 }
@@ -113,16 +116,16 @@
   std::string message;
   ASSERT_EQ(
       SyncWebSocket::kOk,
-      sock.ReceiveNextMessage(&message, long_timeout_));
+      sock.ReceiveNextMessage(&message, long_timeout()));
   ASSERT_STREQ("1", message.c_str());
   ASSERT_TRUE(sock.Send("3"));
   ASSERT_EQ(
       SyncWebSocket::kOk,
-      sock.ReceiveNextMessage(&message, long_timeout_));
+      sock.ReceiveNextMessage(&message, long_timeout()));
   ASSERT_STREQ("2", message.c_str());
   ASSERT_EQ(
       SyncWebSocket::kOk,
-      sock.ReceiveNextMessage(&message, long_timeout_));
+      sock.ReceiveNextMessage(&message, long_timeout()));
   ASSERT_STREQ("3", message.c_str());
 }
 
@@ -134,7 +137,7 @@
   std::string message;
   ASSERT_EQ(
       SyncWebSocket::kDisconnected,
-      sock.ReceiveNextMessage(&message, long_timeout_));
+      sock.ReceiveNextMessage(&message, long_timeout()));
   ASSERT_STREQ("", message.c_str());
 }
 
@@ -150,9 +153,8 @@
   ASSERT_TRUE(sock.Connect(server_.web_socket_url()));
   ASSERT_TRUE(sock.Send("1"));
   // Wait for SyncWebSocket to receive the response from the server.
-  base::TimeTicks deadline =
-      base::TimeTicks::Now() + base::TimeDelta::FromSeconds(20);
-  while (base::TimeTicks::Now() < deadline) {
+  Timeout response_timeout(base::TimeDelta::FromSeconds(20));
+  while (!response_timeout.IsExpired()) {
     if (sock.IsConnected() && !sock.HasNextMessage())
       base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(10));
     else
@@ -169,7 +171,7 @@
   std::string message;
   ASSERT_EQ(
       SyncWebSocket::kOk,
-      sock.ReceiveNextMessage(&message, long_timeout_));
+      sock.ReceiveNextMessage(&message, long_timeout()));
   ASSERT_STREQ("3", message.c_str());
   ASSERT_FALSE(sock.HasNextMessage());
 }
diff --git a/chrome/test/chromedriver/net/timeout.cc b/chrome/test/chromedriver/net/timeout.cc
new file mode 100644
index 0000000..391a63f6
--- /dev/null
+++ b/chrome/test/chromedriver/net/timeout.cc
@@ -0,0 +1,48 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/test/chromedriver/net/timeout.h"
+
+#include <algorithm>
+
+#include "base/logging.h"
+
+Timeout::Timeout() : start_(base::TimeTicks::Now()) {
+}
+
+Timeout::Timeout(const base::TimeDelta& duration) : Timeout() {
+  SetDuration(duration);
+}
+
+Timeout::Timeout(const base::TimeDelta& duration, const Timeout* outer)
+    : Timeout(duration) {
+  if (outer && !outer->deadline_.is_null())
+    deadline_ = std::min(outer->deadline_, deadline_);
+}
+
+void Timeout::SetDuration(const base::TimeDelta& duration) {
+  DCHECK(!start_.is_null());
+  if (deadline_.is_null()) {
+    deadline_ = start_ + duration;
+  } else if (deadline_ - start_ != duration) {
+    LOG(ERROR) << "Timeout::SetDuration was called with a duration different"
+                  " from what was already set: " << duration << " vs. "
+               << deadline_ - start_ << " (original).";
+    NOTREACHED();
+  }
+}
+
+bool Timeout::IsExpired() const {
+  return GetRemainingTime() <= base::TimeDelta();
+}
+
+base::TimeDelta Timeout::GetDuration() const {
+  return !deadline_.is_null() ? deadline_ - start_
+                              : base::TimeDelta::Max();
+}
+
+base::TimeDelta Timeout::GetRemainingTime() const {
+  return !deadline_.is_null() ? deadline_ - base::TimeTicks::Now()
+                              : base::TimeDelta::Max();
+}
diff --git a/chrome/test/chromedriver/net/timeout.h b/chrome/test/chromedriver/net/timeout.h
new file mode 100644
index 0000000..a74f2b9
--- /dev/null
+++ b/chrome/test/chromedriver/net/timeout.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_TEST_CHROMEDRIVER_NET_TIMEOUT_H_
+#define CHROME_TEST_CHROMEDRIVER_NET_TIMEOUT_H_
+
+#include "base/time/time.h"
+
+// A helper for tracking the time spent executing a task.  Creating a new
+// instance marks the beginning of the task.  Task duration limit may be set
+// in the contructor or at any time later, but only once.
+class Timeout {
+ public:
+  Timeout();
+  explicit Timeout(const base::TimeDelta& duration);
+
+  // To be used when executing a sub-task with its own timeout, keeping track
+  // of the parent task timeout at the same time. Creates a new Timeout whose
+  // deadline is either Now() + |duration| or deadline of |outer|, whichever is
+  // smaller. |outer| may be nullptr. Note: setting duration on |outer| won't
+  // affect sub-timeouts that were created earlier!
+  Timeout(const base::TimeDelta& duration, const Timeout* outer);
+
+  // Sets the deadline by adding |duration| to the start time recored at
+  // contruction.  Should not be called if the deadline is already set, unless
+  // the duration is exactly the same.
+  void SetDuration(const base::TimeDelta& duration);
+
+  bool is_set() const { return !deadline_.is_null(); }
+
+  // Whether the remaining time delta is less than or equal to zero.
+  bool IsExpired() const;
+
+  // Returns the duration if set, otherwise returns TimeDelta::Max().
+  base::TimeDelta GetDuration() const;
+
+  // Returns the remaining time if duration is set, otherwise returns
+  // TimeDelta::Max().
+  base::TimeDelta GetRemainingTime() const;
+
+ private:
+  base::TimeTicks start_;
+  base::TimeTicks deadline_;
+};
+
+#endif  // CHROME_TEST_CHROMEDRIVER_NET_TIMEOUT_H_
diff --git a/chrome/test/chromedriver/net/timeout_unittest.cc b/chrome/test/chromedriver/net/timeout_unittest.cc
new file mode 100644
index 0000000..eb36631
--- /dev/null
+++ b/chrome/test/chromedriver/net/timeout_unittest.cc
@@ -0,0 +1,63 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/logging.h"
+#include "chrome/test/chromedriver/net/timeout.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+using base::TimeDelta;
+
+TEST(TimeoutTest, Basics) {
+  Timeout timeout;
+  EXPECT_FALSE(timeout.is_set());
+  EXPECT_FALSE(timeout.IsExpired());
+  EXPECT_EQ(TimeDelta::Max(), timeout.GetDuration());
+  EXPECT_EQ(TimeDelta::Max(), timeout.GetRemainingTime());
+
+  timeout.SetDuration(TimeDelta());
+  EXPECT_TRUE(timeout.is_set());
+  EXPECT_TRUE(timeout.IsExpired());
+  EXPECT_EQ(TimeDelta(), timeout.GetDuration());
+  EXPECT_GE(TimeDelta(), timeout.GetRemainingTime());
+}
+
+TEST(TimeoutTest, SetDuration) {
+  Timeout timeout(TimeDelta::FromSeconds(1));
+
+  // It's ok to set the same duration again, since nothing changes.
+  timeout.SetDuration(TimeDelta::FromSeconds(1));
+
+#if DCHECK_IS_ON() && GTEST_HAS_DEATH_TEST && !defined(OS_ANDROID)
+  EXPECT_DEATH(timeout.SetDuration(TimeDelta::FromMinutes(30)), "");
+#endif  // DCHECK_IS_ON() && GTEST_HAS_DEATH_TEST && !defined(OS_ANDROID)
+}
+
+TEST(TimeoutTest, Derive) {
+  Timeout timeout(TimeDelta::FromMinutes(5));
+  EXPECT_TRUE(timeout.is_set());
+  EXPECT_FALSE(timeout.IsExpired());
+  EXPECT_EQ(TimeDelta::FromMinutes(5), timeout.GetDuration());
+  EXPECT_GE(TimeDelta::FromMinutes(5), timeout.GetRemainingTime());
+
+  Timeout small = Timeout(TimeDelta::FromSeconds(10), &timeout);
+  EXPECT_TRUE(small.is_set());
+  EXPECT_FALSE(small.IsExpired());
+  EXPECT_EQ(TimeDelta::FromSeconds(10), small.GetDuration());
+
+  Timeout large = Timeout(TimeDelta::FromMinutes(30), &timeout);
+  EXPECT_TRUE(large.is_set());
+  EXPECT_FALSE(large.IsExpired());
+  EXPECT_GE(timeout.GetDuration(), large.GetDuration());
+}
+
+TEST(TimeoutTest, DeriveExpired) {
+  Timeout timeout((TimeDelta()));
+  EXPECT_TRUE(timeout.is_set());
+  EXPECT_TRUE(timeout.IsExpired());
+
+  Timeout derived = Timeout(TimeDelta::FromSeconds(10), &timeout);
+  EXPECT_TRUE(derived.is_set());
+  EXPECT_TRUE(derived.IsExpired());
+  EXPECT_GE(TimeDelta(), derived.GetDuration());
+}
diff --git a/chrome/test/chromedriver/performance_logger.cc b/chrome/test/chromedriver/performance_logger.cc
index 387d32d..4b26454 100644
--- a/chrome/test/chromedriver/performance_logger.cc
+++ b/chrome/test/chromedriver/performance_logger.cc
@@ -17,6 +17,7 @@
 #include "chrome/test/chromedriver/chrome/devtools_client_impl.h"
 #include "chrome/test/chromedriver/chrome/log.h"
 #include "chrome/test/chromedriver/chrome/status.h"
+#include "chrome/test/chromedriver/net/timeout.h"
 #include "chrome/test/chromedriver/session.h"
 
 namespace {
@@ -268,7 +269,7 @@
   // Block up to 30 seconds until Tracing.tracingComplete event is received.
   status = browser_client_->HandleEventsUntil(
       base::Bind(&PerformanceLogger::IsTraceDone, base::Unretained(this)),
-      base::TimeDelta::FromSeconds(30));
+      Timeout(base::TimeDelta::FromSeconds(30)));
   if (status.IsError())
     return status;
 
diff --git a/chrome/test/chromedriver/performance_logger_unittest.cc b/chrome/test/chromedriver/performance_logger_unittest.cc
index 967bf22..cca0ad3 100644
--- a/chrome/test/chromedriver/performance_logger_unittest.cc
+++ b/chrome/test/chromedriver/performance_logger_unittest.cc
@@ -260,7 +260,7 @@
 
   // Overridden from DevToolsClient:
   Status HandleEventsUntil(const ConditionalFunc& conditional_func,
-                           const base::TimeDelta& timeout) override {
+                           const Timeout& timeout) override {
     TriggerEvent("Tracing.tracingComplete");
     events_handled_ = true;
     return Status(kOk);
diff --git a/chrome/test/chromedriver/session_commands.cc b/chrome/test/chromedriver/session_commands.cc
index 33e955ce..1da0f06f 100644
--- a/chrome/test/chromedriver/session_commands.cc
+++ b/chrome/test/chromedriver/session_commands.cc
@@ -458,7 +458,7 @@
 
   bool is_pending;
   status = web_view->IsPendingNavigation(
-      session->GetCurrentFrameId(), &is_pending);
+      session->GetCurrentFrameId(), nullptr, &is_pending);
   if (status.IsError())
     return status;
   value->reset(new base::FundamentalValue(is_pending));
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py
index 279e474d..da9d275d 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -178,6 +178,10 @@
         # TODO(gmanikpure): re-enable this test when we stop supporting
         # WebView on KitKat.
         'ChromeDriverTest.testGetUrlOnInvalidUrl',
+        # The WebView shell that we test against (on KitKat) does not perform
+        # cross-process navigations.
+        # TODO(samuong): reenable when it does.
+        'ChromeDriverPageLoadTimeoutTest.testPageLoadTimeoutCrossDomain',
     ]
 )
 
@@ -255,13 +259,28 @@
     return False
 
 
-class ChromeDriverTest(ChromeDriverBaseTest):
+class ChromeDriverBaseTestWithWebServer(ChromeDriverBaseTest):
+
+  @staticmethod
+  def GlobalSetUp():
+    ChromeDriverBaseTestWithWebServer._http_server = webserver.WebServer(
+        chrome_paths.GetTestData())
+
+  @staticmethod
+  def GlobalTearDown():
+    ChromeDriverBaseTestWithWebServer._http_server.Shutdown()
+
+  @staticmethod
+  def GetHttpUrlForFile(file_path):
+    return ChromeDriverBaseTestWithWebServer._http_server.GetUrl() + file_path
+
+
+class ChromeDriverTest(ChromeDriverBaseTestWithWebServer):
   """End to end tests for ChromeDriver."""
 
   @staticmethod
   def GlobalSetUp():
-    ChromeDriverTest._http_server = webserver.WebServer(
-        chrome_paths.GetTestData())
+    ChromeDriverBaseTestWithWebServer.GlobalSetUp()
     ChromeDriverTest._sync_server = webserver.SyncWebServer()
     if _ANDROID_PACKAGE_KEY:
       ChromeDriverTest._device = device_utils.DeviceUtils.HealthyDevices()[0]
@@ -275,11 +294,7 @@
   def GlobalTearDown():
     if _ANDROID_PACKAGE_KEY:
       forwarder.Forwarder.UnmapAllDevicePorts(ChromeDriverTest._device)
-    ChromeDriverTest._http_server.Shutdown()
-
-  @staticmethod
-  def GetHttpUrlForFile(file_path):
-    return ChromeDriverTest._http_server.GetUrl() + file_path
+    ChromeDriverBaseTestWithWebServer.GlobalTearDown()
 
   def setUp(self):
     self._driver = self.CreateDriver()
@@ -1243,6 +1258,48 @@
     self._driver.HandleAlert(True)
 
 
+class ChromeDriverPageLoadTimeoutTest(ChromeDriverBaseTestWithWebServer):
+
+  def _CheckPageLoadTimeout(self, driver, host=None):
+    initial_url = self.GetHttpUrlForFile('/chromedriver/empty.html')
+    driver.Load(initial_url)
+
+    request_received_event = threading.Event()
+    send_response_event = threading.Event()
+    def hang(request):
+      request_received_event.set()
+      # Don't hang infinitely, 10 seconds are enough.
+      send_response_event.wait(10)
+      return {}, 'Hi!'
+
+    try:
+      self._http_server.SetCallbackForPath('/hang', hang)
+      # NB: With a too small timeout chromedriver might not send the
+      # Navigate command at all.
+      driver.SetTimeout('page load', 500) # 500 ms
+      driver.Load(self._http_server.GetUrl(host) + '/hang')
+    except chromedriver.ChromeDriverException as e:
+      self.assertNotEqual(-1, e.message.find('timeout'))
+      # Verify that the browser actually made that request.
+      self.assertTrue(request_received_event.wait(1))
+    finally:
+      send_response_event.set()
+      pass
+
+    self.assertEquals(initial_url, driver.GetCurrentUrl())
+
+  def testPageLoadTimeout(self):
+    self._CheckPageLoadTimeout(self.CreateDriver())
+
+  def testPageLoadTimeoutCrossDomain(self):
+    driver = self.CreateDriver(
+        chrome_switches=['host-resolver-rules=MAP * 127.0.0.1'])
+    # Cross-domain navigation is likely to be a cross-process one. In this case
+    # DevToolsAgentHost behaves quite differently and does not send command
+    # responses if the navigation hangs, so this case deserves a dedicated test.
+    self._CheckPageLoadTimeout(driver, 'foo.bar')
+
+
 class ChromeDriverAndroidTest(ChromeDriverBaseTest):
   """End to end tests for Android-specific tests."""
 
diff --git a/chrome/test/chromedriver/test/webserver.py b/chrome/test/chromedriver/test/webserver.py
index f19f38f..a5a5d32 100644
--- a/chrome/test/chromedriver/test/webserver.py
+++ b/chrome/test/chromedriver/test/webserver.py
@@ -5,6 +5,7 @@
 import BaseHTTPServer
 import os
 import threading
+import sys
 
 
 class Responder(object):
@@ -80,6 +81,18 @@
         """Overriddes base class method to disable logging."""
         pass
 
+      def handle(self):
+        try:
+          BaseHTTPServer.BaseHTTPRequestHandler.handle(self)
+        except:
+          pass # Ignore socket errors.
+
+      def finish(self):
+        try:
+          BaseHTTPServer.BaseHTTPRequestHandler.finish(self)
+        except:
+          pass # Ignore socket errors.
+
     BaseHTTPServer.HTTPServer.__init__(self, ('127.0.0.1', 0), _Handler)
 
     if server_cert_and_key_path is not None:
@@ -94,9 +107,9 @@
     """Overridden from SocketServer."""
     raise RuntimeError('Timed out waiting for http request')
 
-  def GetUrl(self):
+  def GetUrl(self, host=None):
     """Returns the base URL of the server."""
-    postfix = '://127.0.0.1:%s' % self.server_port
+    postfix = '://%s:%s' % (host or '127.0.0.1', self.server_port)
     if self._is_https_enabled:
       return 'https' + postfix
     return 'http' + postfix
@@ -174,9 +187,9 @@
       self._path_maps_lock.release()
 
 
-  def GetUrl(self):
+  def GetUrl(self, host=None):
     """Returns the base URL of the server."""
-    return self._server.GetUrl()
+    return self._server.GetUrl(host)
 
   def Shutdown(self):
     """Shuts down the server synchronously."""
@@ -223,5 +236,5 @@
       responder.SendResponse({}, content)
     self.Respond(SendContent)
 
-  def GetUrl(self):
-    return self._server.GetUrl()
+  def GetUrl(self, host=None):
+    return self._server.GetUrl(host)
diff --git a/chrome/test/chromedriver/window_commands.cc b/chrome/test/chromedriver/window_commands.cc
index d1a4263..0ea9014 100644
--- a/chrome/test/chromedriver/window_commands.cc
+++ b/chrome/test/chromedriver/window_commands.cc
@@ -29,6 +29,7 @@
 #include "chrome/test/chromedriver/chrome/ui_events.h"
 #include "chrome/test/chromedriver/chrome/web_view.h"
 #include "chrome/test/chromedriver/element_util.h"
+#include "chrome/test/chromedriver/net/timeout.h"
 #include "chrome/test/chromedriver/session.h"
 #include "chrome/test/chromedriver/util.h"
 
@@ -202,6 +203,7 @@
                             Session* session,
                             const base::DictionaryValue& params,
                             std::unique_ptr<base::Value>* value) {
+  Timeout timeout;
   WebView* web_view = NULL;
   Status status = session->GetTargetWindow(&web_view);
   if (status.IsError())
@@ -232,19 +234,22 @@
     }
 
     nav_status = web_view->WaitForPendingNavigations(
-        session->GetCurrentFrameId(), session->page_load_timeout, true);
+        session->GetCurrentFrameId(),
+        Timeout(session->page_load_timeout, &timeout), true);
     if (nav_status.IsError())
       return nav_status;
 
-    status = command.Run(session, web_view, params, value);
-    if (status.code() == kNoSuchExecutionContext) {
+    status = command.Run(session, web_view, params, value, &timeout);
+    if (status.code() == kNoSuchExecutionContext || status.code() == kTimeout) {
+      // If the command timed out, let WaitForPendingNavigations cancel
+      // the navigation if there is one.
       continue;
     } else if (status.IsError()) {
       // If the command failed while a new page or frame started loading, retry
       // the command after the pending navigation has completed.
       bool is_pending = false;
       nav_status = web_view->IsPendingNavigation(session->GetCurrentFrameId(),
-                                                 &is_pending);
+                                                 &timeout, &is_pending);
       if (nav_status.IsError())
         return nav_status;
       else if (is_pending)
@@ -254,7 +259,8 @@
   }
 
   nav_status = web_view->WaitForPendingNavigations(
-      session->GetCurrentFrameId(), session->page_load_timeout, true);
+      session->GetCurrentFrameId(),
+      Timeout(session->page_load_timeout, &timeout), true);
 
   if (status.IsOk() && nav_status.IsError() &&
       nav_status.code() != kUnexpectedAlertOpen)
@@ -267,11 +273,13 @@
 Status ExecuteGet(Session* session,
                   WebView* web_view,
                   const base::DictionaryValue& params,
-                  std::unique_ptr<base::Value>* value) {
+                  std::unique_ptr<base::Value>* value,
+                  Timeout* timeout) {
+  timeout->SetDuration(session->page_load_timeout);
   std::string url;
   if (!params.GetString("url", &url))
     return Status(kUnknownError, "'url' must be a string");
-  Status status = web_view->Load(url);
+  Status status = web_view->Load(url, timeout);
   if (status.IsError())
     return status;
   session->SwitchToTopFrame();
@@ -281,7 +289,8 @@
 Status ExecuteExecuteScript(Session* session,
                             WebView* web_view,
                             const base::DictionaryValue& params,
-                            std::unique_ptr<base::Value>* value) {
+                            std::unique_ptr<base::Value>* value,
+                            Timeout* timeout) {
   std::string script;
   if (!params.GetString("script", &script))
     return Status(kUnknownError, "'script' must be a string");
@@ -304,7 +313,8 @@
 Status ExecuteExecuteAsyncScript(Session* session,
                                  WebView* web_view,
                                  const base::DictionaryValue& params,
-                                 std::unique_ptr<base::Value>* value) {
+                                 std::unique_ptr<base::Value>* value,
+                                 Timeout* timeout) {
   std::string script;
   if (!params.GetString("script", &script))
     return Status(kUnknownError, "'script' must be a string");
@@ -320,7 +330,8 @@
 Status ExecuteSwitchToFrame(Session* session,
                             WebView* web_view,
                             const base::DictionaryValue& params,
-                            std::unique_ptr<base::Value>* value) {
+                            std::unique_ptr<base::Value>* value,
+                            Timeout* timeout) {
   const base::Value* id;
   if (!params.Get("id", &id))
     return Status(kUnknownError, "missing 'id'");
@@ -390,7 +401,8 @@
 Status ExecuteSwitchToParentFrame(Session* session,
                                   WebView* web_view,
                                   const base::DictionaryValue& params,
-                                  std::unique_ptr<base::Value>* value) {
+                                  std::unique_ptr<base::Value>* value,
+                                  Timeout* timeout) {
   session->SwitchToParentFrame();
   return Status(kOk);
 }
@@ -398,7 +410,8 @@
 Status ExecuteGetTitle(Session* session,
                        WebView* web_view,
                        const base::DictionaryValue& params,
-                       std::unique_ptr<base::Value>* value) {
+                       std::unique_ptr<base::Value>* value,
+                       Timeout* timeout) {
   const char kGetTitleScript[] = "function() {  return document.title;}";
   base::ListValue args;
   return web_view->CallFunction(std::string(), kGetTitleScript, args, value);
@@ -407,7 +420,8 @@
 Status ExecuteGetPageSource(Session* session,
                             WebView* web_view,
                             const base::DictionaryValue& params,
-                            std::unique_ptr<base::Value>* value) {
+                            std::unique_ptr<base::Value>* value,
+                            Timeout* timeout) {
   const char kGetPageSource[] =
       "function() {"
       "  return new XMLSerializer().serializeToString(document);"
@@ -421,7 +435,8 @@
                           Session* session,
                           WebView* web_view,
                           const base::DictionaryValue& params,
-                          std::unique_ptr<base::Value>* value) {
+                          std::unique_ptr<base::Value>* value,
+                          Timeout* timeout) {
   return FindElement(interval_ms, true, NULL, session, web_view, params, value);
 }
 
@@ -429,7 +444,8 @@
                            Session* session,
                            WebView* web_view,
                            const base::DictionaryValue& params,
-                           std::unique_ptr<base::Value>* value) {
+                           std::unique_ptr<base::Value>* value,
+                           Timeout* timeout) {
   return FindElement(
       interval_ms, false, NULL, session, web_view, params, value);
 }
@@ -437,7 +453,8 @@
 Status ExecuteGetCurrentUrl(Session* session,
                             WebView* web_view,
                             const base::DictionaryValue& params,
-                            std::unique_ptr<base::Value>* value) {
+                            std::unique_ptr<base::Value>* value,
+                            Timeout* timeout) {
   std::string url;
   Status status = GetUrl(web_view, std::string(), &url);
   if (status.IsError())
@@ -463,7 +480,8 @@
 Status ExecuteGoBack(Session* session,
                      WebView* web_view,
                      const base::DictionaryValue& params,
-                     std::unique_ptr<base::Value>* value) {
+                     std::unique_ptr<base::Value>* value,
+                     Timeout* timeout) {
   Status status = web_view->TraverseHistory(-1);
   if (status.IsError())
     return status;
@@ -474,7 +492,8 @@
 Status ExecuteGoForward(Session* session,
                         WebView* web_view,
                         const base::DictionaryValue& params,
-                        std::unique_ptr<base::Value>* value) {
+                        std::unique_ptr<base::Value>* value,
+                        Timeout* timeout) {
   Status status = web_view->TraverseHistory(1);
   if (status.IsError())
     return status;
@@ -485,7 +504,8 @@
 Status ExecuteRefresh(Session* session,
                       WebView* web_view,
                       const base::DictionaryValue& params,
-                      std::unique_ptr<base::Value>* value) {
+                      std::unique_ptr<base::Value>* value,
+                      Timeout* timeout) {
   Status status = web_view->Reload();
   if (status.IsError())
     return status;
@@ -496,7 +516,8 @@
 Status ExecuteMouseMoveTo(Session* session,
                           WebView* web_view,
                           const base::DictionaryValue& params,
-                          std::unique_ptr<base::Value>* value) {
+                          std::unique_ptr<base::Value>* value,
+                          Timeout* timeout) {
   std::string element_id;
   bool has_element = params.GetString("element", &element_id);
   int x_offset = 0;
@@ -533,7 +554,8 @@
 Status ExecuteMouseClick(Session* session,
                          WebView* web_view,
                          const base::DictionaryValue& params,
-                         std::unique_ptr<base::Value>* value) {
+                         std::unique_ptr<base::Value>* value,
+                         Timeout* timeout) {
   MouseButton button;
   Status status = GetMouseButton(params, &button);
   if (status.IsError())
@@ -553,7 +575,8 @@
 Status ExecuteMouseButtonDown(Session* session,
                               WebView* web_view,
                               const base::DictionaryValue& params,
-                              std::unique_ptr<base::Value>* value) {
+                              std::unique_ptr<base::Value>* value,
+                              Timeout* timeout) {
   MouseButton button;
   Status status = GetMouseButton(params, &button);
   if (status.IsError())
@@ -569,7 +592,8 @@
 Status ExecuteMouseButtonUp(Session* session,
                             WebView* web_view,
                             const base::DictionaryValue& params,
-                            std::unique_ptr<base::Value>* value) {
+                            std::unique_ptr<base::Value>* value,
+                            Timeout* timeout) {
   MouseButton button;
   Status status = GetMouseButton(params, &button);
   if (status.IsError())
@@ -585,7 +609,8 @@
 Status ExecuteMouseDoubleClick(Session* session,
                                WebView* web_view,
                                const base::DictionaryValue& params,
-                               std::unique_ptr<base::Value>* value) {
+                               std::unique_ptr<base::Value>* value,
+                               Timeout* timeout) {
   MouseButton button;
   Status status = GetMouseButton(params, &button);
   if (status.IsError())
@@ -605,28 +630,32 @@
 Status ExecuteTouchDown(Session* session,
                         WebView* web_view,
                         const base::DictionaryValue& params,
-                        std::unique_ptr<base::Value>* value) {
+                        std::unique_ptr<base::Value>* value,
+                        Timeout* timeout) {
   return ExecuteTouchEvent(session, web_view, kTouchStart, params);
 }
 
 Status ExecuteTouchUp(Session* session,
                       WebView* web_view,
                       const base::DictionaryValue& params,
-                      std::unique_ptr<base::Value>* value) {
+                      std::unique_ptr<base::Value>* value,
+                      Timeout* timeout) {
   return ExecuteTouchEvent(session, web_view, kTouchEnd, params);
 }
 
 Status ExecuteTouchMove(Session* session,
                         WebView* web_view,
                         const base::DictionaryValue& params,
-                        std::unique_ptr<base::Value>* value) {
+                        std::unique_ptr<base::Value>* value,
+                        Timeout* timeout) {
   return ExecuteTouchEvent(session, web_view, kTouchMove, params);
 }
 
 Status ExecuteTouchScroll(Session* session,
                           WebView* web_view,
                           const base::DictionaryValue& params,
-                          std::unique_ptr<base::Value>* value) {
+                          std::unique_ptr<base::Value>* value,
+                          Timeout* timeout) {
   if (session->chrome->GetBrowserInfo()->build_no < 2286) {
     // TODO(samuong): remove this once we stop supporting M41.
     return Status(kUnknownCommand, "Touch scroll action requires Chrome 42+");
@@ -652,7 +681,8 @@
 Status ExecuteTouchPinch(Session* session,
                          WebView* web_view,
                          const base::DictionaryValue& params,
-                         std::unique_ptr<base::Value>* value) {
+                         std::unique_ptr<base::Value>* value,
+                         Timeout* timeout) {
   if (session->chrome->GetBrowserInfo()->build_no < 2286) {
     // TODO(samuong): remove this once we stop supporting M41.
     return Status(kUnknownCommand, "Pinch action requires Chrome 42+");
@@ -671,14 +701,16 @@
 Status ExecuteGetActiveElement(Session* session,
                                WebView* web_view,
                                const base::DictionaryValue& params,
-                               std::unique_ptr<base::Value>* value) {
+                               std::unique_ptr<base::Value>* value,
+                               Timeout* timeout) {
   return GetActiveElement(session, web_view, value);
 }
 
 Status ExecuteSendKeysToActiveElement(Session* session,
                                       WebView* web_view,
                                       const base::DictionaryValue& params,
-                                      std::unique_ptr<base::Value>* value) {
+                                      std::unique_ptr<base::Value>* value,
+                                      Timeout* timeout) {
   const base::ListValue* key_list;
   if (!params.GetList("value", &key_list))
     return Status(kUnknownError, "'value' must be a list");
@@ -689,7 +721,8 @@
 Status ExecuteGetAppCacheStatus(Session* session,
                                 WebView* web_view,
                                 const base::DictionaryValue& params,
-                                std::unique_ptr<base::Value>* value) {
+                                std::unique_ptr<base::Value>* value,
+                                Timeout* timeout) {
   return web_view->EvaluateScript(
       session->GetCurrentFrameId(),
       "applicationCache.status",
@@ -699,7 +732,8 @@
 Status ExecuteIsBrowserOnline(Session* session,
                               WebView* web_view,
                               const base::DictionaryValue& params,
-                              std::unique_ptr<base::Value>* value) {
+                              std::unique_ptr<base::Value>* value,
+                              Timeout* timeout) {
   return web_view->EvaluateScript(
       session->GetCurrentFrameId(),
       "navigator.onLine",
@@ -710,7 +744,8 @@
                              Session* session,
                              WebView* web_view,
                              const base::DictionaryValue& params,
-                             std::unique_ptr<base::Value>* value) {
+                             std::unique_ptr<base::Value>* value,
+                             Timeout* timeout) {
   std::string key;
   if (!params.GetString("key", &key))
     return Status(kUnknownError, "'key' must be a string");
@@ -727,7 +762,8 @@
                              Session* session,
                              WebView* web_view,
                              const base::DictionaryValue& params,
-                             std::unique_ptr<base::Value>* value) {
+                             std::unique_ptr<base::Value>* value,
+                             Timeout* timeout) {
   const char script[] =
       "var keys = [];"
       "for (var key in %s) {"
@@ -744,7 +780,8 @@
                              Session* session,
                              WebView* web_view,
                              const base::DictionaryValue& params,
-                             std::unique_ptr<base::Value>* value) {
+                             std::unique_ptr<base::Value>* value,
+                             Timeout* timeout) {
   std::string key;
   if (!params.GetString("key", &key))
     return Status(kUnknownError, "'key' must be a string");
@@ -765,7 +802,8 @@
                                 Session* session,
                                 WebView* web_view,
                                 const base::DictionaryValue& params,
-                                std::unique_ptr<base::Value>* value) {
+                                std::unique_ptr<base::Value>* value,
+                                Timeout* timeout) {
   std::string key;
   if (!params.GetString("key", &key))
     return Status(kUnknownError, "'key' must be a string");
@@ -782,7 +820,8 @@
                            Session* session,
                            WebView* web_view,
                            const base::DictionaryValue& params,
-                           std::unique_ptr<base::Value>* value) {
+                           std::unique_ptr<base::Value>* value,
+                           Timeout* timeout) {
   return web_view->EvaluateScript(
       session->GetCurrentFrameId(),
       base::StringPrintf("%s.clear()", storage),
@@ -793,7 +832,8 @@
                              Session* session,
                              WebView* web_view,
                              const base::DictionaryValue& params,
-                             std::unique_ptr<base::Value>* value) {
+                             std::unique_ptr<base::Value>* value,
+                             Timeout* timeout) {
   return web_view->EvaluateScript(
       session->GetCurrentFrameId(),
       base::StringPrintf("%s.length", storage),
@@ -803,7 +843,8 @@
 Status ExecuteScreenshot(Session* session,
                          WebView* web_view,
                          const base::DictionaryValue& params,
-                         std::unique_ptr<base::Value>* value) {
+                         std::unique_ptr<base::Value>* value,
+                         Timeout* timeout) {
   Status status = session->chrome->ActivateWebView(web_view->GetId());
   if (status.IsError())
     return status;
@@ -834,7 +875,8 @@
 Status ExecuteGetCookies(Session* session,
                          WebView* web_view,
                          const base::DictionaryValue& params,
-                         std::unique_ptr<base::Value>* value) {
+                         std::unique_ptr<base::Value>* value,
+                         Timeout* timeout) {
   std::list<Cookie> cookies;
   Status status = GetVisibleCookies(web_view, &cookies);
   if (status.IsError())
@@ -851,7 +893,8 @@
 Status ExecuteAddCookie(Session* session,
                         WebView* web_view,
                         const base::DictionaryValue& params,
-                        std::unique_ptr<base::Value>* value) {
+                        std::unique_ptr<base::Value>* value,
+                        Timeout* timeout) {
   const base::DictionaryValue* cookie;
   if (!params.GetDictionary("cookie", &cookie))
     return Status(kUnknownError, "missing 'cookie'");
@@ -865,7 +908,8 @@
 Status ExecuteDeleteCookie(Session* session,
                            WebView* web_view,
                            const base::DictionaryValue& params,
-                           std::unique_ptr<base::Value>* value) {
+                           std::unique_ptr<base::Value>* value,
+                           Timeout* timeout) {
   std::string name;
   if (!params.GetString("name", &name))
     return Status(kUnknownError, "missing 'name'");
@@ -881,7 +925,8 @@
 Status ExecuteDeleteAllCookies(Session* session,
                                WebView* web_view,
                                const base::DictionaryValue& params,
-                               std::unique_ptr<base::Value>* value) {
+                               std::unique_ptr<base::Value>* value,
+                               Timeout* timeout) {
   std::list<Cookie> cookies;
   Status status = GetVisibleCookies(web_view, &cookies);
   if (status.IsError())
@@ -908,7 +953,8 @@
 Status ExecuteSetLocation(Session* session,
                           WebView* web_view,
                           const base::DictionaryValue& params,
-                          std::unique_ptr<base::Value>* value) {
+                          std::unique_ptr<base::Value>* value,
+                          Timeout* timeout) {
   const base::DictionaryValue* location = NULL;
   Geoposition geoposition;
   if (!params.GetDictionary("location", &location) ||
@@ -933,7 +979,8 @@
 Status ExecuteSetNetworkConditions(Session* session,
                                    WebView* web_view,
                                    const base::DictionaryValue& params,
-                                   std::unique_ptr<base::Value>* value) {
+                                   std::unique_ptr<base::Value>* value,
+                                   Timeout* timeout) {
   std::string network_name;
   const base::DictionaryValue* conditions = NULL;
   std::unique_ptr<NetworkConditions> network_conditions(
@@ -993,7 +1040,8 @@
 Status ExecuteDeleteNetworkConditions(Session* session,
                                       WebView* web_view,
                                       const base::DictionaryValue& params,
-                                      std::unique_ptr<base::Value>* value) {
+                                      std::unique_ptr<base::Value>* value,
+                                      Timeout* timeout) {
   // Chrome does not have any command to stop overriding network conditions, so
   // we just override the network conditions with the "No throttling" preset.
   NetworkConditions network_conditions;
@@ -1015,6 +1063,7 @@
 Status ExecuteTakeHeapSnapshot(Session* session,
                                WebView* web_view,
                                const base::DictionaryValue& params,
-                               std::unique_ptr<base::Value>* value) {
+                               std::unique_ptr<base::Value>* value,
+                               Timeout* timeout) {
   return web_view->TakeHeapSnapshot(value);
 }
diff --git a/chrome/test/chromedriver/window_commands.h b/chrome/test/chromedriver/window_commands.h
index b48f6d1..0f33d22f 100644
--- a/chrome/test/chromedriver/window_commands.h
+++ b/chrome/test/chromedriver/window_commands.h
@@ -17,13 +17,14 @@
 
 struct Session;
 class Status;
+class Timeout;
 class WebView;
 
 typedef base::Callback<Status(Session* session,
                               WebView* web_view,
                               const base::DictionaryValue&,
-                              std::unique_ptr<base::Value>*)>
-    WindowCommand;
+                              std::unique_ptr<base::Value>*,
+                              Timeout*)> WindowCommand;
 
 // Execute a Window Command on the target window.
 Status ExecuteWindowCommand(const WindowCommand& command,
@@ -35,247 +36,289 @@
 Status ExecuteGet(Session* session,
                   WebView* web_view,
                   const base::DictionaryValue& params,
-                  std::unique_ptr<base::Value>* value);
+                  std::unique_ptr<base::Value>* value,
+                  Timeout* timeout);
 
 // Evaluates a given synchronous script with arguments.
 Status ExecuteExecuteScript(Session* session,
                             WebView* web_view,
                             const base::DictionaryValue& params,
-                            std::unique_ptr<base::Value>* value);
+                            std::unique_ptr<base::Value>* value,
+                            Timeout* timeout);
 
 // Evaluates a given asynchronous script with arguments.
 Status ExecuteExecuteAsyncScript(Session* session,
                                  WebView* web_view,
                                  const base::DictionaryValue& params,
-                                 std::unique_ptr<base::Value>* value);
+                                 std::unique_ptr<base::Value>* value,
+                                 Timeout* timeout);
 
 // Changes the targeted frame for the given session.
 Status ExecuteSwitchToFrame(Session* session,
                             WebView* web_view,
                             const base::DictionaryValue& params,
-                            std::unique_ptr<base::Value>* value);
+                            std::unique_ptr<base::Value>* value,
+                            Timeout* timeout);
 
 // Change focus to the parent frame.
 Status ExecuteSwitchToParentFrame(Session* session,
                                   WebView* web_view,
                                   const base::DictionaryValue& params,
-                                  std::unique_ptr<base::Value>* value);
+                                  std::unique_ptr<base::Value>* value,
+                                  Timeout* timeout);
 
 // Get the current page title.
 Status ExecuteGetTitle(Session* session,
                        WebView* web_view,
                        const base::DictionaryValue& params,
-                       std::unique_ptr<base::Value>* value);
+                       std::unique_ptr<base::Value>* value,
+                       Timeout* timeout);
 
 // Get the current page source.
 Status ExecuteGetPageSource(Session* session,
                             WebView* web_view,
                             const base::DictionaryValue& params,
-                            std::unique_ptr<base::Value>* value);
+                            std::unique_ptr<base::Value>* value,
+                            Timeout* timeout);
 
 // Search for an element on the page, starting from the document root.
 Status ExecuteFindElement(int interval_ms,
                           Session* session,
                           WebView* web_view,
                           const base::DictionaryValue& params,
-                          std::unique_ptr<base::Value>* value);
+                          std::unique_ptr<base::Value>* value,
+                          Timeout* timeout);
 
 // Search for multiple elements on the page, starting from the document root.
 Status ExecuteFindElements(int interval_ms,
                            Session* session,
                            WebView* web_view,
                            const base::DictionaryValue& params,
-                           std::unique_ptr<base::Value>* value);
+                           std::unique_ptr<base::Value>* value,
+                           Timeout* timeout);
 
 // Get the current page url.
 Status ExecuteGetCurrentUrl(Session* session,
                             WebView* web_view,
                             const base::DictionaryValue& params,
-                            std::unique_ptr<base::Value>* value);
+                            std::unique_ptr<base::Value>* value,
+                            Timeout* timeout);
 
 // Navigate backward in the browser history.
 Status ExecuteGoBack(Session* session,
                      WebView* web_view,
                      const base::DictionaryValue& params,
-                     std::unique_ptr<base::Value>* value);
+                     std::unique_ptr<base::Value>* value,
+                     Timeout* timeout);
 
 // Navigate forward in the browser history.
 Status ExecuteGoForward(Session* session,
                         WebView* web_view,
                         const base::DictionaryValue& params,
-                        std::unique_ptr<base::Value>* value);
+                        std::unique_ptr<base::Value>* value,
+                        Timeout* timeout);
 
 // Refresh the current page.
 Status ExecuteRefresh(Session* session,
                       WebView* web_view,
                       const base::DictionaryValue& params,
-                      std::unique_ptr<base::Value>* value);
+                      std::unique_ptr<base::Value>* value,
+                      Timeout* timeout);
 
 // Move the mouse by an offset of the element if specified .
 Status ExecuteMouseMoveTo(Session* session,
                           WebView* web_view,
                           const base::DictionaryValue& params,
-                          std::unique_ptr<base::Value>* value);
+                          std::unique_ptr<base::Value>* value,
+                          Timeout* timeout);
 
 // Click a mouse button at the coordinates set by the last moveto.
 Status ExecuteMouseClick(Session* session,
                          WebView* web_view,
                          const base::DictionaryValue& params,
-                         std::unique_ptr<base::Value>* value);
+                         std::unique_ptr<base::Value>* value,
+                         Timeout* timeout);
 
 // Click and hold a mouse button at the coordinates set by the last moveto.
 Status ExecuteMouseButtonDown(Session* session,
                               WebView* web_view,
                               const base::DictionaryValue& params,
-                              std::unique_ptr<base::Value>* value);
+                              std::unique_ptr<base::Value>* value,
+                              Timeout* timeout);
 
 // Releases the mouse button previously held (where the mouse is currently at).
 Status ExecuteMouseButtonUp(Session* session,
                             WebView* web_view,
                             const base::DictionaryValue& params,
-                            std::unique_ptr<base::Value>* value);
+                            std::unique_ptr<base::Value>* value,
+                            Timeout* timeout);
 
 // Double-clicks at the current mouse coordinates (set by last moveto).
 Status ExecuteMouseDoubleClick(Session* session,
                                WebView* web_view,
                                const base::DictionaryValue& params,
-                               std::unique_ptr<base::Value>* value);
+                               std::unique_ptr<base::Value>* value,
+                               Timeout* timeout);
 
 // Touch press at a given coordinate.
 Status ExecuteTouchDown(Session* session,
                         WebView* web_view,
                         const base::DictionaryValue& params,
-                        std::unique_ptr<base::Value>* value);
+                        std::unique_ptr<base::Value>* value,
+                        Timeout* timeout);
 
 // Touch release at a given coordinate.
 Status ExecuteTouchUp(Session* session,
                       WebView* web_view,
                       const base::DictionaryValue& params,
-                      std::unique_ptr<base::Value>* value);
+                      std::unique_ptr<base::Value>* value,
+                      Timeout* timeout);
 
 // Touch move at a given coordinate.
 Status ExecuteTouchMove(Session* session,
                         WebView* web_view,
                         const base::DictionaryValue& params,
-                        std::unique_ptr<base::Value>* value);
+                        std::unique_ptr<base::Value>* value,
+                        Timeout* timeout);
 
 // Do a swipe (scroll) gesture beginning at the element.
 Status ExecuteTouchScroll(Session* session,
                           WebView* web_view,
                           const base::DictionaryValue& params,
-                          std::unique_ptr<base::Value>* value);
+                          std::unique_ptr<base::Value>* value,
+                          Timeout* timeout);
 
 Status ExecuteTouchPinch(Session* session,
                          WebView* web_view,
                          const base::DictionaryValue& params,
-                         std::unique_ptr<base::Value>* value);
+                         std::unique_ptr<base::Value>* value,
+                         Timeout* timeout);
 
 Status ExecuteGetActiveElement(Session* session,
                                WebView* web_view,
                                const base::DictionaryValue& params,
-                               std::unique_ptr<base::Value>* value);
+                               std::unique_ptr<base::Value>* value,
+                               Timeout* timeout);
 
 // Send a sequence of key strokes to the active element.
 Status ExecuteSendKeysToActiveElement(Session* session,
                                       WebView* web_view,
                                       const base::DictionaryValue& params,
-                                      std::unique_ptr<base::Value>* value);
+                                      std::unique_ptr<base::Value>* value,
+                                      Timeout* timeout);
 
 // Gets the status of the application cache (window.applicationCache.status).
 Status ExecuteGetAppCacheStatus(Session* session,
                                 WebView* web_view,
                                 const base::DictionaryValue& params,
-                                std::unique_ptr<base::Value>* value);
+                                std::unique_ptr<base::Value>* value,
+                                Timeout* timeout);
 
 Status ExecuteIsBrowserOnline(Session* session,
                               WebView* web_view,
                               const base::DictionaryValue& params,
-                              std::unique_ptr<base::Value>* value);
+                              std::unique_ptr<base::Value>* value,
+                              Timeout* timeout);
 
 Status ExecuteGetStorageItem(const char* storage,
                              Session* session,
                              WebView* web_view,
                              const base::DictionaryValue& params,
-                             std::unique_ptr<base::Value>* value);
+                             std::unique_ptr<base::Value>* value,
+                             Timeout* timeout);
 
 Status ExecuteGetStorageKeys(const char* storage,
                              Session* session,
                              WebView* web_view,
                              const base::DictionaryValue& params,
-                             std::unique_ptr<base::Value>* value);
+                             std::unique_ptr<base::Value>* value,
+                             Timeout* timeout);
 
 Status ExecuteSetStorageItem(const char* storage,
                              Session* session,
                              WebView* web_view,
                              const base::DictionaryValue& params,
-                             std::unique_ptr<base::Value>* value);
+                             std::unique_ptr<base::Value>* value,
+                             Timeout* timeout);
 
 Status ExecuteRemoveStorageItem(const char* storage,
                                 Session* session,
                                 WebView* web_view,
                                 const base::DictionaryValue& params,
-                                std::unique_ptr<base::Value>* value);
+                                std::unique_ptr<base::Value>* value,
+                                Timeout* timeout);
 
 Status ExecuteClearStorage(const char* storage,
                            Session* session,
                            WebView* web_view,
                            const base::DictionaryValue& params,
-                           std::unique_ptr<base::Value>* value);
+                           std::unique_ptr<base::Value>* value,
+                           Timeout* timeout);
 
 Status ExecuteGetStorageSize(const char* storage,
                              Session* session,
                              WebView* web_view,
                              const base::DictionaryValue& params,
-                             std::unique_ptr<base::Value>* value);
+                             std::unique_ptr<base::Value>* value,
+                             Timeout* timeout);
 
 Status ExecuteScreenshot(Session* session,
                          WebView* web_view,
                          const base::DictionaryValue& params,
-                         std::unique_ptr<base::Value>* value);
+                         std::unique_ptr<base::Value>* value,
+                         Timeout* timeout);
 
 // Retrieve all cookies visible to the current page.
 Status ExecuteGetCookies(Session* session,
                          WebView* web_view,
                          const base::DictionaryValue& params,
-                         std::unique_ptr<base::Value>* value);
+                         std::unique_ptr<base::Value>* value,
+                         Timeout* timeout);
 
 // Set a cookie. If the cookie path is not specified, it should be set to "/".
 // If the domain is omitted, it should default to the current page's domain.
 Status ExecuteAddCookie(Session* session,
                         WebView* web_view,
                         const base::DictionaryValue& params,
-                        std::unique_ptr<base::Value>* value);
+                        std::unique_ptr<base::Value>* value,
+                        Timeout* timeout);
 
 // Delete the cookie with the given name if it exists in the current page.
 Status ExecuteDeleteCookie(Session* session,
                            WebView* web_view,
                            const base::DictionaryValue& params,
-                           std::unique_ptr<base::Value>* value);
+                           std::unique_ptr<base::Value>* value,
+                           Timeout* timeout);
 
 // Delete all cookies visible to the current page.
 Status ExecuteDeleteAllCookies(Session* session,
                                WebView* web_view,
                                const base::DictionaryValue& params,
-                               std::unique_ptr<base::Value>* value);
+                               std::unique_ptr<base::Value>* value,
+                               Timeout* timeout);
 
 Status ExecuteSetLocation(Session* session,
                           WebView* web_view,
                           const base::DictionaryValue& params,
-                          std::unique_ptr<base::Value>* value);
+                          std::unique_ptr<base::Value>* value,
+                          Timeout* timeout);
 
 Status ExecuteSetNetworkConditions(Session* session,
                                    WebView* web_view,
                                    const base::DictionaryValue& params,
-                                   std::unique_ptr<base::Value>* value);
+                                   std::unique_ptr<base::Value>* value,
+                                   Timeout* timeout);
 
 Status ExecuteDeleteNetworkConditions(Session* session,
                                       WebView* web_view,
                                       const base::DictionaryValue& params,
-                                      std::unique_ptr<base::Value>* value);
+                                      std::unique_ptr<base::Value>* value,
+                                      Timeout* timeout);
 
 Status ExecuteTakeHeapSnapshot(Session* session,
                                WebView* web_view,
                                const base::DictionaryValue& params,
-                               std::unique_ptr<base::Value>* value);
+                               std::unique_ptr<base::Value>* value,
+                               Timeout* timeout);
 
 #endif  // CHROME_TEST_CHROMEDRIVER_WINDOW_COMMANDS_H_
diff --git a/chrome/test/data/extensions/platform_apps/web_view/text_input_state/background.js b/chrome/test/data/extensions/platform_apps/web_view/text_input_state/background.js
deleted file mode 100644
index 598fc2e1..0000000
--- a/chrome/test/data/extensions/platform_apps/web_view/text_input_state/background.js
+++ /dev/null
@@ -1,7 +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.
-
-chrome.app.runtime.onLaunched.addListener(function() {
-  chrome.app.window.create('window.html', {}, function () {});
-});
diff --git a/chrome/test/data/extensions/platform_apps/web_view/text_input_state/guest.html b/chrome/test/data/extensions/platform_apps/web_view/text_input_state/guest.html
deleted file mode 100644
index 1b2a5ab..0000000
--- a/chrome/test/data/extensions/platform_apps/web_view/text_input_state/guest.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<!--
- * 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.
--->
-<html>
-<head>
-  <title> Guest page with text input field. </title>
-</head>
-
-<body>
-  <input type="text" value="guest"></input>
-  <script>
-    window.addEventListener('load', function() {
-      document.querySelector('input').addEventListener('focus', function() {
-        console.log('Guest input focused!');
-      });
-    });
-  </script>
-</body>
-</html>
diff --git a/chrome/test/data/extensions/platform_apps/web_view/text_input_state/manifest.json b/chrome/test/data/extensions/platform_apps/web_view/text_input_state/manifest.json
deleted file mode 100644
index 0382f97..0000000
--- a/chrome/test/data/extensions/platform_apps/web_view/text_input_state/manifest.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "name": "<webview> - Text Input State Tracking Test",
-  "version": "1",
-  "permissions": [
-    "webview"
-  ],
-  "app": {
-    "background": {
-      "scripts": ["background.js"]
-    }
-  }
-}
diff --git a/chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.html b/chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.html
deleted file mode 100644
index 7ac32466..0000000
--- a/chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<!--
- * 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.
--->
-<html>
-<head>
-  <title>App Page Title</title>
-</head>
-<body>
-  <input id="first" type="number" value="2016"></input>
-  <div id="webview-container"></div>
-  <input id="second" type="text" value="last one"></input>
-  <script src="window.js"></script>
-</body>
-</html>
diff --git a/chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.js b/chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.js
deleted file mode 100644
index 117a3e5..0000000
--- a/chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.js
+++ /dev/null
@@ -1,38 +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.
-
-chrome.test.getConfig(function(config) {
-  var guestURL = 'http://localhost:' + config.testServer.port +
-      '/extensions/platform_apps/web_view/text_input_state/guest.html';
-  var webview = document.createElement('webview');
-  document.querySelector('#webview-container').appendChild(webview);
-  webview.onloadstop = function() {
-    chrome.test.sendMessage('connected');
-  };
-  webview.addEventListener('consolemessage', function(e) {
-    chrome.test.sendMessage('GUEST-FOCUSED');
-  });
-  webview.src = guestURL;
-});
-
-window.addEventListener('load', function() {
-  document.querySelector('#first').addEventListener('focus', function() {
-    chrome.test.sendMessage('EMBEDDER-FOCUSED-1');
-  });
-
-  document.querySelector('#second').addEventListener('focus', function() {
-    chrome.test.sendMessage('EMBEDDER-FOCUSED-2');
-  });
-});
-
-function detachWebView() {
-  var webview = document.querySelector('webview');
-  if (webview) {
-    webview.parentNode.removeChild(webview);
-    chrome.test.sendMessage('detached');
-  } else {
-    chrome.test.sendMessage('failed-to-detach');
-  }
-}
-
diff --git a/chrome/test/data/webui/media_router/media_router_container_filter_tests.js b/chrome/test/data/webui/media_router/media_router_container_filter_tests.js
index 937bb0b..f2cfe39 100644
--- a/chrome/test/data/webui/media_router/media_router_container_filter_tests.js
+++ b/chrome/test/data/webui/media_router/media_router_container_filter_tests.js
@@ -52,6 +52,19 @@
       var fakeSinkList = [];
 
       /**
+       * Simulates pressing the Escape key on |element|.
+       * @param {!HTMLElement} element
+       */
+      var pressEscapeOnElement = function(element) {
+        element.dispatchEvent(new KeyboardEvent('keydown', {
+          'key': 'Escape',
+          'code': 'Escape',
+          'bubbles': true,
+          'cancelable': true
+        }));
+      };
+
+      /**
        * Search text that will match all sinks.
        * @type {?string}
        */
@@ -142,13 +155,53 @@
       test('filter view escape key', function(done) {
         MockInteractions.tap(container.$['sink-search-icon']);
         setTimeout(function() {
-          MockInteractions.pressAndReleaseKeyOn(
-              container, media_router.KEYCODE_ESC);
+          pressEscapeOnElement(container);
           checkCurrentView(media_router.MediaRouterView.SINK_LIST);
           done();
         });
       });
 
+      // Tests that pressing the Escape key in the FILTER view when a sink has
+      // keyboard focus returns |container| to the SINK_LIST view and focuses
+      // the correct sink in the list.
+      test('filter view escape key on menu item', function(done) {
+        container.allSinks = fakeSinkList;
+        MockInteractions.tap(container.$['sink-search-icon']);
+        setTimeout(function() {
+          var item =
+              container.$$('#search-results').querySelectorAll('paper-item')[1];
+          item.focus();
+          pressEscapeOnElement(item);
+          checkCurrentView(media_router.MediaRouterView.SINK_LIST);
+          setTimeout(function() {
+            item =
+                container.$['sink-list-view'].querySelectorAll('paper-item')[1];
+            assertTrue(item.focused);
+            done();
+          });
+        });
+      });
+
+      // Tests that pressing the Escape key in the FILTER view when a sink does
+      // not have keyboard focus returns |container| to the SINK_LIST view and
+      // leaves focus where it is.
+      test('filter view escape key on menu item other focus', function(done) {
+        container.allSinks = fakeSinkList;
+        MockInteractions.tap(container.$['sink-search-icon']);
+        setTimeout(function() {
+          var item =
+              container.$$('#search-results').querySelectorAll('paper-item')[1];
+          var closeButton = container.$['container-header'].$['close-button'];
+          closeButton.focus();
+          pressEscapeOnElement(item);
+          checkCurrentView(media_router.MediaRouterView.SINK_LIST);
+          setTimeout(function() {
+            assertTrue(closeButton.focused);
+            done();
+          });
+        });
+      });
+
       // Tests that expected elements are visible when in filter view.
       test('filter view visibility', function(done) {
         checkElementsVisibleWithId(['container-header',
@@ -229,8 +282,7 @@
                                                   'sink-list-view']);
                       // Pressing the Escape key in FILTER view should return
                       // |container| to SINK_LIST view and not exit the dialog.
-                      MockInteractions.pressAndReleaseKeyOn(
-                          container, media_router.KEYCODE_ESC);
+                      pressEscapeOnElement(container);
                       setTimeout(function() {
                         checkElementsVisibleWithId(['container-header',
                                                     'sink-search',
@@ -299,8 +351,7 @@
         setTimeout(function() {
           container.$['sink-search-input'].value = searchTextAll;
 
-          MockInteractions.pressAndReleaseKeyOn(
-              container, media_router.KEYCODE_ESC);
+          pressEscapeOnElement(container);
           assertEquals(searchTextAll, container.$['sink-search-input'].value);
           done();
         });
diff --git a/chrome_elf/BUILD.gn b/chrome_elf/BUILD.gn
index 218c2240..31ea217a 100644
--- a/chrome_elf/BUILD.gn
+++ b/chrome_elf/BUILD.gn
@@ -24,6 +24,7 @@
 
 shared_library("chrome_elf") {
   sources = [
+    "chrome_elf.def",
     "chrome_elf_main.cc",
     "chrome_elf_main.h",
   ]
@@ -37,10 +38,7 @@
   ]
   configs += [ "//build/config/win:windowed" ]
   configs -= [ "//build/config/win:console" ]
-  ldflags = [
-    "/NODEFAULTLIB:user32.lib",
-    "/DEF:" + rebase_path("chrome_elf.def"),
-  ]
+  ldflags = [ "/NODEFAULTLIB:user32.lib" ]
   if (current_cpu == "x86") {
     # Don"t set an x64 base address (to avoid breaking HE-ASLR).
     ldflags += [ "/BASE:0x01c20000" ]
@@ -161,6 +159,7 @@
 shared_library("blacklist_test_main_dll") {
   sources = [
     "blacklist/test/blacklist_test_main_dll.cc",
+    "blacklist/test/blacklist_test_main_dll.def",
   ]
   deps = [
     ":blacklist",
@@ -168,34 +167,34 @@
     "//base",
     "//build/config/sanitizers:deps",
   ]
-  ldflags =
-      [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_main_dll.def",
-                              root_build_dir) ]
 }
 
-shared_library("blacklist_test_dll_1") {
+loadable_module("blacklist_test_dll_1") {
   sources = [
     "blacklist/test/blacklist_test_dll_1.cc",
+    "blacklist/test/blacklist_test_dll_1.def",
   ]
-  ldflags = [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_dll_1.def",
-                                    root_build_dir) ]
   deps = [
     "//build/config/sanitizers:deps",
   ]
 }
 
-shared_library("blacklist_test_dll_2") {
+loadable_module("blacklist_test_dll_2") {
   sources = [
     "blacklist/test/blacklist_test_dll_2.cc",
+    "blacklist/test/blacklist_test_dll_2.def",
   ]
-  ldflags = [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_dll_2.def",
-                                    root_build_dir) ]
   deps = [
     "//build/config/sanitizers:deps",
   ]
 }
 
-shared_library("blacklist_test_dll_3") {
+# As-is, this does not generate a .lib file because there are no exports and no
+# .def file. The current definition of loadable_module does not declare a .lib
+# file as an output, so this is OK. If it did (or if this used shared_library
+# which does), Ninja would get confused and always rebuild this target because
+# it sees a declared output file but that file doesn't exist on disk.
+loadable_module("blacklist_test_dll_3") {
   sources = [
     "blacklist/test/blacklist_test_dll_3.cc",
   ]
diff --git a/chromecast/browser/cast_browser_context.cc b/chromecast/browser/cast_browser_context.cc
index 2ba12493..20e0007 100644
--- a/chromecast/browser/cast_browser_context.cc
+++ b/chromecast/browser/cast_browser_context.cc
@@ -94,22 +94,6 @@
   return false;
 }
 
-net::URLRequestContextGetter* CastBrowserContext::GetMediaRequestContext() {
-  return url_request_context_factory_->GetMediaGetter();
-}
-
-net::URLRequestContextGetter*
-CastBrowserContext::GetMediaRequestContextForRenderProcess(
-    int renderer_child_id) {
-  return GetMediaRequestContext();
-}
-
-net::URLRequestContextGetter*
-CastBrowserContext::GetMediaRequestContextForStoragePartition(
-    const base::FilePath& partition_path, bool in_memory) {
-  return GetMediaRequestContext();
-}
-
 net::URLRequestContextGetter* CastBrowserContext::GetSystemRequestContext() {
   return url_request_context_factory_->GetSystemGetter();
 }
@@ -166,5 +150,15 @@
   return nullptr;
 }
 
+net::URLRequestContextGetter* CastBrowserContext::CreateMediaRequestContext() {
+  return url_request_context_factory_->GetMediaGetter();
+}
+
+net::URLRequestContextGetter*
+CastBrowserContext::CreateMediaRequestContextForStoragePartition(
+    const base::FilePath& partition_path, bool in_memory) {
+  return nullptr;
+}
+
 }  // namespace shell
 }  // namespace chromecast
diff --git a/chromecast/browser/cast_browser_context.h b/chromecast/browser/cast_browser_context.h
index 91e5302..a0e6ba7e 100644
--- a/chromecast/browser/cast_browser_context.h
+++ b/chromecast/browser/cast_browser_context.h
@@ -30,12 +30,6 @@
       const base::FilePath& partition_path) override;
   base::FilePath GetPath() const override;
   bool IsOffTheRecord() const override;
-  net::URLRequestContextGetter* GetMediaRequestContext() override;
-  net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
-      int renderer_child_id) override;
-  net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
-      const base::FilePath& partition_path,
-      bool in_memory) override;
   content::ResourceContext* GetResourceContext() override;
   content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
   content::BrowserPluginGuestManager* GetGuestManager() override;
@@ -52,6 +46,10 @@
       bool in_memory,
       content::ProtocolHandlerMap* protocol_handlers,
       content::URLRequestInterceptorScopedVector request_interceptors) override;
+  net::URLRequestContextGetter* CreateMediaRequestContext() override;
+  net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
+      const base::FilePath& partition_path,
+      bool in_memory) override;
 
   net::URLRequestContextGetter* GetSystemRequestContext();
 
diff --git a/chromeos/dbus/cras_audio_client_unittest.cc b/chromeos/dbus/cras_audio_client_unittest.cc
index d297701..a2993bd 100644
--- a/chromeos/dbus/cras_audio_client_unittest.cc
+++ b/chromeos/dbus/cras_audio_client_unittest.cc
@@ -94,6 +94,49 @@
   EXPECT_FALSE(reader->HasMoreData());
 }
 
+// Expect the reader to have an uint64_t and an int32_t.
+void ExpectUint64AndInt32Arguments(uint64_t expected_uint64,
+                                   int32_t expected_int32,
+                                   dbus::MessageReader* reader) {
+  uint64_t value1;
+  ASSERT_TRUE(reader->PopUint64(&value1));
+  EXPECT_EQ(expected_uint64, value1);
+  int32_t value2;
+  ASSERT_TRUE(reader->PopInt32(&value2));
+  EXPECT_EQ(expected_int32, value2);
+  EXPECT_FALSE(reader->HasMoreData());
+}
+
+// Expect the reader to have an uint64_t.
+void ExpectUint64Argument(uint64_t expected_value,
+                          dbus::MessageReader* reader) {
+  uint64_t value;
+  ASSERT_TRUE(reader->PopUint64(&value));
+  EXPECT_EQ(expected_value, value);
+  EXPECT_FALSE(reader->HasMoreData());
+}
+
+// Expect the reader to have a bool.
+void ExpectBoolArgument(bool expected_bool, dbus::MessageReader* reader) {
+  bool value;
+  ASSERT_TRUE(reader->PopBool(&value));
+  EXPECT_EQ(expected_bool, value);
+  EXPECT_FALSE(reader->HasMoreData());
+}
+
+// Expect the reader to have an uint64_t and a bool.
+void ExpectUint64AndBoolArguments(uint64_t expected_uint64,
+                                  bool expected_bool,
+                                  dbus::MessageReader* reader) {
+  uint64_t value1;
+  ASSERT_TRUE(reader->PopUint64(&value1));
+  EXPECT_EQ(expected_uint64, value1);
+  bool value2;
+  ASSERT_TRUE(reader->PopBool(&value2));
+  EXPECT_EQ(expected_bool, value2);
+  EXPECT_FALSE(reader->HasMoreData());
+}
+
 void WriteNodesToResponse(dbus::MessageWriter& writer,
                           const AudioNodeList& node_list) {
   dbus::MessageWriter sub_writer(nullptr);
@@ -599,6 +642,180 @@
   message_loop_.RunUntilIdle();
 }
 
+TEST_F(CrasAudioClientTest, SetOutputNodeVolume) {
+  const uint64_t kNodeId = 10003;
+  const int32_t kVolume = 80;
+  // Create response.
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+
+  // Set expectations.
+  PrepareForMethodCall(cras::kSetOutputNodeVolume,
+                       base::Bind(&ExpectUint64AndInt32Arguments,
+                                  kNodeId,
+                                  kVolume),
+                       response.get());
+  // Call method.
+  client_->SetOutputNodeVolume(kNodeId, kVolume);
+  // Run the message loop.
+  message_loop_.RunUntilIdle();
+}
+
+TEST_F(CrasAudioClientTest, SetOutputUserMute) {
+  const bool kUserMuteOn = true;
+  // Create response.
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+
+  // Set expectations.
+  PrepareForMethodCall(cras::kSetOutputUserMute,
+                       base::Bind(&ExpectBoolArgument, kUserMuteOn),
+                       response.get());
+  // Call method.
+  client_->SetOutputUserMute(kUserMuteOn);
+  // Run the message loop.
+  message_loop_.RunUntilIdle();
+}
+
+TEST_F(CrasAudioClientTest, SetInputNodeGain) {
+  const uint64_t kNodeId = 20003;
+  const int32_t kInputGain = 2;
+  // Create response.
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+
+  // Set expectations.
+  PrepareForMethodCall(cras::kSetInputNodeGain,
+                       base::Bind(&ExpectUint64AndInt32Arguments,
+                                  kNodeId,
+                                  kInputGain),
+                       response.get());
+  // Call method.
+  client_->SetInputNodeGain(kNodeId, kInputGain);
+  // Run the message loop.
+  message_loop_.RunUntilIdle();
+}
+
+TEST_F(CrasAudioClientTest, SetInputMute) {
+  const bool kInputMuteOn = true;
+  // Create response.
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+
+  // Set expectations.
+  PrepareForMethodCall(cras::kSetInputMute,
+                       base::Bind(&ExpectBoolArgument, kInputMuteOn),
+                       response.get());
+  // Call method.
+  client_->SetInputMute(kInputMuteOn);
+  // Run the message loop.
+  message_loop_.RunUntilIdle();
+}
+
+TEST_F(CrasAudioClientTest, SetActiveOutputNode) {
+  const uint64_t kNodeId = 10004;
+  // Create response.
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+
+  // Set expectations.
+  PrepareForMethodCall(cras::kSetActiveOutputNode,
+                       base::Bind(&ExpectUint64Argument, kNodeId),
+                       response.get());
+  // Call method.
+  client_->SetActiveOutputNode(kNodeId);
+  // Run the message loop.
+  message_loop_.RunUntilIdle();
+}
+
+TEST_F(CrasAudioClientTest, SetActiveInputNode) {
+  const uint64_t kNodeId = 20004;
+  // Create response.
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+
+  // Set expectations.
+  PrepareForMethodCall(cras::kSetActiveInputNode,
+                       base::Bind(&ExpectUint64Argument, kNodeId),
+                       response.get());
+  // Call method.
+  client_->SetActiveInputNode(kNodeId);
+  // Run the message loop.
+  message_loop_.RunUntilIdle();
+}
+
+TEST_F(CrasAudioClientTest, AddActiveInputNode) {
+  const uint64_t kNodeId = 20005;
+  // Create response.
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+
+  // Set expectations.
+  PrepareForMethodCall(cras::kAddActiveInputNode,
+                       base::Bind(&ExpectUint64Argument, kNodeId),
+                       response.get());
+  // Call method.
+  client_->AddActiveInputNode(kNodeId);
+  // Run the message loop.
+  message_loop_.RunUntilIdle();
+}
+
+TEST_F(CrasAudioClientTest, RemoveActiveInputNode) {
+  const uint64_t kNodeId = 20006;
+  // Create response.
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+
+  // Set expectations.
+  PrepareForMethodCall(cras::kRemoveActiveInputNode,
+                       base::Bind(&ExpectUint64Argument, kNodeId),
+                       response.get());
+  // Call method.
+  client_->RemoveActiveInputNode(kNodeId);
+  // Run the message loop.
+  message_loop_.RunUntilIdle();
+}
+
+TEST_F(CrasAudioClientTest, AddActiveOutputNode) {
+  const uint64_t kNodeId = 10005;
+  // Create response.
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+
+  // Set expectations.
+  PrepareForMethodCall(cras::kAddActiveOutputNode,
+                       base::Bind(&ExpectUint64Argument, kNodeId),
+                       response.get());
+  // Call method.
+  client_->AddActiveOutputNode(kNodeId);
+  // Run the message loop.
+  message_loop_.RunUntilIdle();
+}
+
+TEST_F(CrasAudioClientTest, RemoveActiveOutputNode) {
+  const uint64_t kNodeId = 10006;
+  // Create response.
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+
+  // Set expectations.
+  PrepareForMethodCall(cras::kRemoveActiveOutputNode,
+                       base::Bind(&ExpectUint64Argument, kNodeId),
+                       response.get());
+  // Call method.
+  client_->RemoveActiveOutputNode(kNodeId);
+  // Run the message loop.
+  message_loop_.RunUntilIdle();
+}
+
+TEST_F(CrasAudioClientTest, SwapLeftRight) {
+  const uint64_t kNodeId = 10007;
+  const bool kSwap = true;
+  // Create response.
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+
+  // Set expectations.
+  PrepareForMethodCall(cras::kSwapLeftRight,
+                       base::Bind(&ExpectUint64AndBoolArguments,
+                                  kNodeId,
+                                  kSwap),
+                       response.get());
+  // Call method.
+  client_->SwapLeftRight(kNodeId, kSwap);
+  // Run the message loop.
+  message_loop_.RunUntilIdle();
+}
+
 TEST_F(CrasAudioClientTest, SetGlobalOutputChannelRemix) {
   const int32_t kChannels = 2;
   const std::vector<double> kMixer = {0, 0.1, 0.5, 1};
diff --git a/components/arc.gypi b/components/arc.gypi
index 5ccd8ea..7660ad95 100644
--- a/components/arc.gypi
+++ b/components/arc.gypi
@@ -119,6 +119,7 @@
         'arc/common/power.mojom',
         'arc/common/process.mojom',
         'arc/common/video.mojom',
+        'arc/common/video_accelerator.mojom',
       ],
     },
     {
diff --git a/components/arc/BUILD.gn b/components/arc/BUILD.gn
index df641de..8634459 100644
--- a/components/arc/BUILD.gn
+++ b/components/arc/BUILD.gn
@@ -96,6 +96,7 @@
     "common/power.mojom",
     "common/process.mojom",
     "common/video.mojom",
+    "common/video_accelerator.mojom",
   ]
 }
 
diff --git a/components/arc/arc_bridge_bootstrap.cc b/components/arc/arc_bridge_bootstrap.cc
index c9e44a1..b2880517 100644
--- a/components/arc/arc_bridge_bootstrap.cc
+++ b/components/arc/arc_bridge_bootstrap.cc
@@ -34,16 +34,6 @@
 
 namespace {
 
-// We do not know the PID of ARC, since Chrome does not create it directly.
-// Since Mojo in POSIX does not use the child PID except as an unique
-// identifier for the routing table, rather than doing a lot of plumbing in the
-// whole system to get the correct PID, just use an arbitrary number that will
-// never be used by a legitimate process. Chrome OS assigns unassigned PIDs
-// sequentially until it reaches a certain maximum value (Chrome OS uses the
-// default value of 32k), at which point it loops around to zero. An arbitrary
-// number larger than the maximum should be safe.
-const pid_t kArcPid = 0x3DE0EA7C;
-
 const base::FilePath::CharType kArcBridgeSocketPath[] =
     FILE_PATH_LITERAL("/var/run/chrome/arc_bridge.sock");
 
@@ -260,8 +250,10 @@
   }
   base::ScopedFD scoped_fd(raw_fd);
 
+  // Hardcode pid 0 since it is unused in mojo.
+  const base::ProcessHandle kUnusedChildProcessHandle = 0;
   mojo::edk::ScopedPlatformHandle child_handle =
-      mojo::edk::ChildProcessLaunched(kArcPid);
+      mojo::edk::ChildProcessLaunched(kUnusedChildProcessHandle);
 
   mojo::edk::ScopedPlatformHandleVectorPtr handles(
       new mojo::edk::PlatformHandleVector{child_handle.release()});
diff --git a/components/arc/common/video.mojom b/components/arc/common/video.mojom
index b21a1db..1c99881 100644
--- a/components/arc/common/video.mojom
+++ b/components/arc/common/video.mojom
@@ -5,8 +5,12 @@
 module arc;
 
 interface VideoHost {
-  // Notifies Chrome a request for ipc channel of video acceleration.
-  OnRequestArcVideoAcceleratorChannel() => (handle channel_handle);
+  // Requests an ipc channel from Chrome to be used in the video accelerator.
+  // Replies with |channel_handle| of mojo initial message pipe and |token| for
+  // creating the client end of VideoAcceleratorService message pipe.
+  // Replys invalid handle and empty token if any failure.
+  OnRequestArcVideoAcceleratorChannel() => (handle channel_handle,
+                                            string token);
 };
 
 interface VideoInstance {
diff --git a/components/arc/common/video_accelerator.mojom b/components/arc/common/video_accelerator.mojom
new file mode 100644
index 0000000..6fd79cc1
--- /dev/null
+++ b/components/arc/common/video_accelerator.mojom
@@ -0,0 +1,91 @@
+// 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.
+
+// This file defined the mojo interface between Android and Chromium for video
+// decoding and encoding. See comments of ArcVideoAccelerator for more info.
+
+module arc;
+
+[Extensible]
+enum HalPixelFormatExtension {
+  HAL_PIXEL_FORMAT_YCbCr_420_888 = 0x23,
+  HAL_PIXEL_FORMAT_H264 = 0x34363248,
+  HAL_PIXEL_FORMAT_VP8 = 0x00385056,
+};
+
+enum PortType {
+  PORT_INPUT = 0,
+  PORT_OUTPUT = 1,
+};
+
+[Extensible]
+enum BufferFlag {
+  BUFFER_FLAG_EOS = 1,
+};
+
+struct BufferMetadata {
+  int64 timestamp;  // in microseconds
+  uint32 flags;
+  uint32 bytes_used;
+};
+
+struct VideoFormat {
+  uint32 pixel_format;
+  uint32 buffer_size;
+
+  // minimal number of buffers required to process the video.
+  uint32 min_num_buffers;
+  uint32 coded_width;
+  uint32 coded_height;
+  uint32 crop_left;
+  uint32 crop_width;
+  uint32 crop_top;
+  uint32 crop_height;
+};
+
+struct ArcVideoAcceleratorConfig {
+  enum DeviceType {
+    DEVICE_ENCODER = 0,
+    DEVICE_DECODER = 1,
+  };
+
+  DeviceType device_type;
+  uint32 num_input_buffers;
+  uint32 input_pixel_format;
+};
+
+interface VideoAcceleratorService {
+  Initialize@0(ArcVideoAcceleratorConfig config) => (bool result);
+
+  BindSharedMemory@1(PortType port, uint32 index, handle ashmem_fd,
+                   uint32 offset, uint32 length);
+
+  BindDmabuf@2(PortType port, uint32 index, handle dmabuf_fd);
+
+  UseBuffer@3(PortType port, uint32 index, BufferMetadata metadata);
+
+  SetNumberOfOutputBuffers@4(uint32 number);
+
+  Reset@5();
+};
+
+interface VideoAcceleratorServiceClient {
+  enum Error {
+    NO_ERROR = 0,
+    ILLEGAL_STATE = 1,
+    INVALID_ARGUMENT = 2,
+    UNREADABLE_INPUT = 3,
+    PLATFORM_FAILURE = 4,
+  };
+
+  Init@0(VideoAcceleratorService service_ptr);
+
+  OnError@1(Error error);
+
+  OnBufferDone@2(PortType port, uint32 index, BufferMetadata metadata);
+
+  OnResetDone@3();
+
+  OnOutputFormatChanged@4(VideoFormat format);
+};
diff --git a/components/browser_watcher/exit_code_watcher_win.cc b/components/browser_watcher/exit_code_watcher_win.cc
index 76aacd0..3d762ed 100644
--- a/components/browser_watcher/exit_code_watcher_win.cc
+++ b/components/browser_watcher/exit_code_watcher_win.cc
@@ -24,9 +24,8 @@
 
 }  // namespace
 
-ExitCodeWatcher::ExitCodeWatcher(const base::char16* registry_path) :
-    registry_path_(registry_path), exit_code_(STILL_ACTIVE) {
-}
+ExitCodeWatcher::ExitCodeWatcher(base::StringPiece16 registry_path)
+    : registry_path_(registry_path.as_string()), exit_code_(STILL_ACTIVE) {}
 
 ExitCodeWatcher::~ExitCodeWatcher() {
 }
diff --git a/components/browser_watcher/exit_code_watcher_win.h b/components/browser_watcher/exit_code_watcher_win.h
index 644b2a5..c5cfdbe5 100644
--- a/components/browser_watcher/exit_code_watcher_win.h
+++ b/components/browser_watcher/exit_code_watcher_win.h
@@ -7,6 +7,7 @@
 #include "base/macros.h"
 #include "base/process/process.h"
 #include "base/strings/string16.h"
+#include "base/strings/string_piece.h"
 #include "base/time/time.h"
 #include "base/win/scoped_handle.h"
 
@@ -17,7 +18,7 @@
 class ExitCodeWatcher {
  public:
   // Initialize the watcher with a registry path.
-  explicit ExitCodeWatcher(const base::char16* registry_path);
+  explicit ExitCodeWatcher(base::StringPiece16 registry_path);
   ~ExitCodeWatcher();
 
   // Initializes from arguments on |cmd_line|, returns true on success.
@@ -40,7 +41,7 @@
   bool WriteProcessExitCode(int exit_code);
 
   // The registry path the exit codes are written to.
-  base::string16 registry_path_;
+  const base::string16 registry_path_;
 
   // Watched process and its creation time.
   base::Process process_;
diff --git a/components/browser_watcher/watcher_metrics_provider_win.cc b/components/browser_watcher/watcher_metrics_provider_win.cc
index f401ef97..efe177b 100644
--- a/components/browser_watcher/watcher_metrics_provider_win.cc
+++ b/components/browser_watcher/watcher_metrics_provider_win.cc
@@ -191,7 +191,7 @@
     "Stability.BrowserExitCodes";
 
 WatcherMetricsProviderWin::WatcherMetricsProviderWin(
-    const base::char16* registry_path,
+    const base::string16& registry_path,
     base::TaskRunner* cleanup_io_task_runner)
     : recording_enabled_(false),
       cleanup_scheduled_(false),
diff --git a/components/browser_watcher/watcher_metrics_provider_win.h b/components/browser_watcher/watcher_metrics_provider_win.h
index d2f800e..48ec7fa 100644
--- a/components/browser_watcher/watcher_metrics_provider_win.h
+++ b/components/browser_watcher/watcher_metrics_provider_win.h
@@ -20,7 +20,7 @@
 
   // Initializes the reporter. |cleanup_io_task_runner| is used to clear
   // leftover data in registry if metrics reporting is disabled.
-  WatcherMetricsProviderWin(const base::char16* registry_path,
+  WatcherMetricsProviderWin(const base::string16& registry_path,
                             base::TaskRunner* cleanup_io_task_runner);
   ~WatcherMetricsProviderWin() override;
 
@@ -33,7 +33,7 @@
  private:
   bool recording_enabled_;
   bool cleanup_scheduled_;
-  base::string16 registry_path_;
+  const base::string16 registry_path_;
   scoped_refptr<base::TaskRunner> cleanup_io_task_runner_;
 
   DISALLOW_COPY_AND_ASSIGN(WatcherMetricsProviderWin);
diff --git a/components/cronet/android/api/build.xml b/components/cronet/android/api/build.xml
index cdf8aad..164e75fd 100644
--- a/components/cronet/android/api/build.xml
+++ b/components/cronet/android/api/build.xml
@@ -2,13 +2,8 @@
   <target name="doc" description="generate documentation">
       <javadoc destdir="${doc.dir}"
                overview="${overview}"
-               windowtitle="Cronet API"
-               nohelp="yes"
-               notree="yes"
-               nodeprecated="yes"
-               linkoffline="https://developer.android.com/reference ."
                bootclasspath="../../../../third_party/android_tools/sdk/platforms/android-23/android.jar:../../../../third_party/android_tools/sdk/extras/android/support/annotations/android-support-annotations.jar:${lib.java.dir}/cronet_javadoc_classpath.jar"
-               use="true"
+               docletpath="../../../../buildtools/android/doclava/jsilver.jar:../../../../buildtools/android/doclava/doclava.jar"
                >
         <fileset dir="${source.dir}" defaultexcludes="yes">
           <include name="**/*.java"/>
@@ -16,7 +11,18 @@
           <exclude name="**/Chromium*.java"/>
           <exclude name="**/ChunkedWritableByteChannel*.java"/>
           <exclude name="**/HttpUrl*.java"/>
+          <exclude name="**/ResponseTooLargeException.java"/>
+          <exclude name="**/UrlRequestContextConfig.java"/>
+          <exclude name="**/UserAgent.java"/>
         </fileset>
+        <doclet name="com.google.doclava.Doclava">
+          <param name="-title" /><param name="Cronet API"/>
+          <!-- federation -->
+          <param name="-federate" /><param name="Android"/>
+          <param name="https://developer.android.com/"/>
+          <param name="-federationapi"/><param name="Android"/>
+          <param name="../../../../buildtools/android/doclava/current.txt"/>
+        </doclet>
       </javadoc>
   </target>
 </project>
diff --git a/components/cronet/android/api/package-list b/components/cronet/android/api/package-list
deleted file mode 100644
index 5e9b5b23..0000000
--- a/components/cronet/android/api/package-list
+++ /dev/null
@@ -1,14 +0,0 @@
-android.content
-android.net.http
-android.util
-java
-java.io
-java.lang
-java.net
-java.nio
-java.security
-java.security.cert
-java.util
-java.util.concurrent
-javax.net.ssl
-org.json
diff --git a/components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java b/components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java
index 5b6d04bf..8b12c33 100644
--- a/components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java
+++ b/components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java
@@ -113,13 +113,12 @@
             return this;
         }
 
-        /** @deprecated not really deprecated but hidden. */
+        /** @hide */
         @IntDef({
                 STREAM_PRIORITY_IDLE, STREAM_PRIORITY_LOWEST, STREAM_PRIORITY_LOW,
                 STREAM_PRIORITY_MEDIUM, STREAM_PRIORITY_HIGHEST,
         })
         @Retention(RetentionPolicy.SOURCE)
-        @SuppressWarnings("DepAnn")
         public @interface StreamPriority {}
 
         /**
diff --git a/components/cronet/android/api/src/org/chromium/net/CronetEngine.java b/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
index 07e04b4..6f621bf 100644
--- a/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
+++ b/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
@@ -5,6 +5,7 @@
 package org.chromium.net;
 
 import android.content.Context;
+import android.net.http.HttpResponseCache;
 import android.support.annotation.IntDef;
 import android.support.annotation.Nullable;
 import android.util.Log;
@@ -30,6 +31,8 @@
 import java.util.concurrent.Executor;
 import java.util.regex.Pattern;
 
+import javax.net.ssl.HttpsURLConnection;
+
 /**
  * An engine to process {@link UrlRequest}s, which uses the best HTTP stack
  * available on the current platform.
@@ -198,6 +201,7 @@
          *              {@link java.net.HttpURLConnection} implementation.
          * @return the builder to facilitate chaining.
          * @deprecated Not supported by the new API.
+         * @hide
          */
         @Deprecated
         public Builder enableLegacyMode(boolean value) {
@@ -325,11 +329,8 @@
          * @param secureProxyCheckUrl a URL to fetch to determine if using a secure
          * proxy is allowed.
          * @return the builder to facilitate chaining.
-         * @deprecated Marked as deprecated because @hide doesn't properly hide but
-         *         javadocs are built with nodeprecated="yes".
+         * @hide as it's a prototype.
          */
-        @Deprecated
-        @SuppressWarnings("DepAnn")
         public Builder setDataReductionProxyOptions(
                 String primaryProxy, String fallbackProxy, String secureProxyCheckUrl) {
             if (primaryProxy.isEmpty() || fallbackProxy.isEmpty()
@@ -355,12 +356,11 @@
             return mDataReductionProxySecureProxyCheckUrl;
         }
 
-        /** @deprecated not really deprecated but hidden. */
+        /** @hide */
         @IntDef({
                 HTTP_CACHE_DISABLED, HTTP_CACHE_IN_MEMORY, HTTP_CACHE_DISK_NO_HTTP, HTTP_CACHE_DISK,
         })
         @Retention(RetentionPolicy.SOURCE)
-        @SuppressWarnings("DepAnn")
         public @interface HttpCacheSetting {}
 
         /**
@@ -639,6 +639,7 @@
      * @param executor {@link Executor} on which all callbacks will be invoked.
      * @return new request.
      * @deprecated Use {@link UrlRequest.Builder#build}.
+     * @hide
      */
     @Deprecated
     public final UrlRequest createRequest(
@@ -660,6 +661,7 @@
      *         values.
      * @return new request.
      * @deprecated Use {@link UrlRequest.Builder#build}.
+     * @hide
      */
     @Deprecated
     public final UrlRequest createRequest(String url, UrlRequest.Callback callback,
@@ -681,7 +683,10 @@
      *         values.
      * @param requestAnnotations Objects to pass on to {@link CronetEngine.RequestFinishedListener}.
      * @return new request.
+     * @deprecated Use {@link UrlRequest.Builder#build}.
+     * @hide as it references hidden CronetEngine.RequestFinishedListener
      */
+    @Deprecated
     protected abstract UrlRequest createRequest(String url, UrlRequest.Callback callback,
             Executor executor, int priority, Collection<Object> requestAnnotations);
 
@@ -782,9 +787,9 @@
      * only when enabled.
      * @param executor an executor that will be used to notified all
      *            added RTT and throughput listeners.
-     * @deprecated not really deprecated but hidden for now as it's a prototype.
+     * @hide as it's a prototype.
      */
-    @Deprecated public abstract void enableNetworkQualityEstimator(Executor executor);
+    public abstract void enableNetworkQualityEstimator(Executor executor);
 
     /**
      * Enables the network quality estimator for testing. This must be called
@@ -794,9 +799,8 @@
      * @param useSmallerResponses include small responses in throughput estimates.
      * @param executor an {@link java.util.concurrent.Executor} on which all
      *            listeners will be called.
-     * @deprecated not really deprecated but hidden for now as it's a prototype.
+     * @hide as it's a prototype.
      */
-    @Deprecated
     abstract void enableNetworkQualityEstimatorForTesting(
             boolean useLocalHostRequests, boolean useSmallerResponses, Executor executor);
 
@@ -809,9 +813,9 @@
      * The listener is called on the {@link java.util.concurrent.Executor} that
      * is passed to {@link #enableNetworkQualityEstimator}.
      * @param listener the listener of round trip times.
-     * @deprecated not really deprecated but hidden for now as it's a prototype.
+     * @hide as it's a prototype.
      */
-    @Deprecated public abstract void addRttListener(NetworkQualityRttListener listener);
+    public abstract void addRttListener(NetworkQualityRttListener listener);
 
     /**
      * Removes a listener of round trip times if previously registered with
@@ -819,9 +823,9 @@
      * {@link NetworkQualityRttListener} is added in order to stop receiving
      * observations.
      * @param listener the listener of round trip times.
-     * @deprecated not really deprecated but hidden for now as it's a prototype.
+     * @hide as it's a prototype.
      */
-    @Deprecated public abstract void removeRttListener(NetworkQualityRttListener listener);
+    public abstract void removeRttListener(NetworkQualityRttListener listener);
 
     /**
      * Registers a listener that gets called whenever the network quality
@@ -832,9 +836,8 @@
      * is called on the {@link java.util.concurrent.Executor} that is passed to
      * {@link #enableNetworkQualityEstimator}.
      * @param listener the listener of throughput.
-     * @deprecated not really deprecated but hidden for now as it's a prototype.
+     * @hide as it's a prototype.
      */
-    @Deprecated
     public abstract void addThroughputListener(NetworkQualityThroughputListener listener);
 
     /**
@@ -842,9 +845,8 @@
      * {@link NetworkQualityThroughputListener} is added with
      * {@link #addThroughputListener} in order to stop receiving observations.
      * @param listener the listener of throughput.
-     * @deprecated not really deprecated but hidden for now as it's a prototype.
+     * @hide as it's a prototype.
      */
-    @Deprecated
     public abstract void removeThroughputListener(NetworkQualityThroughputListener listener);
 
     /**
@@ -870,12 +872,8 @@
      * @param proxy proxy to use when establishing connection.
      * @return an {@link java.net.HttpURLConnection} instance implemented by this CronetEngine.
      * @throws IOException if an error occurs while opening the connection.
-     * @deprecated Marked as deprecated because @hide doesn't properly hide but
-     *         javadocs are built with nodeprecated="yes".
-     *         TODO(pauljensen): Expose once implemented, http://crbug.com/418111
+     * @hide TODO(pauljensen): Expose once implemented, http://crbug.com/418111
      */
-    @Deprecated
-    @SuppressWarnings("DepAnn")
     public abstract URLConnection openConnection(URL url, Proxy proxy) throws IOException;
 
     /**
@@ -887,8 +885,7 @@
      * Cronet does not use certain HTTP features provided via the system:
      * <ul>
      * <li>the HTTP cache installed via
-     *     {@link android.net.http.HttpResponseCache#install(java.io.File, long)
-     *            HttpResponseCache.install()}</li>
+     *     {@link HttpResponseCache#install(java.io.File, long) HttpResponseCache.install()}</li>
      * <li>the HTTP authentication method installed via
      *     {@link java.net.Authenticator#setDefault}</li>
      * <li>the HTTP cookie storage installed via {@link java.net.CookieHandler#setDefault}</li>
@@ -896,14 +893,14 @@
      * <p>
      * While Cronet supports and encourages requests using the HTTPS protocol,
      * Cronet does not provide support for the
-     * {@link javax.net.ssl.HttpsURLConnection} API. This lack of support also
+     * {@link HttpsURLConnection} API. This lack of support also
      * includes not using certain HTTPS features provided via the system:
      * <ul>
      * <li>the HTTPS hostname verifier installed via {@link
-     *   javax.net.ssl.HttpsURLConnection#setDefaultHostnameVerifier(javax.net.ssl.HostnameVerifier)
+     *   HttpsURLConnection#setDefaultHostnameVerifier(javax.net.ssl.HostnameVerifier)
      *     HttpsURLConnection.setDefaultHostnameVerifier()}</li>
      * <li>the HTTPS socket factory installed via {@link
-     *   javax.net.ssl.HttpsURLConnection#setDefaultSSLSocketFactory(javax.net.ssl.SSLSocketFactory)
+     *   HttpsURLConnection#setDefaultSSLSocketFactory(javax.net.ssl.SSLSocketFactory)
      *     HttpsURLConnection.setDefaultSSLSocketFactory()}</li>
      * </ul>
      *
@@ -918,6 +915,7 @@
      * @param builder builder to used for creating the CronetEngine instance.
      * @return the created CronetEngine instance.
      * @deprecated Use {@link CronetEngine.Builder}.
+     * @hide
      */
     @Deprecated
     public static CronetEngine createContext(Builder builder) {
@@ -967,26 +965,24 @@
      *
      * @param listener the listener for finished requests.
      *
-     * @deprecated not really deprecated but hidden for now as it's a prototype.
+     * @hide as it's a prototype.
      */
-    @Deprecated public abstract void addRequestFinishedListener(RequestFinishedListener listener);
+    public abstract void addRequestFinishedListener(RequestFinishedListener listener);
 
     /**
      * Removes a finished request listener.
      *
      * @param listener the listener to remove.
      *
-     * @deprecated not really deprecated but hidden for now as it's a prototype.
+     * @hide it's a prototype.
      */
-    @Deprecated
     public abstract void removeRequestFinishedListener(RequestFinishedListener listener);
 
     /**
      * Information about a finished request. Passed to {@link RequestFinishedListener}.
      *
-     * @deprecated not really deprecated but hidden for now as it's a prototype.
+     * @hide as it's a prototype.
      */
-    @Deprecated
     public static final class UrlRequestInfo {
         private final String mUrl;
         private final Collection<Object> mAnnotations;
@@ -1044,9 +1040,8 @@
      *
      * <p>Must call {@link #enableNetworkQualityEstimator} to enable request metrics collection.
      *
-     * @deprecated not really deprecated but hidden for now as it's a prototype.
+     * @hide as it's a prototype.
      */
-    @Deprecated
     public static final class UrlRequestMetrics {
         @Nullable private final Long mTtfbMs;
         @Nullable private final Long mTotalTimeMs;
@@ -1099,9 +1094,8 @@
     /**
      * Interface to listen for finished requests that were created via this CronetEngine instance.
      *
-     * @deprecated not really deprecated but hidden for now as it's a prototype.
+     * @hide as it's a prototype.
      */
-    @Deprecated
     public interface RequestFinishedListener { // TODO(klm): Add a convenience abstract class.
         /**
          * Invoked with request info.
diff --git a/components/cronet/android/api/src/org/chromium/net/NetworkQualityRttListener.java b/components/cronet/android/api/src/org/chromium/net/NetworkQualityRttListener.java
index b1fe24d..cd04f6eb 100644
--- a/components/cronet/android/api/src/org/chromium/net/NetworkQualityRttListener.java
+++ b/components/cronet/android/api/src/org/chromium/net/NetworkQualityRttListener.java
@@ -9,9 +9,8 @@
  * various layers of the network stack. These include RTT estimates by QUIC
  * and TCP, as well as the time between when a URL request is sent and when
  * the first byte of the response is received.
- * @deprecated not really deprecated but hidden for now as it's a prototype.
+ * {@hide} as it's a prototype.
  */
-@SuppressWarnings("DepAnn")
 public interface NetworkQualityRttListener {
     /**
      * Reports a new round trip time observation.
@@ -20,4 +19,4 @@
      * @param source the observation source from {@link NetworkQualityObservationSource}.
      */
     public void onRttObservation(int rttMs, long whenMs, int source);
-}
\ No newline at end of file
+}
diff --git a/components/cronet/android/api/src/org/chromium/net/NetworkQualityThroughputListener.java b/components/cronet/android/api/src/org/chromium/net/NetworkQualityThroughputListener.java
index 0930eb6..196dbecc 100644
--- a/components/cronet/android/api/src/org/chromium/net/NetworkQualityThroughputListener.java
+++ b/components/cronet/android/api/src/org/chromium/net/NetworkQualityThroughputListener.java
@@ -6,9 +6,8 @@
 
 /**
  * Interface to watch for observations of throughput.
- * @deprecated not really deprecated but hidden for now as it's a prototype.
+ * {@hide} as it's a prototype.
  */
-@SuppressWarnings("DepAnn")
 public interface NetworkQualityThroughputListener {
     /**
      * Reports a new throughput observation.
@@ -17,4 +16,4 @@
      * @param source the observation source from {@link NetworkQualityObservationSource}.
      */
     public void onThroughputObservation(int throughputKbps, long whenMs, int source);
-}
\ No newline at end of file
+}
diff --git a/components/cronet/android/api/src/org/chromium/net/UrlRequest.java b/components/cronet/android/api/src/org/chromium/net/UrlRequest.java
index ed16cc3..073d271 100644
--- a/components/cronet/android/api/src/org/chromium/net/UrlRequest.java
+++ b/components/cronet/android/api/src/org/chromium/net/UrlRequest.java
@@ -140,13 +140,12 @@
             return this;
         }
 
-        /** @deprecated not really deprecated but hidden. */
+        /** @hide */
         @IntDef({
                 REQUEST_PRIORITY_IDLE, REQUEST_PRIORITY_LOWEST, REQUEST_PRIORITY_LOW,
                 REQUEST_PRIORITY_MEDIUM, REQUEST_PRIORITY_HIGHEST,
         })
         @Retention(RetentionPolicy.SOURCE)
-        @SuppressWarnings("DepAnn")
         public @interface RequestPriority {}
 
         /**
@@ -222,9 +221,8 @@
          * {@link CronetEngine.RequestFinishedListener} with a {@link CronetEngine.UrlRequestInfo}.
          * @return the builder to facilitate chaining.
          *
-         * @deprecated not really deprecated but hidden for now as it's a prototype.
+         * @hide as it's a prototype.
          */
-        @Deprecated
         public Builder addRequestAnnotation(Object annotation) {
             if (annotation == null) {
                 throw new NullPointerException("Invalid metrics annotation.");
@@ -377,7 +375,7 @@
      * Request status values returned by {@link #getStatus}.
      */
     public static class Status {
-        /** @deprecated not really deprecated but hidden. */
+        /** @hide */
         @IntDef({
                 INVALID, IDLE, WAITING_FOR_STALLED_SOCKET_POOL, WAITING_FOR_AVAILABLE_SOCKET,
                 WAITING_FOR_DELEGATE, WAITING_FOR_CACHE, DOWNLOADING_PROXY_SCRIPT,
@@ -386,7 +384,6 @@
                 READING_RESPONSE,
         })
         @Retention(RetentionPolicy.SOURCE)
-        @SuppressWarnings("DepAnn")
         public @interface StatusValues {}
 
         /**
@@ -579,6 +576,7 @@
      *
      * @param method "GET", "HEAD", "DELETE", "POST" or "PUT".
      * @deprecated Use {@link Builder#setHttpMethod}.
+     * @hide
      */
     @Deprecated public void setHttpMethod(String method);
 
@@ -588,6 +586,7 @@
      * @param header header name.
      * @param value header value.
      * @deprecated Use {@link Builder#setPriority}.
+     * @hide
      */
     @Deprecated public void addHeader(String header, String value);
 
@@ -602,6 +601,7 @@
      *     using this {@code Executor}. May optionally be the same
      *     {@code Executor} the request itself is using.
      * @deprecated Use {@link Builder#setUploadDataProvider}.
+     * @hide
      */
     @Deprecated
     public void setUploadDataProvider(UploadDataProvider uploadDataProvider, Executor executor);
@@ -665,6 +665,7 @@
      * Disables cache for the request. If context is not set up to use cache,
      * this call has no effect.
      * @deprecated Use {@link Builder#disableCache}.
+     * @hide
      */
     // TODO(pauljensen): When all callers shifted to Builder.disableCache(),
     // remove this method and instead add constructor argument and make
diff --git a/components/cronet/tools/generate_javadoc.py b/components/cronet/tools/generate_javadoc.py
index 4c13c03..cab6801 100755
--- a/components/cronet/tools/generate_javadoc.py
+++ b/components/cronet/tools/generate_javadoc.py
@@ -43,7 +43,7 @@
              '-Dlib.java.dir=' + lib_java_dir, '-Doverview=' + overview_file,
              'doc']
   stdout = build_utils.CheckOutput(javadoc_cmd, cwd=working_dir)
-  if " error: " in stdout or "warning" in stdout:
+  if " error: " in stdout or "warning" in stdout or "javadoc: error " in stdout:
     build_utils.DeleteDirectory(output_dir)
     raise build_utils.CalledProcessError(working_dir, javadoc_cmd, stdout)
 
diff --git a/components/dom_distiller.gypi b/components/dom_distiller.gypi
index adf078e1..8d0bc61 100644
--- a/components/dom_distiller.gypi
+++ b/components/dom_distiller.gypi
@@ -140,6 +140,7 @@
       'target_name': 'dom_distiller_mojo_bindings',
       'type': 'static_library',
       'sources': [
+        'dom_distiller/content/common/distillability_service.mojom',
         'dom_distiller/content/common/distiller_javascript_service.mojom',
         'dom_distiller/content/common/distiller_page_notifier_service.mojom',
       ],
@@ -156,7 +157,6 @@
           'target_name': 'dom_distiller_content_browser',
           'type': 'static_library',
           'dependencies': [
-            'dom_distiller_content_common',
             'dom_distiller_core',
             'dom_distiller_mojo_bindings',
             'dom_distiller_protos',
@@ -207,7 +207,6 @@
           'target_name': 'dom_distiller_content_renderer',
           'type': 'static_library',
           'dependencies': [
-            'dom_distiller_content_common',
             'dom_distiller_mojo_bindings',
             'dom_distiller_protos',
             '../base/base.gyp:base',
@@ -233,24 +232,6 @@
           ],
         },
         {
-          # GN version: //components/dom_distiller/content/common
-          'target_name': 'dom_distiller_content_common',
-          'type': 'static_library',
-          'include_dirs': [
-            '..',
-          ],
-          'dependencies': [
-            '../base/base.gyp:base',
-            '../content/content.gyp:content_common',
-            '../ipc/ipc.gyp:ipc',
-            '../url/url.gyp:url_lib',
-          ],
-          'sources': [
-            'dom_distiller/content/common/distiller_messages.cc',
-            'dom_distiller/content/common/distiller_messages.h',
-          ],
-        },
-        {
           # GN version: //components/dom_distiller/webui
           'target_name': 'dom_distiller_webui',
           'type': 'static_library',
diff --git a/components/dom_distiller/content/browser/BUILD.gn b/components/dom_distiller/content/browser/BUILD.gn
index db24bc2..2494342 100644
--- a/components/dom_distiller/content/browser/BUILD.gn
+++ b/components/dom_distiller/content/browser/BUILD.gn
@@ -30,7 +30,6 @@
   ]
   deps = [
     "//base",
-    "//components/dom_distiller/content/common",
     "//components/dom_distiller/content/common:mojo_bindings",
     "//components/resources",
     "//components/strings",
diff --git a/components/dom_distiller/content/browser/distillability_driver.cc b/components/dom_distiller/content/browser/distillability_driver.cc
index 8af458f..3feb13bba 100644
--- a/components/dom_distiller/content/browser/distillability_driver.cc
+++ b/components/dom_distiller/content/browser/distillability_driver.cc
@@ -3,24 +3,53 @@
 // found in the LICENSE file.
 
 #include "components/dom_distiller/content/browser/distillability_driver.h"
-#include "components/dom_distiller/content/common/distiller_messages.h"
 
 #include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/browser/web_contents_user_data.h"
+#include "content/public/common/service_registry.h"
 
 DEFINE_WEB_CONTENTS_USER_DATA_KEY(
     dom_distiller::DistillabilityDriver);
 
 namespace dom_distiller {
 
+// Implementation of the Mojo DistillabilityService. This is called by the
+// renderer to notify the browser that a page is distillable.
+class DistillabilityServiceImpl : public DistillabilityService {
+ public:
+  DistillabilityServiceImpl(
+      mojo::InterfaceRequest<DistillabilityService> request,
+      DistillabilityDriver* distillability_driver)
+      : binding_(this, std::move(request)),
+        distillability_driver_(distillability_driver) {}
+
+  ~DistillabilityServiceImpl() override {}
+
+  void NotifyIsDistillable(bool is_distillable, bool is_last_update) override {
+    distillability_driver_->OnDistillability(is_distillable, is_last_update);
+  }
+
+ private:
+  mojo::StrongBinding<DistillabilityService> binding_;
+  DistillabilityDriver* distillability_driver_;
+};
+
 DistillabilityDriver::DistillabilityDriver(
     content::WebContents* web_contents)
-    : content::WebContentsObserver(web_contents) {
+    : content::WebContentsObserver(web_contents),
+      weak_factory_(this) {
+  SetupMojoService();
 }
 
 DistillabilityDriver::~DistillabilityDriver() {
-  CleanUp();
+  content::WebContentsObserver::Observe(nullptr);
+}
+
+void DistillabilityDriver::CreateDistillabilityService(
+    mojo::InterfaceRequest<DistillabilityService> request) {
+  new DistillabilityServiceImpl(std::move(request), this);
 }
 
 void DistillabilityDriver::SetDelegate(
@@ -28,31 +57,29 @@
   m_delegate_ = delegate;
 }
 
-bool DistillabilityDriver::OnMessageReceived(const IPC::Message &msg,
-    content::RenderFrameHost* render_frame_host) {
-  bool handled = true;
-  IPC_BEGIN_MESSAGE_MAP(DistillabilityDriver, msg)
-    IPC_MESSAGE_HANDLER(FrameHostMsg_Distillability,
-                        OnDistillability)
-  IPC_MESSAGE_UNHANDLED(handled = false)
-  IPC_END_MESSAGE_MAP()
-  return handled;
-}
-
 void DistillabilityDriver::OnDistillability(
     bool distillable, bool is_last) {
   if (m_delegate_.is_null()) return;
 
   m_delegate_.Run(distillable, is_last);
+
+  if (web_contents() && is_last) {
+    web_contents()->GetMainFrame()->GetServiceRegistry()
+        ->RemoveService<DistillabilityService>();
+  }
 }
 
-void DistillabilityDriver::RenderProcessGone(
-    base::TerminationStatus status) {
-  CleanUp();
+void DistillabilityDriver::DidStartProvisionalLoadForFrame(
+    content::RenderFrameHost* render_frame_host, const GURL& validated_url,
+    bool is_error_page, bool is_iframe_srcdoc) {
+  SetupMojoService();
 }
 
-void DistillabilityDriver::CleanUp() {
-  content::WebContentsObserver::Observe(NULL);
+void DistillabilityDriver::SetupMojoService() {
+  if (!web_contents()) return;
+  web_contents()->GetMainFrame()->GetServiceRegistry()->AddService(
+      base::Bind(&DistillabilityDriver::CreateDistillabilityService,
+          weak_factory_.GetWeakPtr()));
 }
 
 }  // namespace dom_distiller
diff --git a/components/dom_distiller/content/browser/distillability_driver.h b/components/dom_distiller/content/browser/distillability_driver.h
index 795b9bf..e538ed7 100644
--- a/components/dom_distiller/content/browser/distillability_driver.h
+++ b/components/dom_distiller/content/browser/distillability_driver.h
@@ -6,8 +6,11 @@
 #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLIBILITY_DRIVER_H_
 
 #include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "components/dom_distiller/content/common/distillability_service.mojom.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/browser/web_contents_user_data.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
 
 namespace dom_distiller {
 
@@ -17,25 +20,30 @@
       public content::WebContentsUserData<DistillabilityDriver> {
  public:
   ~DistillabilityDriver() override;
+  void CreateDistillabilityService(
+      mojo::InterfaceRequest<DistillabilityService> request);
 
   void SetDelegate(const base::Callback<void(bool, bool)>& delegate);
 
   // content::WebContentsObserver implementation.
-  bool OnMessageReceived(const IPC::Message& message,
-                         content::RenderFrameHost* rfh) override;
-  void RenderProcessGone(base::TerminationStatus status) override;
+  void DidStartProvisionalLoadForFrame(
+      content::RenderFrameHost* render_frame_host,
+      const GURL& validated_url,
+      bool is_error_page,
+      bool is_iframe_srcdoc) override;
 
  private:
   explicit DistillabilityDriver(content::WebContents* web_contents);
   friend class content::WebContentsUserData<DistillabilityDriver>;
+  friend class DistillabilityServiceImpl;
 
+  void SetupMojoService();
   void OnDistillability(bool distillable, bool is_last);
 
-  // Removes the observer and clears the WebContents member.
-  void CleanUp();
-
   base::Callback<void(bool, bool)> m_delegate_;
 
+  base::WeakPtrFactory<DistillabilityDriver> weak_factory_;
+
   DISALLOW_COPY_AND_ASSIGN(DistillabilityDriver);
 };
 
diff --git a/components/dom_distiller/content/common/BUILD.gn b/components/dom_distiller/content/common/BUILD.gn
index 4fef7bc9..57cbc893 100644
--- a/components/dom_distiller/content/common/BUILD.gn
+++ b/components/dom_distiller/content/common/BUILD.gn
@@ -4,24 +4,10 @@
 
 import("//mojo/public/tools/bindings/mojom.gni")
 
-# GYP version: components/dom_distiller.gypi:dom_distiller_content_common
-source_set("common") {
-  sources = [
-    "distiller_messages.cc",
-    "distiller_messages.h",
-  ]
-
-  deps = [
-    "//base",
-    "//content/public/common",
-    "//ipc",
-    "//url",
-  ]
-}
-
 # GYP version: components/dom_distiller.gypi:dom_distiller_mojo_bindings
 mojom("mojo_bindings") {
   sources = [
+    "distillability_service.mojom",
     "distiller_javascript_service.mojom",
     "distiller_page_notifier_service.mojom",
   ]
diff --git a/components/dom_distiller/content/common/distillability_service.mojom b/components/dom_distiller/content/common/distillability_service.mojom
new file mode 100644
index 0000000..3b60172
--- /dev/null
+++ b/components/dom_distiller/content/common/distillability_service.mojom
@@ -0,0 +1,11 @@
+// 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.
+
+module dom_distiller;
+
+// This service is implemented in the browser process and is used by the
+// renderer to notify the Reader Mode UI if a page is distillable.
+interface DistillabilityService {
+  NotifyIsDistillable(bool page_is_distillable, bool is_last_update);
+};
diff --git a/components/dom_distiller/content/common/distiller_messages.cc b/components/dom_distiller/content/common/distiller_messages.cc
deleted file mode 100644
index e336f9e..0000000
--- a/components/dom_distiller/content/common/distiller_messages.cc
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 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.
-
-// Get basic type definitions.
-#define IPC_MESSAGE_IMPL
-#include "components/dom_distiller/content/common/distiller_messages.h"
-
-// Generate constructors.
-#include "ipc/struct_constructor_macros.h"
-#include "components/dom_distiller/content/common/distiller_messages.h"
-
-// Generate destructors.
-#include "ipc/struct_destructor_macros.h"
-#include "components/dom_distiller/content/common/distiller_messages.h"
-
-// Generate param traits write methods.
-#include "ipc/param_traits_write_macros.h"
-namespace IPC {
-#include "components/dom_distiller/content/common/distiller_messages.h"
-}  // namespace IPC
-
-// Generate param traits read methods.
-#include "ipc/param_traits_read_macros.h"
-namespace IPC {
-#include "components/dom_distiller/content/common/distiller_messages.h"
-}  // namespace IPC
-
-// Generate param traits log methods.
-#include "ipc/param_traits_log_macros.h"
-namespace IPC {
-#include "components/dom_distiller/content/common/distiller_messages.h"
-}  // namespace IPC
diff --git a/components/dom_distiller/content/common/distiller_messages.h b/components/dom_distiller/content/common/distiller_messages.h
deleted file mode 100644
index 84c4081..0000000
--- a/components/dom_distiller/content/common/distiller_messages.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Multiply-included message file, hence no include guard.
-
-#include <string>
-#include <vector>
-
-#include "base/strings/string16.h"
-#include "content/public/common/common_param_traits.h"
-#include "content/public/common/common_param_traits_macros.h"
-#include "ipc/ipc_message_macros.h"
-#include "ipc/ipc_message_utils.h"
-
-#define IPC_MESSAGE_START DistillerMsgStart
-
-// Whether a page is suitable for DOM distiller to process.
-IPC_MESSAGE_ROUTED2(FrameHostMsg_Distillability,
-                    bool /* is_distillable */,
-                    bool /* is_last_update */)
diff --git a/components/dom_distiller/content/renderer/BUILD.gn b/components/dom_distiller/content/renderer/BUILD.gn
index a442dec9..3ff8df4 100644
--- a/components/dom_distiller/content/renderer/BUILD.gn
+++ b/components/dom_distiller/content/renderer/BUILD.gn
@@ -20,7 +20,6 @@
   ]
   deps = [
     "//base",
-    "//components/dom_distiller/content/common",
     "//components/dom_distiller/content/common:mojo_bindings",
     "//components/dom_distiller/core",
     "//content/public/common",
diff --git a/components/dom_distiller/content/renderer/distillability_agent.cc b/components/dom_distiller/content/renderer/distillability_agent.cc
index 93e3736..a3119f469 100644
--- a/components/dom_distiller/content/renderer/distillability_agent.cc
+++ b/components/dom_distiller/content/renderer/distillability_agent.cc
@@ -3,13 +3,15 @@
 // found in the LICENSE file.
 
 #include "base/metrics/histogram.h"
+#include "base/strings/string_util.h"
 
-#include "components/dom_distiller/content/common/distiller_messages.h"
+#include "components/dom_distiller/content/common/distillability_service.mojom.h"
 #include "components/dom_distiller/content/renderer/distillability_agent.h"
 #include "components/dom_distiller/core/distillable_page_detector.h"
 #include "components/dom_distiller/core/experiments.h"
 #include "components/dom_distiller/core/page_features.h"
 #include "components/dom_distiller/core/url_utils.h"
+#include "content/public/common/service_registry.h"
 #include "content/public/renderer/render_frame.h"
 
 #include "third_party/WebKit/public/platform/WebDistillability.h"
@@ -146,11 +148,15 @@
   if (!NeedToUpdate(is_loaded)) return;
 
   bool is_last = IsLast(is_loaded);
-  Send(new FrameHostMsg_Distillability(routing_id(),
-      IsDistillablePage(doc, is_last), is_last));
+  // Connect to Mojo service on browser to notify page distillability.
+  DistillabilityServicePtr distillability_service;
+  render_frame()->GetServiceRegistry()->ConnectToRemoteService(
+      mojo::GetProxy(&distillability_service));
+  DCHECK(distillability_service);
+  distillability_service->NotifyIsDistillable(
+      IsDistillablePage(doc, is_last), is_last);
 }
 
-
 DistillabilityAgent::~DistillabilityAgent() {}
 
 }  // namespace dom_distiller
diff --git a/components/dom_distiller/core/distiller.cc b/components/dom_distiller/core/distiller.cc
index c28962b..f860516 100644
--- a/components/dom_distiller/core/distiller.cc
+++ b/components/dom_distiller/core/distiller.cc
@@ -141,139 +141,145 @@
     std::unique_ptr<proto::DomDistillerResult> distiller_result,
     bool distillation_successful) {
   DCHECK(started_pages_index_.find(page_num) != started_pages_index_.end());
-  if (distillation_successful) {
-
-    if (distiller_result->has_statistics_info() && page_num == 0) {
-      if (distiller_result->statistics_info().has_word_count()) {
-        UMA_HISTOGRAM_CUSTOM_COUNTS(
-            "DomDistiller.Statistics.FirstPageWordCount",
-            distiller_result->statistics_info().word_count(),
-            1, 4000, 50);
-      }
-    }
-
-    DCHECK(distiller_result.get());
-    DistilledPageData* page_data =
-        GetPageAtIndex(started_pages_index_[page_num]);
-    page_data->distilled_page_proto =
-        new base::RefCountedData<DistilledPageProto>();
-    page_data->page_num = page_num;
-    if (distiller_result->has_title()) {
-      page_data->distilled_page_proto->data.set_title(
-          distiller_result->title());
-    }
-    page_data->distilled_page_proto->data.set_url(page_url.spec());
-    if (distiller_result->has_distilled_content() &&
-        distiller_result->distilled_content().has_html()) {
-      page_data->distilled_page_proto->data.set_html(
-          distiller_result->distilled_content().html());
-    }
-
-    if (distiller_result->has_timing_info()) {
-      const proto::TimingInfo& distiller_timing_info =
-          distiller_result->timing_info();
-      DistilledPageProto::TimingInfo timing_info;
-      if (distiller_timing_info.has_markup_parsing_time()) {
-        timing_info.set_name("markup_parsing");
-        timing_info.set_time(distiller_timing_info.markup_parsing_time());
-        *page_data->distilled_page_proto->data.add_timing_info() = timing_info;
-      }
-
-      if (distiller_timing_info.has_document_construction_time()) {
-        timing_info.set_name("document_construction");
-        timing_info.set_time(
-            distiller_timing_info.document_construction_time());
-        *page_data->distilled_page_proto->data.add_timing_info() = timing_info;
-      }
-
-      if (distiller_timing_info.has_article_processing_time()) {
-        timing_info.set_name("article_processing");
-        timing_info.set_time(
-            distiller_timing_info.article_processing_time());
-        *page_data->distilled_page_proto->data.add_timing_info() = timing_info;
-      }
-
-      if (distiller_timing_info.has_formatting_time()) {
-        timing_info.set_name("formatting");
-        timing_info.set_time(
-            distiller_timing_info.formatting_time());
-        *page_data->distilled_page_proto->data.add_timing_info() = timing_info;
-      }
-
-      if (distiller_timing_info.has_total_time()) {
-        timing_info.set_name("total");
-        timing_info.set_time(
-            distiller_timing_info.total_time());
-        *page_data->distilled_page_proto->data.add_timing_info() = timing_info;
-      }
-
-      for (int i = 0; i < distiller_timing_info.other_times_size(); i++) {
-        timing_info.set_name(distiller_timing_info.other_times(i).name());
-        timing_info.set_time(distiller_timing_info.other_times(i).time());
-        *page_data->distilled_page_proto->data.add_timing_info() = timing_info;
-      }
-    }
-
-    if (distiller_result->has_debug_info() &&
-        distiller_result->debug_info().has_log()) {
-      page_data->distilled_page_proto->data.mutable_debug_info()->set_log(
-          distiller_result->debug_info().log());
-    }
-
-    if (distiller_result->has_text_direction()) {
-      page_data->distilled_page_proto->data.set_text_direction(
-          distiller_result->text_direction());
-    } else {
-      page_data->distilled_page_proto->data.set_text_direction("auto");
-    }
-
-    if (distiller_result->has_pagination_info()) {
-      const proto::PaginationInfo& pagination_info =
-          distiller_result->pagination_info();
-      if (pagination_info.has_next_page()) {
-        GURL next_page_url(pagination_info.next_page());
-        if (next_page_url.is_valid()) {
-          // The pages should be in same origin.
-          DCHECK_EQ(next_page_url.GetOrigin(), page_url.GetOrigin());
-          AddToDistillationQueue(page_num + 1, next_page_url);
-          page_data->distilled_page_proto->data.mutable_pagination_info()->
-              set_next_page(next_page_url.spec());
-        }
-      }
-
-      if (pagination_info.has_prev_page()) {
-        GURL prev_page_url(pagination_info.prev_page());
-        if (prev_page_url.is_valid()) {
-          DCHECK_EQ(prev_page_url.GetOrigin(), page_url.GetOrigin());
-          AddToDistillationQueue(page_num - 1, prev_page_url);
-          page_data->distilled_page_proto->data.mutable_pagination_info()->
-              set_prev_page(prev_page_url.spec());
-        }
-      }
-
-      if (pagination_info.has_canonical_page()) {
-        GURL canonical_page_url(pagination_info.canonical_page());
-        if (canonical_page_url.is_valid()) {
-          page_data->distilled_page_proto->data.mutable_pagination_info()->
-              set_canonical_page(canonical_page_url.spec());
-        }
-      }
-    }
-
-    for (int img_num = 0; img_num < distiller_result->content_images_size();
-         ++img_num) {
-      std::string image_id =
-          base::IntToString(page_num + 1) + "_" + base::IntToString(img_num);
-      FetchImage(page_num, image_id,
-          distiller_result->content_images(img_num).url());
-    }
-
-    AddPageIfDone(page_num);
-    DistillNextPage();
-  } else {
+  if (!distillation_successful) {
     started_pages_index_.erase(page_num);
     RunDistillerCallbackIfDone();
+    return;
   }
+
+  if (distiller_result->has_statistics_info() && page_num == 0) {
+    if (distiller_result->statistics_info().has_word_count()) {
+      UMA_HISTOGRAM_CUSTOM_COUNTS(
+          "DomDistiller.Statistics.FirstPageWordCount",
+          distiller_result->statistics_info().word_count(),
+          1, 4000, 50);
+    }
+  }
+
+  DCHECK(distiller_result.get());
+  DistilledPageData* page_data =
+      GetPageAtIndex(started_pages_index_[page_num]);
+  page_data->distilled_page_proto =
+      new base::RefCountedData<DistilledPageProto>();
+  page_data->page_num = page_num;
+  if (distiller_result->has_title()) {
+    page_data->distilled_page_proto->data.set_title(
+        distiller_result->title());
+  }
+  page_data->distilled_page_proto->data.set_url(page_url.spec());
+  bool content_empty = true;
+  if (distiller_result->has_distilled_content() &&
+      distiller_result->distilled_content().has_html()) {
+    page_data->distilled_page_proto->data.set_html(
+        distiller_result->distilled_content().html());
+    if (!distiller_result->distilled_content().html().empty()) {
+      content_empty = false;
+    }
+  }
+
+  if (distiller_result->has_timing_info()) {
+    const proto::TimingInfo& distiller_timing_info =
+        distiller_result->timing_info();
+    DistilledPageProto::TimingInfo timing_info;
+    if (distiller_timing_info.has_markup_parsing_time()) {
+      timing_info.set_name("markup_parsing");
+      timing_info.set_time(distiller_timing_info.markup_parsing_time());
+      *page_data->distilled_page_proto->data.add_timing_info() = timing_info;
+    }
+
+    if (distiller_timing_info.has_document_construction_time()) {
+      timing_info.set_name("document_construction");
+      timing_info.set_time(
+          distiller_timing_info.document_construction_time());
+      *page_data->distilled_page_proto->data.add_timing_info() = timing_info;
+    }
+
+    if (distiller_timing_info.has_article_processing_time()) {
+      timing_info.set_name("article_processing");
+      timing_info.set_time(
+          distiller_timing_info.article_processing_time());
+      *page_data->distilled_page_proto->data.add_timing_info() = timing_info;
+    }
+
+    if (distiller_timing_info.has_formatting_time()) {
+      timing_info.set_name("formatting");
+      timing_info.set_time(
+          distiller_timing_info.formatting_time());
+      *page_data->distilled_page_proto->data.add_timing_info() = timing_info;
+    }
+
+    if (distiller_timing_info.has_total_time()) {
+      timing_info.set_name("total");
+      timing_info.set_time(
+          distiller_timing_info.total_time());
+      *page_data->distilled_page_proto->data.add_timing_info() = timing_info;
+    }
+
+    for (int i = 0; i < distiller_timing_info.other_times_size(); i++) {
+      timing_info.set_name(distiller_timing_info.other_times(i).name());
+      timing_info.set_time(distiller_timing_info.other_times(i).time());
+      *page_data->distilled_page_proto->data.add_timing_info() = timing_info;
+    }
+  }
+
+  if (distiller_result->has_debug_info() &&
+      distiller_result->debug_info().has_log()) {
+    page_data->distilled_page_proto->data.mutable_debug_info()->set_log(
+        distiller_result->debug_info().log());
+  }
+
+  if (distiller_result->has_text_direction()) {
+    page_data->distilled_page_proto->data.set_text_direction(
+        distiller_result->text_direction());
+  } else {
+    page_data->distilled_page_proto->data.set_text_direction("auto");
+  }
+
+  if (distiller_result->has_pagination_info()) {
+    const proto::PaginationInfo& pagination_info =
+        distiller_result->pagination_info();
+    // Skip the next page if the first page is empty.
+    if (pagination_info.has_next_page() &&
+        (page_num != 0 || !content_empty)) {
+      GURL next_page_url(pagination_info.next_page());
+      if (next_page_url.is_valid()) {
+        // The pages should be in same origin.
+        DCHECK_EQ(next_page_url.GetOrigin(), page_url.GetOrigin());
+        AddToDistillationQueue(page_num + 1, next_page_url);
+        page_data->distilled_page_proto->data.mutable_pagination_info()->
+            set_next_page(next_page_url.spec());
+      }
+    }
+
+    if (pagination_info.has_prev_page()) {
+      GURL prev_page_url(pagination_info.prev_page());
+      if (prev_page_url.is_valid()) {
+        DCHECK_EQ(prev_page_url.GetOrigin(), page_url.GetOrigin());
+        AddToDistillationQueue(page_num - 1, prev_page_url);
+        page_data->distilled_page_proto->data.mutable_pagination_info()->
+            set_prev_page(prev_page_url.spec());
+      }
+    }
+
+    if (pagination_info.has_canonical_page()) {
+      GURL canonical_page_url(pagination_info.canonical_page());
+      if (canonical_page_url.is_valid()) {
+        page_data->distilled_page_proto->data.mutable_pagination_info()->
+            set_canonical_page(canonical_page_url.spec());
+      }
+    }
+  }
+
+  for (int img_num = 0; img_num < distiller_result->content_images_size();
+       ++img_num) {
+    std::string image_id =
+        base::IntToString(page_num + 1) + "_" + base::IntToString(img_num);
+    FetchImage(page_num, image_id,
+        distiller_result->content_images(img_num).url());
+  }
+
+  AddPageIfDone(page_num);
+  DistillNextPage();
 }
 
 void DistillerImpl::FetchImage(int page_num,
diff --git a/components/dom_distiller/core/distiller_unittest.cc b/components/dom_distiller/core/distiller_unittest.cc
index 495d06a..b972d64e 100644
--- a/components/dom_distiller/core/distiller_unittest.cc
+++ b/components/dom_distiller/core/distiller_unittest.cc
@@ -566,6 +566,67 @@
       article_proto_.get(), distiller_data.get(), failed_page_num, kNumPages);
 }
 
+TEST_F(DistillerTest, DistillMultiplePagesFirstEmpty) {
+  base::MessageLoopForUI loop;
+  const size_t kNumPages = 8;
+  std::unique_ptr<MultipageDistillerData> distiller_data =
+      CreateMultipageDistillerDataWithoutImages(kNumPages);
+
+  // The first page has no content.
+  const size_t empty_page_num = 0;
+  distiller_data->content[empty_page_num] = "";
+  std::unique_ptr<base::Value> distilled_value =
+      CreateDistilledValueReturnedFromJS(kTitle, "", vector<int>(),
+      GenerateNextPageUrl(kURL, empty_page_num, kNumPages),
+      GeneratePrevPageUrl(kURL, empty_page_num));
+  // Reset distilled data of the first page.
+  distiller_data->distilled_values.erase(
+      distiller_data->distilled_values.begin() + empty_page_num);
+  distiller_data->distilled_values.insert(
+      distiller_data->distilled_values.begin() + empty_page_num,
+      distilled_value.release());
+
+  distiller_.reset(
+      new DistillerImpl(url_fetcher_factory_, DomDistillerOptions()));
+  DistillPage(distiller_data->page_urls[0],
+              CreateMockDistillerPages(distiller_data.get(), 1, 0));
+  base::MessageLoop::current()->RunUntilIdle();
+  // If the first page has no content, stop fetching the next page.
+  EXPECT_EQ(1, article_proto_->pages_size());
+  VerifyArticleProtoMatchesMultipageData(
+      article_proto_.get(), distiller_data.get(), 1, 1);
+}
+
+TEST_F(DistillerTest, DistillMultiplePagesSecondEmpty) {
+  base::MessageLoopForUI loop;
+  const size_t kNumPages = 8;
+  std::unique_ptr<MultipageDistillerData> distiller_data =
+      CreateMultipageDistillerDataWithoutImages(kNumPages);
+
+  // The second page has no content.
+  const size_t empty_page_num = 1;
+  distiller_data->content[empty_page_num] = "";
+  std::unique_ptr<base::Value> distilled_value =
+      CreateDistilledValueReturnedFromJS(kTitle, "", vector<int>(),
+      GenerateNextPageUrl(kURL, empty_page_num, kNumPages),
+      GeneratePrevPageUrl(kURL, empty_page_num));
+  // Reset distilled data of the second page.
+  distiller_data->distilled_values.erase(
+      distiller_data->distilled_values.begin() + empty_page_num);
+  distiller_data->distilled_values.insert(
+      distiller_data->distilled_values.begin() + empty_page_num,
+      distilled_value.release());
+
+  distiller_.reset(
+      new DistillerImpl(url_fetcher_factory_, DomDistillerOptions()));
+  DistillPage(distiller_data->page_urls[0],
+              CreateMockDistillerPages(distiller_data.get(), kNumPages, 0));
+  base::MessageLoop::current()->RunUntilIdle();
+
+  VerifyArticleProtoMatchesMultipageData(
+      article_proto_.get(), distiller_data.get(), kNumPages, kNumPages);
+}
+
 TEST_F(DistillerTest, DistillPreviousPage) {
   base::MessageLoopForUI loop;
   const size_t kNumPages = 8;
diff --git a/components/gcm_driver.gypi b/components/gcm_driver.gypi
index 6590f8b..042397f 100644
--- a/components/gcm_driver.gypi
+++ b/components/gcm_driver.gypi
@@ -175,6 +175,8 @@
       ],
       'sources': [
         # Note: file list duplicated in GN build.
+        'gcm_driver/instance_id/android/component_jni_registrar.cc',
+        'gcm_driver/instance_id/android/component_jni_registrar.h',
         'gcm_driver/instance_id/instance_id.cc',
         'gcm_driver/instance_id/instance_id.h',
         'gcm_driver/instance_id/instance_id_android.cc',
@@ -186,6 +188,9 @@
       ],
       'conditions': [
         ['OS == "android"', {
+          'dependencies': [
+            'instance_id_driver_jni_headers',
+          ],
           'sources!': [
             'gcm_driver/instance_id/instance_id_impl.cc',
             'gcm_driver/instance_id/instance_id_impl.h',
@@ -300,8 +305,7 @@
           'target_name': 'gcm_driver_java',
           'type': 'none',
           'dependencies': [
-            '../base/base.gyp:base',
-            # TODO(johnme): Fix the layering violation of depending on content/
+            '../base/base.gyp:base_java',
             '../content/content.gyp:content_java',
             '../sync/sync.gyp:sync_java',
           ],
@@ -322,6 +326,31 @@
           },
           'includes': [ '../build/jni_generator.gypi' ],
         },
+        {
+          # GN version: //components/gcm_driver/instance_id/android:instance_id_driver_java
+          'target_name': 'instance_id_driver_java',
+          'type': 'none',
+          'dependencies': [
+            '../base/base.gyp:base_java',
+            '../third_party/android_tools/android_tools.gyp:google_play_services_javalib',
+          ],
+          'variables': {
+            'java_in_dir': 'gcm_driver/instance_id/android/java',
+          },
+          'includes': [ '../build/java.gypi' ],
+        },
+        {
+          # GN version: //components/gcm_driver/instance_id/android:jni_headers
+          'target_name': 'instance_id_driver_jni_headers',
+          'type': 'none',
+          'sources': [
+            'gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java',
+          ],
+          'variables': {
+            'jni_gen_package': 'components/gcm_driver/instance_id',
+          },
+          'includes': [ '../build/jni_generator.gypi' ],
+        },
       ],
      },
     ],
diff --git a/components/gcm_driver/android/BUILD.gn b/components/gcm_driver/android/BUILD.gn
index af75f01f..3f674c61 100644
--- a/components/gcm_driver/android/BUILD.gn
+++ b/components/gcm_driver/android/BUILD.gn
@@ -17,9 +17,7 @@
   deps = [
     "//base:base_java",
     "//content/public/android:content_java",
-    "//sync/android:sync_java",
     "//third_party/android_tools:android_gcm_java",
-    "//third_party/cacheinvalidation:cacheinvalidation_javalib",
     "//third_party/jsr-305:jsr_305_javalib",
   ]
 
diff --git a/components/gcm_driver/android/component_jni_registrar.cc b/components/gcm_driver/android/component_jni_registrar.cc
index 0ef0601..025820c 100644
--- a/components/gcm_driver/android/component_jni_registrar.cc
+++ b/components/gcm_driver/android/component_jni_registrar.cc
@@ -14,7 +14,7 @@
 namespace android {
 
 static base::android::RegistrationMethod kGCMDriverRegisteredMethods[] = {
-    {"GCMDriver", gcm::GCMDriverAndroid::RegisterBindings},
+    {"GCMDriver", gcm::GCMDriverAndroid::RegisterJni},
 };
 
 bool RegisterGCMDriverJni(JNIEnv* env) {
diff --git a/components/gcm_driver/gcm_driver_android.cc b/components/gcm_driver/gcm_driver_android.cc
index 21bcfa0..40e204d 100644
--- a/components/gcm_driver/gcm_driver_android.cc
+++ b/components/gcm_driver/gcm_driver_android.cc
@@ -111,7 +111,7 @@
 }
 
 // static
-bool GCMDriverAndroid::RegisterBindings(JNIEnv* env) {
+bool GCMDriverAndroid::RegisterJni(JNIEnv* env) {
   return RegisterNativesImpl(env);
 }
 
diff --git a/components/gcm_driver/gcm_driver_android.h b/components/gcm_driver/gcm_driver_android.h
index 5944b85..ab5c9f3 100644
--- a/components/gcm_driver/gcm_driver_android.h
+++ b/components/gcm_driver/gcm_driver_android.h
@@ -51,7 +51,7 @@
       const base::android::JavaParamRef<jobjectArray>& data_keys_and_values);
 
   // Register JNI methods.
-  static bool RegisterBindings(JNIEnv* env);
+  static bool RegisterJni(JNIEnv* env);
 
   // GCMDriver implementation:
   void OnSignedIn() override;
diff --git a/components/gcm_driver/instance_id/BUILD.gn b/components/gcm_driver/instance_id/BUILD.gn
index 3e77929..ec00c0b 100644
--- a/components/gcm_driver/instance_id/BUILD.gn
+++ b/components/gcm_driver/instance_id/BUILD.gn
@@ -5,6 +5,8 @@
 # GYP version: components/gcm_driver.gypi:instance_id_driver
 source_set("instance_id") {
   sources = [
+    "android/component_jni_registrar.cc",
+    "android/component_jni_registrar.h",
     "instance_id.cc",
     "instance_id.h",
     "instance_id_driver.cc",
@@ -29,6 +31,7 @@
       "instance_id_android.cc",
       "instance_id_android.h",
     ]
+    deps += [ "android:jni_headers" ]
   }
 }
 
diff --git a/components/gcm_driver/instance_id/android/BUILD.gn b/components/gcm_driver/instance_id/android/BUILD.gn
new file mode 100644
index 0000000..6168aff
--- /dev/null
+++ b/components/gcm_driver/instance_id/android/BUILD.gn
@@ -0,0 +1,26 @@
+# 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("//build/config/android/rules.gni")
+
+# GYP version: components/gcm_driver.gypi:instance_id_driver_jni_headers
+generate_jni("jni_headers") {
+  sources = [
+    "java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java",
+  ]
+  jni_package = "components/gcm_driver/instance_id"
+}
+
+# GYP version: components/gcm_driver.gypi:instance_id_driver_java
+android_library("instance_id_driver_java") {
+  deps = [
+    "//base:base_java",
+    google_play_services_library,
+  ]
+
+  java_files = [
+    "java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java",
+    "java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDWithSubtype.java",
+  ]
+}
diff --git a/components/gcm_driver/instance_id/android/component_jni_registrar.cc b/components/gcm_driver/instance_id/android/component_jni_registrar.cc
new file mode 100644
index 0000000..de6705b
--- /dev/null
+++ b/components/gcm_driver/instance_id/android/component_jni_registrar.cc
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/gcm_driver/instance_id/android/component_jni_registrar.h"
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_registrar.h"
+#include "base/macros.h"
+#include "components/gcm_driver/instance_id/instance_id_android.h"
+
+namespace instance_id {
+namespace android {
+
+static base::android::RegistrationMethod kInstanceIDRegisteredMethods[] = {
+    {"InstanceID", instance_id::InstanceIDAndroid::RegisterJni},
+};
+
+bool RegisterInstanceIDJni(JNIEnv* env) {
+  return base::android::RegisterNativeMethods(
+      env, kInstanceIDRegisteredMethods,
+      arraysize(kInstanceIDRegisteredMethods));
+}
+
+}  // namespace android
+}  // namespace instance_id
diff --git a/components/gcm_driver/instance_id/android/component_jni_registrar.h b/components/gcm_driver/instance_id/android/component_jni_registrar.h
new file mode 100644
index 0000000..dc40f9bc
--- /dev/null
+++ b/components/gcm_driver/instance_id/android/component_jni_registrar.h
@@ -0,0 +1,19 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_GCM_DRIVER_INSTANCE_ID_ANDROID_COMPONENT_JNI_REGISTRAR_H_
+#define COMPONENTS_GCM_DRIVER_INSTANCE_ID_ANDROID_COMPONENT_JNI_REGISTRAR_H_
+
+#include <jni.h>
+
+namespace instance_id {
+namespace android {
+
+// Register all JNI bindings necessary for the gcm_driver/instance_id component.
+bool RegisterInstanceIDJni(JNIEnv* env);
+
+}  // namespace android
+}  // namespace instance_id
+
+#endif  // COMPONENTS_GCM_DRIVER_INSTANCE_ID_ANDROID_COMPONENT_JNI_REGISTRAR_H_
diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
new file mode 100644
index 0000000..a984a24
--- /dev/null
+++ b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
@@ -0,0 +1,146 @@
+// 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.components.gcm_driver.instance_id;
+
+import android.content.Context;
+import android.os.AsyncTask;
+import android.os.Bundle;
+
+import com.google.android.gms.iid.InstanceID;
+
+import org.chromium.base.annotations.CalledByNative;
+import org.chromium.base.annotations.JNINamespace;
+
+import java.io.IOException;
+
+/**
+ * Wraps InstanceID and InstanceIDWithSubtype so they can be used over JNI.
+ * Performs disk/network operations on a background thread and replies asynchronously.
+ */
+@JNINamespace("instance_id")
+public class InstanceIDBridge {
+    /** Underlying InstanceID. May be shared by multiple InstanceIDBridges. */
+    private final InstanceID mInstanceID;
+    private long mNativeInstanceIDAndroid;
+
+    private InstanceIDBridge(
+            long nativeInstanceIDAndroid, Context context, String subtype) {
+        mInstanceID = InstanceIDWithSubtype.getInstance(context, subtype);
+        mNativeInstanceIDAndroid = nativeInstanceIDAndroid;
+    }
+
+    /**
+     * Returns a wrapped {@link InstanceIDWithSubtype}. Multiple InstanceIDBridge instances may
+     * share an underlying InstanceIDWithSubtype.
+     */
+    @CalledByNative
+    public static InstanceIDBridge create(
+            long nativeInstanceIDAndroid, Context context, String subtype) {
+        // TODO(johnme): This should also be async.
+        return new InstanceIDBridge(nativeInstanceIDAndroid, context, subtype);
+    }
+
+    /**
+     * Called when our C++ counterpart is destroyed. Clears the handle to our native C++ object,
+     * ensuring it's not called by pending async tasks.
+     */
+    @CalledByNative
+    private void destroy() {
+        mNativeInstanceIDAndroid = 0;
+    }
+
+    /** Wrapper for {@link InstanceID#getId}. */
+    @CalledByNative
+    public String getId() {
+        // TODO(johnme): This should also be async.
+        return mInstanceID.getId();
+    }
+
+    /** Wrapper for {@link InstanceID#getCreationTime}. */
+    @CalledByNative
+    public long getCreationTime() {
+        // TODO(johnme): This should also be async.
+        return mInstanceID.getCreationTime();
+    }
+
+    /** Async wrapper for {@link InstanceID#getToken(String, String, Bundle)}. */
+    @CalledByNative
+    private void getToken(final int requestId, final String authorizedEntity, final String scope,
+            String[] extrasStrings) {
+        final Bundle extras = new Bundle();
+        assert extrasStrings.length % 2 == 0;
+        for (int i = 0; i < extrasStrings.length; i += 2) {
+            extras.putString(extrasStrings[i], extrasStrings[i + 1]);
+        }
+        new AsyncTask<Void, Void, String>() {
+            @Override
+            protected String doInBackground(Void... params) {
+                try {
+                    return mInstanceID.getToken(authorizedEntity, scope, extras);
+                } catch (IOException ex) {
+                    return "";
+                }
+            }
+            @Override
+            protected void onPostExecute(String token) {
+                if (mNativeInstanceIDAndroid != 0) {
+                    nativeDidGetToken(mNativeInstanceIDAndroid, requestId, token);
+                }
+            }
+        }.execute();
+    }
+
+    /** Async wrapper for {@link InstanceID#deleteToken(String, String)}. */
+    @CalledByNative
+    private void deleteToken(
+            final int requestId, final String authorizedEntity, final String scope) {
+        new AsyncTask<Void, Void, Boolean>() {
+            @Override
+            protected Boolean doInBackground(Void... params) {
+                try {
+                    mInstanceID.deleteToken(authorizedEntity, scope);
+                    return true;
+                } catch (IOException ex) {
+                    return false;
+                }
+            }
+            @Override
+            protected void onPostExecute(Boolean success) {
+                if (mNativeInstanceIDAndroid != 0) {
+                    nativeDidDeleteToken(mNativeInstanceIDAndroid, requestId, success);
+                }
+            }
+        }.execute();
+    }
+
+    /** Async wrapper for {@link InstanceID#deleteInstanceID}. */
+    @CalledByNative
+    private void deleteInstanceID(final int requestId) {
+        new AsyncTask<Void, Void, Boolean>() {
+            @Override
+            protected Boolean doInBackground(Void... params) {
+                try {
+                    mInstanceID.deleteInstanceID();
+                    return true;
+                } catch (IOException ex) {
+                    return false;
+                }
+            }
+            @Override
+            protected void onPostExecute(Boolean success) {
+                if (mNativeInstanceIDAndroid != 0) {
+                    nativeDidDeleteID(mNativeInstanceIDAndroid, requestId, success);
+                }
+            }
+        }.execute();
+    }
+
+    private native void nativeDidGetToken(
+            long nativeInstanceIDAndroid, int requestId, String token);
+    private native void nativeDidDeleteToken(
+            long nativeInstanceIDAndroid, int requestId, boolean success);
+    private native void nativeDidDeleteID(
+            long nativeInstanceIDAndroid, int requestId, boolean success);
+}
\ No newline at end of file
diff --git a/components/gcm_driver/instance_id/instance_id.cc b/components/gcm_driver/instance_id/instance_id.cc
index d89c997e..d48b5ca 100644
--- a/components/gcm_driver/instance_id/instance_id.cc
+++ b/components/gcm_driver/instance_id/instance_id.cc
@@ -6,14 +6,9 @@
 
 namespace instance_id {
 
-InstanceID::InstanceID(const std::string& app_id,
-                       gcm::InstanceIDHandler* handler)
-    : handler_(handler), app_id_(app_id) {
-  DCHECK(handler_);
-}
+InstanceID::InstanceID(const std::string& app_id) : app_id_(app_id) {}
 
-InstanceID::~InstanceID() {
-}
+InstanceID::~InstanceID() {}
 
 void InstanceID::SetTokenRefreshCallback(const TokenRefreshCallback& callback) {
   token_refresh_callback_ = callback;
diff --git a/components/gcm_driver/instance_id/instance_id.h b/components/gcm_driver/instance_id/instance_id.h
index fb69a11..de9bc21 100644
--- a/components/gcm_driver/instance_id/instance_id.h
+++ b/components/gcm_driver/instance_id/instance_id.h
@@ -57,7 +57,7 @@
   // Creator.
   // |app_id|: identifies the application that uses the Instance ID.
   // |handler|: provides the GCM functionality needed to support Instance ID.
-  //            Must outlive this class.
+  //            Must outlive this class. On Android, this can be null instead.
   static scoped_ptr<InstanceID> Create(const std::string& app_id,
                                        gcm::InstanceIDHandler* handler);
 
@@ -106,17 +106,11 @@
   std::string app_id() const { return app_id_; }
 
  protected:
-  InstanceID(const std::string& app_id, gcm::InstanceIDHandler* handler);
+  InstanceID(const std::string& app_id);
 
   void NotifyTokenRefresh(bool update_id);
 
-  gcm::InstanceIDHandler* handler() const { return handler_; }
-
  private:
-  // Owned by GCMProfileServiceFactory, which is a dependency of
-  // InstanceIDProfileServiceFactory, which owns this.
-  gcm::InstanceIDHandler* handler_;
-
   std::string app_id_;
   TokenRefreshCallback token_refresh_callback_;
 
diff --git a/components/gcm_driver/instance_id/instance_id_android.cc b/components/gcm_driver/instance_id/instance_id_android.cc
index 9611567..f2fbd21 100644
--- a/components/gcm_driver/instance_id/instance_id_android.cc
+++ b/components/gcm_driver/instance_id/instance_id_android.cc
@@ -4,49 +4,175 @@
 
 #include "components/gcm_driver/instance_id/instance_id_android.h"
 
+#include <stdint.h>
+
+#include "base/android/context_utils.h"
+#include "base/android/jni_android.h"
+#include "base/android/jni_array.h"
+#include "base/android/jni_string.h"
+#include "base/bind.h"
+#include "base/location.h"
 #include "base/logging.h"
 #include "base/memory/scoped_ptr.h"
+#include "base/thread_task_runner_handle.h"
+#include "base/time/time.h"
+#include "jni/InstanceIDBridge_jni.h"
+
+using base::android::AttachCurrentThread;
+using base::android::ConvertJavaStringToUTF8;
+using base::android::ConvertUTF8ToJavaString;
 
 namespace instance_id {
 
 // static
-scoped_ptr<InstanceID> InstanceID::Create(const std::string& app_id,
-                                          gcm::InstanceIDHandler* handler) {
-  return make_scoped_ptr(new InstanceIDAndroid(app_id, handler));
+bool InstanceIDAndroid::RegisterJni(JNIEnv* env) {
+  return RegisterNativesImpl(env);
 }
 
-InstanceIDAndroid::InstanceIDAndroid(const std::string& app_id,
-                                     gcm::InstanceIDHandler* handler)
-    : InstanceID(app_id, handler) {}
+// static
+scoped_ptr<InstanceID> InstanceID::Create(const std::string& app_id,
+                                          gcm::InstanceIDHandler* unused) {
+  return make_scoped_ptr(new InstanceIDAndroid(app_id));
+}
+
+InstanceIDAndroid::InstanceIDAndroid(const std::string& app_id)
+    : InstanceID(app_id) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  DCHECK(!app_id.empty()) << "Empty app_id is not supported";
+  // The |app_id| is stored in GCM's category field by the desktop InstanceID
+  // implementation, but because the category is reserved for the app's package
+  // name on Android the subtype field is used instead.
+  std::string subtype = app_id;
+
+  JNIEnv* env = AttachCurrentThread();
+  java_ref_.Reset(Java_InstanceIDBridge_create(
+      env, reinterpret_cast<intptr_t>(this),
+      base::android::GetApplicationContext(),
+      ConvertUTF8ToJavaString(env, subtype).obj()));
+}
 
 InstanceIDAndroid::~InstanceIDAndroid() {
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  JNIEnv* env = AttachCurrentThread();
+  Java_InstanceIDBridge_destroy(env, java_ref_.obj());
 }
 
 void InstanceIDAndroid::GetID(const GetIDCallback& callback) {
-  NOTIMPLEMENTED();
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  JNIEnv* env = AttachCurrentThread();
+  std::string id = ConvertJavaStringToUTF8(
+      Java_InstanceIDBridge_getId(env, java_ref_.obj()));
+  base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+                                                base::Bind(callback, id));
 }
 
 void InstanceIDAndroid::GetCreationTime(
     const GetCreationTimeCallback& callback) {
-  NOTIMPLEMENTED();
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  JNIEnv* env = AttachCurrentThread();
+  int64_t creation_time_unix_ms =
+      Java_InstanceIDBridge_getCreationTime(env, java_ref_.obj());
+  base::Time creation_time;
+  // If the InstanceID's getId, getToken and deleteToken methods have never been
+  // called, or deleteInstanceID has cleared it since, creation time will be 0.
+  if (creation_time_unix_ms) {
+    creation_time = base::Time::UnixEpoch() +
+                    base::TimeDelta::FromMilliseconds(creation_time_unix_ms);
+  }
+  base::ThreadTaskRunnerHandle::Get()->PostTask(
+      FROM_HERE, base::Bind(callback, creation_time));
 }
 
 void InstanceIDAndroid::GetToken(
-    const std::string& audience,
+    const std::string& authorized_entity,
     const std::string& scope,
     const std::map<std::string, std::string>& options,
     const GetTokenCallback& callback) {
-  NOTIMPLEMENTED();
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  int32_t request_id = get_token_callbacks_.Add(new GetTokenCallback(callback));
+
+  std::vector<std::string> options_strings;
+  for (const auto& entry : options) {
+    options_strings.push_back(entry.first);
+    options_strings.push_back(entry.second);
+  }
+
+  JNIEnv* env = AttachCurrentThread();
+  Java_InstanceIDBridge_getToken(
+      env, java_ref_.obj(), request_id,
+      ConvertUTF8ToJavaString(env, authorized_entity).obj(),
+      ConvertUTF8ToJavaString(env, scope).obj(),
+      base::android::ToJavaArrayOfStrings(env, options_strings).obj());
 }
 
-void InstanceIDAndroid::DeleteToken(const std::string& audience,
+void InstanceIDAndroid::DeleteToken(const std::string& authorized_entity,
                                     const std::string& scope,
                                     const DeleteTokenCallback& callback) {
-  NOTIMPLEMENTED();
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  int32_t request_id =
+      delete_token_callbacks_.Add(new DeleteTokenCallback(callback));
+
+  JNIEnv* env = AttachCurrentThread();
+  Java_InstanceIDBridge_deleteToken(
+      env, java_ref_.obj(), request_id,
+      ConvertUTF8ToJavaString(env, authorized_entity).obj(),
+      ConvertUTF8ToJavaString(env, scope).obj());
 }
 
 void InstanceIDAndroid::DeleteID(const DeleteIDCallback& callback) {
-  NOTIMPLEMENTED();
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  int32_t request_id = delete_id_callbacks_.Add(new DeleteIDCallback(callback));
+
+  JNIEnv* env = AttachCurrentThread();
+  Java_InstanceIDBridge_deleteInstanceID(env, java_ref_.obj(), request_id);
+}
+
+void InstanceIDAndroid::DidGetToken(
+    JNIEnv* env,
+    const base::android::JavaParamRef<jobject>& obj,
+    jint request_id,
+    const base::android::JavaParamRef<jstring>& jtoken) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  GetTokenCallback* callback = get_token_callbacks_.Lookup(request_id);
+  DCHECK(callback);
+  std::string token = ConvertJavaStringToUTF8(jtoken);
+  callback->Run(
+      token, token.empty() ? InstanceID::UNKNOWN_ERROR : InstanceID::SUCCESS);
+  get_token_callbacks_.Remove(request_id);
+}
+
+void InstanceIDAndroid::DidDeleteToken(
+    JNIEnv* env,
+    const base::android::JavaParamRef<jobject>& obj,
+    jint request_id,
+    jboolean success) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  DeleteTokenCallback* callback = delete_token_callbacks_.Lookup(request_id);
+  DCHECK(callback);
+  callback->Run(success ? InstanceID::SUCCESS : InstanceID::UNKNOWN_ERROR);
+  delete_token_callbacks_.Remove(request_id);
+}
+
+void InstanceIDAndroid::DidDeleteID(
+    JNIEnv* env,
+    const base::android::JavaParamRef<jobject>& obj,
+    jint request_id,
+    jboolean success) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+
+  DeleteIDCallback* callback = delete_id_callbacks_.Lookup(request_id);
+  DCHECK(callback);
+  callback->Run(success ? InstanceID::SUCCESS : InstanceID::UNKNOWN_ERROR);
+  delete_id_callbacks_.Remove(request_id);
 }
 
 }  // namespace instance_id
diff --git a/components/gcm_driver/instance_id/instance_id_android.h b/components/gcm_driver/instance_id/instance_id_android.h
index de0ff62d..a1152960 100644
--- a/components/gcm_driver/instance_id/instance_id_android.h
+++ b/components/gcm_driver/instance_id/instance_id_android.h
@@ -5,12 +5,17 @@
 #ifndef COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_
 #define COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_
 
+#include <jni.h>
+
 #include <map>
 #include <string>
 
+#include "base/android/scoped_java_ref.h"
 #include "base/callback.h"
 #include "base/compiler_specific.h"
+#include "base/id_map.h"
 #include "base/macros.h"
+#include "base/threading/thread_checker.h"
 #include "base/time/time.h"
 #include "components/gcm_driver/instance_id/instance_id.h"
 
@@ -19,10 +24,13 @@
 // InstanceID implementation for Android.
 class InstanceIDAndroid : public InstanceID {
  public:
-  InstanceIDAndroid(const std::string& app_id, gcm::InstanceIDHandler* handler);
+  // Register JNI methods.
+  static bool RegisterJni(JNIEnv* env);
+
+  InstanceIDAndroid(const std::string& app_id);
   ~InstanceIDAndroid() override;
 
-  // InstanceID:
+  // InstanceID implementation:
   void GetID(const GetIDCallback& callback) override;
   void GetCreationTime(const GetCreationTimeCallback& callback) override;
   void GetToken(const std::string& audience,
@@ -34,7 +42,29 @@
                    const DeleteTokenCallback& callback) override;
   void DeleteID(const DeleteIDCallback& callback) override;
 
+  // Methods called from Java via JNI:
+  void DidGetToken(JNIEnv* env,
+                   const base::android::JavaParamRef<jobject>& obj,
+                   jint request_id,
+                   const base::android::JavaParamRef<jstring>& jtoken);
+  void DidDeleteToken(JNIEnv* env,
+                      const base::android::JavaParamRef<jobject>& obj,
+                      jint request_id,
+                      jboolean success);
+  void DidDeleteID(JNIEnv* env,
+                   const base::android::JavaParamRef<jobject>& obj,
+                   jint request_id,
+                   jboolean success);
+
  private:
+  base::android::ScopedJavaGlobalRef<jobject> java_ref_;
+
+  IDMap<GetTokenCallback, IDMapOwnPointer> get_token_callbacks_;
+  IDMap<DeleteTokenCallback, IDMapOwnPointer> delete_token_callbacks_;
+  IDMap<DeleteIDCallback, IDMapOwnPointer> delete_id_callbacks_;
+
+  base::ThreadChecker thread_checker_;
+
   DISALLOW_COPY_AND_ASSIGN(InstanceIDAndroid);
 };
 
diff --git a/components/gcm_driver/instance_id/instance_id_driver.cc b/components/gcm_driver/instance_id/instance_id_driver.cc
index 374be22..937d77b 100644
--- a/components/gcm_driver/instance_id/instance_id_driver.cc
+++ b/components/gcm_driver/instance_id/instance_id_driver.cc
@@ -12,22 +12,15 @@
 namespace instance_id {
 
 namespace {
-#if !defined(OS_ANDROID)
 const char kInstanceIDFieldTrialName[] = "InstanceID";
 const char kInstanceIDFieldTrialEnabledGroupName[] = "Enabled";
-#endif    // !defined(OS_ANDROID)
 }  // namespace
 
 // static
 bool InstanceIDDriver::IsInstanceIDEnabled() {
-#if defined(OS_ANDROID)
-  // Not implemented yet.
-  return false;
-#else
   std::string group_name =
       base::FieldTrialList::FindFullName(kInstanceIDFieldTrialName);
   return group_name == kInstanceIDFieldTrialEnabledGroupName;
-#endif    // defined(OS_ANDROID)
 }
 
 InstanceIDDriver::InstanceIDDriver(gcm::GCMDriver* gcm_driver)
diff --git a/components/gcm_driver/instance_id/instance_id_impl.cc b/components/gcm_driver/instance_id/instance_id_impl.cc
index ee1ea35..f7e5014 100644
--- a/components/gcm_driver/instance_id/instance_id_impl.cc
+++ b/components/gcm_driver/instance_id/instance_id_impl.cc
@@ -54,8 +54,9 @@
 
 InstanceIDImpl::InstanceIDImpl(const std::string& app_id,
                                gcm::InstanceIDHandler* handler)
-    : InstanceID(app_id, handler), weak_ptr_factory_(this) {
-  handler->GetInstanceIDData(
+    : InstanceID(app_id), handler_(handler), weak_ptr_factory_(this) {
+  DCHECK(handler_);
+  handler_->GetInstanceIDData(
       app_id, base::Bind(&InstanceIDImpl::GetInstanceIDDataCompleted,
                          weak_ptr_factory_.GetWeakPtr()));
 }
@@ -126,9 +127,9 @@
     const GetTokenCallback& callback) {
   EnsureIDGenerated();
 
-  handler()->GetToken(app_id(), authorized_entity, scope, options,
-                      base::Bind(&InstanceIDImpl::OnGetTokenCompleted,
-                                 weak_ptr_factory_.GetWeakPtr(), callback));
+  handler_->GetToken(app_id(), authorized_entity, scope, options,
+                     base::Bind(&InstanceIDImpl::OnGetTokenCompleted,
+                                weak_ptr_factory_.GetWeakPtr(), callback));
 }
 
 void InstanceIDImpl::DeleteToken(const std::string& authorized_entity,
@@ -160,9 +161,9 @@
     return;
   }
 
-  handler()->DeleteToken(app_id(), authorized_entity, scope,
-                         base::Bind(&InstanceIDImpl::OnDeleteTokenCompleted,
-                                    weak_ptr_factory_.GetWeakPtr(), callback));
+  handler_->DeleteToken(app_id(), authorized_entity, scope,
+                        base::Bind(&InstanceIDImpl::OnDeleteTokenCompleted,
+                                   weak_ptr_factory_.GetWeakPtr(), callback));
 }
 
 void InstanceIDImpl::DeleteID(const DeleteIDCallback& callback) {
@@ -184,11 +185,11 @@
     return;
   }
 
-  handler()->DeleteAllTokensForApp(
+  handler_->DeleteAllTokensForApp(
       app_id(), base::Bind(&InstanceIDImpl::OnDeleteIDCompleted,
                            weak_ptr_factory_.GetWeakPtr(), callback));
 
-  handler()->RemoveInstanceIDData(app_id());
+  handler_->RemoveInstanceIDData(app_id());
 
   id_.clear();
   creation_time_ = base::Time();
@@ -261,7 +262,7 @@
   creation_time_ = base::Time::Now();
 
   // Save to the persistent store.
-  handler()->AddInstanceIDData(
+  handler_->AddInstanceIDData(
       app_id(), id_, base::Int64ToString(creation_time_.ToInternalValue()));
 }
 
diff --git a/components/gcm_driver/instance_id/instance_id_impl.h b/components/gcm_driver/instance_id/instance_id_impl.h
index dd4569a..d36264c3 100644
--- a/components/gcm_driver/instance_id/instance_id_impl.h
+++ b/components/gcm_driver/instance_id/instance_id_impl.h
@@ -66,6 +66,10 @@
                      const DeleteTokenCallback& callback);
   void DoDeleteID(const DeleteIDCallback& callback);
 
+  // Owned by GCMProfileServiceFactory, which is a dependency of
+  // InstanceIDProfileServiceFactory, which owns this.
+  gcm::InstanceIDHandler* handler_;
+
   gcm::GCMDelayedTaskController delayed_task_controller_;
 
   // The generated Instance ID.
diff --git a/components/metrics/leak_detector/leak_detector_impl.cc b/components/metrics/leak_detector/leak_detector_impl.cc
index ded8b5b0..ba55ad5 100644
--- a/components/metrics/leak_detector/leak_detector_impl.cc
+++ b/components/metrics/leak_detector/leak_detector_impl.cc
@@ -68,6 +68,9 @@
 LeakDetectorImpl::LeakReport::AllocationBreakdown::AllocationBreakdown()
     : count_for_call_stack(0) {}
 
+LeakDetectorImpl::LeakReport::AllocationBreakdown::AllocationBreakdown(
+    const AllocationBreakdown& other) = default;
+
 LeakDetectorImpl::LeakReport::AllocationBreakdown::~AllocationBreakdown() {}
 
 LeakDetectorImpl::LeakReport::LeakReport() : alloc_size_bytes_(0) {}
diff --git a/components/metrics/leak_detector/leak_detector_impl.h b/components/metrics/leak_detector/leak_detector_impl.h
index ae13e3a..50a8a6e 100644
--- a/components/metrics/leak_detector/leak_detector_impl.h
+++ b/components/metrics/leak_detector/leak_detector_impl.h
@@ -42,6 +42,7 @@
     // time.
     struct AllocationBreakdown {
       AllocationBreakdown();
+      AllocationBreakdown(const AllocationBreakdown& other);
       ~AllocationBreakdown();
 
       // The contents of |LeakDetectorImpl::size_breakdown_history_| when this
diff --git a/components/mus/gles2/gpu_state.cc b/components/mus/gles2/gpu_state.cc
index b78f198..fce2d438 100644
--- a/components/mus/gles2/gpu_state.cc
+++ b/components/mus/gles2/gpu_state.cc
@@ -44,6 +44,9 @@
 }
 
 void GpuState::InitializeOnGpuThread(base::WaitableEvent* event) {
+#if defined(USE_OZONE)
+  ui::OzonePlatform::InitializeForGPU();
+#endif
   hardware_rendering_available_ = gfx::GLSurface::InitializeOneOff();
   command_buffer_task_runner_ = new CommandBufferTaskRunner;
   driver_manager_.reset(new CommandBufferDriverManager);
@@ -68,9 +71,6 @@
   }
   event->Signal();
 
-#if defined(USE_OZONE)
-  ui::OzonePlatform::InitializeForGPU();
-#endif
 }
 
 void GpuState::DestroyGpuSpecificStateOnGpuThread() {
diff --git a/components/mus/public/cpp/input_event_handler.h b/components/mus/public/cpp/input_event_handler.h
index e40e60e31..d21354b 100644
--- a/components/mus/public/cpp/input_event_handler.h
+++ b/components/mus/public/cpp/input_event_handler.h
@@ -16,17 +16,21 @@
 
 class Window;
 
+namespace mojom {
+enum class EventResult;
+}
+
 // Responsible for processing input events for mus::Window.
 class InputEventHandler {
  public:
   // The event handler can asynchronously ack the event by taking ownership of
-  // the |ack_callback|. The callback takes a bool representing whether the
+  // the |ack_callback|. The callback takes an EventResult indicating if the
   // handler has consumed the event. If the handler does not take ownership of
   // the callback, then WindowTreeClientImpl will ack the event as not consumed.
   virtual void OnWindowInputEvent(
       Window* target,
       const ui::Event& event,
-      scoped_ptr<base::Callback<void(bool)>>* ack_callback) = 0;
+      scoped_ptr<base::Callback<void(mojom::EventResult)>>* ack_callback) = 0;
 
  protected:
   virtual ~InputEventHandler() {}
diff --git a/components/mus/public/cpp/lib/window.cc b/components/mus/public/cpp/lib/window.cc
index 4228e9a5..688aa54b2 100644
--- a/components/mus/public/cpp/lib/window.cc
+++ b/components/mus/public/cpp/lib/window.cc
@@ -15,9 +15,12 @@
 #include "components/mus/common/transient_window_utils.h"
 #include "components/mus/public/cpp/lib/window_private.h"
 #include "components/mus/public/cpp/lib/window_tree_client_impl.h"
+#include "components/mus/public/cpp/property_type_converters.h"
 #include "components/mus/public/cpp/window_observer.h"
+#include "components/mus/public/cpp/window_property.h"
 #include "components/mus/public/cpp/window_surface.h"
 #include "components/mus/public/cpp/window_tracker.h"
+#include "components/mus/public/interfaces/window_manager.mojom.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/geometry/size.h"
 
@@ -432,6 +435,13 @@
     tree_client()->RequestClose(this);
 }
 
+std::string Window::GetName() const {
+  if (HasSharedProperty(mojom::WindowManager::kName_Property))
+    return GetSharedProperty<std::string>(mojom::WindowManager::kName_Property);
+
+  return std::string();
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // Window, protected:
 
diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.cc b/components/mus/public/cpp/lib/window_tree_client_impl.cc
index 9b199da..23cc50de 100644
--- a/components/mus/public/cpp/lib/window_tree_client_impl.cc
+++ b/components/mus/public/cpp/lib/window_tree_client_impl.cc
@@ -868,12 +868,12 @@
                                               mojom::EventPtr event) {
   Window* window = GetWindowByServerId(window_id);
   if (!window || !window->input_event_handler_) {
-    tree_->OnWindowInputEventAck(event_id, false);
+    tree_->OnWindowInputEventAck(event_id, mojom::EventResult::UNHANDLED);
     return;
   }
 
-  scoped_ptr<base::Callback<void(bool)>> ack_callback(
-      new base::Callback<void(bool)>(
+  scoped_ptr<base::Callback<void(mojom::EventResult)>> ack_callback(
+      new base::Callback<void(mojom::EventResult)>(
           base::Bind(&mojom::WindowTree::OnWindowInputEventAck,
                      base::Unretained(tree_), event_id)));
   window->input_event_handler_->OnWindowInputEvent(
@@ -882,7 +882,7 @@
   // The handler did not take ownership of the callback, so we send the ack,
   // marking the event as not consumed.
   if (ack_callback)
-    ack_callback->Run(false);
+    ack_callback->Run(mojom::EventResult::UNHANDLED);
 }
 
 void WindowTreeClientImpl::OnWindowFocused(Id focused_window_id) {
diff --git a/components/mus/public/cpp/tests/test_window_tree.cc b/components/mus/public/cpp/tests/test_window_tree.cc
index 07505758..5d45dcf 100644
--- a/components/mus/public/cpp/tests/test_window_tree.cc
+++ b/components/mus/public/cpp/tests/test_window_tree.cc
@@ -143,7 +143,8 @@
                                       bool visible,
                                       mojo::TextInputStatePtr state) {}
 
-void TestWindowTree::OnWindowInputEventAck(uint32_t event_id, bool handled) {
+void TestWindowTree::OnWindowInputEventAck(uint32_t event_id,
+                                           mus::mojom::EventResult result) {
   EXPECT_FALSE(acked_events_.count(event_id));
   acked_events_.insert(event_id);
 }
diff --git a/components/mus/public/cpp/tests/test_window_tree.h b/components/mus/public/cpp/tests/test_window_tree.h
index 05705da9..2910dc65 100644
--- a/components/mus/public/cpp/tests/test_window_tree.h
+++ b/components/mus/public/cpp/tests/test_window_tree.h
@@ -90,7 +90,8 @@
   void SetImeVisibility(uint32_t window_id,
                         bool visible,
                         mojo::TextInputStatePtr state) override;
-  void OnWindowInputEventAck(uint32_t event_id, bool handled) override;
+  void OnWindowInputEventAck(uint32_t event_id,
+                             mus::mojom::EventResult result) override;
   void GetWindowManagerClient(
       mojo::AssociatedInterfaceRequest<mojom::WindowManagerClient> internal)
       override;
diff --git a/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc b/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
index d80e117..05adc19 100644
--- a/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
+++ b/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
@@ -31,7 +31,7 @@
 
 namespace {
 
-void DoNothingBool(bool result) {}
+void DoNothingWithEventResult(mojom::EventResult result) {}
 
 Id server_id(mus::Window* window) {
   return WindowPrivate(window).server_id();
@@ -130,22 +130,22 @@
   void AckEvent() {
     DCHECK(should_manually_ack_);
     DCHECK(!ack_callback_.is_null());
-    ack_callback_.Run(true);
-    ack_callback_ = base::Bind(&DoNothingBool);
+    ack_callback_.Run(mojom::EventResult::HANDLED);
+    ack_callback_ = base::Bind(&DoNothingWithEventResult);
   }
 
   void Reset() {
     received_event_ = false;
-    ack_callback_ = base::Bind(&DoNothingBool);
+    ack_callback_ = base::Bind(&DoNothingWithEventResult);
   }
   bool received_event() const { return received_event_; }
 
  private:
   // InputEventHandler:
-  void OnWindowInputEvent(
-      Window* target,
-      const ui::Event& event,
-      scoped_ptr<base::Callback<void(bool)>>* ack_callback) override {
+  void OnWindowInputEvent(Window* target,
+                          const ui::Event& event,
+                          scoped_ptr<base::Callback<void(mojom::EventResult)>>*
+                              ack_callback) override {
     EXPECT_FALSE(received_event_)
         << "Observer was not reset after receiving event.";
     received_event_ = true;
@@ -157,7 +157,7 @@
 
   bool received_event_;
   bool should_manually_ack_;
-  base::Callback<void(bool)> ack_callback_;
+  base::Callback<void(mojom::EventResult)> ack_callback_;
 
   DISALLOW_COPY_AND_ASSIGN(TestInputEventHandler);
 };
diff --git a/components/mus/public/cpp/window.h b/components/mus/public/cpp/window.h
index 6c2cc1b7..da3bd30 100644
--- a/components/mus/public/cpp/window.h
+++ b/components/mus/public/cpp/window.h
@@ -218,6 +218,9 @@
   // to a better place.
   void RequestClose();
 
+  // Returns an internal name, set by a client app when it creates a window.
+  std::string GetName() const;
+
  protected:
   // This class is subclassed only by test classes that provide a public ctor.
   Window();
diff --git a/components/mus/public/interfaces/window_manager.mojom b/components/mus/public/interfaces/window_manager.mojom
index 11cf1fe..4bd4ade 100644
--- a/components/mus/public/interfaces/window_manager.mojom
+++ b/components/mus/public/interfaces/window_manager.mojom
@@ -20,6 +20,8 @@
 // with WindowTreeClient, further WindowTree requests this interface from
 // WindowTreeClient supplied at the time the WindowTreeHost is created.
 interface WindowManager {
+  // Internal window name. Useful for debugging. Type: mojom::String
+  const string kName_Property = "prop:name";
   // The window's preferred size as defined by its content. Type: gfx::Size.
   const string kPreferredSize_Property = "prop:preferred-size";
   // The window's resize behavior. Type: ResizeBehavior.
diff --git a/components/mus/public/interfaces/window_tree.mojom b/components/mus/public/interfaces/window_tree.mojom
index fe110197..eb2ef58 100644
--- a/components/mus/public/interfaces/window_tree.mojom
+++ b/components/mus/public/interfaces/window_tree.mojom
@@ -52,6 +52,12 @@
   DEFAULT,
 };
 
+// The result of an input event sent to a client app.
+enum EventResult {
+  HANDLED,
+  UNHANDLED,
+};
+
 // Windows are identified by a uint32. The upper 16 bits are the connection id,
 // and the lower 16 the id assigned by the client.
 //
@@ -241,7 +247,7 @@
   SetImeVisibility(uint32 window_id, bool visible, mojo.TextInputState? state);
 
   // See documentation for WindowTreeClient::OnWindowInputEvent().
-  OnWindowInputEventAck(uint32 event_id, bool handled);
+  OnWindowInputEventAck(uint32 event_id, EventResult result);
 
   // See description of WindowManager for details.
   GetWindowManagerClient(associated WindowManagerClient& internal);
@@ -351,7 +357,7 @@
 
   // Invoked when an event is targeted at the specified window. The client must
   // call WindowTree::OnWindowInputEventAck() with the same |event_id| to notify
-  // that the event has been processed, and with a boolean |handled| to notify
+  // that the event has been processed, and with an EventResult value to notify
   // if the event was consumed. The client will not receive farther events until
   // the event is ack'ed.
   OnWindowInputEvent(uint32 event_id, uint32 window, Event event);
diff --git a/components/mus/surfaces/direct_output_surface.h b/components/mus/surfaces/direct_output_surface.h
index 73c6e8a..b4caad3 100644
--- a/components/mus/surfaces/direct_output_surface.h
+++ b/components/mus/surfaces/direct_output_surface.h
@@ -5,6 +5,8 @@
 #ifndef COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACE_H_
 #define COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACE_H_
 
+#include <memory>
+
 #include "cc/output/output_surface.h"
 #include "cc/scheduler/begin_frame_source.h"
 #include "components/mus/surfaces/surfaces_context_provider.h"
@@ -30,7 +32,7 @@
   void OnVSyncParametersUpdated(int64_t timebase, int64_t interval) override;
 
  private:
-  scoped_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source_;
+  std::unique_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source_;
   base::WeakPtrFactory<DirectOutputSurface> weak_ptr_factory_;
 };
 
diff --git a/components/mus/surfaces/surfaces_context_provider.h b/components/mus/surfaces/surfaces_context_provider.h
index 9fa6d47..5562af49 100644
--- a/components/mus/surfaces/surfaces_context_provider.h
+++ b/components/mus/surfaces/surfaces_context_provider.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/non_thread_safe.h"
 #include "cc/output/context_provider.h"
@@ -72,9 +73,9 @@
 
   // From GLES2Context:
   // Initialized in BindToCurrentThread.
-  scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
-  scoped_ptr<gpu::TransferBuffer> transfer_buffer_;
-  scoped_ptr<gpu::gles2::GLES2Implementation> implementation_;
+  std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
+  std::unique_ptr<gpu::TransferBuffer> transfer_buffer_;
+  std::unique_ptr<gpu::gles2::GLES2Implementation> implementation_;
 
   cc::ContextProvider::Capabilities capabilities_;
   LostContextCallback lost_context_callback_;
diff --git a/components/mus/surfaces/surfaces_state.h b/components/mus/surfaces/surfaces_state.h
index 9790f872..f7e2368b 100644
--- a/components/mus/surfaces/surfaces_state.h
+++ b/components/mus/surfaces/surfaces_state.h
@@ -9,7 +9,6 @@
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/surfaces/surface_hittest.h"
 #include "cc/surfaces/surface_manager.h"
 
diff --git a/components/mus/ws/window_manager_state.cc b/components/mus/ws/window_manager_state.cc
index f383906..c81bb8c 100644
--- a/components/mus/ws/window_manager_state.cc
+++ b/components/mus/ws/window_manager_state.cc
@@ -160,7 +160,9 @@
   // The WindowTree is dying. So it's not going to ack the event.
   // If the dying tree matches the root |tree_| marked as handled so we don't
   // notify it of accelerators.
-  OnEventAck(tree_awaiting_input_ack_, tree == tree_);
+  OnEventAck(tree_awaiting_input_ack_, tree == tree_
+                                           ? mojom::EventResult::HANDLED
+                                           : mojom::EventResult::UNHANDLED);
 }
 
 WindowManagerState::WindowManagerState(Display* display,
@@ -227,7 +229,8 @@
   event_dispatcher_.ProcessEvent(event);
 }
 
-void WindowManagerState::OnEventAck(mojom::WindowTree* tree, bool handled) {
+void WindowManagerState::OnEventAck(mojom::WindowTree* tree,
+                                    mojom::EventResult result) {
   if (tree_awaiting_input_ack_ != tree) {
     // TODO(sad): The ack must have arrived after the timeout. We should do
     // something here, and in OnEventAckTimeout().
@@ -236,7 +239,7 @@
   tree_awaiting_input_ack_ = nullptr;
   event_ack_timer_.Stop();
 
-  if (!handled && post_target_accelerator_)
+  if (result == mojom::EventResult::UNHANDLED && post_target_accelerator_)
     OnAccelerator(post_target_accelerator_->id(), *event_awaiting_input_ack_);
 
   ProcessNextEventFromQueue();
@@ -249,7 +252,7 @@
 void WindowManagerState::OnEventAckTimeout() {
   // TODO(sad): Figure out what we should do.
   NOTIMPLEMENTED() << "Event ACK timed out.";
-  OnEventAck(tree_awaiting_input_ack_, false);
+  OnEventAck(tree_awaiting_input_ack_, mojom::EventResult::UNHANDLED);
 }
 
 void WindowManagerState::QueueEvent(
diff --git a/components/mus/ws/window_manager_state.h b/components/mus/ws/window_manager_state.h
index b53885e9..d85199b 100644
--- a/components/mus/ws/window_manager_state.h
+++ b/components/mus/ws/window_manager_state.h
@@ -96,9 +96,9 @@
   void ProcessEvent(const ui::Event& event);
 
   // Called when the ack from an event dispatched to WindowTree |tree| is
-  // received. When |handled| is true, the client consumed the event.
+  // received.
   // TODO(sky): make this private and use a callback.
-  void OnEventAck(mojom::WindowTree* tree, bool handled);
+  void OnEventAck(mojom::WindowTree* tree, mojom::EventResult result);
 
   // Returns a mojom::Display for the specified display. WindowManager specific
   // values are not set.
diff --git a/components/mus/ws/window_manager_state_unittest.cc b/components/mus/ws/window_manager_state_unittest.cc
index c803d0f..65fb486 100644
--- a/components/mus/ws/window_manager_state_unittest.cc
+++ b/components/mus/ws/window_manager_state_unittest.cc
@@ -203,7 +203,7 @@
   EXPECT_EQ("InputEvent window=1,1 event_action=1",
             ChangesToDescription1(*tracker->changes())[0]);
 
-  state->OnEventAck(target_tree, false);
+  state->OnEventAck(target_tree, mojom::EventResult::UNHANDLED);
   EXPECT_FALSE(window_manager()->on_accelerator_called());
 }
 
@@ -220,7 +220,7 @@
   EXPECT_EQ("InputEvent window=1,1 event_action=1",
             ChangesToDescription1(*tracker->changes())[0]);
 
-  window_manager_state()->OnEventAck(tree(), false);
+  window_manager_state()->OnEventAck(tree(), mojom::EventResult::UNHANDLED);
   EXPECT_TRUE(window_manager()->on_accelerator_called());
   EXPECT_EQ(accelerator->id(), window_manager()->on_accelerator_id());
 }
@@ -238,7 +238,7 @@
   EXPECT_EQ("InputEvent window=1,1 event_action=1",
             ChangesToDescription1(*tracker->changes())[0]);
 
-  window_manager_state()->OnEventAck(tree(), true);
+  window_manager_state()->OnEventAck(tree(), mojom::EventResult::HANDLED);
   EXPECT_FALSE(window_manager()->on_accelerator_called());
 }
 
@@ -256,7 +256,7 @@
             ChangesToDescription1(*tracker->changes())[0]);
 
   accelerator.reset();
-  window_manager_state()->OnEventAck(tree(), false);
+  window_manager_state()->OnEventAck(tree(), mojom::EventResult::UNHANDLED);
   EXPECT_FALSE(window_manager()->on_accelerator_called());
 }
 
@@ -288,7 +288,7 @@
 
   WindowTree* target_tree = tree();
   WindowTreeTestApi(target_tree).ClearAck();
-  state->OnEventAck(target_tree, false);
+  state->OnEventAck(target_tree, mojom::EventResult::UNHANDLED);
   EXPECT_EQ(1u, tracker->changes()->size());
   EXPECT_EQ("InputEvent window=1,1 event_action=1",
             ChangesToDescription1(*tracker->changes())[0]);
diff --git a/components/mus/ws/window_tree.cc b/components/mus/ws/window_tree.cc
index ed05e24..863a3a1 100644
--- a/components/mus/ws/window_tree.cc
+++ b/components/mus/ws/window_tree.cc
@@ -1219,7 +1219,8 @@
   }
 }
 
-void WindowTree::OnWindowInputEventAck(uint32_t event_id, bool handled) {
+void WindowTree::OnWindowInputEventAck(uint32_t event_id,
+                                       mojom::EventResult result) {
   if (event_ack_id_ == 0 || event_id != event_ack_id_) {
     // TODO(sad): Something bad happened. Kill the client?
     NOTIMPLEMENTED() << "Wrong event acked.";
@@ -1229,7 +1230,7 @@
   WindowManagerState* event_source_wms = event_source_wms_;
   event_source_wms_ = nullptr;
   if (event_source_wms)
-    event_source_wms->OnEventAck(this, handled);
+    event_source_wms->OnEventAck(this, result);
 
   if (!event_queue_.empty()) {
     DCHECK(!event_ack_id_);
diff --git a/components/mus/ws/window_tree.h b/components/mus/ws/window_tree.h
index 1bcff73..ab8e624 100644
--- a/components/mus/ws/window_tree.h
+++ b/components/mus/ws/window_tree.h
@@ -365,7 +365,8 @@
   void SetImeVisibility(Id transport_window_id,
                         bool visible,
                         mojo::TextInputStatePtr state) override;
-  void OnWindowInputEventAck(uint32_t event_id, bool handled) override;
+  void OnWindowInputEventAck(uint32_t event_id,
+                             mojom::EventResult result) override;
   void SetClientArea(
       Id transport_window_id,
       mojo::InsetsPtr insets,
diff --git a/components/mus/ws/window_tree_client_unittest.cc b/components/mus/ws/window_tree_client_unittest.cc
index db7b86b..0ae95d6 100644
--- a/components/mus/ws/window_tree_client_unittest.cc
+++ b/components/mus/ws/window_tree_client_unittest.cc
@@ -361,7 +361,7 @@
     // Ack input events to clear the state on the server. These can be received
     // during test startup. X11Window::DispatchEvent sends a synthetic move
     // event to notify of entry.
-    tree()->OnWindowInputEventAck(event_id, true);
+    tree()->OnWindowInputEventAck(event_id, mojom::EventResult::HANDLED);
     // Don't log input events as none of the tests care about them and they
     // may come in at random points.
   }
diff --git a/components/mus/ws/window_tree_unittest.cc b/components/mus/ws/window_tree_unittest.cc
index e89343b..f5bd3212 100644
--- a/components/mus/ws/window_tree_unittest.cc
+++ b/components/mus/ws/window_tree_unittest.cc
@@ -127,8 +127,10 @@
 
   void AckPreviousEvent() {
     WindowManagerStateTestApi test_api(display_->GetActiveWindowManagerState());
-    while (test_api.tree_awaiting_input_ack())
-      test_api.tree_awaiting_input_ack()->OnWindowInputEventAck(0, true);
+    while (test_api.tree_awaiting_input_ack()) {
+      test_api.tree_awaiting_input_ack()->OnWindowInputEventAck(
+          0, mojom::EventResult::HANDLED);
+    }
   }
 
   void DispatchEventAndAckImmediately(const ui::Event& event) {
diff --git a/components/ntp_snippets/ntp_snippets_fetcher.h b/components/ntp_snippets/ntp_snippets_fetcher.h
index 517198d..ae7fd6c9 100644
--- a/components/ntp_snippets/ntp_snippets_fetcher.h
+++ b/components/ntp_snippets/ntp_snippets_fetcher.h
@@ -10,6 +10,7 @@
 
 #include "base/callback.h"
 #include "base/callback_list.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/sequenced_task_runner.h"
 #include "net/url_request/url_fetcher_delegate.h"
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.cc b/components/page_load_metrics/browser/metrics_web_contents_observer.cc
index e1cc10d..c5705732 100644
--- a/components/page_load_metrics/browser/metrics_web_contents_observer.cc
+++ b/components/page_load_metrics/browser/metrics_web_contents_observer.cc
@@ -207,6 +207,7 @@
 PageLoadTracker::PageLoadTracker(
     bool in_foreground,
     PageLoadMetricsEmbedderInterface* embedder_interface,
+    PageLoadTracker* const currently_committed_load_or_null,
     content::NavigationHandle* navigation_handle,
     int aborted_chain_size,
     int aborted_chain_size_same_url)
@@ -220,8 +221,12 @@
       embedder_interface_(embedder_interface) {
   DCHECK(!navigation_handle->HasCommitted());
   embedder_interface_->RegisterObservers(this);
+  const GURL& currently_committed_url =
+      currently_committed_load_or_null
+          ? currently_committed_load_or_null->committed_url()
+          : GURL::EmptyGURL();
   for (const auto& observer : observers_) {
-    observer->OnStart(navigation_handle);
+    observer->OnStart(navigation_handle, currently_committed_url);
   }
 }
 
@@ -355,10 +360,6 @@
   return false;
 }
 
-bool PageLoadTracker::HasBackgrounded() {
-  return !started_in_foreground_ || !background_time_.is_null();
-}
-
 void PageLoadTracker::set_renderer_tracked(bool renderer_tracked) {
   renderer_tracked_ = renderer_tracked;
 }
@@ -521,12 +522,13 @@
   DCHECK_GT(2ul, provisional_loads_.size());
   // Passing raw pointers to observers_ and embedder_interface_ is safe because
   // the MetricsWebContentsObserver owns them both list and they are torn down
-  // after the PageLoadTracker.
-  provisional_loads_.insert(
-      std::make_pair(navigation_handle,
-                     make_scoped_ptr(new PageLoadTracker(
-                         in_foreground_, embedder_interface_.get(),
-                         navigation_handle, chain_size, chain_size_same_url))));
+  // after the PageLoadTracker. The PageLoadTracker does not hold on to
+  // committed_load_ or navigation_handle beyond the scope of the constructor.
+  provisional_loads_.insert(std::make_pair(
+      navigation_handle,
+      make_scoped_ptr(new PageLoadTracker(
+          in_foreground_, embedder_interface_.get(), committed_load_.get(),
+          navigation_handle, chain_size, chain_size_same_url))));
 }
 
 void MetricsWebContentsObserver::DidFinishNavigation(
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.h b/components/page_load_metrics/browser/metrics_web_contents_observer.h
index 14aec671..f18b126 100644
--- a/components/page_load_metrics/browser/metrics_web_contents_observer.h
+++ b/components/page_load_metrics/browser/metrics_web_contents_observer.h
@@ -106,9 +106,12 @@
 class PageLoadTracker {
  public:
   // Caller must guarantee that the embedder_interface pointer outlives this
-  // class.
+  // class. The PageLoadTracker must not hold on to
+  // currently_committed_load_or_null or navigation_handle beyond the scope of
+  // the constructor.
   PageLoadTracker(bool in_foreground,
                   PageLoadMetricsEmbedderInterface* embedder_interface,
+                  PageLoadTracker* const currently_committed_load_or_null,
                   content::NavigationHandle* navigation_handle,
                   int aborted_chain_size,
                   int aborted_chain_size_same_url);
@@ -122,7 +125,6 @@
   // Returns true if the timing was successfully updated.
   bool UpdateTiming(const PageLoadTiming& timing,
                     const PageLoadMetadata& metadata);
-  bool HasBackgrounded();
 
   void set_renderer_tracked(bool renderer_tracked);
   bool renderer_tracked() const { return renderer_tracked_; }
@@ -152,12 +154,15 @@
 
   bool MatchesOriginalNavigation(content::NavigationHandle* navigation_handle);
 
+  // Only valid to call post-commit.
+  const GURL& committed_url() const {
+    DCHECK(!commit_time_.is_null());
+    return url_;
+  }
+
  private:
   PageLoadExtraInfo GetPageLoadMetricsInfo();
 
-  // Only valid to call post-commit.
-  const GURL& committed_url();
-
   void UpdateAbortInternal(UserAbortType abort_type,
                            base::TimeTicks timestamp);
 
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc b/components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc
index a6a910ab..de1fc26 100644
--- a/components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc
+++ b/components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc
@@ -18,30 +18,39 @@
 #include "content/public/test/test_renderer_host.h"
 #include "content/public/test/web_contents_tester.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "url/gurl.h"
 
 namespace page_load_metrics {
 
 namespace {
 
-const char kDefaultTestUrl[] = "https://google.com";
-const char kDefaultTestUrlAnchor[] = "https://google.com#samepage";
-const char kDefaultTestUrl2[] = "https://whatever.com";
+const char kDefaultTestUrl[] = "https://google.com/";
+const char kDefaultTestUrlAnchor[] = "https://google.com/#samepage";
+const char kDefaultTestUrl2[] = "https://whatever.com/";
 
 // Simple PageLoadMetricsObserver that copies observed PageLoadTimings into the
 // provided std::vector, so they can be analyzed by unit tests.
 class TestPageLoadMetricsObserver : public PageLoadMetricsObserver {
  public:
   explicit TestPageLoadMetricsObserver(
-      std::vector<PageLoadTiming>* observed_timings)
-      : observed_timings_(observed_timings) {}
+      std::vector<PageLoadTiming>* observed_timings,
+      std::vector<GURL>* observed_committed_urls)
+      : observed_timings_(observed_timings),
+        observed_committed_urls_(observed_committed_urls) {}
+
+  void OnStart(content::NavigationHandle* navigation_handle,
+               const GURL& currently_committed_url) override {
+    observed_committed_urls_->push_back(currently_committed_url);
+  }
 
   void OnComplete(const PageLoadTiming& timing,
-                  const PageLoadExtraInfo&) override {
+                  const PageLoadExtraInfo& extra_info) override {
     observed_timings_->push_back(timing);
   }
 
  private:
   std::vector<PageLoadTiming>* const observed_timings_;
+  std::vector<GURL>* const observed_committed_urls_;
 };
 
 class TestPageLoadMetricsEmbedderInterface
@@ -56,15 +65,21 @@
     is_prerendering_ = is_prerendering;
   }
   void RegisterObservers(PageLoadTracker* tracker) override {
-    tracker->AddObserver(
-        make_scoped_ptr(new TestPageLoadMetricsObserver(&observed_timings_)));
+    tracker->AddObserver(make_scoped_ptr(new TestPageLoadMetricsObserver(
+        &observed_timings_, &observed_committed_urls_)));
   }
   const std::vector<PageLoadTiming>& observed_timings() const {
     return observed_timings_;
   }
 
+  // currently_committed_urls passed to OnStart().
+  const std::vector<GURL>& observed_committed_urls_from_on_start() const {
+    return observed_committed_urls_;
+  }
+
  private:
   std::vector<PageLoadTiming> observed_timings_;
+  std::vector<GURL> observed_committed_urls_;
   bool is_prerendering_;
 };
 
@@ -80,6 +95,18 @@
     AttachObserver();
   }
 
+  void SimulateTimingUpdate(const PageLoadTiming& timing) {
+    SimulateTimingUpdate(timing, web_contents()->GetMainFrame());
+  }
+
+  void SimulateTimingUpdate(const PageLoadTiming& timing,
+                            content::RenderFrameHost* render_frame_host) {
+    ASSERT_TRUE(observer_->OnMessageReceived(
+        PageLoadMetricsMsg_TimingUpdated(observer_->routing_id(), timing,
+                                         PageLoadMetadata()),
+        render_frame_host));
+  }
+
   void AttachObserver() {
     embedder_interface_ = new TestPageLoadMetricsEmbedderInterface();
     observer_.reset(new MetricsWebContentsObserver(
@@ -107,10 +134,26 @@
     }
   }
 
+  void AssertNonEmptyTimingsReported(size_t expected_non_empty_timings) {
+    ASSERT_GE(embedder_interface_->observed_timings().size(),
+              expected_non_empty_timings);
+    size_t actual_non_empty_timings = 0;
+    for (const auto& timing : embedder_interface_->observed_timings()) {
+      if (!timing.IsEmpty()) {
+        ++actual_non_empty_timings;
+      }
+    }
+    ASSERT_EQ(expected_non_empty_timings, actual_non_empty_timings);
+  }
+
   void AssertNoTimingReported() {
     ASSERT_TRUE(embedder_interface_->observed_timings().empty());
   }
 
+  const std::vector<GURL>& observed_committed_urls_from_on_start() const {
+    return embedder_interface_->observed_committed_urls_from_on_start();
+  }
+
  protected:
   base::HistogramTester histogram_tester_;
   TestPageLoadMetricsEmbedderInterface* embedder_interface_;
@@ -122,6 +165,31 @@
   DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserverTest);
 };
 
+TEST_F(MetricsWebContentsObserverTest, SuccessfulMainFrameNavigation) {
+  PageLoadTiming timing;
+  timing.navigation_start = base::Time::FromDoubleT(1);
+  timing.response_start = base::TimeDelta::FromMilliseconds(2);
+
+  content::WebContentsTester* web_contents_tester =
+      content::WebContentsTester::For(web_contents());
+
+  ASSERT_TRUE(observed_committed_urls_from_on_start().empty());
+  web_contents_tester->NavigateAndCommit(GURL(kDefaultTestUrl));
+  ASSERT_EQ(1u, observed_committed_urls_from_on_start().size());
+  ASSERT_TRUE(observed_committed_urls_from_on_start().at(0).is_empty());
+
+  SimulateTimingUpdate(timing);
+  AssertNoTimingReported();
+
+  web_contents_tester->NavigateAndCommit(GURL(kDefaultTestUrl2));
+  AssertNonEmptyTimingsReported(1);
+  ASSERT_EQ(2u, observed_committed_urls_from_on_start().size());
+  ASSERT_EQ(kDefaultTestUrl,
+            observed_committed_urls_from_on_start().at(1).spec());
+
+  CheckNoErrorEvents();
+}
+
 TEST_F(MetricsWebContentsObserverTest, NotInMainFrame) {
   PageLoadTiming timing;
   timing.navigation_start = base::Time::FromDoubleT(1);
@@ -138,10 +206,7 @@
       content::RenderFrameHostTester::For(subframe);
   subframe_tester->SimulateNavigationStart(GURL(kDefaultTestUrl2));
   subframe_tester->SimulateNavigationCommit(GURL(kDefaultTestUrl2));
-  observer_->OnMessageReceived(
-      PageLoadMetricsMsg_TimingUpdated(observer_->routing_id(), timing,
-                                       PageLoadMetadata()),
-      subframe);
+  SimulateTimingUpdate(timing, subframe);
   subframe_tester->SimulateNavigationStop();
 
   // Navigate again to see if the timing updated for a subframe message.
@@ -159,11 +224,7 @@
   content::WebContentsTester* web_contents_tester =
       content::WebContentsTester::For(web_contents());
   web_contents_tester->NavigateAndCommit(GURL(kDefaultTestUrl));
-
-  observer_->OnMessageReceived(
-      PageLoadMetricsMsg_TimingUpdated(observer_->routing_id(), timing,
-                                       PageLoadMetadata()),
-      web_contents()->GetMainFrame());
+  SimulateTimingUpdate(timing);
   web_contents_tester->NavigateAndCommit(GURL(kDefaultTestUrlAnchor));
   // A same page navigation shouldn't trigger logging UMA for the original.
   AssertNoNonEmptyTimingReported();
@@ -179,11 +240,7 @@
   embedder_interface_->set_is_prerendering(true);
 
   web_contents_tester->NavigateAndCommit(GURL(kDefaultTestUrl));
-  observer_->OnMessageReceived(
-      PageLoadMetricsMsg_TimingUpdated(observer_->routing_id(), timing,
-                                       PageLoadMetadata()),
-      web_contents()->GetMainFrame());
-
+  SimulateTimingUpdate(timing);
   web_contents_tester->NavigateAndCommit(GURL(kDefaultTestUrl2));
   AssertNoTimingReported();
   CheckErrorEvent(ERR_IPC_WITH_NO_RELEVANT_LOAD, 1);
@@ -199,12 +256,7 @@
 
   GURL about_blank_url = GURL("about:blank");
   web_contents_tester->NavigateAndCommit(about_blank_url);
-
-  observer_->OnMessageReceived(
-      PageLoadMetricsMsg_TimingUpdated(observer_->routing_id(), timing,
-                                       PageLoadMetadata()),
-      main_rfh());
-
+  SimulateTimingUpdate(timing);
   web_contents_tester->NavigateAndCommit(GURL(kDefaultTestUrl));
 
   CheckErrorEvent(ERR_IPC_FROM_BAD_URL_SCHEME, 1);
@@ -228,10 +280,7 @@
       content::RenderFrameHostTester::For(subframe);
   subframe_tester->SimulateNavigationStart(GURL(kDefaultTestUrl2));
   subframe_tester->SimulateNavigationCommit(GURL(kDefaultTestUrl2));
-  observer_->OnMessageReceived(
-      PageLoadMetricsMsg_TimingUpdated(observer_->routing_id(), timing,
-                                       PageLoadMetadata()),
-      subframe);
+  SimulateTimingUpdate(timing, subframe);
   CheckErrorEvent(ERR_IPC_FROM_WRONG_FRAME, 1);
   CheckTotalErrorEvents();
 }
@@ -246,14 +295,8 @@
       content::WebContentsTester::For(web_contents());
   web_contents_tester->NavigateAndCommit(GURL(kDefaultTestUrl));
 
-  observer_->OnMessageReceived(
-      PageLoadMetricsMsg_TimingUpdated(observer_->routing_id(), timing,
-                                       PageLoadMetadata()),
-      main_rfh());
-  observer_->OnMessageReceived(
-      PageLoadMetricsMsg_TimingUpdated(observer_->routing_id(), timing2,
-                                       PageLoadMetadata()),
-      main_rfh());
+  SimulateTimingUpdate(timing);
+  SimulateTimingUpdate(timing2);
 
   CheckErrorEvent(ERR_BAD_TIMING_IPC, 1);
   CheckTotalErrorEvents();
@@ -276,10 +319,8 @@
   AttachObserver();
   rfh_tester->SimulateNavigationCommit(GURL(kDefaultTestUrl));
 
-  observer_->OnMessageReceived(
-      PageLoadMetricsMsg_TimingUpdated(observer_->routing_id(), timing,
-                                       PageLoadMetadata()),
-      main_rfh());
+  SimulateTimingUpdate(timing);
+
   // Navigate again to force histogram logging.
   web_contents_tester->NavigateAndCommit(GURL(kDefaultTestUrl2));
   AssertNoTimingReported();
diff --git a/components/page_load_metrics/browser/page_load_metrics_observer.cc b/components/page_load_metrics/browser/page_load_metrics_observer.cc
index b340d60..68de4d4 100644
--- a/components/page_load_metrics/browser/page_load_metrics_observer.cc
+++ b/components/page_load_metrics/browser/page_load_metrics_observer.cc
@@ -23,4 +23,6 @@
       time_to_abort(time_to_abort),
       metadata(metadata) {}
 
+PageLoadExtraInfo::PageLoadExtraInfo(const PageLoadExtraInfo& other) = default;
+
 }  // namespace page_load_metrics
diff --git a/components/page_load_metrics/browser/page_load_metrics_observer.h b/components/page_load_metrics/browser/page_load_metrics_observer.h
index 659eaa5..23abda5 100644
--- a/components/page_load_metrics/browser/page_load_metrics_observer.h
+++ b/components/page_load_metrics/browser/page_load_metrics_observer.h
@@ -59,6 +59,7 @@
                     UserAbortType abort_type,
                     base::TimeDelta time_to_abort,
                     const PageLoadMetadata& metadata);
+  PageLoadExtraInfo(const PageLoadExtraInfo& other);
 
   // The first time that the page was backgrounded since the navigation started.
   // If the page has not been backgrounded this will be base::TimeDelta().
@@ -97,8 +98,16 @@
  public:
   virtual ~PageLoadMetricsObserver() {}
 
-  // The page load started, with the given navigation handle.
-  virtual void OnStart(content::NavigationHandle* navigation_handle) {}
+  // The page load started, with the given navigation handle. Note that OnStart
+  // is called for same-page navigations. Implementers of OnStart that only want
+  // to process non-same-page navigations should also check to see that the page
+  // load committed via OnCommit or committed_url in
+  // PageLoadExtraInfo. currently_committed_url contains the URL of the
+  // committed page load at the time the navigation for navigation_handle was
+  // initiated, or the empty URL if there was no committed page load at the time
+  // the navigation was initiated.
+  virtual void OnStart(content::NavigationHandle* navigation_handle,
+                       const GURL& currently_committed_url) {}
 
   // OnRedirect is triggered when a page load redirects to another URL.
   // The navigation handle holds relevant data for the navigation, but will
diff --git a/components/policy/core/common/cloud/device_management_service.h b/components/policy/core/common/cloud/device_management_service.h
index fa5dfbcd..b4986fa 100644
--- a/components/policy/core/common/cloud/device_management_service.h
+++ b/components/policy/core/common/cloud/device_management_service.h
@@ -16,6 +16,7 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string_split.h"
 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
diff --git a/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl.h b/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl.h
index 3c26db07..17c19bd 100644
--- a/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl.h
+++ b/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl.h
@@ -7,6 +7,7 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h"
 #include "google_apis/gaia/oauth2_token_service.h"
 
diff --git a/components/quirks/quirks_client.h b/components/quirks/quirks_client.h
index d0a71fb..5219a5c 100644
--- a/components/quirks/quirks_client.h
+++ b/components/quirks/quirks_client.h
@@ -7,6 +7,7 @@
 
 #include "base/files/file_path.h"
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/timer/timer.h"
 #include "net/base/backoff_entry.h"
diff --git a/components/signin/core/browser/account_fetcher_service.h b/components/signin/core/browser/account_fetcher_service.h
index 6cbb0808..cde20c3 100644
--- a/components/signin/core/browser/account_fetcher_service.h
+++ b/components/signin/core/browser/account_fetcher_service.h
@@ -9,6 +9,7 @@
 
 #include "base/containers/scoped_ptr_hash_map.h"
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "base/timer/timer.h"
 #include "components/keyed_service/core/keyed_service.h"
diff --git a/components/signin/core/browser/account_info_fetcher.h b/components/signin/core/browser/account_info_fetcher.h
index b47a976..ba2375b 100644
--- a/components/signin/core/browser/account_info_fetcher.h
+++ b/components/signin/core/browser/account_info_fetcher.h
@@ -6,6 +6,7 @@
 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_INFO_FETCHER_H_
 
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "google_apis/gaia/gaia_auth_consumer.h"
 #include "google_apis/gaia/gaia_oauth_client.h"
 #include "google_apis/gaia/oauth2_token_service.h"
diff --git a/components/signin/core/browser/child_account_info_fetcher_impl.h b/components/signin/core/browser/child_account_info_fetcher_impl.h
index 33ceae4..3332c24a 100644
--- a/components/signin/core/browser/child_account_info_fetcher_impl.h
+++ b/components/signin/core/browser/child_account_info_fetcher_impl.h
@@ -6,6 +6,7 @@
 #define COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_IMPL_H_
 
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/timer/timer.h"
 #include "components/invalidation/public/invalidation_handler.h"
diff --git a/components/sync_driver/device_info_service.cc b/components/sync_driver/device_info_service.cc
index 8318e5d2..3453104 100644
--- a/components/sync_driver/device_info_service.cc
+++ b/components/sync_driver/device_info_service.cc
@@ -10,6 +10,7 @@
 
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/strings/string_util.h"
 #include "sync/api/entity_change.h"
 #include "sync/api/metadata_batch.h"
 #include "sync/api/sync_error.h"
@@ -40,6 +41,12 @@
 using Result = ModelTypeStore::Result;
 using WriteBatch = ModelTypeStore::WriteBatch;
 
+namespace {
+
+const char kClientTagPrefix[] = "DeviceInfo_";
+
+}  // namespace
+
 DeviceInfoService::DeviceInfoService(
     sync_driver::LocalDeviceInfoProvider* local_device_info_provider,
     const StoreFactoryFunction& callback,
@@ -85,36 +92,37 @@
   // data is blown away. However, this simplification is being ignored here and
   // a full difference is going to be calculated to explore what other service
   // implementations may look like.
-  std::set<std::string> local_tags_to_put;
+  std::set<std::string> local_guids_to_put;
   for (const auto& kv : all_data_) {
-    local_tags_to_put.insert(kv.first);
+    local_guids_to_put.insert(kv.first);
   }
 
   bool has_changes = false;
   const DeviceInfo* local_info =
       local_device_info_provider_->GetLocalDeviceInfo();
-  std::string local_tag = local_info->guid();
+  std::string local_guid = local_info->guid();
   scoped_ptr<WriteBatch> batch = store_->CreateWriteBatch();
   for (const auto& kv : entity_data_map) {
-    const std::string tag = GetClientTag(kv.second.value());
     const DeviceInfoSpecifics& specifics =
         kv.second.value().specifics.device_info();
-    if (tag == local_tag) {
+    DCHECK_EQ(kv.first, SpecificsToTag(specifics));
+    if (specifics.cache_guid() == local_guid) {
       // Don't Put local data if it's the same as the remote copy.
       if (local_info->Equals(*CopyToModel(specifics))) {
-        local_tags_to_put.erase(tag);
+        local_guids_to_put.erase(local_guid);
       }
     } else {
       // Remote data wins conflicts.
-      local_tags_to_put.erase(tag);
+      local_guids_to_put.erase(specifics.cache_guid());
       has_changes = true;
       StoreSpecifics(make_scoped_ptr(new DeviceInfoSpecifics(specifics)),
                      batch.get());
     }
   }
 
-  for (const std::string& tag : local_tags_to_put) {
-    change_processor()->Put(tag, CopyToEntityData(*all_data_[tag]),
+  for (const std::string& guid : local_guids_to_put) {
+    change_processor()->Put(SpecificsToTag(*all_data_[guid]),
+                            CopyToEntityData(*all_data_[guid]),
                             metadata_change_list.get());
   }
 
@@ -136,19 +144,19 @@
   scoped_ptr<WriteBatch> batch = store_->CreateWriteBatch();
   bool has_changes = false;
   for (EntityChange& change : entity_changes) {
-    const std::string tag = change.client_tag();
+    const std::string guid = TagToCacheGuid(change.client_tag());
     // Each device is the authoritative source for itself, ignore any remote
     // changes that have our local cache guid.
-    if (tag == local_device_info_provider_->GetLocalDeviceInfo()->guid()) {
+    if (guid == local_device_info_provider_->GetLocalDeviceInfo()->guid()) {
       continue;
     }
 
     if (change.type() == EntityChange::ACTION_DELETE) {
-      has_changes |= DeleteSpecifics(tag, batch.get());
+      has_changes |= DeleteSpecifics(guid, batch.get());
     } else {
       const DeviceInfoSpecifics& specifics =
           change.data().specifics.device_info();
-      DCHECK(tag == specifics.cache_guid());
+      DCHECK(guid == specifics.cache_guid());
       StoreSpecifics(make_scoped_ptr(new DeviceInfoSpecifics(specifics)),
                      batch.get());
       has_changes = true;
@@ -173,8 +181,9 @@
 
   scoped_ptr<DataBatchImpl> batch(new DataBatchImpl());
   for (const auto& tag : client_tags) {
-    const auto iter = all_data_.find(tag);
+    const auto& iter = all_data_.find(TagToCacheGuid(tag));
     if (iter != all_data_.end()) {
+      DCHECK_EQ(tag, SpecificsToTag(*iter->second));
       batch->Put(tag, CopyToEntityData(*iter->second));
     }
   }
@@ -193,14 +202,14 @@
 
   scoped_ptr<DataBatchImpl> batch(new DataBatchImpl());
   for (const auto& kv : all_data_) {
-    batch->Put(kv.first, CopyToEntityData(*kv.second));
+    batch->Put(SpecificsToTag(*kv.second), CopyToEntityData(*kv.second));
   }
   callback.Run(syncer::SyncError(), std::move(batch));
 }
 
 std::string DeviceInfoService::GetClientTag(const EntityData& entity_data) {
   DCHECK(entity_data.specifics.has_device_info());
-  return entity_data.specifics.device_info().cache_guid();
+  return SpecificsToTag(entity_data.specifics.device_info());
 }
 
 void DeviceInfoService::OnChangeProcessorSet() {
@@ -258,6 +267,16 @@
   FOR_EACH_OBSERVER(Observer, observers_, OnDeviceInfoChange());
 }
 
+std::string DeviceInfoService::SpecificsToTag(
+    const sync_pb::DeviceInfoSpecifics& specifics) {
+  return kClientTagPrefix + specifics.cache_guid();
+}
+
+std::string DeviceInfoService::TagToCacheGuid(const std::string& tag) {
+  DCHECK(base::StartsWith(tag, kClientTagPrefix, base::CompareCase::SENSITIVE));
+  return tag.substr(strlen(kClientTagPrefix));
+}
+
 // TODO(skym): crbug.com/543406: It might not make sense for this to be a
 // scoped_ptr.
 // Static.
@@ -288,26 +307,27 @@
     const DeviceInfoSpecifics& specifics) {
   scoped_ptr<EntityData> entity_data(new EntityData());
   *entity_data->specifics.mutable_device_info() = specifics;
+  entity_data->non_unique_name = specifics.client_name();
   return entity_data;
 }
 
 void DeviceInfoService::StoreSpecifics(
     scoped_ptr<DeviceInfoSpecifics> specifics,
     WriteBatch* batch) {
-  const std::string tag = specifics->cache_guid();
+  const std::string guid = specifics->cache_guid();
   DVLOG(1) << "Storing DEVICE_INFO for " << specifics->client_name()
-           << " with ID " << tag;
-  store_->WriteData(batch, tag, specifics->SerializeAsString());
-  all_data_[tag] = std::move(specifics);
+           << " with ID " << guid;
+  store_->WriteData(batch, guid, specifics->SerializeAsString());
+  all_data_[guid] = std::move(specifics);
 }
 
-bool DeviceInfoService::DeleteSpecifics(const std::string& tag,
+bool DeviceInfoService::DeleteSpecifics(const std::string& guid,
                                         WriteBatch* batch) {
-  ClientIdToSpecifics::const_iterator iter = all_data_.find(tag);
+  ClientIdToSpecifics::const_iterator iter = all_data_.find(guid);
   if (iter != all_data_.end()) {
     DVLOG(1) << "Deleting DEVICE_INFO for " << iter->second->client_name()
-             << " with ID " << tag;
-    store_->DeleteData(batch, tag);
+             << " with ID " << guid;
+    store_->DeleteData(batch, guid);
     all_data_.erase(iter);
     return true;
   } else {
@@ -346,7 +366,7 @@
     scoped_ptr<DeviceInfoSpecifics> specifics(
         make_scoped_ptr(new DeviceInfoSpecifics()));
     if (specifics->ParseFromString(r.value)) {
-      all_data_[r.id] = std::move(specifics);
+      all_data_[specifics->cache_guid()] = std::move(specifics);
     } else {
       LOG(WARNING) << "Failed to deserialize specifics.";
       // TODO(skym, crbug.com/582460): Handle unrecoverable initialization
@@ -449,7 +469,8 @@
 
   scoped_ptr<MetadataChangeList> metadata_change_list =
       CreateMetadataChangeList();
-  change_processor()->Put(device_info.guid(), CopyToEntityData(*specifics),
+  change_processor()->Put(SpecificsToTag(*specifics),
+                          CopyToEntityData(*specifics),
                           metadata_change_list.get());
 
   scoped_ptr<WriteBatch> batch = store_->CreateWriteBatch();
diff --git a/components/sync_driver/device_info_service.h b/components/sync_driver/device_info_service.h
index cbd0abf..59ea378f 100644
--- a/components/sync_driver/device_info_service.h
+++ b/components/sync_driver/device_info_service.h
@@ -76,6 +76,13 @@
  private:
   friend class DeviceInfoServiceTest;
 
+  // Formats ClientTag form DeviceInfoSpecifics.
+  static std::string SpecificsToTag(
+      const sync_pb::DeviceInfoSpecifics& specifics);
+
+  // Extracts cache_guid from ClientTag.
+  static std::string TagToCacheGuid(const std::string& tag);
+
   static scoped_ptr<sync_pb::DeviceInfoSpecifics> CopyToSpecifics(
       const sync_driver::DeviceInfo& info);
 
diff --git a/components/sync_driver/device_info_service_unittest.cc b/components/sync_driver/device_info_service_unittest.cc
index c41c320..81039c0 100644
--- a/components/sync_driver/device_info_service_unittest.cc
+++ b/components/sync_driver/device_info_service_unittest.cc
@@ -113,6 +113,10 @@
   return data.PassToPtr();
 }
 
+std::string CacheGuidToTag(const std::string& guid) {
+  return "DeviceInfo_" + guid;
+}
+
 // Instead of actually processing anything, simply accumulates all instructions
 // in members that can then be accessed. TODO(skym): If this ends up being
 // useful for other model type unittests it should be moved out to a shared
@@ -363,7 +367,7 @@
   entity_specifics.mutable_device_info()->set_cache_guid(guid);
   EntityData entity_data;
   entity_data.specifics = entity_specifics;
-  EXPECT_EQ(guid, service()->GetClientTag(entity_data));
+  EXPECT_EQ(CacheGuidToTag(guid), service()->GetClientTag(entity_data));
 }
 
 TEST_F(DeviceInfoServiceTest, GetClientTagEmpty) {
@@ -372,13 +376,14 @@
   entity_specifics.mutable_device_info();
   EntityData entity_data;
   entity_data.specifics = entity_specifics;
-  EXPECT_EQ("", service()->GetClientTag(entity_data));
+  EXPECT_EQ(CacheGuidToTag(""), service()->GetClientTag(entity_data));
 }
 
 TEST_F(DeviceInfoServiceTest, TestWithLocalData) {
   scoped_ptr<WriteBatch> batch = store()->CreateWriteBatch();
   DeviceInfoSpecifics specifics(GenerateTestSpecifics());
-  store()->WriteData(batch.get(), "tag", specifics.SerializeAsString());
+  store()->WriteData(batch.get(), specifics.cache_guid(),
+                     specifics.SerializeAsString());
   store()->CommitWriteBatch(std::move(batch),
                             base::Bind(&AssertResultIsSuccess));
 
@@ -387,7 +392,8 @@
   ScopedVector<DeviceInfo> all_device_info(service()->GetAllDeviceInfo());
   ASSERT_EQ(1u, all_device_info.size());
   AssertEqual(specifics, *all_device_info[0]);
-  AssertEqual(specifics, *service()->GetDeviceInfo("tag").get());
+  AssertEqual(specifics,
+              *service()->GetDeviceInfo(specifics.cache_guid()).get());
 }
 
 TEST_F(DeviceInfoServiceTest, TestWithLocalMetadata) {
@@ -408,7 +414,8 @@
 TEST_F(DeviceInfoServiceTest, TestWithLocalDataAndMetadata) {
   scoped_ptr<WriteBatch> batch = store()->CreateWriteBatch();
   DeviceInfoSpecifics specifics(GenerateTestSpecifics());
-  store()->WriteData(batch.get(), "tag", specifics.SerializeAsString());
+  store()->WriteData(batch.get(), specifics.cache_guid(),
+                     specifics.SerializeAsString());
   DataTypeState state;
   state.set_encryption_key_name("ekn");
   store()->WriteGlobalMetadata(batch.get(), state.SerializeAsString());
@@ -419,7 +426,8 @@
 
   ScopedVector<DeviceInfo> all_device_info(service()->GetAllDeviceInfo());
   ASSERT_EQ(2u, all_device_info.size());
-  AssertEqual(specifics, *service()->GetDeviceInfo("tag").get());
+  AssertEqual(specifics,
+              *service()->GetDeviceInfo(specifics.cache_guid()).get());
   ASSERT_TRUE(processor()->metadata());
   ASSERT_EQ(state.encryption_key_name(),
             processor()->metadata()->GetDataTypeState().encryption_key_name());
@@ -428,22 +436,25 @@
 TEST_F(DeviceInfoServiceTest, GetData) {
   scoped_ptr<WriteBatch> batch = store()->CreateWriteBatch();
   DeviceInfoSpecifics specifics1(GenerateTestSpecifics());
+  DeviceInfoSpecifics specifics2(GenerateTestSpecifics());
   DeviceInfoSpecifics specifics3(GenerateTestSpecifics());
-  store()->WriteData(batch.get(), "tag1", specifics1.SerializeAsString());
-  store()->WriteData(batch.get(), "tag2",
-                     GenerateTestSpecifics().SerializeAsString());
-  store()->WriteData(batch.get(), "tag3", specifics3.SerializeAsString());
+  store()->WriteData(batch.get(), specifics1.cache_guid(),
+                     specifics1.SerializeAsString());
+  store()->WriteData(batch.get(), specifics2.cache_guid(),
+                     specifics2.SerializeAsString());
+  store()->WriteData(batch.get(), specifics3.cache_guid(),
+                     specifics3.SerializeAsString());
   store()->CommitWriteBatch(std::move(batch),
                             base::Bind(&AssertResultIsSuccess));
 
   InitializeAndPump();
 
   std::map<std::string, DeviceInfoSpecifics> expected;
-  expected["tag1"] = specifics1;
-  expected["tag3"] = specifics3;
+  expected[CacheGuidToTag(specifics1.cache_guid())] = specifics1;
+  expected[CacheGuidToTag(specifics3.cache_guid())] = specifics3;
   ClientTagList client_tags;
-  client_tags.push_back("tag1");
-  client_tags.push_back("tag3");
+  client_tags.push_back(CacheGuidToTag(specifics1.cache_guid()));
+  client_tags.push_back(CacheGuidToTag(specifics3.cache_guid()));
   service()->GetData(client_tags,
                      base::Bind(&AssertExpectedFromDataBatch, expected));
 }
@@ -452,7 +463,7 @@
   InitializeAndPump();
   std::map<std::string, DeviceInfoSpecifics> expected;
   ClientTagList client_tags;
-  client_tags.push_back("tag1");
+  client_tags.push_back(CacheGuidToTag("tag1"));
   service()->GetData(client_tags,
                      base::Bind(&AssertExpectedFromDataBatch, expected));
 }
@@ -467,19 +478,23 @@
   scoped_ptr<WriteBatch> batch = store()->CreateWriteBatch();
   DeviceInfoSpecifics specifics1(GenerateTestSpecifics());
   DeviceInfoSpecifics specifics2(GenerateTestSpecifics());
-  store()->WriteData(batch.get(), "tag1", specifics1.SerializeAsString());
-  store()->WriteData(batch.get(), "tag2", specifics2.SerializeAsString());
+  const std::string& tag1 = CacheGuidToTag(specifics1.cache_guid());
+  const std::string& tag2 = CacheGuidToTag(specifics2.cache_guid());
+  store()->WriteData(batch.get(), specifics1.cache_guid(),
+                     specifics1.SerializeAsString());
+  store()->WriteData(batch.get(), specifics2.cache_guid(),
+                     specifics2.SerializeAsString());
   store()->CommitWriteBatch(std::move(batch),
                             base::Bind(&AssertResultIsSuccess));
 
   InitializeAndPump();
 
   std::map<std::string, DeviceInfoSpecifics> expected;
-  expected["tag1"] = specifics1;
-  expected["tag2"] = specifics2;
+  expected[tag1] = specifics1;
+  expected[tag2] = specifics2;
   ClientTagList client_tags;
-  client_tags.push_back("tag1");
-  client_tags.push_back("tag2");
+  client_tags.push_back(tag1);
+  client_tags.push_back(tag2);
   service()->GetData(client_tags,
                      base::Bind(&AssertExpectedFromDataBatch, expected));
 }
@@ -515,7 +530,8 @@
       service()->CreateMetadataChangeList(), add_changes);
 
   EXPECT_FALSE(error.IsSet());
-  scoped_ptr<DeviceInfo> info = service()->GetDeviceInfo(tag);
+  scoped_ptr<DeviceInfo> info =
+      service()->GetDeviceInfo(specifics.cache_guid());
   ASSERT_TRUE(info);
   AssertEqual(specifics, *info.get());
   EXPECT_EQ(1, change_count());
@@ -526,7 +542,7 @@
                                       delete_changes);
 
   EXPECT_FALSE(error.IsSet());
-  EXPECT_FALSE(service()->GetDeviceInfo(tag));
+  EXPECT_FALSE(service()->GetDeviceInfo(specifics.cache_guid()));
   EXPECT_EQ(2, change_count());
 }
 
@@ -550,7 +566,8 @@
   PumpAndShutdown();
   InitializeAndPump();
 
-  scoped_ptr<DeviceInfo> info = service()->GetDeviceInfo(tag);
+  scoped_ptr<DeviceInfo> info =
+      service()->GetDeviceInfo(specifics.cache_guid());
   ASSERT_TRUE(info);
   AssertEqual(specifics, *info.get());
   // TODO(skym): Uncomment once SimpleMetadataChangeList::TransferChanges is
@@ -572,7 +589,8 @@
   const std::string tag = PushBackEntityChangeAdd(specifics, &change_list);
 
   // Should have a single change from reconciliation.
-  EXPECT_TRUE(service()->GetDeviceInfo(tag));
+  EXPECT_TRUE(
+      service()->GetDeviceInfo(local_device()->GetLocalDeviceInfo()->guid()));
   EXPECT_EQ(1, change_count());
 
   EXPECT_FALSE(
@@ -594,7 +612,7 @@
   InitializeAndPumpAndStart();
   EXPECT_EQ(1, change_count());
   EntityChangeList delete_changes;
-  delete_changes.push_back(EntityChange::CreateDelete("tag"));
+  delete_changes.push_back(EntityChange::CreateDelete(CacheGuidToTag("tag")));
   const SyncError error = service()->ApplySyncChanges(
       service()->CreateMetadataChangeList(), delete_changes);
   EXPECT_FALSE(error.IsSet());
@@ -638,9 +656,10 @@
   EXPECT_EQ(1, change_count());
 
   EntityDataMap remote_input;
-  remote_input[conflict_remote.cache_guid()] =
+  remote_input[CacheGuidToTag(conflict_remote.cache_guid())] =
       SpecificsToEntity(conflict_remote);
-  remote_input[unique_remote.cache_guid()] = SpecificsToEntity(unique_remote);
+  remote_input[CacheGuidToTag(unique_remote.cache_guid())] =
+      SpecificsToEntity(unique_remote);
 
   DataTypeState state;
   state.set_encryption_key_name("ekn");
@@ -662,7 +681,7 @@
   // Service should have told the processor about the existance of unique_local.
   EXPECT_TRUE(processor()->delete_set().empty());
   EXPECT_EQ(2u, processor()->put_map().size());
-  const auto& it = processor()->put_map().find("unique_local");
+  const auto& it = processor()->put_map().find(CacheGuidToTag("unique_local"));
   ASSERT_NE(processor()->put_map().end(), it);
   AssertEqual(unique_local, it->second->specifics.device_info());
 
@@ -676,17 +695,17 @@
   const DeviceInfo* local_device_info = local_device()->GetLocalDeviceInfo();
   scoped_ptr<DeviceInfoSpecifics> specifics(
       CopyToSpecifics(*local_device_info));
-  const std::string tag = local_device_info->guid();
+  const std::string guid = local_device_info->guid();
 
   scoped_ptr<WriteBatch> batch = store()->CreateWriteBatch();
-  store()->WriteData(batch.get(), tag, specifics->SerializeAsString());
+  store()->WriteData(batch.get(), guid, specifics->SerializeAsString());
   store()->CommitWriteBatch(std::move(batch),
                             base::Bind(&AssertResultIsSuccess));
 
   InitializeAndPumpAndStart();
 
   EntityDataMap remote_input;
-  remote_input[tag] = SpecificsToEntity(*specifics);
+  remote_input[CacheGuidToTag(guid)] = SpecificsToEntity(*specifics);
 
   const SyncError error = service()->MergeSyncData(
       service()->CreateMetadataChangeList(), remote_input);
diff --git a/components/sync_driver/generic_change_processor.h b/components/sync_driver/generic_change_processor.h
index 7586d32b..29e7edd 100644
--- a/components/sync_driver/generic_change_processor.h
+++ b/components/sync_driver/generic_change_processor.h
@@ -12,6 +12,7 @@
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "components/sync_driver/change_processor.h"
diff --git a/components/sync_driver/glue/sync_backend_registrar.h b/components/sync_driver/glue/sync_backend_registrar.h
index e5c64f71..d59b0598 100644
--- a/components/sync_driver/glue/sync_backend_registrar.h
+++ b/components/sync_driver/glue/sync_backend_registrar.h
@@ -14,6 +14,7 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/thread.h"
 #include "sync/internal_api/public/base/model_type.h"
diff --git a/components/update_client/persisted_data.cc b/components/update_client/persisted_data.cc
index 0894dba..673ba1e6 100644
--- a/components/update_client/persisted_data.cc
+++ b/components/update_client/persisted_data.cc
@@ -7,7 +7,9 @@
 #include <string>
 #include <vector>
 
+#include "base/guid.h"
 #include "base/macros.h"
+#include "base/strings/stringprintf.h"
 #include "base/threading/thread_checker.h"
 #include "base/values.h"
 #include "components/prefs/pref_registry_simple.h"
@@ -35,13 +37,28 @@
       pref_service_->GetDictionary(kPersistedDataPreference);
   // We assume ids do not contain '.' characters.
   DCHECK_EQ(std::string::npos, id.find('.'));
-  if (!dict->GetInteger("apps." + id + ".dlrc", &dlrc))
+  if (!dict->GetInteger(base::StringPrintf("apps.%s.dlrc", id.c_str()), &dlrc))
     return kDateLastRollCallUnknown;
   return dlrc;
 }
 
+std::string PersistedData::GetPingFreshness(const std::string& id) const {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  if (!pref_service_)
+    return std::string();
+  std::string freshness;
+  const base::DictionaryValue* dict =
+      pref_service_->GetDictionary(kPersistedDataPreference);
+  // We assume ids do not contain '.' characters.
+  DCHECK_EQ(std::string::npos, id.find('.'));
+  if (!dict->GetString(base::StringPrintf("apps.%s.pf", id.c_str()),
+                       &freshness))
+    return std::string();
+  return base::StringPrintf("{%s}", freshness.c_str());
+}
+
 void PersistedData::SetDateLastRollCall(const std::vector<std::string>& ids,
-                                        int datenum) const {
+                                        int datenum) {
   DCHECK(thread_checker_.CalledOnValidThread());
   if (!pref_service_ || datenum < 0)
     return;
@@ -49,7 +66,9 @@
   for (auto id : ids) {
     // We assume ids do not contain '.' characters.
     DCHECK_EQ(std::string::npos, id.find('.'));
-    update->SetInteger("apps." + id + ".dlrc", datenum);
+    update->SetInteger(base::StringPrintf("apps.%s.dlrc", id.c_str()), datenum);
+    update->SetString(base::StringPrintf("apps.%s.pf", id.c_str()),
+                      base::GenerateGUID());
   }
 }
 
diff --git a/components/update_client/persisted_data.h b/components/update_client/persisted_data.h
index d4673b4..6b24e57 100644
--- a/components/update_client/persisted_data.h
+++ b/components/update_client/persisted_data.h
@@ -38,12 +38,16 @@
   // -2 indicates that there is no recorded date number for the |id|.
   int GetDateLastRollCall(const std::string& id) const;
 
+  // Returns the PingFreshness (a random token that is written into the profile
+  // data whenever the DateLastRollCall it is modified) for the specified |id|.
+  // "" indicates that there is no recorded freshness value for the |id|.
+  std::string GetPingFreshness(const std::string& id) const;
+
   // Records the DateLastRollCall for the specified |ids|. |datenum| must be a
   // non-negative integer: calls with a negative |datenum| are simply ignored.
   // Calls to SetDateLastRollCall that occur prior to the persisted data store
-  // has been fully initialized are ignored.
-  void SetDateLastRollCall(const std::vector<std::string>& ids,
-                           int datenum) const;
+  // has been fully initialized are ignored. Also sets the PingFreshness.
+  void SetDateLastRollCall(const std::vector<std::string>& ids, int datenum);
 
   // This is called only via update_client's RegisterUpdateClientPreferences.
   static void RegisterPrefs(PrefRegistrySimple* registry);
diff --git a/components/update_client/persisted_data_unittest.cc b/components/update_client/persisted_data_unittest.cc
index d89060f..dfe242c2 100644
--- a/components/update_client/persisted_data_unittest.cc
+++ b/components/update_client/persisted_data_unittest.cc
@@ -22,9 +22,15 @@
   metadata->SetDateLastRollCall(items, 3383);
   EXPECT_EQ(3383, metadata->GetDateLastRollCall("someappid"));
   EXPECT_EQ(-2, metadata->GetDateLastRollCall("someotherappid"));
+  const std::string pf1 = metadata->GetPingFreshness("someappid");
+  EXPECT_FALSE(pf1.empty());
   metadata->SetDateLastRollCall(items, 3386);
   EXPECT_EQ(3386, metadata->GetDateLastRollCall("someappid"));
   EXPECT_EQ(-2, metadata->GetDateLastRollCall("someotherappid"));
+  const std::string pf2 = metadata->GetPingFreshness("someappid");
+  EXPECT_FALSE(pf2.empty());
+  // The following has a 1 / 2^128 chance of being flaky.
+  EXPECT_NE(pf1, pf2);
 }
 
 TEST(PersistedDataTest, SharedPref) {
diff --git a/components/update_client/update_checker.cc b/components/update_client/update_checker.cc
index ec88892..7f40a0c 100644
--- a/components/update_client/update_checker.cc
+++ b/components/update_client/update_checker.cc
@@ -64,7 +64,7 @@
 //    </app>
 std::string BuildUpdateCheckRequest(const Configurator& config,
                                     const std::vector<CrxUpdateItem*>& items,
-                                    const PersistedData& metadata,
+                                    PersistedData* metadata,
                                     const std::string& additional_attributes) {
   const std::string brand(SanitizeBrand(config.GetBrand()));
   std::string app_elements;
@@ -82,8 +82,9 @@
       base::StringAppendF(&app, " ap=\"%s\"", ap.c_str());
     base::StringAppendF(&app, ">");
     base::StringAppendF(&app, "<updatecheck />");
-    base::StringAppendF(&app, "<ping rd=\"%d\" />",
-                        metadata.GetDateLastRollCall(item->id));
+    base::StringAppendF(&app, "<ping rd=\"%d\" ping_freshness=\"%s\" />",
+                        metadata->GetDateLastRollCall(item->id),
+                        metadata->GetPingFreshness(item->id).c_str());
     if (!item->component.fingerprint.empty()) {
       base::StringAppendF(&app,
                           "<packages>"
@@ -105,7 +106,7 @@
 class UpdateCheckerImpl : public UpdateChecker {
  public:
   UpdateCheckerImpl(const scoped_refptr<Configurator>& config,
-                    const PersistedData& metadata);
+                    PersistedData* metadata);
   ~UpdateCheckerImpl() override;
 
   // Overrides for UpdateChecker.
@@ -122,7 +123,7 @@
   base::ThreadChecker thread_checker_;
 
   const scoped_refptr<Configurator> config_;
-  const PersistedData& metadata_;
+  PersistedData* metadata_;
   UpdateCheckCallback update_check_callback_;
   scoped_ptr<RequestSender> request_sender_;
 
@@ -130,7 +131,7 @@
 };
 
 UpdateCheckerImpl::UpdateCheckerImpl(const scoped_refptr<Configurator>& config,
-                                     const PersistedData& metadata)
+                                     PersistedData* metadata)
     : config_(config), metadata_(metadata) {}
 
 UpdateCheckerImpl::~UpdateCheckerImpl() {
@@ -180,7 +181,7 @@
     if (update_response.Parse(response)) {
       int daynum = update_response.results().daystart_elapsed_days;
       if (daynum != UpdateResponse::kNoDaystart)
-        metadata_.SetDateLastRollCall(*ids_checked, daynum);
+        metadata_->SetDateLastRollCall(*ids_checked, daynum);
       base::ThreadTaskRunnerHandle::Get()->PostTask(
           FROM_HERE, base::Bind(update_check_callback_, error,
                                 update_response.results(), retry_after_sec));
@@ -200,7 +201,7 @@
 
 scoped_ptr<UpdateChecker> UpdateChecker::Create(
     const scoped_refptr<Configurator>& config,
-    const PersistedData& persistent) {
+    PersistedData* persistent) {
   return scoped_ptr<UpdateChecker>(new UpdateCheckerImpl(config, persistent));
 }
 
diff --git a/components/update_client/update_checker.h b/components/update_client/update_checker.h
index 94b88d6..2af7e7a0 100644
--- a/components/update_client/update_checker.h
+++ b/components/update_client/update_checker.h
@@ -32,7 +32,7 @@
 
   using Factory =
       scoped_ptr<UpdateChecker> (*)(const scoped_refptr<Configurator>& config,
-                                    const PersistedData& persistent);
+                                    PersistedData* persistent);
 
   virtual ~UpdateChecker() {}
 
@@ -46,7 +46,7 @@
 
   static scoped_ptr<UpdateChecker> Create(
       const scoped_refptr<Configurator>& config,
-      const PersistedData& persistent);
+      PersistedData* persistent);
 
  protected:
   UpdateChecker() {}
diff --git a/components/update_client/update_checker_unittest.cc b/components/update_client/update_checker_unittest.cc
index b866643..7fd0972 100644
--- a/components/update_client/update_checker_unittest.cc
+++ b/components/update_client/update_checker_unittest.cc
@@ -165,7 +165,7 @@
   EXPECT_TRUE(post_interceptor_->ExpectRequest(
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
 
-  update_checker_ = UpdateChecker::Create(config_, *metadata_);
+  update_checker_ = UpdateChecker::Create(config_, metadata_.get());
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   item.component.ap = "some_ap";
@@ -194,8 +194,10 @@
       string::npos,
       post_interceptor_->GetRequests()[0].find(
           "<app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\" "
-          "brand=\"TEST\" ap=\"some_ap\"><updatecheck /><ping rd=\"-2\" />"
-          "<packages><package fp=\"fp1\"/></packages></app>"));
+          "brand=\"TEST\" ap=\"some_ap\"><updatecheck /><ping rd=\"-2\" "));
+  EXPECT_NE(string::npos,
+            post_interceptor_->GetRequests()[0].find(
+                "<packages><package fp=\"fp1\"/></packages></app>"));
 
   EXPECT_NE(string::npos,
             post_interceptor_->GetRequests()[0].find("<hw physmemory="));
@@ -213,7 +215,7 @@
   EXPECT_TRUE(post_interceptor_->ExpectRequest(
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
 
-  update_checker_ = UpdateChecker::Create(config_, *metadata_);
+  update_checker_ = UpdateChecker::Create(config_, metadata_.get());
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   item.component.ap = std::string(257, 'a');  // Too long.
@@ -230,8 +232,10 @@
       string::npos,
       post_interceptor_->GetRequests()[0].find(
           "app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\" "
-          "brand=\"TEST\"><updatecheck /><ping rd=\"-2\" />"
-          "<packages><package fp=\"fp1\"/></packages></app>"));
+          "brand=\"TEST\"><updatecheck /><ping rd=\"-2\" "));
+  EXPECT_NE(string::npos,
+            post_interceptor_->GetRequests()[0].find(
+                "<packages><package fp=\"fp1\"/></packages></app>"));
 }
 
 TEST_F(UpdateCheckerTest, UpdateCheckSuccessNoBrand) {
@@ -239,7 +243,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
 
   config_->SetBrand("TOOLONG");   // Sets an invalid brand code.
-  update_checker_ = UpdateChecker::Create(config_, *metadata_);
+  update_checker_ = UpdateChecker::Create(config_, metadata_.get());
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   std::vector<CrxUpdateItem*> items_to_check;
@@ -255,8 +259,10 @@
       string::npos,
       post_interceptor_->GetRequests()[0].find(
           "<app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\">"
-          "<updatecheck /><ping rd=\"-2\" /><packages><package fp=\"fp1\"/>"
-          "</packages></app>"));
+          "<updatecheck /><ping rd=\"-2\" "));
+  EXPECT_NE(string::npos,
+            post_interceptor_->GetRequests()[0].find(
+                "<packages><package fp=\"fp1\"/></packages></app>"));
 }
 
 // Simulates a 403 server response error.
@@ -264,7 +270,7 @@
   EXPECT_TRUE(
       post_interceptor_->ExpectRequest(new PartialMatch("updatecheck"), 403));
 
-  update_checker_ = UpdateChecker::Create(config_, *metadata_);
+  update_checker_ = UpdateChecker::Create(config_, metadata_.get());
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   std::vector<CrxUpdateItem*> items_to_check;
@@ -290,7 +296,7 @@
 
   config_->SetDownloadPreference(string("cacheable"));
 
-  update_checker_ = UpdateChecker::Create(config_, *metadata_);
+  update_checker_ = UpdateChecker::Create(config_, metadata_.get());
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   std::vector<CrxUpdateItem*> items_to_check;
@@ -316,7 +322,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
 
   config_->SetUseCupSigning(true);
-  update_checker_ = UpdateChecker::Create(config_, *metadata_);
+  update_checker_ = UpdateChecker::Create(config_, metadata_.get());
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   std::vector<CrxUpdateItem*> items_to_check;
@@ -338,8 +344,10 @@
       string::npos,
       post_interceptor_->GetRequests()[0].find(
           "<app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\" "
-          "brand=\"TEST\"><updatecheck /><ping rd=\"-2\" />"
-          "<packages><package fp=\"fp1\"/></packages></app>"));
+          "brand=\"TEST\"><updatecheck /><ping rd=\"-2\" "));
+  EXPECT_NE(string::npos,
+            post_interceptor_->GetRequests()[0].find(
+                "<packages><package fp=\"fp1\"/></packages></app>"));
 
   // Expect an error since the response is not trusted.
   EXPECT_EQ(-10000, error_);
@@ -351,7 +359,7 @@
 TEST_F(UpdateCheckerTest, UpdateCheckRequiresEncryptionError) {
   config_->SetUpdateCheckUrl(GURL("http:\\foo\bar"));
 
-  update_checker_ = UpdateChecker::Create(config_, *metadata_);
+  update_checker_ = UpdateChecker::Create(config_, metadata_.get());
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   item.component.requires_network_encryption = true;
@@ -375,7 +383,7 @@
   EXPECT_TRUE(post_interceptor_->ExpectRequest(
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_4.xml")));
 
-  update_checker_ = UpdateChecker::Create(config_, *metadata_);
+  update_checker_ = UpdateChecker::Create(config_, metadata_.get());
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   std::vector<CrxUpdateItem*> items_to_check;
@@ -387,7 +395,7 @@
       base::Bind(&UpdateCheckerTest::UpdateCheckComplete,
                  base::Unretained(this)));
   RunThreads();
-  update_checker_ = UpdateChecker::Create(config_, *metadata_);
+  update_checker_ = UpdateChecker::Create(config_, metadata_.get());
   update_checker_->CheckForUpdates(
       items_to_check, "extra=\"params\"",
       base::Bind(&UpdateCheckerTest::UpdateCheckComplete,
@@ -398,10 +406,10 @@
       << post_interceptor_->GetRequestsAsString();
   ASSERT_EQ(2, post_interceptor_->GetCount())
       << post_interceptor_->GetRequestsAsString();
-  EXPECT_NE(string::npos,
-            post_interceptor_->GetRequests()[0].find("<ping rd=\"-2\" />"));
-  EXPECT_NE(string::npos,
-            post_interceptor_->GetRequests()[1].find("<ping rd=\"3383\" />"));
+  EXPECT_NE(string::npos, post_interceptor_->GetRequests()[0].find(
+                              "<ping rd=\"-2\" ping_freshness="));
+  EXPECT_NE(string::npos, post_interceptor_->GetRequests()[1].find(
+                              "<ping rd=\"3383\" ping_freshness="));
 }
 
 }  // namespace update_client
diff --git a/components/update_client/update_client_unittest.cc b/components/update_client/update_client_unittest.cc
index 8e8c943..1bdfa2f1 100644
--- a/components/update_client/update_client_unittest.cc
+++ b/components/update_client/update_client_unittest.cc
@@ -148,7 +148,7 @@
   static base::FilePath TestFilePath(const char* file);
 
   scoped_refptr<update_client::Configurator> config() { return config_; }
-  const update_client::PersistedData& metadata() { return *metadata_; }
+  update_client::PersistedData* metadata() { return metadata_.get(); }
 
   base::Closure quit_closure() { return quit_closure_; }
 
@@ -227,7 +227,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -334,7 +334,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -520,7 +520,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -768,7 +768,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -1019,7 +1019,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -1311,7 +1311,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -1495,7 +1495,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -1785,7 +1785,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -1885,7 +1885,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -2072,7 +2072,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -2166,7 +2166,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -2212,7 +2212,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return nullptr;
     }
 
@@ -2310,7 +2310,7 @@
    public:
     static scoped_ptr<UpdateChecker> Create(
         const scoped_refptr<Configurator>& config,
-        const PersistedData& metadata) {
+        PersistedData* metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
diff --git a/components/update_client/update_engine.cc b/components/update_client/update_engine.cc
index 87cbda2b..b9959a23 100644
--- a/components/update_client/update_engine.cc
+++ b/components/update_client/update_engine.cc
@@ -100,7 +100,7 @@
 
   CrxUpdateItem update_item;
   scoped_ptr<ActionUpdateCheck> update_check_action(new ActionUpdateCheck(
-      (*update_context->update_checker_factory)(config_, *metadata_),
+      (*update_context->update_checker_factory)(config_, metadata_.get()),
       config_->GetBrowserVersion(), config_->ExtraRequestParams()));
 
   update_context->current_action.reset(update_check_action.release());
diff --git a/components/url_formatter/elide_url_unittest.cc b/components/url_formatter/elide_url_unittest.cc
index 2a62f1f62..97cafaf 100644
--- a/components/url_formatter/elide_url_unittest.cc
+++ b/components/url_formatter/elide_url_unittest.cc
@@ -320,10 +320,10 @@
       {"Trailing dot in DNS name", "https://www.example.com./get/goat",
        L"https://www.example.com.", L"www.example.com."},
       {"Blob URL",
-       "blob:http%3A//www.html5rocks.com/4d4ff040-6d61-4446-86d3-13ca07ec9ab9",
-       L"blob:http%3A//www.html5rocks.com/"
+       "blob:http://www.html5rocks.com/4d4ff040-6d61-4446-86d3-13ca07ec9ab9",
+       L"blob:http://www.html5rocks.com/"
        L"4d4ff040-6d61-4446-86d3-13ca07ec9ab9",
-       L"blob:http%3A//www.html5rocks.com/"
+       L"blob:http://www.html5rocks.com/"
        L"4d4ff040-6d61-4446-86d3-13ca07ec9ab9"}};
 
   for (size_t i = 0; i < arraysize(tests); ++i) {
diff --git a/content/DEPS b/content/DEPS
index f5efa16c..0518328 100644
--- a/content/DEPS
+++ b/content/DEPS
@@ -115,7 +115,7 @@
 
 # content -> content/shell dependency is not allowed, except for browser tests.
 specific_include_rules = {
-  ".*_browsertest[a-z_]*\.(cc|h)": [
+  ".*_browsertest[a-z_]*\.cc": [
     "+content/shell/browser",
     "+content/shell/common",
   ],
diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h
index 12307b8..efa80e4d 100644
--- a/content/browser/accessibility/browser_accessibility.h
+++ b/content/browser/accessibility/browser_accessibility.h
@@ -91,6 +91,11 @@
   // Called when the location changed.
   virtual void OnLocationChanged() {}
 
+  // This is called when the platform-specific attributes for a node need
+  // to be recomputed, which may involve firing native events, due to a
+  // change other than an update from OnAccessibilityEvents.
+  virtual void UpdatePlatformAttributes() {}
+
   // Return true if this object is equal to or a descendant of |ancestor|.
   bool IsDescendantOf(const BrowserAccessibility* ancestor) const;
 
diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc
index e5c82fa2..2eca69f 100644
--- a/content/browser/accessibility/browser_accessibility_manager.cc
+++ b/content/browser/accessibility/browser_accessibility_manager.cc
@@ -131,6 +131,7 @@
       osk_state_(OSK_ALLOWED),
       last_focused_node_(nullptr),
       last_focused_manager_(nullptr),
+      connected_to_parent_tree_node_(false),
       ax_tree_id_(AXTreeIDRegistry::kNoAXTreeID),
       parent_node_id_from_parent_tree_(0) {
   tree_->SetDelegate(this);
@@ -345,6 +346,21 @@
     }
   }
 
+  // If the root's parent is in another accessibility tree but it wasn't
+  // previously connected, post the proper notifications on the parent.
+  BrowserAccessibility* parent = GetParentNodeFromParentTree();
+  if (parent) {
+    if (!connected_to_parent_tree_node_) {
+      parent->OnDataChanged();
+      parent->UpdatePlatformAttributes();
+      parent->manager()->NotifyAccessibilityEvent(
+          ui::AX_EVENT_CHILDREN_CHANGED, parent);
+      connected_to_parent_tree_node_ = true;
+    }
+  } else {
+    connected_to_parent_tree_node_ = false;
+  }
+
   // Based on the changes to the tree, first fire focus events if needed.
   // Screen readers might not do the right thing if they're not aware of what
   // has focus, so always try that first. Nothing will be fired if the window
@@ -822,25 +838,26 @@
     ax_tree_id_changed = true;
   }
 
-  if (ax_tree_id_changed || root_changed) {
-    BrowserAccessibility* parent = GetParentNodeFromParentTree();
-    if (parent) {
-      parent->OnDataChanged();
-      parent->manager()->NotifyAccessibilityEvent(
-          ui::AX_EVENT_CHILDREN_CHANGED, parent);
-    }
+  // Whenever the tree ID or the root of this tree changes we may need to
+  // fire an event on our parent node in the parent tree to ensure that
+  // we're properly connected.
+  if (ax_tree_id_changed || root_changed)
+    connected_to_parent_tree_node_ = false;
+
+  // When the root changes and this is the root manager, we may need to
+  // fire a new focus event.
+  if (root_changed && last_focused_manager_ == this) {
+    last_focused_node_ = nullptr;
+    last_focused_manager_ = nullptr;
   }
 }
 
 BrowserAccessibilityManager* BrowserAccessibilityManager::GetRootManager() {
-  if (!GetRoot())
-    return nullptr;
-  int parent_tree_id = GetTreeData().parent_tree_id;
-  BrowserAccessibilityManager* parent_manager =
-      BrowserAccessibilityManager::FromID(parent_tree_id);
-  if (parent_manager)
-    return parent_manager->GetRootManager();
-  return this;
+  BrowserAccessibility* parent = GetParentNodeFromParentTree();
+  if (!parent)
+    return this;
+
+  return parent->manager()->GetRootManager();
 }
 
 BrowserAccessibilityDelegate*
diff --git a/content/browser/accessibility/browser_accessibility_manager.h b/content/browser/accessibility/browser_accessibility_manager.h
index 9c3251ea..ad073bf 100644
--- a/content/browser/accessibility/browser_accessibility_manager.h
+++ b/content/browser/accessibility/browser_accessibility_manager.h
@@ -426,6 +426,11 @@
   BrowserAccessibility* last_focused_node_;
   BrowserAccessibilityManager* last_focused_manager_;
 
+  // True if the root's parent is in another accessibility tree and that
+  // parent's child is the root. Ensures that the parent node is notified
+  // once when this subtree is first connected.
+  bool connected_to_parent_tree_node_;
+
   // The global ID of this accessibility tree.
   AXTreeIDRegistry::AXTreeID ax_tree_id_;
 
diff --git a/content/browser/accessibility/browser_accessibility_manager_win.cc b/content/browser/accessibility/browser_accessibility_manager_win.cc
index eb9a2e4..506e20a 100644
--- a/content/browser/accessibility/browser_accessibility_manager_win.cc
+++ b/content/browser/accessibility/browser_accessibility_manager_win.cc
@@ -89,7 +89,8 @@
 
 void BrowserAccessibilityManagerWin::MaybeCallNotifyWinEvent(
     DWORD event, BrowserAccessibility* node) {
-  BrowserAccessibilityDelegate* delegate = GetDelegateFromRootManager();
+  BrowserAccessibilityDelegate* delegate =
+      node->manager()->GetDelegateFromRootManager();
   if (!delegate) {
     // This line and other LOG(WARNING) lines are temporary, to debug
     // flaky failures in DumpAccessibilityEvent* tests.
@@ -114,7 +115,7 @@
 
   // It doesn't make sense to fire a REORDER event on a leaf node; that
   // happens when the node has internal children line inline text boxes.
-  if (event == EVENT_OBJECT_REORDER && node->PlatformIsLeaf())
+  if (event == EVENT_OBJECT_REORDER && node->PlatformChildCount() == 0)
     return;
 
   // Pass the negation of this node's unique id in the |child_id|
@@ -290,12 +291,6 @@
   BrowserAccessibilityManager::OnAtomicUpdateFinished(
       tree, root_changed, changes);
 
-  if (root_changed) {
-    // In order to make screen readers aware of the new accessibility root,
-    // we need to fire a focus event on it.
-    OnWindowFocused();
-  }
-
   // Do a sequence of Windows-specific updates on each node. Each one is
   // done in a single pass that must complete before the next step starts.
   // The first step moves win_attributes_ to old_win_attributes_ and then
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index 48bc352..98aeb77 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -3583,15 +3583,19 @@
     BrowserAccessibilityWin* parent = ToBrowserAccessibilityWin(GetParent());
     if (parent && IsTextOnlyObject() &&
         name() != old_win_attributes_->name) {
-      parent->UpdateStep1ComputeWinAttributes();
-      parent->UpdateStep2ComputeHypertext();
-      parent->UpdateStep3FireEvents(false);
+      parent->UpdatePlatformAttributes();
     }
   }
 
   old_win_attributes_.reset(nullptr);
 }
 
+void BrowserAccessibilityWin::UpdatePlatformAttributes() {
+  UpdateStep1ComputeWinAttributes();
+  UpdateStep2ComputeHypertext();
+  UpdateStep3FireEvents(false);
+}
+
 void BrowserAccessibilityWin::OnSubtreeWillBeDeleted() {
   manager()->ToBrowserAccessibilityManagerWin()->MaybeCallNotifyWinEvent(
       EVENT_OBJECT_HIDE, this);
diff --git a/content/browser/accessibility/browser_accessibility_win.h b/content/browser/accessibility/browser_accessibility_win.h
index b43eda1..2092a9ca 100644
--- a/content/browser/accessibility/browser_accessibility_win.h
+++ b/content/browser/accessibility/browser_accessibility_win.h
@@ -103,7 +103,11 @@
   CONTENT_EXPORT void UpdateStep1ComputeWinAttributes();
   CONTENT_EXPORT void UpdateStep2ComputeHypertext();
   CONTENT_EXPORT void UpdateStep3FireEvents(bool is_subtree_creation);
-  CONTENT_EXPORT void UpdateStep4DeleteOldWinAttributes();
+
+  // This is used to call UpdateStep1ComputeWinAttributes, ... above when
+  // a node needs to be updated for some other reason other than via
+  // OnAtomicUpdateFinished.
+  CONTENT_EXPORT void UpdatePlatformAttributes() override;
 
   //
   // BrowserAccessibility methods.
diff --git a/content/browser/android/in_process/context_provider_in_process.cc b/content/browser/android/in_process/context_provider_in_process.cc
index 54e5e1bb..bdab089 100644
--- a/content/browser/android/in_process/context_provider_in_process.cc
+++ b/content/browser/android/in_process/context_provider_in_process.cc
@@ -11,9 +11,9 @@
 #include "base/callback_helpers.h"
 #include "base/strings/stringprintf.h"
 #include "cc/output/managed_memory_policy.h"
-#include "content/common/gpu/client/grcontext_for_gles2_interface.h"
 #include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h"
 #include "gpu/command_buffer/client/gles2_implementation.h"
+#include "gpu/skia_bindings/grcontext_for_gles2_interface.h"
 #include "third_party/skia/include/gpu/GrContext.h"
 
 using gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl;
@@ -139,8 +139,8 @@
   if (gr_context_)
     return gr_context_->get();
 
-  gr_context_.reset(
-      new GrContextForGLES2Interface(context3d_->GetGLInterface()));
+  gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(
+      context3d_->GetGLInterface()));
   return gr_context_->get();
 }
 
@@ -149,7 +149,7 @@
   DCHECK(context_thread_checker_.CalledOnValidThread());
 
   if (gr_context_)
-    return gr_context_->get()->resetContext(state);
+    return gr_context_->ResetContext(state);
 }
 
 void ContextProviderInProcess::SetupLock() {
diff --git a/content/browser/android/in_process/context_provider_in_process.h b/content/browser/android/in_process/context_provider_in_process.h
index beeaf727..8baf1c4 100644
--- a/content/browser/android/in_process/context_provider_in_process.h
+++ b/content/browser/android/in_process/context_provider_in_process.h
@@ -21,9 +21,11 @@
 class WebGraphicsContext3DInProcessCommandBufferImpl;
 }
 
-namespace content {
-
+namespace skia_bindings {
 class GrContextForGLES2Interface;
+}
+
+namespace content {
 
 class ContextProviderInProcess
     : NON_EXPORTED_BASE(public cc_blink::ContextProviderWebContext) {
@@ -65,7 +67,7 @@
 
   std::unique_ptr<gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl>
       context3d_;
-  std::unique_ptr<GrContextForGLES2Interface> gr_context_;
+  std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_;
 
   LostContextCallback lost_context_callback_;
 
diff --git a/content/browser/bluetooth/bluetooth_blacklist.cc b/content/browser/bluetooth/bluetooth_blacklist.cc
index c9edc5e38..6564c4c 100644
--- a/content/browser/bluetooth/bluetooth_blacklist.cc
+++ b/content/browser/bluetooth/bluetooth_blacklist.cc
@@ -179,6 +179,8 @@
 }
 
 void BluetoothBlacklist::PopulateWithServerProvidedValues() {
+  // DCHECK to maybe help debug https://crbug.com/604078.
+  DCHECK(GetContentClient());
   Add(GetContentClient()->browser()->GetWebBluetoothBlacklist());
 }
 
diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.cc b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
index 0180613..2725b3d 100644
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.cc
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
@@ -168,45 +168,6 @@
   return WebBluetoothError::UNTRANSLATED_CONNECT_ERROR_CODE;
 }
 
-WebBluetoothError TranslateGATTError(
-    BluetoothGattService::GattErrorCode error_code,
-    UMAGATTOperation operation) {
-  switch (error_code) {
-    case BluetoothGattService::GATT_ERROR_UNKNOWN:
-      RecordGATTOperationOutcome(operation, UMAGATTOperationOutcome::UNKNOWN);
-      return blink::WebBluetoothError::GATT_UNKNOWN_ERROR;
-    case BluetoothGattService::GATT_ERROR_FAILED:
-      RecordGATTOperationOutcome(operation, UMAGATTOperationOutcome::FAILED);
-      return blink::WebBluetoothError::GATT_UNKNOWN_FAILURE;
-    case BluetoothGattService::GATT_ERROR_IN_PROGRESS:
-      RecordGATTOperationOutcome(operation,
-                                 UMAGATTOperationOutcome::IN_PROGRESS);
-      return blink::WebBluetoothError::GATT_OPERATION_IN_PROGRESS;
-    case BluetoothGattService::GATT_ERROR_INVALID_LENGTH:
-      RecordGATTOperationOutcome(operation,
-                                 UMAGATTOperationOutcome::INVALID_LENGTH);
-      return blink::WebBluetoothError::GATT_INVALID_ATTRIBUTE_LENGTH;
-    case BluetoothGattService::GATT_ERROR_NOT_PERMITTED:
-      RecordGATTOperationOutcome(operation,
-                                 UMAGATTOperationOutcome::NOT_PERMITTED);
-      return blink::WebBluetoothError::GATT_NOT_PERMITTED;
-    case BluetoothGattService::GATT_ERROR_NOT_AUTHORIZED:
-      RecordGATTOperationOutcome(operation,
-                                 UMAGATTOperationOutcome::NOT_AUTHORIZED);
-      return blink::WebBluetoothError::GATT_NOT_AUTHORIZED;
-    case BluetoothGattService::GATT_ERROR_NOT_PAIRED:
-      RecordGATTOperationOutcome(operation,
-                                 UMAGATTOperationOutcome::NOT_PAIRED);
-      return blink::WebBluetoothError::GATT_NOT_PAIRED;
-    case BluetoothGattService::GATT_ERROR_NOT_SUPPORTED:
-      RecordGATTOperationOutcome(operation,
-                                 UMAGATTOperationOutcome::NOT_SUPPORTED);
-      return blink::WebBluetoothError::GATT_NOT_SUPPORTED;
-  }
-  NOTREACHED();
-  return blink::WebBluetoothError::GATT_UNTRANSLATED_ERROR_CODE;
-}
-
 void StopDiscoverySession(
     std::unique_ptr<device::BluetoothDiscoverySession> discovery_session) {
   // Nothing goes wrong if the discovery session fails to stop, and we don't
@@ -310,13 +271,6 @@
   IPC_MESSAGE_HANDLER(BluetoothHostMsg_GetPrimaryService, OnGetPrimaryService)
   IPC_MESSAGE_HANDLER(BluetoothHostMsg_GetCharacteristic, OnGetCharacteristic)
   IPC_MESSAGE_HANDLER(BluetoothHostMsg_GetCharacteristics, OnGetCharacteristics)
-  IPC_MESSAGE_HANDLER(BluetoothHostMsg_ReadValue, OnReadValue)
-  IPC_MESSAGE_HANDLER(BluetoothHostMsg_StartNotifications, OnStartNotifications)
-  IPC_MESSAGE_HANDLER(BluetoothHostMsg_StopNotifications, OnStopNotifications)
-  IPC_MESSAGE_HANDLER(BluetoothHostMsg_RegisterCharacteristic,
-                      OnRegisterCharacteristicObject);
-  IPC_MESSAGE_HANDLER(BluetoothHostMsg_UnregisterCharacteristic,
-                      OnUnregisterCharacteristicObject);
   IPC_MESSAGE_UNHANDLED(handled = false)
   IPC_END_MESSAGE_MAP()
   return handled;
@@ -347,8 +301,6 @@
     // called, we clean them here.
     service_to_device_.clear();
     characteristic_to_service_.clear();
-    characteristic_id_to_notify_session_.clear();
-    active_characteristic_threads_.clear();
     connected_devices_map_.reset(new ConnectedDevicesMap(render_process_id_));
     allowed_devices_map_ = BluetoothAllowedDevicesMap();
   }
@@ -522,11 +474,19 @@
 void BluetoothDispatcherHost::set_adapter(
     scoped_refptr<device::BluetoothAdapter> adapter) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  if (adapter_.get())
+  if (adapter_.get()) {
     adapter_->RemoveObserver(this);
+    for (device::BluetoothAdapter::Observer* observer : adapter_observers_) {
+      adapter_->RemoveObserver(observer);
+    }
+  }
   adapter_ = adapter;
-  if (adapter_.get())
+  if (adapter_.get()) {
     adapter_->AddObserver(this);
+    for (device::BluetoothAdapter::Observer* observer : adapter_observers_) {
+      adapter_->AddObserver(observer);
+    }
+  }
 }
 
 void BluetoothDispatcherHost::StartDeviceDiscovery(
@@ -659,42 +619,6 @@
       << "Sending get-service responses unexpectedly queued another request.";
 }
 
-void BluetoothDispatcherHost::GattCharacteristicValueChanged(
-    device::BluetoothAdapter* adapter,
-    device::BluetoothGattCharacteristic* characteristic,
-    const std::vector<uint8_t>& value) {
-  VLOG(1) << "Characteristic updated: " << characteristic->GetIdentifier();
-  auto iter =
-      active_characteristic_threads_.find(characteristic->GetIdentifier());
-
-  if (iter == active_characteristic_threads_.end()) {
-    return;
-  }
-
-  for (int thread_id : iter->second) {
-    // Yield to the event loop so that the event gets dispatched after the
-    // readValue promise resolves.
-    // TODO(ortuno): Make sure the order of fulfulling promises and triggering
-    // events matches the spec and that events don't get lost.
-    // https://crbug.com/543882
-    if (!base::ThreadTaskRunnerHandle::Get()->PostTask(
-            FROM_HERE,
-            base::Bind(&BluetoothDispatcherHost::NotifyActiveCharacteristic,
-                       weak_ptr_on_ui_thread_, thread_id,
-                       characteristic->GetIdentifier(), value))) {
-      LOG(WARNING) << "No TaskRunner.";
-    }
-  }
-}
-
-void BluetoothDispatcherHost::NotifyActiveCharacteristic(
-    int thread_id,
-    const std::string& characteristic_instance_id,
-    const std::vector<uint8_t>& value) {
-  Send(new BluetoothMsg_CharacteristicValueChanged(
-      thread_id, characteristic_instance_id, value));
-}
-
 void BluetoothDispatcherHost::OnRequestDevice(
     int thread_id,
     int request_id,
@@ -994,145 +918,6 @@
           : WebBluetoothError::CHARACTERISTIC_NOT_FOUND));
 }
 
-void BluetoothDispatcherHost::OnReadValue(
-    int thread_id,
-    int request_id,
-    int frame_routing_id,
-    const std::string& characteristic_instance_id) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  RecordWebBluetoothFunctionCall(
-      UMAWebBluetoothFunction::CHARACTERISTIC_READ_VALUE);
-
-  const CacheQueryResult query_result = QueryCacheForCharacteristic(
-      GetOrigin(frame_routing_id), characteristic_instance_id);
-
-  if (query_result.outcome == CacheQueryOutcome::BAD_RENDERER) {
-    return;
-  }
-
-  if (query_result.outcome != CacheQueryOutcome::SUCCESS) {
-    RecordCharacteristicReadValueOutcome(query_result.outcome);
-    Send(new BluetoothMsg_ReadCharacteristicValueError(
-        thread_id, request_id, query_result.GetWebError()));
-    return;
-  }
-
-  if (BluetoothBlacklist::Get().IsExcludedFromReads(
-          query_result.characteristic->GetUUID())) {
-    RecordCharacteristicReadValueOutcome(UMAGATTOperationOutcome::BLACKLISTED);
-    Send(new BluetoothMsg_ReadCharacteristicValueError(
-        thread_id, request_id, WebBluetoothError::BLACKLISTED_READ));
-    return;
-  }
-
-  query_result.characteristic->ReadRemoteCharacteristic(
-      base::Bind(&BluetoothDispatcherHost::OnCharacteristicValueRead,
-                 weak_ptr_on_ui_thread_, thread_id, request_id),
-      base::Bind(&BluetoothDispatcherHost::OnCharacteristicReadValueError,
-                 weak_ptr_on_ui_thread_, thread_id, request_id));
-}
-
-void BluetoothDispatcherHost::OnStartNotifications(
-    int thread_id,
-    int request_id,
-    int frame_routing_id,
-    const std::string& characteristic_instance_id) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  RecordWebBluetoothFunctionCall(
-      UMAWebBluetoothFunction::CHARACTERISTIC_START_NOTIFICATIONS);
-
-  // BluetoothDispatcher will never send a request for a characteristic
-  // already subscribed to notifications.
-  if (characteristic_id_to_notify_session_.find(characteristic_instance_id) !=
-      characteristic_id_to_notify_session_.end()) {
-    bad_message::ReceivedBadMessage(
-        this, bad_message::BDH_CHARACTERISTIC_ALREADY_SUBSCRIBED);
-    return;
-  }
-
-  // TODO(ortuno): Check if notify/indicate bit is set.
-  // http://crbug.com/538869
-
-  const CacheQueryResult query_result = QueryCacheForCharacteristic(
-      GetOrigin(frame_routing_id), characteristic_instance_id);
-
-  if (query_result.outcome == CacheQueryOutcome::BAD_RENDERER) {
-    return;
-  }
-
-  if (query_result.outcome != CacheQueryOutcome::SUCCESS) {
-    RecordStartNotificationsOutcome(query_result.outcome);
-    Send(new BluetoothMsg_StartNotificationsError(thread_id, request_id,
-                                                  query_result.GetWebError()));
-    return;
-  }
-
-  query_result.characteristic->StartNotifySession(
-      base::Bind(&BluetoothDispatcherHost::OnStartNotifySessionSuccess,
-                 weak_ptr_factory_.GetWeakPtr(), thread_id, request_id),
-      base::Bind(&BluetoothDispatcherHost::OnStartNotifySessionFailed,
-                 weak_ptr_factory_.GetWeakPtr(), thread_id, request_id));
-}
-
-void BluetoothDispatcherHost::OnStopNotifications(
-    int thread_id,
-    int request_id,
-    int frame_routing_id,
-    const std::string& characteristic_instance_id) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  RecordWebBluetoothFunctionCall(
-      UMAWebBluetoothFunction::CHARACTERISTIC_STOP_NOTIFICATIONS);
-
-  // Check the origin is allowed to access the device. We perform this check in
-  // case a hostile renderer is trying to stop notifications for a device
-  // that the renderer is not allowed to access.
-  if (!CanFrameAccessCharacteristicInstance(frame_routing_id,
-                                            characteristic_instance_id)) {
-    return;
-  }
-
-  auto notify_session_iter =
-      characteristic_id_to_notify_session_.find(characteristic_instance_id);
-  if (notify_session_iter == characteristic_id_to_notify_session_.end()) {
-    Send(new BluetoothMsg_StopNotificationsSuccess(thread_id, request_id));
-    return;
-  }
-  notify_session_iter->second->Stop(
-      base::Bind(&BluetoothDispatcherHost::OnStopNotifySession,
-                 weak_ptr_factory_.GetWeakPtr(), thread_id, request_id,
-                 characteristic_instance_id));
-}
-
-void BluetoothDispatcherHost::OnRegisterCharacteristicObject(
-    int thread_id,
-    int frame_routing_id,
-    const std::string& characteristic_instance_id) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  // Make sure the origin is allowed to access the device.
-  if (!CanFrameAccessCharacteristicInstance(frame_routing_id,
-                                            characteristic_instance_id)) {
-    return;
-  }
-  active_characteristic_threads_[characteristic_instance_id].insert(thread_id);
-}
-
-void BluetoothDispatcherHost::OnUnregisterCharacteristicObject(
-    int thread_id,
-    int frame_routing_id,
-    const std::string& characteristic_instance_id) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  auto active_iter =
-      active_characteristic_threads_.find(characteristic_instance_id);
-  if (active_iter == active_characteristic_threads_.end()) {
-    return;
-  }
-  std::set<int>& thread_ids_set = active_iter->second;
-  thread_ids_set.erase(thread_id);
-  if (thread_ids_set.empty()) {
-    active_characteristic_threads_.erase(active_iter);
-  }
-}
-
 void BluetoothDispatcherHost::OnGetAdapter(
     base::Closure continuation,
     scoped_refptr<device::BluetoothAdapter> adapter) {
@@ -1515,61 +1300,6 @@
                                                  service_identifier));
 }
 
-void BluetoothDispatcherHost::OnCharacteristicValueRead(
-    int thread_id,
-    int request_id,
-    const std::vector<uint8_t>& value) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  RecordCharacteristicReadValueOutcome(UMAGATTOperationOutcome::SUCCESS);
-  Send(new BluetoothMsg_ReadCharacteristicValueSuccess(thread_id, request_id,
-                                                       value));
-}
-
-void BluetoothDispatcherHost::OnCharacteristicReadValueError(
-    int thread_id,
-    int request_id,
-    device::BluetoothGattService::GattErrorCode error_code) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  // TranslateGATTError calls RecordGATTOperationOutcome.
-  Send(new BluetoothMsg_ReadCharacteristicValueError(
-      thread_id, request_id,
-      TranslateGATTError(error_code, UMAGATTOperation::CHARACTERISTIC_READ)));
-}
-
-void BluetoothDispatcherHost::OnStartNotifySessionSuccess(
-    int thread_id,
-    int request_id,
-    std::unique_ptr<device::BluetoothGattNotifySession> notify_session) {
-  RecordStartNotificationsOutcome(UMAGATTOperationOutcome::SUCCESS);
-
-  // Copy Characteristic Instance ID before passing scoped pointer because
-  // compilers may evaluate arguments in any order.
-  const std::string characteristic_instance_id =
-      notify_session->GetCharacteristicIdentifier();
-  characteristic_id_to_notify_session_.insert(
-      std::make_pair(characteristic_instance_id, std::move(notify_session)));
-
-  Send(new BluetoothMsg_StartNotificationsSuccess(thread_id, request_id));
-}
-
-void BluetoothDispatcherHost::OnStartNotifySessionFailed(
-    int thread_id,
-    int request_id,
-    device::BluetoothGattService::GattErrorCode error_code) {
-  // TranslateGATTError calls RecordGATTOperationOutcome.
-  Send(new BluetoothMsg_StartNotificationsError(
-      thread_id, request_id,
-      TranslateGATTError(error_code, UMAGATTOperation::START_NOTIFICATIONS)));
-}
-
-void BluetoothDispatcherHost::OnStopNotifySession(
-    int thread_id,
-    int request_id,
-    const std::string& characteristic_instance_id) {
-  characteristic_id_to_notify_session_.erase(characteristic_instance_id);
-  Send(new BluetoothMsg_StopNotificationsSuccess(thread_id, request_id));
-}
-
 BluetoothDispatcherHost::CacheQueryResult
 BluetoothDispatcherHost::QueryCacheForDevice(const url::Origin& origin,
                                              const std::string& device_id) {
@@ -1664,6 +1394,22 @@
   return result;
 }
 
+void BluetoothDispatcherHost::AddAdapterObserver(
+    device::BluetoothAdapter::Observer* observer) {
+  adapter_observers_.insert(observer);
+  if (adapter_) {
+    adapter_->AddObserver(observer);
+  }
+}
+
+void BluetoothDispatcherHost::RemoveAdapterObserver(
+    device::BluetoothAdapter::Observer* observer) {
+  DCHECK(adapter_observers_.erase(observer));
+  if (adapter_) {
+    adapter_->RemoveObserver(observer);
+  }
+}
+
 void BluetoothDispatcherHost::AddToPendingPrimaryServicesRequest(
     const std::string& device_address,
     const PrimaryServicesRequest& request) {
@@ -1675,12 +1421,4 @@
       ->GetLastCommittedOrigin();
 }
 
-bool BluetoothDispatcherHost::CanFrameAccessCharacteristicInstance(
-    int frame_routing_id,
-    const std::string& characteristic_instance_id) {
-  return QueryCacheForCharacteristic(GetOrigin(frame_routing_id),
-                                     characteristic_instance_id)
-             .outcome != CacheQueryOutcome::BAD_RENDERER;
-}
-
 }  // namespace content
diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.h b/content/browser/bluetooth/bluetooth_dispatcher_host.h
index d65f99d..7a1756c 100644
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.h
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.h
@@ -78,6 +78,14 @@
       const url::Origin& origin,
       const std::string& characteristic_instance_id);
 
+  // Temporary functions so that WebBluetoothServices can add themselves as
+  // observers of the Bluetooth Adapter without having to get an adapter for
+  // themselves.
+  // TODO(ortuno): Remove once WebBluetoothServiceImpl gets its own adapter.
+  // https://crbug.com/508771
+  void AddAdapterObserver(device::BluetoothAdapter::Observer* observer);
+  void RemoveAdapterObserver(device::BluetoothAdapter::Observer* observer);
+
  protected:
   ~BluetoothDispatcherHost() override;
 
@@ -114,6 +122,12 @@
 
   // Set |adapter_| to a BluetoothAdapter instance and register observers,
   // releasing references to previous |adapter_|.
+  //
+  // We currently keep track of observers that used BluetoothDispatcherHost
+  // to register themselves on the adapter and remove them from |adapter_| and
+  // add them to |adapter| when this function is called.
+  // TODO(ortuno): Observers should add/remove themselves to/from the adapter.
+  // http://crbug.com/603291
   void set_adapter(scoped_refptr<device::BluetoothAdapter> adapter);
 
   // Makes sure a BluetoothDiscoverySession is active for |session|, and resets
@@ -133,16 +147,6 @@
                      device::BluetoothDevice* device) override;
   void GattServicesDiscovered(device::BluetoothAdapter* adapter,
                               device::BluetoothDevice* device) override;
-  void GattCharacteristicValueChanged(
-      device::BluetoothAdapter* adapter,
-      device::BluetoothGattCharacteristic* characteristic,
-      const std::vector<uint8_t>& value) override;
-
-  // Sends an IPC to the thread informing that a the characteristic's
-  // value changed.
-  void NotifyActiveCharacteristic(int thread_id,
-                                  const std::string& characteristic_instance_id,
-                                  const std::vector<uint8_t>& value);
 
   // IPC Handlers, see definitions in bluetooth_messages.h.
   void OnRequestDevice(
@@ -173,26 +177,6 @@
                             int frame_routing_id,
                             const std::string& service_instance_id,
                             const std::string& characteristics_uuid);
-  void OnReadValue(int thread_id,
-                   int request_id,
-                   int frame_routing_id,
-                   const std::string& characteristic_instance_id);
-  void OnStartNotifications(int thread_id,
-                            int request_id,
-                            int frame_routing_id,
-                            const std::string& characteristic_instance_id);
-  void OnStopNotifications(int thread_id,
-                           int request_id,
-                           int frame_routing_id,
-                           const std::string& characteristic_instance_id);
-  void OnRegisterCharacteristicObject(
-      int thread_id,
-      int frame_routing_id,
-      const std::string& characteristic_instance_id);
-  void OnUnregisterCharacteristicObject(
-      int thread_id,
-      int frame_routing_id,
-      const std::string& characteristic_instance_id);
 
   // Callbacks for BluetoothDevice::OnRequestDevice.
   // If necessary, the adapter must be obtained before continuing to Impl.
@@ -245,30 +229,6 @@
       int thread_id,
       int request_id);
 
-  // Callbacks for BluetoothGattCharacteristic::ReadRemoteCharacteristic.
-  void OnCharacteristicValueRead(int thread_id,
-                                 int request_id,
-                                 const std::vector<uint8_t>& value);
-  void OnCharacteristicReadValueError(
-      int thread_id,
-      int request_id,
-      device::BluetoothGattService::GattErrorCode);
-
-  // Callbacks for BluetoothGattCharacteristic::StartNotifySession.
-  void OnStartNotifySessionSuccess(
-      int thread_id,
-      int request_id,
-      std::unique_ptr<device::BluetoothGattNotifySession> notify_session);
-  void OnStartNotifySessionFailed(
-      int thread_id,
-      int request_id,
-      device::BluetoothGattService::GattErrorCode error_code);
-
-  // Callback for BluetoothGattNotifySession::Stop.
-  void OnStopNotifySession(int thread_id,
-                           int request_id,
-                           const std::string& characteristic_instance_id);
-
   // Functions to query the platform cache for the bluetooth object.
   // result.outcome == CacheQueryOutcome::SUCCESS if the object was found in the
   // cache. Otherwise result.outcome that can used to record the outcome and
@@ -296,12 +256,6 @@
   // render_process_id_.
   url::Origin GetOrigin(int frame_routing_id);
 
-  // Returns true if the frame has permission to access the characteristic
-  // with |characteristic_instance_id|.
-  bool CanFrameAccessCharacteristicInstance(
-      int frame_routing_id,
-      const std::string& characteristic_instance_id);
-
   int render_process_id_;
 
   // Maps a (thread_id,request_id) to information about its requestDevice call,
@@ -318,23 +272,14 @@
   // Map of characteristic_instance_id to service_instance_id.
   std::map<std::string, std::string> characteristic_to_service_;
 
-  // Map that matches characteristic_instance_id to notify session.
-  // TODO(ortuno): Also key by thread_id once support for web workers,
-  // is added: http://crbug.com/537372
-  std::map<std::string, std::unique_ptr<device::BluetoothGattNotifySession>>
-      characteristic_id_to_notify_session_;
-
-  // Map of characteristic_instance_id to a set of thread ids.
-  // A thread_id in the set represents a BluetoothDispatcher that
-  // needs to be notified of changes to the characteristic.
-  std::map<std::string, std::set<int>> active_characteristic_threads_;
-
   // Defines how long to scan for and how long to discover services for.
   int current_delay_time_;
 
   // A BluetoothAdapter instance representing an adapter of the system.
   scoped_refptr<device::BluetoothAdapter> adapter_;
 
+  std::unordered_set<device::BluetoothAdapter::Observer*> adapter_observers_;
+
   // Automatically stops Bluetooth discovery a set amount of time after it was
   // started. We have a single timer for all of Web Bluetooth because it's
   // simpler than tracking timeouts for each RequestDeviceSession individually,
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc
index ea627d2..978aa88 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.cc
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc
@@ -4,12 +4,13 @@
 
 #include "content/browser/bluetooth/web_bluetooth_service_impl.h"
 
-#include <vector>
-
+#include "base/thread_task_runner_handle.h"
 #include "content/browser/bluetooth/bluetooth_blacklist.h"
 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h"
 #include "content/browser/renderer_host/render_process_host_impl.h"
+#include "content/public/browser/navigation_handle.h"
 #include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/web_contents.h"
 #include "device/bluetooth/bluetooth_gatt_characteristic.h"
 
 using device::BluetoothGattService;
@@ -64,13 +65,111 @@
 WebBluetoothServiceImpl::WebBluetoothServiceImpl(
     RenderFrameHost* render_frame_host,
     blink::mojom::WebBluetoothServiceRequest request)
-    : render_frame_host_(render_frame_host),
+    : WebContentsObserver(WebContents::FromRenderFrameHost(render_frame_host)),
+      render_frame_host_(render_frame_host),
       binding_(this, std::move(request)),
       weak_ptr_factory_(this) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  CHECK(web_contents());
+
+  GetBluetoothDispatcherHost()->AddAdapterObserver(this);
 }
 
-WebBluetoothServiceImpl::~WebBluetoothServiceImpl() {}
+WebBluetoothServiceImpl::~WebBluetoothServiceImpl() {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  GetBluetoothDispatcherHost()->RemoveAdapterObserver(this);
+}
+
+void WebBluetoothServiceImpl::SetClientConnectionErrorHandler(
+    base::Closure closure) {
+  binding_.set_connection_error_handler(closure);
+}
+
+void WebBluetoothServiceImpl::DidFinishNavigation(
+    NavigationHandle* navigation_handle) {
+  if (navigation_handle->HasCommitted() &&
+      navigation_handle->GetRenderFrameHost() == render_frame_host_ &&
+      !navigation_handle->IsSamePage()) {
+    // After navigation we need to clear the frame's state.
+    characteristic_id_to_notify_session_.clear();
+  }
+}
+
+void WebBluetoothServiceImpl::GattCharacteristicValueChanged(
+    device::BluetoothAdapter* adapter,
+    device::BluetoothGattCharacteristic* characteristic,
+    const std::vector<uint8_t>& value) {
+  // TODO(ortuno): Only send characteristic value changed events for
+  // characteristics that we've returned in the past. We can't yet do
+  // this because WebBluetoothServiceImpl doesn't have direct access
+  // to the list of returned characteristics.
+  // https://crbug.com/508771
+  if (BluetoothBlacklist::Get().IsExcluded(characteristic->GetUUID())) {
+    return;
+  }
+
+  // On Chrome OS and Linux, GattCharacteristicValueChanged is called before the
+  // success callback for ReadRemoteCharacteristic is called, which could result
+  // in an event being fired before the readValue promise is resolved.
+  if (!base::ThreadTaskRunnerHandle::Get()->PostTask(
+          FROM_HERE,
+          base::Bind(&WebBluetoothServiceImpl::NotifyCharacteristicValueChanged,
+                     weak_ptr_factory_.GetWeakPtr(),
+                     characteristic->GetIdentifier(), value))) {
+    LOG(WARNING) << "No TaskRunner.";
+  }
+}
+
+void WebBluetoothServiceImpl::NotifyCharacteristicValueChanged(
+    const std::string& characteristic_instance_id,
+    std::vector<uint8_t> value) {
+  if (client_) {
+    client_->RemoteCharacteristicValueChanged(
+        characteristic_instance_id, mojo::Array<uint8_t>(std::move(value)));
+  }
+}
+
+void WebBluetoothServiceImpl::SetClient(
+    blink::mojom::WebBluetoothServiceClientAssociatedPtrInfo client) {
+  DCHECK(!client_.get());
+  client_.Bind(std::move(client));
+}
+
+void WebBluetoothServiceImpl::RemoteCharacteristicReadValue(
+    const mojo::String& characteristic_instance_id,
+    const RemoteCharacteristicReadValueCallback& callback) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  RecordWebBluetoothFunctionCall(
+      UMAWebBluetoothFunction::CHARACTERISTIC_READ_VALUE);
+
+  const CacheQueryResult query_result =
+      GetBluetoothDispatcherHost()->QueryCacheForCharacteristic(
+          GetOrigin(), characteristic_instance_id);
+
+  if (query_result.outcome == CacheQueryOutcome::BAD_RENDERER) {
+    return;
+  }
+
+  if (query_result.outcome != CacheQueryOutcome::SUCCESS) {
+    RecordCharacteristicReadValueOutcome(query_result.outcome);
+    callback.Run(query_result.GetWebError(), nullptr /* value */);
+    return;
+  }
+
+  if (BluetoothBlacklist::Get().IsExcludedFromReads(
+          query_result.characteristic->GetUUID())) {
+    RecordCharacteristicReadValueOutcome(UMAGATTOperationOutcome::BLACKLISTED);
+    callback.Run(blink::mojom::WebBluetoothError::BLACKLISTED_READ,
+                 nullptr /* value */);
+    return;
+  }
+
+  query_result.characteristic->ReadRemoteCharacteristic(
+      base::Bind(&WebBluetoothServiceImpl::OnReadValueSuccess,
+                 weak_ptr_factory_.GetWeakPtr(), callback),
+      base::Bind(&WebBluetoothServiceImpl::OnReadValueFailed,
+                 weak_ptr_factory_.GetWeakPtr(), callback));
+}
 
 void WebBluetoothServiceImpl::RemoteCharacteristicWriteValue(
     const mojo::String& characteristic_instance_id,
@@ -118,6 +217,101 @@
                  weak_ptr_factory_.GetWeakPtr(), callback));
 }
 
+void WebBluetoothServiceImpl::RemoteCharacteristicStartNotifications(
+    const mojo::String& characteristic_instance_id,
+    const RemoteCharacteristicStartNotificationsCallback& callback) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  RecordWebBluetoothFunctionCall(
+      UMAWebBluetoothFunction::CHARACTERISTIC_START_NOTIFICATIONS);
+
+  auto iter =
+      characteristic_id_to_notify_session_.find(characteristic_instance_id);
+  if (iter != characteristic_id_to_notify_session_.end() &&
+      iter->second->IsActive()) {
+    // If the frame has already started notifications and the notifications
+    // are active we return SUCCESS.
+    callback.Run(blink::mojom::WebBluetoothError::SUCCESS);
+    return;
+  }
+
+  const CacheQueryResult query_result =
+      GetBluetoothDispatcherHost()->QueryCacheForCharacteristic(
+          GetOrigin(), characteristic_instance_id);
+
+  if (query_result.outcome == CacheQueryOutcome::BAD_RENDERER) {
+    binding_.Close();
+    return;
+  }
+
+  if (query_result.outcome != CacheQueryOutcome::SUCCESS) {
+    RecordStartNotificationsOutcome(query_result.outcome);
+    callback.Run(query_result.GetWebError());
+    return;
+  }
+
+  device::BluetoothGattCharacteristic::Properties notify_or_indicate =
+      query_result.characteristic->GetProperties() &
+      (device::BluetoothGattCharacteristic::PROPERTY_NOTIFY |
+       device::BluetoothGattCharacteristic::PROPERTY_INDICATE);
+  if (!notify_or_indicate) {
+    callback.Run(blink::mojom::WebBluetoothError::GATT_NOT_SUPPORTED);
+    return;
+  }
+
+  query_result.characteristic->StartNotifySession(
+      base::Bind(&WebBluetoothServiceImpl::OnStartNotifySessionSuccess,
+                 weak_ptr_factory_.GetWeakPtr(), callback),
+      base::Bind(&WebBluetoothServiceImpl::OnStartNotifySessionFailed,
+                 weak_ptr_factory_.GetWeakPtr(), callback));
+}
+
+void WebBluetoothServiceImpl::RemoteCharacteristicStopNotifications(
+    const mojo::String& characteristic_instance_id,
+    const RemoteCharacteristicStopNotificationsCallback& callback) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  RecordWebBluetoothFunctionCall(
+      UMAWebBluetoothFunction::CHARACTERISTIC_STOP_NOTIFICATIONS);
+
+  const CacheQueryResult query_result =
+      GetBluetoothDispatcherHost()->QueryCacheForCharacteristic(
+          GetOrigin(), characteristic_instance_id);
+
+  if (query_result.outcome == CacheQueryOutcome::BAD_RENDERER) {
+    binding_.Close();
+    return;
+  }
+
+  auto notify_session_iter =
+      characteristic_id_to_notify_session_.find(characteristic_instance_id);
+  if (notify_session_iter == characteristic_id_to_notify_session_.end()) {
+    // If the frame hasn't subscribed to notifications before we just
+    // run the callback.
+    callback.Run();
+    return;
+  }
+  notify_session_iter->second->Stop(base::Bind(
+      &WebBluetoothServiceImpl::OnStopNotifySessionComplete,
+      weak_ptr_factory_.GetWeakPtr(), characteristic_instance_id, callback));
+}
+
+void WebBluetoothServiceImpl::OnReadValueSuccess(
+    const RemoteCharacteristicReadValueCallback& callback,
+    const std::vector<uint8_t>& value) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  RecordCharacteristicReadValueOutcome(UMAGATTOperationOutcome::SUCCESS);
+  callback.Run(blink::mojom::WebBluetoothError::SUCCESS,
+               mojo::Array<uint8_t>::From(value));
+}
+
+void WebBluetoothServiceImpl::OnReadValueFailed(
+    const RemoteCharacteristicReadValueCallback& callback,
+    device::BluetoothGattService::GattErrorCode error_code) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  callback.Run(TranslateGATTErrorAndRecord(
+                   error_code, UMAGATTOperation::CHARACTERISTIC_READ),
+               nullptr /* value */);
+}
+
 void WebBluetoothServiceImpl::OnWriteValueSuccess(
     const RemoteCharacteristicWriteValueCallback& callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -133,6 +327,35 @@
       error_code, UMAGATTOperation::CHARACTERISTIC_WRITE));
 }
 
+void WebBluetoothServiceImpl::OnStartNotifySessionSuccess(
+    const RemoteCharacteristicStartNotificationsCallback& callback,
+    std::unique_ptr<device::BluetoothGattNotifySession> notify_session) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  // Copy Characteristic Instance ID before passing a unique pointer because
+  // compilers may evaluate arguments in any order.
+  std::string characteristic_instance_id =
+      notify_session->GetCharacteristicIdentifier();
+  // Saving the BluetoothGattNotifySession keeps notifications active.
+  characteristic_id_to_notify_session_[characteristic_instance_id] =
+      std::move(notify_session);
+  callback.Run(blink::mojom::WebBluetoothError::SUCCESS);
+}
+
+void WebBluetoothServiceImpl::OnStartNotifySessionFailed(
+    const RemoteCharacteristicStartNotificationsCallback& callback,
+    device::BluetoothGattService::GattErrorCode error_code) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  callback.Run(TranslateGATTErrorAndRecord(
+      error_code, UMAGATTOperation::START_NOTIFICATIONS));
+}
+
+void WebBluetoothServiceImpl::OnStopNotifySessionComplete(
+    const std::string& characteristic_instance_id,
+    const RemoteCharacteristicStopNotificationsCallback& callback) {
+  characteristic_id_to_notify_session_.erase(characteristic_instance_id);
+  callback.Run();
+}
+
 RenderProcessHost* WebBluetoothServiceImpl::GetRenderProcessHost() {
   return render_frame_host_->GetProcess();
 }
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.h b/content/browser/bluetooth/web_bluetooth_service_impl.h
index 45f9e8c..c8a8d81 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.h
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.h
@@ -5,9 +5,17 @@
 #ifndef CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_
 #define CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_
 
+#include <memory>
+#include <string>
+#include <vector>
+
 #include "base/macros.h"
 #include "content/browser/bad_message.h"
 #include "content/common/content_export.h"
+#include "content/public/browser/web_contents_observer.h"
+#include "device/bluetooth/bluetooth_adapter.h"
+#include "device/bluetooth/bluetooth_gatt_characteristic.h"
+#include "device/bluetooth/bluetooth_gatt_notify_session.h"
 #include "device/bluetooth/bluetooth_gatt_service.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom.h"
@@ -32,7 +40,9 @@
 // from the renderer when the first Web Bluetooth API request is handled.
 // RenderFrameHostImpl will create an instance of this class and keep
 // ownership of it.
-class WebBluetoothServiceImpl : public blink::mojom::WebBluetoothService {
+class WebBluetoothServiceImpl : public blink::mojom::WebBluetoothService,
+                                public WebContentsObserver,
+                                public device::BluetoothAdapter::Observer {
  public:
   // |render_frame_host|: The RFH that owns this instance.
   // |request|: The instance will be bound to this request's pipe.
@@ -40,12 +50,53 @@
                           blink::mojom::WebBluetoothServiceRequest request);
   ~WebBluetoothServiceImpl() override;
 
+  // Sets the connection error handler for WebBluetoothServiceImpl's Binding.
+  void SetClientConnectionErrorHandler(base::Closure closure);
+
  private:
+  // WebContentsObserver:
+  // These functions should always check that the affected RenderFrameHost
+  // is this->render_frame_host_ and not some other frame in the same tab.
+  void DidFinishNavigation(NavigationHandle* navigation_handle) override;
+
+  // BluetoothAdapter::Observer:
+  void GattCharacteristicValueChanged(
+      device::BluetoothAdapter* adapter,
+      device::BluetoothGattCharacteristic* characteristic,
+      const std::vector<uint8_t>& value) override;
+
+  // Notifies the WebBluetoothServiceClient that characteristic
+  // |characteristic_instance_id| changed it's value. We only do this for
+  // characteristics that have been returned to the client in the past.
+  void NotifyCharacteristicValueChanged(
+      const std::string& characteristic_instance_id,
+      std::vector<uint8_t> value);
+
   // WebBluetoothService methods:
+  void SetClient(
+      blink::mojom::WebBluetoothServiceClientAssociatedPtrInfo client) override;
+
+  // WebBluetoothService methods:
+  void RemoteCharacteristicReadValue(
+      const mojo::String& characteristic_instance_id,
+      const RemoteCharacteristicReadValueCallback& callback) override;
   void RemoteCharacteristicWriteValue(
       const mojo::String& characteristic_instance_id,
       mojo::Array<uint8_t> value,
       const RemoteCharacteristicWriteValueCallback& callback) override;
+  void RemoteCharacteristicStartNotifications(
+      const mojo::String& characteristic_instance_id,
+      const RemoteCharacteristicStartNotificationsCallback& callback) override;
+  void RemoteCharacteristicStopNotifications(
+      const mojo::String& characteristic_instance_id,
+      const RemoteCharacteristicStopNotificationsCallback& callback) override;
+
+  // Callbacks for BluetoothGattCharacteristic::ReadRemoteCharacteristic.
+  void OnReadValueSuccess(const RemoteCharacteristicReadValueCallback& callback,
+                          const std::vector<uint8_t>& value);
+  void OnReadValueFailed(
+      const RemoteCharacteristicReadValueCallback& callback,
+      device::BluetoothGattService::GattErrorCode error_code);
 
   // Callbacks for BluetoothGattCharacteristic::WriteRemoteCharacteristic.
   void OnWriteValueSuccess(
@@ -54,14 +105,38 @@
       const RemoteCharacteristicWriteValueCallback& callback,
       device::BluetoothGattService::GattErrorCode error_code);
 
+  // Callbacks for BluetoothGattCharacteristic::StartNotifySession.
+  void OnStartNotifySessionSuccess(
+      const RemoteCharacteristicStartNotificationsCallback& callback,
+      std::unique_ptr<device::BluetoothGattNotifySession> notify_session);
+  void OnStartNotifySessionFailed(
+      const RemoteCharacteristicStartNotificationsCallback& callback,
+      device::BluetoothGattService::GattErrorCode error_code);
+
+  // Callback for BluetoothGattNotifySession::Stop.
+  void OnStopNotifySessionComplete(
+      const std::string& characteristic_instance_id,
+      const RemoteCharacteristicStopNotificationsCallback& callback);
+
   RenderProcessHost* GetRenderProcessHost();
   BluetoothDispatcherHost* GetBluetoothDispatcherHost();
   void CrashRendererAndClosePipe(bad_message::BadMessageReason reason);
   url::Origin GetOrigin();
 
+  // All state (maps, sets, etc.) should be cleaned after navigations
+  // that are not in the same page.
+
+  // Map to keep track of the characteristics' notify sessions.
+  std::unordered_map<std::string,
+                     std::unique_ptr<device::BluetoothGattNotifySession>>
+      characteristic_id_to_notify_session_;
+
   // The RFH that owns this instance.
   RenderFrameHost* render_frame_host_;
 
+  // Proxy to the WebBluetoothServiceClient to send device events to.
+  blink::mojom::WebBluetoothServiceClientAssociatedPtr client_;
+
   // The lifetime of this instance is exclusively managed by the RFH that
   // owns it so we use a "Binding" as opposed to a "StrongBinding" which deletes
   // the service on pipe connection errors.
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 2b8e20d..3fc47c3 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -36,7 +36,6 @@
 #include "content/common/host_shared_bitmap_manager.h"
 #include "content/common/input_messages.h"
 #include "content/common/site_isolation_policy.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_messages.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_plugin_guest_manager.h"
@@ -777,14 +776,6 @@
   if (!attached())
     return;
 
-  // The BrowserPluginGuest loses the link to |owner_web_contents_|. Therefore,
-  // the RenderWidgetHostViewGuest will not get a chance to update its text
-  // input state which is tracked by |owner_web_contents_|.
-  // TODO(ekaramad): We should perform detaching through WebContentsImpl (
-  // inner WebContents detaching from outer WebContents). After this is fixed,
-  // we can remove this call to OnTextInputStateChanged (crbug.com/602640).
-  OnTextInputStateChanged(TextInputState());
-
   // This tells BrowserPluginGuest to queue up all IPCs to BrowserPlugin until
   // it's attached again.
   attached_ = false;
@@ -988,9 +979,10 @@
       new BrowserPluginMsg_AdvanceFocus(browser_plugin_instance_id(), reverse));
 }
 
-void BrowserPluginGuest::OnTextInputStateChanged(const TextInputState& params) {
+void BrowserPluginGuest::OnTextInputStateChanged(
+    const ViewHostMsg_TextInputState_Params& params) {
   // Save the state of text input so we can restore it on focus.
-  last_text_input_state_.reset(new TextInputState(params));
+  last_text_input_state_.reset(new ViewHostMsg_TextInputState_Params(params));
 
   SendTextInputTypeChangedToView(
       static_cast<RenderWidgetHostViewBase*>(
diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h
index 83a2715e..a763430 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.h
+++ b/content/browser/browser_plugin/browser_plugin_guest.h
@@ -45,6 +45,7 @@
 #include "ui/gfx/geometry/rect.h"
 
 struct BrowserPluginHostMsg_Attach_Params;
+struct ViewHostMsg_TextInputState_Params;
 
 #if defined(OS_MACOSX)
 struct FrameHostMsg_ShowPopup_Params;
@@ -69,7 +70,6 @@
 class RenderWidgetHostViewBase;
 class SiteInstance;
 struct DropData;
-struct TextInputState;
 
 // A browser plugin guest provides functionality for WebContents to operate in
 // the guest role and implements guest-specific overrides for ViewHostMsg_*
@@ -332,7 +332,8 @@
   void OnUnlockMouseAck(int instance_id);
   void OnUpdateGeometry(int instance_id, const gfx::Rect& view_rect);
 
-  void OnTextInputStateChanged(const TextInputState& params);
+  void OnTextInputStateChanged(
+      const ViewHostMsg_TextInputState_Params& params);
   void OnImeSetComposition(
       int instance_id,
       const std::string& text,
@@ -425,9 +426,8 @@
 
   // Text input type states.
   // Using scoped_ptr to avoid including the header file: view_messages.h.
-  // TODO(ekaramad): The text input state tracking is now done by the
-  // WebContentsImpl. We should remove this variable (crbug.com/602427).
-  std::unique_ptr<const TextInputState> last_text_input_state_;
+  std::unique_ptr<const ViewHostMsg_TextInputState_Params>
+      last_text_input_state_;
 
   // The is the routing ID for a swapped out RenderView for the guest
   // WebContents in the embedder's process.
diff --git a/content/browser/compositor/gl_helper.cc b/content/browser/compositor/gl_helper.cc
index fc17815..b88e78c 100644
--- a/content/browser/compositor/gl_helper.cc
+++ b/content/browser/compositor/gl_helper.cc
@@ -25,8 +25,6 @@
 #include "gpu/command_buffer/client/context_support.h"
 #include "gpu/command_buffer/common/mailbox.h"
 #include "gpu/command_buffer/common/mailbox_holder.h"
-#include "media/base/video_frame.h"
-#include "media/base/video_util.h"
 #include "third_party/skia/include/core/SkRegion.h"
 #include "ui/gfx/geometry/point.h"
 #include "ui/gfx/geometry/rect.h"
@@ -168,8 +166,8 @@
       const base::Callback<void(bool)>& callback);
 
   void ReadbackPlane(TextureFrameBufferPair* source,
-                     const scoped_refptr<media::VideoFrame>& target,
-                     int plane,
+                     int row_stride_bytes,
+                     unsigned char* data,
                      int size_shift,
                      const gfx::Rect& paste_rect,
                      ReadbackSwizzle swizzle,
@@ -271,7 +269,13 @@
 
     void ReadbackYUV(const gpu::Mailbox& mailbox,
                      const gpu::SyncToken& sync_token,
-                     const scoped_refptr<media::VideoFrame>& target,
+                     const gfx::Rect& target_visible_rect,
+                     int y_plane_row_stride_bytes,
+                     unsigned char* y_plane_data,
+                     int u_plane_row_stride_bytes,
+                     unsigned char* u_plane_data,
+                     int v_plane_row_stride_bytes,
+                     unsigned char* v_plane_data,
                      const gfx::Point& paste_location,
                      const base::Callback<void(bool)>& callback) override;
 
@@ -307,7 +311,13 @@
 
     void ReadbackYUV(const gpu::Mailbox& mailbox,
                      const gpu::SyncToken& sync_token,
-                     const scoped_refptr<media::VideoFrame>& target,
+                     const gfx::Rect& target_visible_rect,
+                     int y_plane_row_stride_bytes,
+                     unsigned char* y_plane_data,
+                     int u_plane_row_stride_bytes,
+                     unsigned char* u_plane_data,
+                     int v_plane_row_stride_bytes,
+                     unsigned char* v_plane_data,
                      const gfx::Point& paste_location,
                      const base::Callback<void(bool)>& callback) override;
 
@@ -931,17 +941,17 @@
 
 void GLHelper::CopyTextureToImpl::ReadbackPlane(
     TextureFrameBufferPair* source,
-    const scoped_refptr<media::VideoFrame>& target,
-    int plane,
+    int row_stride_bytes,
+    unsigned char* data,
     int size_shift,
     const gfx::Rect& paste_rect,
     ReadbackSwizzle swizzle,
     const base::Callback<void(bool)>& callback) {
   gl_->BindFramebuffer(GL_FRAMEBUFFER, source->framebuffer());
-  const size_t offset = target->stride(plane) * (paste_rect.y() >> size_shift) +
+  const size_t offset = row_stride_bytes * (paste_rect.y() >> size_shift) +
                         (paste_rect.x() >> size_shift);
   ReadbackAsync(source->size(), paste_rect.width() >> size_shift,
-                target->stride(plane), target->data(plane) + offset,
+                row_stride_bytes, data + offset,
                 (swizzle == kSwizzleBGRA) ? GL_BGRA_EXT : GL_RGBA,
                 GL_UNSIGNED_BYTE, 4, callback);
 }
@@ -1012,17 +1022,16 @@
   DCHECK(!(dst_size.height() & 1));
 }
 
-static void CallbackKeepingVideoFrameAlive(
-    scoped_refptr<media::VideoFrame> video_frame,
-    const base::Callback<void(bool)>& callback,
-    bool success) {
-  callback.Run(success);
-}
-
 void GLHelper::CopyTextureToImpl::ReadbackYUVImpl::ReadbackYUV(
     const gpu::Mailbox& mailbox,
     const gpu::SyncToken& sync_token,
-    const scoped_refptr<media::VideoFrame>& target,
+    const gfx::Rect& target_visible_rect,
+    int y_plane_row_stride_bytes,
+    unsigned char* y_plane_data,
+    int u_plane_row_stride_bytes,
+    unsigned char* u_plane_data,
+    int v_plane_row_stride_bytes,
+    unsigned char* v_plane_data,
     const gfx::Point& paste_location,
     const base::Callback<void(bool)>& callback) {
   DCHECK(!(paste_location.x() & 1));
@@ -1041,7 +1050,7 @@
   v_.Scale(scaler_.texture());
 
   const gfx::Rect paste_rect(paste_location, dst_size_);
-  if (!target->visible_rect().Contains(paste_rect)) {
+  if (!target_visible_rect.Contains(paste_rect)) {
     LOG(DFATAL) << "Paste rect not inside VideoFrame's visible rect!";
     callback.Run(false);
     return;
@@ -1049,18 +1058,16 @@
 
   // Read back planes, one at a time. Keep the video frame alive while doing the
   // readback.
-  copy_impl_->ReadbackPlane(y_.texture_and_framebuffer(), target,
-                            media::VideoFrame::kYPlane, 0, paste_rect, swizzle_,
-                            base::Bind(&nullcallback));
-  copy_impl_->ReadbackPlane(u_.texture_and_framebuffer(), target,
-                            media::VideoFrame::kUPlane, 1, paste_rect, swizzle_,
-                            base::Bind(&nullcallback));
-  copy_impl_->ReadbackPlane(
-      v_.texture_and_framebuffer(), target, media::VideoFrame::kVPlane, 1,
-      paste_rect, swizzle_,
-      base::Bind(&CallbackKeepingVideoFrameAlive, target, callback));
+  copy_impl_->ReadbackPlane(y_.texture_and_framebuffer(),
+                            y_plane_row_stride_bytes, y_plane_data, 0,
+                            paste_rect, swizzle_, base::Bind(&nullcallback));
+  copy_impl_->ReadbackPlane(u_.texture_and_framebuffer(),
+                            u_plane_row_stride_bytes, u_plane_data, 1,
+                            paste_rect, swizzle_, base::Bind(&nullcallback));
+  copy_impl_->ReadbackPlane(v_.texture_and_framebuffer(),
+                            v_plane_row_stride_bytes, v_plane_data, 1,
+                            paste_rect, swizzle_, callback);
   gl_->BindFramebuffer(GL_FRAMEBUFFER, 0);
-  media::LetterboxYUV(target.get(), paste_rect);
 }
 
 // YUV readback constructors. Initiates the main scaler pipeline and
@@ -1118,7 +1125,13 @@
 void GLHelper::CopyTextureToImpl::ReadbackYUV_MRT::ReadbackYUV(
     const gpu::Mailbox& mailbox,
     const gpu::SyncToken& sync_token,
-    const scoped_refptr<media::VideoFrame>& target,
+    const gfx::Rect& target_visible_rect,
+    int y_plane_row_stride_bytes,
+    unsigned char* y_plane_data,
+    int u_plane_row_stride_bytes,
+    unsigned char* u_plane_data,
+    int v_plane_row_stride_bytes,
+    unsigned char* v_plane_data,
     const gfx::Point& paste_location,
     const base::Callback<void(bool)>& callback) {
   DCHECK(!(paste_location.x() & 1));
@@ -1152,22 +1165,20 @@
   pass2_shader_->Execute(uv_, outputs);
 
   const gfx::Rect paste_rect(paste_location, dst_size_);
-  if (!target->visible_rect().Contains(paste_rect)) {
+  if (!target_visible_rect.Contains(paste_rect)) {
     LOG(DFATAL) << "Paste rect not inside VideoFrame's visible rect!";
     callback.Run(false);
     return;
   }
 
   // Read back planes, one at a time.
-  copy_impl_->ReadbackPlane(&y_, target, media::VideoFrame::kYPlane, 0,
+  copy_impl_->ReadbackPlane(&y_, y_plane_row_stride_bytes, y_plane_data, 0,
                             paste_rect, swizzle_, base::Bind(&nullcallback));
-  copy_impl_->ReadbackPlane(&u_, target, media::VideoFrame::kUPlane, 1,
+  copy_impl_->ReadbackPlane(&u_, u_plane_row_stride_bytes, u_plane_data, 1,
                             paste_rect, swizzle_, base::Bind(&nullcallback));
-  copy_impl_->ReadbackPlane(
-      &v_, target, media::VideoFrame::kVPlane, 1, paste_rect, swizzle_,
-      base::Bind(&CallbackKeepingVideoFrameAlive, target, callback));
+  copy_impl_->ReadbackPlane(&v_, v_plane_row_stride_bytes, v_plane_data, 1,
+                            paste_rect, swizzle_, callback);
   gl_->BindFramebuffer(GL_FRAMEBUFFER, 0);
-  media::LetterboxYUV(target.get(), paste_rect);
 }
 
 bool GLHelper::IsReadbackConfigSupported(SkColorType color_type) {
diff --git a/content/browser/compositor/gl_helper.h b/content/browser/compositor/gl_helper.h
index 582c00b9c1..8ebba5f 100644
--- a/content/browser/compositor/gl_helper.h
+++ b/content/browser/compositor/gl_helper.h
@@ -26,10 +26,6 @@
 struct Mailbox;
 }
 
-namespace media {
-class VideoFrame;
-};
-
 class SkRegion;
 
 namespace content {
@@ -369,7 +365,13 @@
   // |target->visible_rect()|.
   virtual void ReadbackYUV(const gpu::Mailbox& mailbox,
                            const gpu::SyncToken& sync_token,
-                           const scoped_refptr<media::VideoFrame>& target,
+                           const gfx::Rect& target_visible_rect,
+                           int y_plane_row_stride_bytes,
+                           unsigned char* y_plane_data,
+                           int u_plane_row_stride_bytes,
+                           unsigned char* u_plane_data,
+                           int v_plane_row_stride_bytes,
+                           unsigned char* v_plane_data,
                            const gfx::Point& paste_location,
                            const base::Callback<void(bool)>& callback) = 0;
   virtual GLHelper::ScalerInterface* scaler() = 0;
diff --git a/content/browser/compositor/gl_helper_unittest.cc b/content/browser/compositor/gl_helper_unittest.cc
index 05f3f6f6..a423426 100644
--- a/content/browser/compositor/gl_helper_unittest.cc
+++ b/content/browser/compositor/gl_helper_unittest.cc
@@ -35,6 +35,7 @@
 #include "gpu/command_buffer/client/gl_in_process_context.h"
 #include "gpu/command_buffer/client/gles2_implementation.h"
 #include "media/base/video_frame.h"
+#include "media/base/video_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkTypes.h"
@@ -1330,9 +1331,19 @@
             base::TimeDelta::FromSeconds(0));
 
     base::RunLoop run_loop;
-    yuv_reader->ReadbackYUV(mailbox, sync_token, output_frame.get(),
+    yuv_reader->ReadbackYUV(mailbox, sync_token, output_frame->visible_rect(),
+                            output_frame->stride(media::VideoFrame::kYPlane),
+                            output_frame->data(media::VideoFrame::kYPlane),
+                            output_frame->stride(media::VideoFrame::kUPlane),
+                            output_frame->data(media::VideoFrame::kUPlane),
+                            output_frame->stride(media::VideoFrame::kVPlane),
+                            output_frame->data(media::VideoFrame::kVPlane),
                             gfx::Point(xmargin, ymargin),
                             base::Bind(&callcallback, run_loop.QuitClosure()));
+
+    const gfx::Rect paste_rect(gfx::Point(xmargin, ymargin),
+                               gfx::Size(xsize, ysize));
+    media::LetterboxYUV(output_frame.get(), paste_rect);
     run_loop.Run();
 
     if (flip) {
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index dfc01621..477bcfd 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -422,13 +422,6 @@
   MOCK_METHOD1(CreateZoomLevelDelegateMock,
                ZoomLevelDelegate*(const base::FilePath&));
   MOCK_CONST_METHOD0(IsOffTheRecord, bool());
-  MOCK_METHOD0(GetMediaRequestContext,
-               net::URLRequestContextGetter*());
-  MOCK_METHOD1(GetMediaRequestContextForRenderProcess,
-               net::URLRequestContextGetter*(int renderer_child_id));
-  MOCK_METHOD2(GetMediaRequestContextForStoragePartition,
-               net::URLRequestContextGetter*(
-                   const base::FilePath& partition_path, bool in_memory));
   MOCK_METHOD0(GetResourceContext, ResourceContext*());
   MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*());
   MOCK_METHOD0(GetGuestManager, BrowserPluginGuestManager* ());
@@ -437,6 +430,11 @@
   MOCK_METHOD0(GetSSLHostStateDelegate, SSLHostStateDelegate*());
   MOCK_METHOD0(GetPermissionManager, PermissionManager*());
   MOCK_METHOD0(GetBackgroundSyncController, BackgroundSyncController*());
+  MOCK_METHOD0(CreateMediaRequestContext,
+               net::URLRequestContextGetter*());
+  MOCK_METHOD2(CreateMediaRequestContextForStoragePartition,
+               net::URLRequestContextGetter*(
+                   const base::FilePath& partition_path, bool in_memory));
 
   // Define these two methods to avoid a
   // cannot access private member declared in class 'ScopedVector<net::URLRequestInterceptor>'
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index b658927d..a9683d3 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -497,7 +497,7 @@
     const GURL& url, const std::string& content_type) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   // Only an internal Blob URL is expected here. See the BlobURL of the Blink.
-  if (!base::StartsWith(url.path(), "blobinternal%3A///",
+  if (!base::StartsWith(url.path(), "blobinternal:///",
                         base::CompareCase::SENSITIVE)) {
     NOTREACHED() << "Malformed Stream URL: " << url.spec();
     bad_message::ReceivedBadMessage(this,
diff --git a/content/browser/fileapi/fileapi_message_filter_unittest.cc b/content/browser/fileapi/fileapi_message_filter_unittest.cc
index 61590a94..c48997e 100644
--- a/content/browser/fileapi/fileapi_message_filter_unittest.cc
+++ b/content/browser/fileapi/fileapi_message_filter_unittest.cc
@@ -38,9 +38,9 @@
 namespace {
 
 const char kFakeBlobInternalUrlSpec[] =
-    "blob:blobinternal%3A///dc83ede4-9bbd-453b-be2e-60fd623fcc93";
+    "blob:blobinternal:///dc83ede4-9bbd-453b-be2e-60fd623fcc93";
 const char kFakeBlobInternalUrlSpec2[] =
-    "blob:blobinternal%3A///d28ae2e7-d233-4dda-9598-d135fe5d403e";
+    "blob:blobinternal:///d28ae2e7-d233-4dda-9598-d135fe5d403e";
 
 const char kFakeContentType[] = "fake/type";
 
diff --git a/content/browser/frame_host/frame_mojo_shell.cc b/content/browser/frame_host/frame_mojo_shell.cc
index 8eb6f70..d40ec40 100644
--- a/content/browser/frame_host/frame_mojo_shell.cc
+++ b/content/browser/frame_host/frame_mojo_shell.cc
@@ -9,7 +9,6 @@
 #include "build/build_config.h"
 #include "content/browser/mojo/mojo_shell_context.h"
 #include "content/common/mojo/service_registry_impl.h"
-#include "content/public/browser/browser_context.h"
 #include "content/public/browser/content_browser_client.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/render_process_host.h"
@@ -58,10 +57,8 @@
   shell::mojom::InterfaceProviderPtr frame_services;
   service_provider_bindings_.AddBinding(GetServiceRegistry(),
                                         GetProxy(&frame_services));
-  std::string mojo_user_id = BrowserContext::GetMojoUserIdFor(
-      frame_host_->GetProcess()->GetBrowserContext());
   MojoShellContext::ConnectToApplication(
-      mojo_user_id, target->name,
+      shell::mojom::kRootUserID, target->name,
       frame_host_->GetSiteInstance()->GetSiteURL().spec(), std::move(services),
       std::move(frame_services), callback);
 }
diff --git a/content/browser/frame_host/frame_navigation_entry.cc b/content/browser/frame_host/frame_navigation_entry.cc
index fe8809c..a6fc6d9 100644
--- a/content/browser/frame_host/frame_navigation_entry.cc
+++ b/content/browser/frame_host/frame_navigation_entry.cc
@@ -11,8 +11,8 @@
 FrameNavigationEntry::FrameNavigationEntry(int frame_tree_node_id)
     : frame_tree_node_id_(frame_tree_node_id),
       item_sequence_number_(-1),
-      document_sequence_number_(-1) {
-}
+      document_sequence_number_(-1),
+      post_id_(-1) {}
 
 FrameNavigationEntry::FrameNavigationEntry(
     int frame_tree_node_id,
@@ -21,14 +21,18 @@
     int64_t document_sequence_number,
     scoped_refptr<SiteInstanceImpl> site_instance,
     const GURL& url,
-    const Referrer& referrer)
+    const Referrer& referrer,
+    const std::string& method,
+    int64_t post_id)
     : frame_tree_node_id_(frame_tree_node_id),
       frame_unique_name_(frame_unique_name),
       item_sequence_number_(item_sequence_number),
       document_sequence_number_(document_sequence_number),
       site_instance_(std::move(site_instance)),
       url_(url),
-      referrer_(referrer) {}
+      referrer_(referrer),
+      method_(method),
+      post_id_(post_id) {}
 
 FrameNavigationEntry::~FrameNavigationEntry() {
 }
@@ -37,7 +41,7 @@
   FrameNavigationEntry* copy = new FrameNavigationEntry(frame_tree_node_id_);
   copy->UpdateEntry(frame_unique_name_, item_sequence_number_,
                     document_sequence_number_, site_instance_.get(), url_,
-                    referrer_, page_state_);
+                    referrer_, page_state_, method_, post_id_);
   return copy;
 }
 
@@ -47,7 +51,9 @@
                                        SiteInstanceImpl* site_instance,
                                        const GURL& url,
                                        const Referrer& referrer,
-                                       const PageState& page_state) {
+                                       const PageState& page_state,
+                                       const std::string& method,
+                                       int64_t post_id) {
   frame_unique_name_ = frame_unique_name;
   item_sequence_number_ = item_sequence_number;
   document_sequence_number_ = document_sequence_number;
@@ -55,6 +61,8 @@
   url_ = url;
   referrer_ = referrer;
   page_state_ = page_state;
+  method_ = method;
+  post_id_ = post_id;
 }
 
 void FrameNavigationEntry::set_item_sequence_number(
diff --git a/content/browser/frame_host/frame_navigation_entry.h b/content/browser/frame_host/frame_navigation_entry.h
index 8527c4a..e93eb010 100644
--- a/content/browser/frame_host/frame_navigation_entry.h
+++ b/content/browser/frame_host/frame_navigation_entry.h
@@ -35,7 +35,9 @@
                        int64_t document_sequence_number,
                        scoped_refptr<SiteInstanceImpl> site_instance,
                        const GURL& url,
-                       const Referrer& referrer);
+                       const Referrer& referrer,
+                       const std::string& method,
+                       int64_t post_id);
 
   // Creates a copy of this FrameNavigationEntry that can be modified
   // independently from the original.
@@ -48,7 +50,9 @@
                    SiteInstanceImpl* site_instance,
                    const GURL& url,
                    const Referrer& referrer,
-                   const PageState& page_state);
+                   const PageState& page_state,
+                   const std::string& method,
+                   int64_t post_id);
 
   // The ID of the FrameTreeNode this entry is for.  -1 for the main frame,
   // since we don't always know the FrameTreeNode ID when creating the overall
@@ -105,6 +109,15 @@
   void set_page_state(const PageState& page_state) { page_state_ = page_state; }
   const PageState& page_state() const { return page_state_; }
 
+  // The HTTP method used to navigate.
+  const std::string& method() const { return method_; }
+  void set_method(const std::string& method) { method_ = method; }
+
+  // The id of the post corresponding to this navigation or -1 if the
+  // navigation was not a POST.
+  int64_t post_id() const { return post_id_; }
+  void set_post_id(int64_t post_id) { post_id_ = post_id; }
+
  private:
   friend class base::RefCounted<FrameNavigationEntry>;
   virtual ~FrameNavigationEntry();
@@ -125,6 +138,8 @@
   Referrer referrer_;
   // TODO(creis): Change this to FrameState.
   PageState page_state_;
+  std::string method_;
+  int64_t post_id_;
 
   DISALLOW_COPY_AND_ASSIGN(FrameNavigationEntry);
 };
diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc
index fcb33292..25a218f 100644
--- a/content/browser/frame_host/interstitial_page_impl.cc
+++ b/content/browser/frame_host/interstitial_page_impl.cc
@@ -34,7 +34,6 @@
 #include "content/browser/web_contents/web_contents_view.h"
 #include "content/common/frame_messages.h"
 #include "content/common/input_messages.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_messages.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_thread.h"
@@ -173,7 +172,6 @@
       create_view_(true),
       pause_throbber_(false),
       delegate_(delegate),
-      text_input_state_(new TextInputState()),
       weak_ptr_factory_(this) {
   InitInterstitialPageMap();
 }
@@ -540,19 +538,6 @@
   CHECK(!web_contents_);
 }
 
-const TextInputState* InterstitialPageImpl::GetTextInputState() {
-  return text_input_state_.get();
-}
-
-void InterstitialPageImpl::UpdateTextInputState(RenderWidgetHostViewBase* rwhv,
-                                                bool text_input_state_changed) {
-  if (web_contents_) {
-    WebContentsImpl* contents = static_cast<WebContentsImpl*>(web_contents_);
-    contents->UpdateTextInputState(rwhv, text_input_state_changed);
-    *text_input_state_ = *contents->GetTextInputState();
-  }
-}
-
 bool InterstitialPageImpl::PreHandleKeyboardEvent(
     const NativeWebKeyboardEvent& event,
     bool* is_keyboard_shortcut) {
diff --git a/content/browser/frame_host/interstitial_page_impl.h b/content/browser/frame_host/interstitial_page_impl.h
index 86f96558..cbefe14 100644
--- a/content/browser/frame_host/interstitial_page_impl.h
+++ b/content/browser/frame_host/interstitial_page_impl.h
@@ -31,7 +31,6 @@
 class RenderViewHostImpl;
 class RenderWidgetHostView;
 class WebContentsView;
-struct TextInputState;
 
 enum ResourceRequestAction {
   BLOCK,
@@ -155,9 +154,6 @@
 
   // RenderWidgetHostDelegate implementation:
   void RenderWidgetDeleted(RenderWidgetHostImpl* render_widget_host) override;
-  const TextInputState* GetTextInputState() override;
-  void UpdateTextInputState(RenderWidgetHostViewBase* rwhv,
-                            bool text_input_state_changed) override;
   bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
                               bool* is_keyboard_shortcut) override;
   void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) override;
@@ -300,8 +296,6 @@
 
   scoped_refptr<SessionStorageNamespace> session_storage_namespace_;
 
-  std::unique_ptr<TextInputState> text_input_state_;
-
   base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl);
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index 6732fefb..9b3fd5e 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -737,7 +737,7 @@
         entry = GetLastCommittedEntry()->Clone();
         entry->SetPageID(-1);
         entry->AddOrUpdateFrameEntry(node, "", -1, -1, nullptr, params.url,
-                                     params.referrer, PageState());
+                                     params.referrer, PageState(), "GET", -1);
       }
     }
   }
@@ -1120,8 +1120,6 @@
   new_entry->SetTransitionType(params.transition);
   new_entry->set_site_instance(
       static_cast<SiteInstanceImpl*>(rfh->GetSiteInstance()));
-  new_entry->SetHasPostData(params.is_post);
-  new_entry->SetPostID(params.post_id);
   new_entry->SetOriginalRequestURL(params.original_request_url);
   new_entry->SetIsOverridingUserAgent(params.is_overriding_user_agent);
 
@@ -1131,6 +1129,8 @@
   frame_entry->set_frame_unique_name(params.frame_unique_name);
   frame_entry->set_item_sequence_number(params.item_sequence_number);
   frame_entry->set_document_sequence_number(params.document_sequence_number);
+  frame_entry->set_method(params.method);
+  frame_entry->set_post_id(params.post_id);
 
   // history.pushState() is classified as a navigation to a new page, but
   // sets was_within_same_page to true. In this case, we already have the
@@ -1184,6 +1184,12 @@
   if (entry->update_virtual_url_with_url())
     UpdateVirtualURLToURL(entry, params.url);
 
+  // Update the post parameters.
+  FrameNavigationEntry* frame_entry =
+      entry->GetFrameEntry(rfh->frame_tree_node());
+  frame_entry->set_method(params.method);
+  frame_entry->set_post_id(params.post_id);
+
   // The redirected to page should not inherit the favicon from the previous
   // page.
   if (ui::PageTransitionIsRedirect(params.transition))
@@ -1196,9 +1202,6 @@
   entry->set_site_instance(
       static_cast<SiteInstanceImpl*>(rfh->GetSiteInstance()));
 
-  entry->SetHasPostData(params.is_post);
-  entry->SetPostID(params.post_id);
-
   // The entry we found in the list might be pending if the user hit
   // back/forward/reload. This load should commit it (since it's already in the
   // list, we can just discard the pending pointer).  We should also discard the
@@ -1241,8 +1244,10 @@
   existing_entry->SetReferrer(params.referrer);
 
   // The page may have been requested with a different HTTP method.
-  existing_entry->SetHasPostData(params.is_post);
-  existing_entry->SetPostID(params.post_id);
+  FrameNavigationEntry* frame_entry =
+      existing_entry->GetFrameEntry(rfh->frame_tree_node());
+  frame_entry->set_method(params.method);
+  frame_entry->set_post_id(params.post_id);
 
   DiscardNonCommittedEntries();
 }
@@ -1267,7 +1272,8 @@
     FrameNavigationEntry* frame_entry = new FrameNavigationEntry(
         rfh->frame_tree_node()->frame_tree_node_id(), params.frame_unique_name,
         params.item_sequence_number, params.document_sequence_number,
-        rfh->GetSiteInstance(), params.url, params.referrer);
+        rfh->GetSiteInstance(), params.url, params.referrer, params.method,
+        params.post_id);
     new_entry = GetLastCommittedEntry()->CloneAndReplace(rfh->frame_tree_node(),
                                                          frame_entry);
 
@@ -1328,7 +1334,8 @@
     last_committed->AddOrUpdateFrameEntry(
         rfh->frame_tree_node(), params.frame_unique_name,
         params.item_sequence_number, params.document_sequence_number,
-        rfh->GetSiteInstance(), params.url, params.referrer, params.page_state);
+        rfh->GetSiteInstance(), params.url, params.referrer, params.page_state,
+        params.method, params.post_id);
 
     // Cross-process subframe navigations may leave a pending entry around.
     // Clear it if it's actually for the subframe.
diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
index ef86543..d369b414 100644
--- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
@@ -3648,4 +3648,63 @@
   EXPECT_EQ(url_3, new_root->current_url());
 }
 
+// Tests that when using FrameNavigationEntries, knowledge of POST navigations
+// is recorded on a subframe level.
+IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
+                       PostInSubframe) {
+  if (!SiteIsolationPolicy::UseSubframeNavigationEntries())
+    return;
+
+  GURL page_with_form_url = embedded_test_server()->GetURL(
+      "/navigation_controller/subframe_form.html");
+  NavigateToURL(shell(), page_with_form_url);
+
+  NavigationControllerImpl& controller = static_cast<NavigationControllerImpl&>(
+      shell()->web_contents()->GetController());
+  FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents())
+                            ->GetFrameTree()
+                            ->root();
+  FrameTreeNode* frame = root->child_at(0);
+  EXPECT_EQ(1, controller.GetEntryCount());
+
+  {
+    NavigationEntryImpl* entry = controller.GetLastCommittedEntry();
+    FrameNavigationEntry* root_entry = entry->GetFrameEntry(root);
+    FrameNavigationEntry* frame_entry = entry->GetFrameEntry(frame);
+    EXPECT_NE(nullptr, root_entry);
+    EXPECT_NE(nullptr, frame_entry);
+    EXPECT_EQ("GET", root_entry->method());
+    EXPECT_EQ(-1, root_entry->post_id());
+    EXPECT_EQ("GET", frame_entry->method());
+    EXPECT_EQ(-1, frame_entry->post_id());
+    EXPECT_FALSE(entry->GetHasPostData());
+    EXPECT_EQ(-1, entry->GetPostID());
+  }
+
+  // Submit the form.
+  TestNavigationObserver observer(shell()->web_contents(), 1);
+  EXPECT_TRUE(ExecuteScript(
+      shell()->web_contents(),
+      "window.domAutomationController.send(submitForm('isubmit'))"));
+  observer.Wait();
+
+  EXPECT_EQ(2, controller.GetEntryCount());
+  {
+    NavigationEntryImpl* entry = controller.GetLastCommittedEntry();
+    FrameNavigationEntry* root_entry = entry->GetFrameEntry(root);
+    FrameNavigationEntry* frame_entry = entry->GetFrameEntry(frame);
+    EXPECT_NE(nullptr, root_entry);
+    EXPECT_NE(nullptr, frame_entry);
+    EXPECT_EQ("GET", root_entry->method());
+    EXPECT_EQ(-1, root_entry->post_id());
+    EXPECT_EQ("POST", frame_entry->method());
+    // TODO(clamy): Check the post id as well when PlzNavigate handles it
+    // properly.
+    if (!IsBrowserSideNavigationEnabled())
+      EXPECT_NE(-1, frame_entry->post_id());
+    EXPECT_FALSE(entry->GetHasPostData());
+    EXPECT_EQ(-1, entry->GetPostID());
+  }
+}
+
 }  // namespace content
diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc
index 33f57c8..6257838d8 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -843,7 +843,7 @@
   params.did_create_new_entry = true;
   params.url = url1;
   params.transition = ui::PAGE_TRANSITION_TYPED;
-  params.is_post = true;
+  params.method = "POST";
   params.post_id = 123;
   params.page_state = PageState::CreateForTesting(url1, false, 0, 0);
   main_test_rfh()->PrepareForCommit();
@@ -1951,7 +1951,7 @@
   params.redirects.push_back(GURL("http://foo2"));
   params.should_update_history = false;
   params.gesture = NavigationGestureAuto;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(url2);
 
   main_test_rfh()->PrepareForCommit();
@@ -2019,7 +2019,7 @@
   params.redirects.push_back(GURL("http://foo2"));
   params.should_update_history = false;
   params.gesture = NavigationGestureAuto;
-  params.is_post = true;
+  params.method = "POST";
   params.page_state = PageState::CreateFromURL(url2);
 
   main_test_rfh()->PrepareForCommit();
@@ -2038,7 +2038,7 @@
 
   params.nav_entry_id = entry_id;
   params.did_create_new_entry = false;
-  params.is_post = false;
+  params.method = "GET";
 
   EXPECT_EQ(0U, notifications.size());
   LoadCommittedDetailsObserver observer(contents());
@@ -2088,7 +2088,7 @@
   params.redirects.push_back(GURL("http://foo2"));
   params.should_update_history = false;
   params.gesture = NavigationGestureAuto;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(url2);
 
   LoadCommittedDetailsObserver observer(contents());
@@ -2192,7 +2192,7 @@
     params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME;
     params.should_update_history = false;
     params.gesture = NavigationGestureUser;
-    params.is_post = false;
+    params.method = "GET";
     params.page_state = PageState::CreateFromURL(subframe_url);
 
     // Navigating should do nothing.
@@ -2212,7 +2212,7 @@
   params.transition = ui::PAGE_TRANSITION_MANUAL_SUBFRAME;
   params.should_update_history = false;
   params.gesture = NavigationGestureUser;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(url2);
 
   LoadCommittedDetailsObserver observer(contents());
@@ -2276,7 +2276,7 @@
     params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME;
     params.should_update_history = false;
     params.gesture = NavigationGestureUser;
-    params.is_post = false;
+    params.method = "GET";
     params.page_state = PageState::CreateFromURL(url2);
 
     // Navigating should do nothing.
@@ -2323,7 +2323,7 @@
     params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME;
     params.should_update_history = false;
     params.gesture = NavigationGestureUser;
-    params.is_post = false;
+    params.method = "GET";
     params.page_state = PageState::CreateFromURL(url3);
 
     // Navigating should do nothing.
@@ -2375,7 +2375,7 @@
     params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME;
     params.should_update_history = false;
     params.gesture = NavigationGestureUser;
-    params.is_post = false;
+    params.method = "GET";
     params.page_state = PageState::CreateFromURL(url4);
 
     // Navigating should do nothing.
@@ -2441,7 +2441,7 @@
     params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME;
     params.should_update_history = false;
     params.gesture = NavigationGestureUser;
-    params.is_post = false;
+    params.method = "GET";
     params.page_state = PageState::CreateFromURL(subframe_url);
     params.item_sequence_number = item_sequence_number1;
 
@@ -2463,7 +2463,7 @@
   params.transition = ui::PAGE_TRANSITION_MANUAL_SUBFRAME;
   params.should_update_history = false;
   params.gesture = NavigationGestureUser;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(url2);
   params.item_sequence_number = item_sequence_number2;
 
@@ -2601,7 +2601,7 @@
   self_params.transition = ui::PAGE_TRANSITION_LINK;
   self_params.should_update_history = false;
   self_params.gesture = NavigationGestureUser;
-  self_params.is_post = false;
+  self_params.method = "GET";
   self_params.page_state = PageState::CreateFromURL(url1);
   self_params.was_within_same_page = true;
 
@@ -2626,7 +2626,7 @@
   params.transition = ui::PAGE_TRANSITION_LINK;
   params.should_update_history = false;
   params.gesture = NavigationGestureUser;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(url2);
   params.was_within_same_page = true;
 
@@ -2725,7 +2725,7 @@
   params.transition = ui::PAGE_TRANSITION_LINK;
   params.should_update_history = false;
   params.gesture = NavigationGestureUser;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(url2);
   params.was_within_same_page = true;
 
@@ -2780,7 +2780,7 @@
     params.redirects.push_back(url);
     params.should_update_history = true;
     params.gesture = NavigationGestureUnknown;
-    params.is_post = false;
+    params.method = "GET";
     params.page_state = PageState::CreateFromURL(url);
     params.was_within_same_page = true;
 
@@ -2809,7 +2809,7 @@
     params.redirects.push_back(url);
     params.should_update_history = true;
     params.gesture = NavigationGestureUnknown;
-    params.is_post = false;
+    params.method = "GET";
     params.page_state = PageState::CreateFromURL(url);
 
     // This SHOULD generate a new entry.
@@ -2996,7 +2996,7 @@
   params.transition = ui::PAGE_TRANSITION_LINK;
   params.should_update_history = false;
   params.gesture = NavigationGestureUser;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(url);
   TestRenderFrameHost* main_rfh =
       static_cast<TestRenderFrameHost*>(our_contents->GetMainFrame());
@@ -3079,7 +3079,7 @@
   params.transition = ui::PAGE_TRANSITION_LINK;
   params.should_update_history = false;
   params.gesture = NavigationGestureUser;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(url);
   TestRenderFrameHost* main_rfh =
       static_cast<TestRenderFrameHost*>(our_contents->GetMainFrame());
@@ -3846,7 +3846,7 @@
   params.gesture = NavigationGestureUser;
   params.page_state = PageState::CreateFromURL(different_origin_url);
   params.was_within_same_page = true;
-  params.is_post = false;
+  params.method = "GET";
   params.post_id = -1;
   main_test_rfh()->SendRendererInitiatedNavigationRequest(different_origin_url,
                                                           false);
@@ -3900,7 +3900,7 @@
   params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME;
   params.should_update_history = false;
   params.gesture = NavigationGestureAuto;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(subframe_url);
   subframe->SendRendererInitiatedNavigationRequest(subframe_url, false);
   subframe->PrepareForCommit();
@@ -4068,7 +4068,7 @@
   params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME;
   params.should_update_history = false;
   params.gesture = NavigationGestureAuto;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(url1_sub);
 
   // This should return false meaning that nothing was actually updated.
@@ -5104,7 +5104,7 @@
   params.gesture = NavigationGestureUser;
   params.page_state = PageState::CreateFromURL(url);
   params.was_within_same_page = false;
-  params.is_post = true;
+  params.method = "POST";
   params.post_id = 2;
   main_test_rfh()->SendRendererInitiatedNavigationRequest(url, false);
   main_test_rfh()->PrepareForCommit();
@@ -5120,7 +5120,7 @@
   params.gesture = NavigationGestureUser;
   params.page_state = PageState::CreateFromURL(replace_url);
   params.was_within_same_page = true;
-  params.is_post = false;
+  params.method = "GET";
   params.post_id = -1;
   main_test_rfh()->SendRendererInitiatedNavigationRequest(replace_url, false);
   main_test_rfh()->PrepareForCommit();
@@ -5145,7 +5145,7 @@
   params.gesture = NavigationGestureUser;
   params.page_state = PageState::CreateFromURL(url);
   params.was_within_same_page = false;
-  params.is_post = true;
+  params.method = "POST";
   params.post_id = 2;
   params.url_is_unreachable = true;
 
@@ -5280,7 +5280,7 @@
   params.transition = ui::PAGE_TRANSITION_LINK;
   params.should_update_history = true;
   params.gesture = NavigationGestureUser;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(url);
   params.was_within_same_page = false;
   params.security_info = "bogus security info!";
diff --git a/content/browser/frame_host/navigation_entry_impl.cc b/content/browser/frame_host/navigation_entry_impl.cc
index dad94ba0..87405be 100644
--- a/content/browser/frame_host/navigation_entry_impl.cc
+++ b/content/browser/frame_host/navigation_entry_impl.cc
@@ -41,7 +41,8 @@
   node->frame_entry = new FrameNavigationEntry(
       -1, UTF16ToUTF8(state.target.string()), state.item_sequence_number,
       state.document_sequence_number, nullptr, GURL(state.url_string.string()),
-      Referrer(GURL(state.referrer.string()), state.referrer_policy));
+      Referrer(GURL(state.referrer.string()), state.referrer_policy), "GET",
+      -1);
 
   // Set a single-frame PageState on the entry.
   ExplodedPageState page_state;
@@ -172,7 +173,9 @@
                                                         -1,
                                                         std::move(instance),
                                                         url,
-                                                        referrer))),
+                                                        referrer,
+                                                        "GET",
+                                                        -1))),
       unique_id_(GetUniqueIDInConstructor()),
       bindings_(kInvalidBindings),
       page_type_(PAGE_TYPE_NORMAL),
@@ -180,8 +183,6 @@
       title_(title),
       page_id_(page_id),
       transition_type_(transition_type),
-      has_post_data_(false),
-      post_id_(-1),
       restore_type_(RESTORE_NONE),
       is_overriding_user_agent_(false),
       http_status_code_(0),
@@ -404,19 +405,19 @@
 }
 
 void NavigationEntryImpl::SetHasPostData(bool has_post_data) {
-  has_post_data_ = has_post_data;
+  frame_tree_->frame_entry->set_method(has_post_data ? "POST" : "GET");
 }
 
 bool NavigationEntryImpl::GetHasPostData() const {
-  return has_post_data_;
+  return frame_tree_->frame_entry->method() == "POST";
 }
 
 void NavigationEntryImpl::SetPostID(int64_t post_id) {
-  post_id_ = post_id;
+  frame_tree_->frame_entry->set_post_id(post_id);
 }
 
 int64_t NavigationEntryImpl::GetPostID() const {
-  return post_id_;
+  return frame_tree_->frame_entry->post_id();
 }
 
 void NavigationEntryImpl::SetBrowserInitiatedPostData(
@@ -545,8 +546,6 @@
   copy->ssl_ = ssl_;
   copy->transition_type_ = transition_type_;
   copy->user_typed_url_ = user_typed_url_;
-  copy->has_post_data_ = has_post_data_;
-  copy->post_id_ = post_id_;
   copy->restore_type_ = restore_type_;
   copy->original_request_url_ = original_request_url_;
   copy->is_overriding_user_agent_ = is_overriding_user_agent_;
@@ -693,7 +692,9 @@
     SiteInstanceImpl* site_instance,
     const GURL& url,
     const Referrer& referrer,
-    const PageState& page_state) {
+    const PageState& page_state,
+    const std::string& method,
+    int64_t post_id) {
   // We should already have a TreeNode for the parent node by the time this node
   // commits.  Find it first.
   DCHECK(frame_tree_node->parent());
@@ -710,9 +711,9 @@
   for (TreeNode* child : parent_node->children) {
     if (child->frame_entry->frame_tree_node_id() == frame_tree_node_id) {
       // Update the existing FrameNavigationEntry (e.g., for replaceState).
-      child->frame_entry->UpdateEntry(frame_unique_name, item_sequence_number,
-                                      document_sequence_number, site_instance,
-                                      url, referrer, page_state);
+      child->frame_entry->UpdateEntry(
+          frame_unique_name, item_sequence_number, document_sequence_number,
+          site_instance, url, referrer, page_state, method, post_id);
       return;
     }
   }
@@ -722,7 +723,7 @@
   // or unique name.
   FrameNavigationEntry* frame_entry = new FrameNavigationEntry(
       frame_tree_node_id, frame_unique_name, item_sequence_number,
-      document_sequence_number, site_instance, url, referrer);
+      document_sequence_number, site_instance, url, referrer, method, post_id);
   frame_entry->set_page_state(page_state);
   parent_node->children.push_back(
       new NavigationEntryImpl::TreeNode(frame_entry));
diff --git a/content/browser/frame_host/navigation_entry_impl.h b/content/browser/frame_host/navigation_entry_impl.h
index 5907b6c..6614806 100644
--- a/content/browser/frame_host/navigation_entry_impl.h
+++ b/content/browser/frame_host/navigation_entry_impl.h
@@ -194,7 +194,9 @@
                              SiteInstanceImpl* site_instance,
                              const GURL& url,
                              const Referrer& referrer,
-                             const PageState& page_state);
+                             const PageState& page_state,
+                             const std::string& method,
+                             int64_t post_id);
 
   // Returns the FrameNavigationEntry corresponding to |frame_tree_node|, if
   // there is one in this NavigationEntry.
@@ -394,8 +396,6 @@
   SSLStatus ssl_;
   ui::PageTransition transition_type_;
   GURL user_typed_url_;
-  bool has_post_data_;
-  int64_t post_id_;
   RestoreType restore_type_;
   GURL original_request_url_;
   bool is_overriding_user_agent_;
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 6b140ef..d096bdf 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -50,7 +50,6 @@
     const base::TimeTicks& navigation_start,
     int pending_nav_entry_id)
     : url_(url),
-      is_post_(false),
       has_user_gesture_(false),
       transition_(ui::PAGE_TRANSITION_LINK),
       is_external_protocol_(false),
@@ -128,7 +127,7 @@
 bool NavigationHandleImpl::IsPost() {
   CHECK_NE(INITIAL, state_)
       << "This accessor should not be called before the request is started.";
-  return is_post_;
+  return method_ == "POST";
 }
 
 const Referrer& NavigationHandleImpl::GetReferrer() {
@@ -231,8 +230,8 @@
     ui::PageTransition transition,
     bool is_external_protocol) {
   NavigationThrottle::ThrottleCheckResult result = NavigationThrottle::DEFER;
-  WillStartRequest(is_post, sanitized_referrer, has_user_gesture, transition,
-                   is_external_protocol,
+  WillStartRequest(is_post ? "POST" : "GET", sanitized_referrer,
+                   has_user_gesture, transition, is_external_protocol,
                    base::Bind(&UpdateThrottleCheckResult, &result));
 
   // Reset the callback to ensure it will not be called later.
@@ -247,8 +246,8 @@
     const GURL& new_referrer_url,
     bool new_is_external_protocol) {
   NavigationThrottle::ThrottleCheckResult result = NavigationThrottle::DEFER;
-  WillRedirectRequest(new_url, new_method_is_post, new_referrer_url,
-                      new_is_external_protocol,
+  WillRedirectRequest(new_url, new_method_is_post ? "POST" : "GET",
+                      new_referrer_url, new_is_external_protocol,
                       scoped_refptr<net::HttpResponseHeaders>(),
                       base::Bind(&UpdateThrottleCheckResult, &result));
 
@@ -265,14 +264,14 @@
 }
 
 void NavigationHandleImpl::WillStartRequest(
-    bool is_post,
+    const std::string& method,
     const Referrer& sanitized_referrer,
     bool has_user_gesture,
     ui::PageTransition transition,
     bool is_external_protocol,
     const ThrottleChecksFinishedCallback& callback) {
   // Update the navigation parameters.
-  is_post_ = is_post;
+  method_ = method;
   sanitized_referrer_ = sanitized_referrer;
   has_user_gesture_ = has_user_gesture;
   transition_ = transition;
@@ -303,14 +302,14 @@
 
 void NavigationHandleImpl::WillRedirectRequest(
     const GURL& new_url,
-    bool new_method_is_post,
+    const std::string& new_method,
     const GURL& new_referrer_url,
     bool new_is_external_protocol,
     scoped_refptr<net::HttpResponseHeaders> response_headers,
     const ThrottleChecksFinishedCallback& callback) {
   // Update the navigation parameters.
   url_ = new_url;
-  is_post_ = new_method_is_post;
+  method_ = new_method;
   sanitized_referrer_.url = new_referrer_url;
   sanitized_referrer_ = Referrer::SanitizeForRequest(url_, sanitized_referrer_);
   is_external_protocol_ = new_is_external_protocol;
@@ -370,7 +369,7 @@
   DCHECK_EQ(frame_tree_node_, render_frame_host->frame_tree_node());
   CHECK_EQ(url_, params.url);
 
-  is_post_ = params.is_post;
+  method_ = params.method;
   has_user_gesture_ = (params.gesture == NavigationGestureUser);
   transition_ = params.transition;
   render_frame_host_ = render_frame_host;
diff --git a/content/browser/frame_host/navigation_handle_impl.h b/content/browser/frame_host/navigation_handle_impl.h
index be65134..0750126 100644
--- a/content/browser/frame_host/navigation_handle_impl.h
+++ b/content/browser/frame_host/navigation_handle_impl.h
@@ -165,7 +165,7 @@
   // Called when the URLRequest will start in the network stack.  |callback|
   // will be called when all throttle checks have completed. This will allow
   // the caller to cancel the navigation or let it proceed.
-  void WillStartRequest(bool is_post,
+  void WillStartRequest(const std::string& method,
                         const Referrer& sanitized_referrer,
                         bool has_user_gesture,
                         ui::PageTransition transition,
@@ -178,7 +178,7 @@
   // This will also inform the delegate that the request was redirected.
   void WillRedirectRequest(
       const GURL& new_url,
-      bool new_method_is_post,
+      const std::string& new_method,
       const GURL& new_referrer_url,
       bool new_is_external_protocol,
       scoped_refptr<net::HttpResponseHeaders> response_headers,
@@ -249,7 +249,6 @@
 
   // See NavigationHandle for a description of those member variables.
   GURL url_;
-  bool is_post_;
   Referrer sanitized_referrer_;
   bool has_user_gesture_;
   ui::PageTransition transition_;
@@ -262,6 +261,9 @@
   bool was_redirected_;
   scoped_refptr<net::HttpResponseHeaders> response_headers_;
 
+  // The HTTP method used for the navigation.
+  std::string method_;
+
   // The state the navigation is in.
   State state_;
 
diff --git a/content/browser/frame_host/navigation_handle_impl_unittest.cc b/content/browser/frame_host/navigation_handle_impl_unittest.cc
index 6f8e87c..7776eac 100644
--- a/content/browser/frame_host/navigation_handle_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_handle_impl_unittest.cc
@@ -102,7 +102,7 @@
     // It's safe to use base::Unretained since the NavigationHandle is owned by
     // the NavigationHandleImplTest.
     test_handle_->WillStartRequest(
-        false, Referrer(), false, ui::PAGE_TRANSITION_LINK, false,
+        "GET", Referrer(), false, ui::PAGE_TRANSITION_LINK, false,
         base::Bind(&NavigationHandleImplTest::UpdateThrottleCheckResult,
                    base::Unretained(this)));
   }
@@ -119,7 +119,7 @@
     // It's safe to use base::Unretained since the NavigationHandle is owned by
     // the NavigationHandleImplTest.
     test_handle_->WillRedirectRequest(
-        GURL(), false, GURL(), false, scoped_refptr<net::HttpResponseHeaders>(),
+        GURL(), "GET", GURL(), false, scoped_refptr<net::HttpResponseHeaders>(),
         base::Bind(&NavigationHandleImplTest::UpdateThrottleCheckResult,
                    base::Unretained(this)));
   }
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index d03296c..11396045 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -212,9 +212,8 @@
     // TODO(clamy): pass the method to the NavigationHandle instead of a
     // boolean.
     navigation_handle_->WillStartRequest(
-        common_params_.method == "POST",
-        Referrer::SanitizeForRequest(common_params_.url,
-                                     common_params_.referrer),
+        common_params_.method, Referrer::SanitizeForRequest(
+                                   common_params_.url, common_params_.referrer),
         begin_params_.has_user_gesture, common_params_.transition, false,
         base::Bind(&NavigationRequest::OnStartChecksComplete,
                    base::Unretained(this)));
@@ -266,8 +265,8 @@
   // NavigationHandle where the callback will be stored.
   // TODO(clamy): pass the real value for |is_external_protocol| if needed.
   navigation_handle_->WillRedirectRequest(
-      common_params_.url, common_params_.method == "POST",
-      common_params_.referrer.url, false, response->head.headers,
+      common_params_.url, common_params_.method, common_params_.referrer.url,
+      false, response->head.headers,
       base::Bind(&NavigationRequest::OnRedirectChecksComplete,
                  base::Unretained(this)));
 }
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 8c12c6a..4e4c97a 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -679,6 +679,14 @@
 
 gfx::AcceleratedWidget
     RenderFrameHostImpl::AccessibilityGetAcceleratedWidget() {
+  // Only the main frame's current frame host is connected to the native
+  // widget tree for accessibility, so return null if this is queried on
+  // any other frame.
+  if (frame_tree_node()->parent() ||
+      frame_tree_node()->current_frame_host() != this) {
+    return gfx::kNullAcceleratedWidget;
+  }
+
   RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>(
       render_view_host_->GetWidget()->GetView());
   if (view)
@@ -2759,6 +2767,15 @@
   DCHECK(!web_bluetooth_service_);
   web_bluetooth_service_.reset(
       new WebBluetoothServiceImpl(this, std::move(request)));
+  // RFHI owns web_bluetooth_service_ and web_bluetooth_service owns the
+  // binding_ which may run the error handler. binding_ can't run the error
+  // handler after it's destroyed so it can't run after the RFHI is destroyed.
+  web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
+      &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
+}
+
+void RenderFrameHostImpl::DeleteWebBluetoothService() {
+  web_bluetooth_service_.reset();
 }
 
 }  // namespace content
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index b3b0378..fa00479 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -745,6 +745,9 @@
   void CreateWebBluetoothService(
       mojo::InterfaceRequest<blink::mojom::WebBluetoothService> request);
 
+  // Deletes the Web Bluetooth Service owned by the frame.
+  void DeleteWebBluetoothService();
+
   // Allows tests to disable the swapout event timer to simulate bugs that
   // happen before it fires (to avoid flakiness).
   void DisableSwapOutTimerForTesting();
diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc
index 1e1c090..e0585623 100644
--- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc
@@ -1204,7 +1204,7 @@
   params.should_update_history = false;
   params.gesture = NavigationGestureAuto;
   params.was_within_same_page = false;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(kUrl2);
 
   evil_rfh->SimulateNavigationStart(kUrl2);
@@ -2788,7 +2788,7 @@
   params.should_update_history = false;
   params.gesture = NavigationGestureAuto;
   params.was_within_same_page = false;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(kUrlBar);
 
   struct TestCase {
@@ -3096,7 +3096,7 @@
   commit_params.should_update_history = false;
   commit_params.gesture = NavigationGestureAuto;
   commit_params.was_within_same_page = false;
-  commit_params.is_post = false;
+  commit_params.method = "GET";
   commit_params.page_state = PageState::CreateFromURL(kUrl3);
   commit_params.should_enforce_strict_mixed_content_checking = false;
   child_host->SendNavigateWithParams(&commit_params);
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index 0a548e41..192b3540 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -219,6 +219,11 @@
   NOTREACHED();
 }
 
+void RenderWidgetHostViewChildFrame::TextInputStateChanged(
+    const ViewHostMsg_TextInputState_Params& params) {
+  // TODO(kenrb): Implement.
+}
+
 void RenderWidgetHostViewChildFrame::RenderProcessGone(
     base::TerminationStatus status,
     int error_code) {
@@ -241,10 +246,6 @@
   // RenderWidgetHostInputEventRouter afterwards.
   NotifyObserversAboutShutdown();
 
-  // If this view has an active text input, the RenderWidgetHostDelegate should
-  // be notified.
-  NotifyHostDelegateAboutShutdown();
-
   host_->SetView(NULL);
   host_ = NULL;
   base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.h b/content/browser/frame_host/render_widget_host_view_child_frame.h
index c2fb267..e6226ef9c 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.h
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.h
@@ -97,6 +97,8 @@
   void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
   void UpdateCursor(const WebCursor& cursor) override;
   void SetIsLoading(bool is_loading) override;
+  void TextInputStateChanged(
+      const ViewHostMsg_TextInputState_Params& params) override;
   void ImeCancelComposition() override;
   void ImeCompositionRangeChanged(
       const gfx::Range& range,
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc b/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
index 870ca1c..d285f48 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
@@ -21,7 +21,6 @@
 #include "content/browser/gpu/compositor_util.h"
 #include "content/browser/renderer_host/render_widget_host_delegate.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_messages.h"
 #include "content/public/browser/render_widget_host_view.h"
 #include "content/public/test/mock_render_process_host.h"
@@ -33,20 +32,13 @@
 namespace {
 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate {
  public:
-  MockRenderWidgetHostDelegate() : text_input_state_(new TextInputState()) {}
+  MockRenderWidgetHostDelegate() {}
   ~MockRenderWidgetHostDelegate() override {}
-
-  const TextInputState* GetTextInputState() override {
-    return text_input_state_.get();
-  }
-
  private:
   void Cut() override {}
   void Copy() override {}
   void Paste() override {}
   void SelectAll() override {}
-
-  std::unique_ptr<TextInputState> text_input_state_;
 };
 
 class MockCrossProcessFrameConnector : public CrossProcessFrameConnector {
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index 727c106..9fe6654 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -349,6 +349,18 @@
   platform_view_->SetIsLoading(is_loading);
 }
 
+void RenderWidgetHostViewGuest::TextInputStateChanged(
+    const ViewHostMsg_TextInputState_Params& params) {
+  if (!guest_)
+    return;
+
+  RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView();
+  if (!rwhv)
+    return;
+  // Forward the information to embedding RWHV.
+  rwhv->TextInputStateChanged(params);
+}
+
 void RenderWidgetHostViewGuest::ImeCancelComposition() {
   if (!guest_)
     return;
@@ -495,10 +507,6 @@
   // processing calls coming in after we release host_.
   NotifyObserversAboutShutdown();
 
-  // The WebContentsImpl should be notified about us so that it will not hold
-  // an invalid text input state which was due to active text on this view.
-  NotifyHostDelegateAboutShutdown();
-
   host_->SetView(NULL);
   host_ = NULL;
   base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
diff --git a/content/browser/frame_host/render_widget_host_view_guest.h b/content/browser/frame_host/render_widget_host_view_guest.h
index 06232ba..b60aa2b3 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.h
+++ b/content/browser/frame_host/render_widget_host_view_guest.h
@@ -24,6 +24,8 @@
 #include "ui/gfx/geometry/vector2d_f.h"
 #include "ui/gfx/native_widget_types.h"
 
+struct ViewHostMsg_TextInputState_Params;
+
 namespace content {
 class BrowserPluginGuest;
 class RenderWidgetHost;
@@ -76,6 +78,8 @@
   void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
   void UpdateCursor(const WebCursor& cursor) override;
   void SetIsLoading(bool is_loading) override;
+  void TextInputStateChanged(
+      const ViewHostMsg_TextInputState_Params& params) override;
   void ImeCancelComposition() override;
 #if defined(OS_MACOSX) || defined(USE_AURA)
   void ImeCompositionRangeChanged(
diff --git a/content/browser/frame_host/render_widget_host_view_guest_unittest.cc b/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
index e99204f..4ddc8634 100644
--- a/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
@@ -20,7 +20,6 @@
 #include "content/browser/gpu/compositor_util.h"
 #include "content/browser/renderer_host/render_widget_host_delegate.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_messages.h"
 #include "content/public/browser/browser_plugin_guest_delegate.h"
 #include "content/public/browser/render_widget_host_view.h"
@@ -34,21 +33,15 @@
 namespace {
 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate {
  public:
-  MockRenderWidgetHostDelegate() : text_input_state_(new TextInputState()) {}
+  MockRenderWidgetHostDelegate() {}
   ~MockRenderWidgetHostDelegate() override {}
 
-  const TextInputState* GetTextInputState() override {
-    return text_input_state_.get();
-  }
-
  private:
   // RenderWidgetHostDelegate:
   void Cut() override {}
   void Copy() override {}
   void Paste() override {}
   void SelectAll() override {}
-
-  std::unique_ptr<TextInputState> text_input_state_;
 };
 
 class RenderWidgetHostViewGuestTest : public testing::Test {
diff --git a/content/browser/loader/navigation_resource_throttle.cc b/content/browser/loader/navigation_resource_throttle.cc
index 6321062..9112f7e 100644
--- a/content/browser/loader/navigation_resource_throttle.cc
+++ b/content/browser/loader/navigation_resource_throttle.cc
@@ -38,7 +38,7 @@
 void CheckWillStartRequestOnUIThread(UIChecksPerformedCallback callback,
                                      int render_process_id,
                                      int render_frame_host_id,
-                                     bool is_post,
+                                     const std::string& method,
                                      const Referrer& sanitized_referrer,
                                      bool has_user_gesture,
                                      ui::PageTransition transition,
@@ -59,7 +59,7 @@
   }
 
   navigation_handle->WillStartRequest(
-      is_post, sanitized_referrer, has_user_gesture, transition,
+      method, sanitized_referrer, has_user_gesture, transition,
       is_external_protocol, base::Bind(&SendCheckResultToIOThread, callback));
 }
 
@@ -68,7 +68,7 @@
     int render_process_id,
     int render_frame_host_id,
     const GURL& new_url,
-    bool new_method_is_post,
+    const std::string& new_method,
     const GURL& new_referrer_url,
     bool new_is_external_protocol,
     scoped_refptr<net::HttpResponseHeaders> headers) {
@@ -91,9 +91,8 @@
   RenderProcessHost::FromID(render_process_id)
       ->FilterURL(false, &new_validated_url);
   navigation_handle->WillRedirectRequest(
-      new_validated_url, new_method_is_post, new_referrer_url,
-      new_is_external_protocol, headers,
-      base::Bind(&SendCheckResultToIOThread, callback));
+      new_validated_url, new_method, new_referrer_url, new_is_external_protocol,
+      headers, base::Bind(&SendCheckResultToIOThread, callback));
 }
 
 void WillProcessResponseOnUIThread(
@@ -148,7 +147,7 @@
   BrowserThread::PostTask(
       BrowserThread::UI, FROM_HERE,
       base::Bind(&CheckWillStartRequestOnUIThread, callback, render_process_id,
-                 render_frame_id, request_->method() == "POST",
+                 render_frame_id, request_->method(),
                  Referrer::SanitizeForRequest(
                      request_->url(), Referrer(GURL(request_->referrer()),
                                                info->GetReferrerPolicy())),
@@ -191,9 +190,8 @@
       BrowserThread::UI, FROM_HERE,
       base::Bind(&CheckWillRedirectRequestOnUIThread, callback,
                  render_process_id, render_frame_id, redirect_info.new_url,
-                 redirect_info.new_method == "POST",
-                 GURL(redirect_info.new_referrer), new_is_external_protocol,
-                 response_headers));
+                 redirect_info.new_method, GURL(redirect_info.new_referrer),
+                 new_is_external_protocol, response_headers));
   *defer = true;
 }
 
diff --git a/content/browser/media/capture/aura_window_capture_machine.cc b/content/browser/media/capture/aura_window_capture_machine.cc
index 1469bca3..a8e91a2 100644
--- a/content/browser/media/capture/aura_window_capture_machine.cc
+++ b/content/browser/media/capture/aura_window_capture_machine.cc
@@ -280,10 +280,17 @@
   cursor_renderer_->SnapshotCursorState(region_in_frame);
   yuv_readback_pipeline_->ReadbackYUV(
       texture_mailbox.mailbox(), texture_mailbox.sync_token(),
-      video_frame.get(), region_in_frame.origin(),
+      video_frame->visible_rect(),
+      video_frame->stride(media::VideoFrame::kYPlane),
+      video_frame->data(media::VideoFrame::kYPlane),
+      video_frame->stride(media::VideoFrame::kUPlane),
+      video_frame->data(media::VideoFrame::kUPlane),
+      video_frame->stride(media::VideoFrame::kVPlane),
+      video_frame->data(media::VideoFrame::kVPlane), region_in_frame.origin(),
       base::Bind(&CopyOutputFinishedForVideo, weak_factory_.GetWeakPtr(),
                  start_time, capture_frame_cb, video_frame,
                  base::Passed(&release_callback)));
+  media::LetterboxYUV(video_frame.get(), region_in_frame);
   return true;
 }
 
diff --git a/content/browser/media/webrtc/webrtc_datachannel_browsertest.cc b/content/browser/media/webrtc/webrtc_datachannel_browsertest.cc
new file mode 100644
index 0000000..e2d358b
--- /dev/null
+++ b/content/browser/media/webrtc/webrtc_datachannel_browsertest.cc
@@ -0,0 +1,39 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/command_line.h"
+#include "base/macros.h"
+#include "content/public/common/content_switches.h"
+#include "content/test/webrtc_content_browsertest_base.h"
+
+namespace {
+
+const char kJavaScriptFeaturesNeeded[] = "--expose-gc";
+const char kDataChannelHtmlFile[] = "/media/datachannel_test.html";
+
+}  // namespace
+
+namespace content {
+
+class WebRtcDataChannelTest : public WebRtcContentBrowserTest {
+ public:
+  WebRtcDataChannelTest() {}
+  ~WebRtcDataChannelTest() override {}
+
+  void SetUpCommandLine(base::CommandLine* command_line) override {
+    WebRtcContentBrowserTest::SetUpCommandLine(command_line);
+    AppendUseFakeUIForMediaStreamFlag();
+    base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+        switches::kJavaScriptFlags, kJavaScriptFeaturesNeeded);
+  }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(WebRtcDataChannelTest);
+};
+
+IN_PROC_BROWSER_TEST_F(WebRtcDataChannelTest, DataChannelGC) {
+  MakeTypicalCall("testDataChannelGC();", kDataChannelHtmlFile);
+}
+
+}  // namespace content
diff --git a/content/browser/mojo/browser_shell_connection.cc b/content/browser/mojo/browser_shell_connection.cc
index 5b762a2a..a39e8ee 100644
--- a/content/browser/mojo/browser_shell_connection.cc
+++ b/content/browser/mojo/browser_shell_connection.cc
@@ -4,11 +4,14 @@
 
 #include "content/browser/mojo/browser_shell_connection.h"
 
+#include "base/bind.h"
 #include "content/browser/mojo/constants.h"
 #include "services/shell/public/interfaces/connector.mojom.h"
 
 namespace content {
 
+BrowserShellConnection::BrowserShellConnection() {}
+
 BrowserShellConnection::BrowserShellConnection(
     shell::mojom::ShellClientRequest request)
     : shell_connection_(new shell::ShellConnection(this, std::move(request))) {}
@@ -16,6 +19,7 @@
 BrowserShellConnection::~BrowserShellConnection() {}
 
 shell::Connector* BrowserShellConnection::GetConnector() {
+  DCHECK(shell_connection_);
   return shell_connection_->connector();
 }
 
@@ -25,11 +29,22 @@
     const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) {
   std::unique_ptr<EmbeddedApplicationRunner> app(
       new EmbeddedApplicationRunner(callback, task_runner));
+  AddShellClientRequestHandler(
+      name, base::Bind(&EmbeddedApplicationRunner::BindShellClientRequest,
+                       base::Unretained(app.get())));
   auto result = embedded_apps_.insert(
       std::make_pair(name.as_string(), std::move(app)));
   DCHECK(result.second);
 }
 
+void BrowserShellConnection::AddShellClientRequestHandler(
+    const base::StringPiece& name,
+    const ShellClientRequestHandler& handler) {
+  auto result = request_handlers_.insert(
+      std::make_pair(name.as_string(), handler));
+  DCHECK(result.second);
+}
+
 bool BrowserShellConnection::AcceptConnection(shell::Connection* connection) {
   std::string remote_app = connection->GetRemoteIdentity().name();
   if (remote_app == "mojo:shell") {
@@ -56,9 +71,9 @@
 void BrowserShellConnection::CreateShellClient(
     shell::mojom::ShellClientRequest request,
     const mojo::String& name) {
-  auto it = embedded_apps_.find(name);
-  if (it != embedded_apps_.end())
-    it->second->BindShellClientRequest(std::move(request));
+  auto it = request_handlers_.find(name);
+  if (it != request_handlers_.end())
+    it->second.Run(std::move(request));
 }
 
 }  // namespace content
diff --git a/content/browser/mojo/browser_shell_connection.h b/content/browser/mojo/browser_shell_connection.h
index 2130856..75e5876 100644
--- a/content/browser/mojo/browser_shell_connection.h
+++ b/content/browser/mojo/browser_shell_connection.h
@@ -33,7 +33,17 @@
       public shell::InterfaceFactory<shell::mojom::ShellClientFactory>,
       public shell::mojom::ShellClientFactory {
  public:
+  using ShellClientRequestHandler =
+      base::Callback<void(shell::mojom::ShellClientRequest)>;
+
+  // Constructs a connection which does not own a ShellClient pipe. This
+  // connection must be manually fed new incoming connections via its
+  // shell::ShellClient interface.
+  BrowserShellConnection();
+
+  // Constructs a connection associated with its own ShellClient pipe.
   explicit BrowserShellConnection(shell::mojom::ShellClientRequest request);
+
   ~BrowserShellConnection() override;
 
   shell::Connector* GetConnector();
@@ -48,6 +58,15 @@
       const EmbeddedApplicationRunner::FactoryCallback& callback,
       const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
 
+  // Adds a generic ShellClientRequestHandler for a given application name. This
+  // will be used to satisfy any incoming calls to CreateShellClient() which
+  // reference the given name.
+  //
+  // For in-process applications, it is preferrable to use
+  // |AddEmbeddedApplication()| as defined above.
+  void AddShellClientRequestHandler(const base::StringPiece& name,
+                                    const ShellClientRequestHandler& handler);
+
  private:
   // shell::ShellClient:
   bool AcceptConnection(shell::Connection* connection) override;
@@ -64,6 +83,7 @@
   mojo::BindingSet<shell::mojom::ShellClientFactory> factory_bindings_;
   std::unordered_map<std::string, std::unique_ptr<EmbeddedApplicationRunner>>
       embedded_apps_;
+  std::unordered_map<std::string, ShellClientRequestHandler> request_handlers_;
 
   DISALLOW_COPY_AND_ASSIGN(BrowserShellConnection);
 };
diff --git a/content/browser/mojo/mojo_shell_context.cc b/content/browser/mojo/mojo_shell_context.cc
index af716e2..3c5636c7 100644
--- a/content/browser/mojo/mojo_shell_context.cc
+++ b/content/browser/mojo/mojo_shell_context.cc
@@ -16,10 +16,10 @@
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "content/browser/gpu/gpu_process_host.h"
+#include "content/browser/mojo/browser_shell_connection.h"
 #include "content/browser/mojo/constants.h"
 #include "content/common/gpu_process_launch_causes.h"
 #include "content/common/mojo/mojo_shell_connection_impl.h"
-#include "content/common/mojo/static_loader.h"
 #include "content/common/process_control.mojom.h"
 #include "content/grit/content_resources.h"
 #include "content/public/browser/browser_thread.h"
@@ -31,15 +31,16 @@
 #include "content/public/common/service_registry.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "mojo/public/cpp/bindings/string.h"
-#include "services/catalog/factory.h"
+#include "services/catalog/catalog.h"
 #include "services/catalog/manifest_provider.h"
 #include "services/catalog/store.h"
 #include "services/shell/connect_params.h"
-#include "services/shell/loader.h"
 #include "services/shell/native_runner.h"
 #include "services/shell/public/cpp/identity.h"
 #include "services/shell/public/cpp/shell_client.h"
 #include "services/shell/public/interfaces/connector.mojom.h"
+#include "services/shell/public/interfaces/shell_client.mojom.h"
+#include "services/shell/public/interfaces/shell_client_factory.mojom.h"
 #include "services/shell/runner/host/in_process_native_runner.h"
 #include "services/user/public/cpp/constants.h"
 
@@ -70,34 +71,22 @@
     LOG(ERROR) << "Failed to launch Mojo application for " << name;
 }
 
-// This launches a utility process and forwards the Load request the
-// mojom::ProcessControl service there. The utility process is sandboxed iff
-// |use_sandbox| is true.
-class UtilityProcessLoader : public shell::Loader {
- public:
-  UtilityProcessLoader(const base::string16& process_name, bool use_sandbox)
-      : process_name_(process_name), use_sandbox_(use_sandbox) {}
-  ~UtilityProcessLoader() override {}
+void LaunchAppInUtilityProcess(const std::string& app_name,
+                               const base::string16& process_name,
+                               bool use_sandbox,
+                               shell::mojom::ShellClientRequest request) {
+  mojom::ProcessControlPtr process_control;
+  mojom::ProcessControlRequest process_request =
+      mojo::GetProxy(&process_control);
+  BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
+                          base::Bind(&StartUtilityProcessOnIOThread,
+                                     base::Passed(&process_request),
+                                     process_name, use_sandbox));
+  process_control->LoadApplication(app_name, std::move(request),
+                                   base::Bind(&OnApplicationLoaded, app_name));
+}
 
- private:
-  // shell::Loader:
-  void Load(const std::string& name,
-            shell::mojom::ShellClientRequest request) override {
-    mojom::ProcessControlPtr process_control;
-    auto process_request = mojo::GetProxy(&process_control);
-    BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
-                            base::Bind(&StartUtilityProcessOnIOThread,
-                                       base::Passed(&process_request),
-                                       process_name_, use_sandbox_));
-    process_control->LoadApplication(name, std::move(request),
-                                     base::Bind(&OnApplicationLoaded, name));
-  }
-
-  const base::string16 process_name_;
-  const bool use_sandbox_;
-
-  DISALLOW_COPY_AND_ASSIGN(UtilityProcessLoader);
-};
+#if (ENABLE_MOJO_MEDIA_IN_GPU_PROCESS)
 
 // Request mojom::ProcessControl from GPU process host. Must be called on IO
 // thread.
@@ -120,27 +109,19 @@
       std::move(request));
 }
 
-// Forwards the load request to the GPU process.
-class GpuProcessLoader : public shell::Loader {
- public:
-  GpuProcessLoader() {}
-  ~GpuProcessLoader() override {}
+void LaunchAppInGpuProcess(const std::string& app_name,
+                           shell::mojom::ShellClientRequest request) {
+  mojom::ProcessControlPtr process_control;
+  mojom::ProcessControlRequest process_request =
+      mojo::GetProxy(&process_control);
+  BrowserThread::PostTask(
+      BrowserThread::IO, FROM_HERE,
+      base::Bind(&RequestGpuProcessControl, base::Passed(&process_request)));
+  process_control->LoadApplication(app_name, std::move(request),
+                                   base::Bind(&OnApplicationLoaded, app_name));
+}
 
- private:
-  // shell::Loader:
-  void Load(const std::string& name,
-            shell::mojom::ShellClientRequest request) override {
-    mojom::ProcessControlPtr process_control;
-    auto process_request = mojo::GetProxy(&process_control);
-    BrowserThread::PostTask(
-        BrowserThread::IO, FROM_HERE,
-        base::Bind(&RequestGpuProcessControl, base::Passed(&process_request)));
-    process_control->LoadApplication(name, std::move(request),
-                                     base::Bind(&OnApplicationLoaded, name));
-  }
-
-  DISALLOW_COPY_AND_ASSIGN(GpuProcessLoader);
-};
+#endif  // ENABLE_MOJO_MEDIA_IN_GPU_PROCESS
 
 }  // namespace
 
@@ -216,6 +197,26 @@
   DISALLOW_COPY_AND_ASSIGN(Proxy);
 };
 
+// Used to attach an existing ShellClient instance as a listener on the global
+// MojoShellConnection.
+// TODO(rockot): Find a way to get rid of this.
+class ShellConnectionListener : public MojoShellConnection::Listener {
+ public:
+  ShellConnectionListener(std::unique_ptr<shell::ShellClient> client)
+      : client_(std::move(client)) {}
+  ~ShellConnectionListener() override {}
+
+ private:
+  // MojoShellConnection::Listener:
+  bool AcceptConnection(shell::Connection* connection) override {
+    return client_->AcceptConnection(connection);
+  }
+
+  std::unique_ptr<shell::ShellClient> client_;
+
+  DISALLOW_COPY_AND_ASSIGN(ShellConnectionListener);
+};
+
 // static
 base::LazyInstance<std::unique_ptr<MojoShellContext::Proxy>>
     MojoShellContext::proxy_ = LAZY_INSTANCE_INITIALIZER;
@@ -244,11 +245,20 @@
   manifest_provider_->AddManifestResource(user_service::kUserServiceName,
                                           IDR_MOJO_PROFILE_MANIFEST);
 
-  catalog_.reset(new catalog::Factory(file_task_runner.get(), nullptr,
+  catalog_.reset(new catalog::Catalog(file_task_runner.get(), nullptr,
                                       manifest_provider_.get()));
   shell_.reset(new shell::Shell(std::move(native_runner_factory),
                                 catalog_->TakeShellClient()));
 
+  if (!IsRunningInMojoShell()) {
+    MojoShellConnection::Create(
+        shell_->InitInstanceForEmbedder(kBrowserMojoApplicationName),
+        false /* is_external */);
+  }
+
+  std::unique_ptr<BrowserShellConnection> browser_shell_connection(
+      new BrowserShellConnection);
+
   StaticApplicationMap apps;
   GetContentClient()->browser()->RegisterInProcessMojoApplications(&apps);
   if (g_applications_for_test) {
@@ -258,8 +268,8 @@
       apps[entry.first] = entry.second;
   }
   for (const auto& entry : apps) {
-    shell_->SetLoaderForName(base::WrapUnique(new StaticLoader(entry.second)),
-                             entry.first);
+    browser_shell_connection->AddEmbeddedApplication(
+        entry.first, entry.second, nullptr);
   }
 
   ContentBrowserClient::OutOfProcessMojoApplicationMap sandboxed_apps;
@@ -267,9 +277,10 @@
       ->browser()
       ->RegisterOutOfProcessMojoApplications(&sandboxed_apps);
   for (const auto& app : sandboxed_apps) {
-    shell_->SetLoaderForName(base::WrapUnique(new UtilityProcessLoader(
-                                 app.second, true /* use_sandbox */)),
-                             app.first);
+    browser_shell_connection->AddShellClientRequestHandler(
+        app.first,
+        base::Bind(&LaunchAppInUtilityProcess, app.first, app.second,
+                   true /* use_sandbox */));
   }
 
   ContentBrowserClient::OutOfProcessMojoApplicationMap unsandboxed_apps;
@@ -277,21 +288,22 @@
       ->browser()
       ->RegisterUnsandboxedOutOfProcessMojoApplications(&unsandboxed_apps);
   for (const auto& app : unsandboxed_apps) {
-    shell_->SetLoaderForName(base::WrapUnique(new UtilityProcessLoader(
-                                 app.second, false /* use_sandbox */)),
-                             app.first);
+    browser_shell_connection->AddShellClientRequestHandler(
+        app.first,
+        base::Bind(&LaunchAppInUtilityProcess, app.first, app.second,
+                   false /* use_sandbox */));
   }
 
 #if (ENABLE_MOJO_MEDIA_IN_GPU_PROCESS)
-  shell_->SetLoaderForName(base::WrapUnique(new GpuProcessLoader),
-                           "mojo:media");
+  browser_shell_connection->AddShellClientRequestHandler(
+      "mojo:media", base::Bind(&LaunchAppInGpuProcess, "mojo:media"));
 #endif
 
-  if (!IsRunningInMojoShell()) {
-    MojoShellConnection::Create(
-        shell_->InitInstanceForEmbedder(kBrowserMojoApplicationName),
-        false /* is_external */);
-  }
+  // Attach our ShellClientFactory implementation to the global connection.
+  MojoShellConnection* shell_connection = MojoShellConnection::Get();
+  CHECK(shell_connection);
+  shell_connection->AddListener(
+      new ShellConnectionListener(std::move(browser_shell_connection)));
 }
 
 MojoShellContext::~MojoShellContext() {
diff --git a/content/browser/mojo/mojo_shell_context.h b/content/browser/mojo/mojo_shell_context.h
index 5fa2b56..f2cb1e73 100644
--- a/content/browser/mojo/mojo_shell_context.h
+++ b/content/browser/mojo/mojo_shell_context.h
@@ -17,7 +17,7 @@
 #include "services/shell/shell.h"
 
 namespace catalog {
-class Factory;
+class Catalog;
 }
 
 namespace mojo {
@@ -67,7 +67,7 @@
   static base::LazyInstance<std::unique_ptr<Proxy>> proxy_;
 
   std::unique_ptr<BuiltinManifestProvider> manifest_provider_;
-  std::unique_ptr<catalog::Factory> catalog_;
+  std::unique_ptr<catalog::Catalog> catalog_;
   std::unique_ptr<shell::Shell> shell_;
 
   DISALLOW_COPY_AND_ASSIGN(MojoShellContext);
diff --git a/content/browser/mojo_shell_browsertest.cc b/content/browser/mojo_shell_browsertest.cc
deleted file mode 100644
index 26811e01..0000000
--- a/content/browser/mojo_shell_browsertest.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <memory>
-
-#include "base/bind.h"
-#include "base/macros.h"
-#include "base/run_loop.h"
-#include "content/browser/mojo/mojo_shell_context.h"
-#include "content/public/browser/browser_context.h"
-#include "content/public/browser/mojo_app_connection.h"
-#include "content/public/browser/web_contents.h"
-#include "content/public/test/content_browser_test.h"
-#include "content/public/test/test_mojo_app.h"
-#include "content/public/test/test_mojo_service.mojom.h"
-#include "content/shell/browser/shell.h"
-#include "url/gurl.h"
-
-namespace content {
-
-const char kInProcessTestMojoAppName[] = "system:content_in_process_test_app";
-
-class MojoShellTest : public ContentBrowserTest {
- public:
-  MojoShellTest() {
-    test_apps_[kInProcessTestMojoAppName] = base::Bind(&CreateTestApp);
-    MojoShellContext::SetApplicationsForTest(&test_apps_);
-  }
-
- protected:
-  std::string GetUserId() {
-    return BrowserContext::GetMojoUserIdFor(
-        shell()->web_contents()->GetBrowserContext());
-  }
-
- private:
-  static std::unique_ptr<shell::ShellClient> CreateTestApp() {
-    return std::unique_ptr<shell::ShellClient>(new TestMojoApp);
-  }
-
-  MojoShellContext::StaticApplicationMap test_apps_;
-
-  DISALLOW_COPY_AND_ASSIGN(MojoShellTest);
-};
-
-IN_PROC_BROWSER_TEST_F(MojoShellTest, TestBrowserConnection) {
-  auto test_app = MojoAppConnection::Create(
-      GetUserId(), kInProcessTestMojoAppName, kBrowserMojoAppUrl);
-  mojom::TestMojoServicePtr test_service;
-  test_app->GetInterface(&test_service);
-
-  base::RunLoop run_loop;
-  test_service->DoSomething(run_loop.QuitClosure());
-  run_loop.Run();
-}
-
-IN_PROC_BROWSER_TEST_F(MojoShellTest, TestUtilityConnection) {
-  // With no loader registered at this URL, the shell should spawn a utility
-  // process and connect us to it. content_shell's utility process always hosts
-  // a TestMojoApp at |kTestMojoAppUrl|.
-  auto test_app = MojoAppConnection::Create(GetUserId(), kTestMojoAppUrl,
-                                            kBrowserMojoAppUrl);
-  mojom::TestMojoServicePtr test_service;
-  test_app->GetInterface(&test_service);
-
-  base::RunLoop run_loop;
-  test_service->DoSomething(run_loop.QuitClosure());
-  run_loop.Run();
-}
-
-}  // namespace content
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc
index 266d821..cef537d3 100644
--- a/content/browser/renderer_host/delegated_frame_host.cc
+++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -584,6 +584,7 @@
 
 // static
 void DelegatedFrameHost::CopyFromCompositingSurfaceFinishedForVideo(
+    scoped_refptr<media::VideoFrame> video_frame,
     base::WeakPtr<DelegatedFrameHost> dfh,
     const base::Callback<void(bool)>& callback,
     scoped_refptr<OwnedMailbox> subscriber_texture,
@@ -711,11 +712,19 @@
 
   base::Callback<void(bool result)> finished_callback = base::Bind(
       &DelegatedFrameHost::CopyFromCompositingSurfaceFinishedForVideo,
-      dfh->AsWeakPtr(), base::Bind(callback, region_in_frame),
+      video_frame, dfh->AsWeakPtr(), base::Bind(callback, region_in_frame),
       subscriber_texture, base::Passed(&release_callback));
   yuv_readback_pipeline->ReadbackYUV(
       texture_mailbox.mailbox(), texture_mailbox.sync_token(),
-      video_frame.get(), region_in_frame.origin(), finished_callback);
+      video_frame->visible_rect(),
+      video_frame->stride(media::VideoFrame::kYPlane),
+      video_frame->data(media::VideoFrame::kYPlane),
+      video_frame->stride(media::VideoFrame::kUPlane),
+      video_frame->data(media::VideoFrame::kUPlane),
+      video_frame->stride(media::VideoFrame::kVPlane),
+      video_frame->data(media::VideoFrame::kVPlane), region_in_frame.origin(),
+      finished_callback);
+  media::LetterboxYUV(video_frame.get(), region_in_frame);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/content/browser/renderer_host/delegated_frame_host.h b/content/browser/renderer_host/delegated_frame_host.h
index 2fe54a52..66b0ac2 100644
--- a/content/browser/renderer_host/delegated_frame_host.h
+++ b/content/browser/renderer_host/delegated_frame_host.h
@@ -216,6 +216,7 @@
       const base::Callback<void(const gfx::Rect&, bool)>& callback,
       std::unique_ptr<cc::CopyOutputResult> result);
   static void CopyFromCompositingSurfaceFinishedForVideo(
+      scoped_refptr<media::VideoFrame> video_frame,
       base::WeakPtr<DelegatedFrameHost> rwhva,
       const base::Callback<void(bool)>& callback,
       scoped_refptr<OwnedMailbox> subscriber_texture,
diff --git a/content/browser/renderer_host/input/web_input_event_builders_win.cc b/content/browser/renderer_host/input/web_input_event_builders_win.cc
index 33701fb1a..253efa8 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_win.cc
+++ b/content/browser/renderer_host/input/web_input_event_builders_win.cc
@@ -6,9 +6,9 @@
 
 #include "base/logging.h"
 #include "content/browser/renderer_host/input/web_input_event_util.h"
+#include "ui/display/win/screen_win.h"
 #include "ui/events/blink/blink_event_util.h"
 #include "ui/events/event_utils.h"
-#include "ui/gfx/win/dpi.h"
 
 using blink::WebInputEvent;
 using blink::WebKeyboardEvent;
@@ -163,7 +163,7 @@
   ClientToScreen(hwnd, &global_point);
 
   // We need to convert the global point back to DIP before using it.
-  gfx::Point dip_global_point = gfx::win::ScreenToDIPPoint(
+  gfx::Point dip_global_point = display::win::ScreenWin::ScreenToDIPPoint(
       gfx::Point(global_point.x, global_point.y));
 
   result.globalX = dip_global_point.x();
diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc
index 40b68610..3afb92c 100644
--- a/content/browser/renderer_host/legacy_render_widget_host_win.cc
+++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc
@@ -19,9 +19,9 @@
 #include "ui/base/view_prop.h"
 #include "ui/base/win/internal_constants.h"
 #include "ui/base/win/window_event_target.h"
+#include "ui/display/win/screen_win.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/win/direct_manipulation.h"
-#include "ui/gfx/win/dpi.h"
 
 namespace content {
 
@@ -85,7 +85,8 @@
 }
 
 void LegacyRenderWidgetHostHWND::SetBounds(const gfx::Rect& bounds) {
-  gfx::Rect bounds_in_pixel = gfx::win::DIPToScreenRect(bounds);
+  gfx::Rect bounds_in_pixel = display::win::ScreenWin::DIPToClientRect(hwnd(),
+                                                                       bounds);
   ::SetWindowPos(hwnd(), NULL, bounds_in_pixel.x(), bounds_in_pixel.y(),
                  bounds_in_pixel.width(), bounds_in_pixel.height(),
                  SWP_NOREDRAW);
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 2e6511c..f37f453 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -896,7 +896,7 @@
   ResourceContext* resource_context = browser_context->GetResourceContext();
 
   scoped_refptr<net::URLRequestContextGetter> media_request_context(
-      browser_context->GetMediaRequestContextForRenderProcess(GetID()));
+      GetStoragePartition()->GetMediaURLRequestContext());
 
   ResourceMessageFilter::GetContextsCallback get_contexts_callback(
       base::Bind(&GetContexts, browser_context->GetResourceContext(),
diff --git a/content/browser/renderer_host/render_widget_host_delegate.cc b/content/browser/renderer_host/render_widget_host_delegate.cc
index 212a5686..e08c7da3 100644
--- a/content/browser/renderer_host/render_widget_host_delegate.cc
+++ b/content/browser/renderer_host/render_widget_host_delegate.cc
@@ -48,10 +48,6 @@
   return receiving_widget;
 }
 
-const TextInputState* RenderWidgetHostDelegate::GetTextInputState() {
-  return nullptr;
-}
-
 gfx::Rect RenderWidgetHostDelegate::GetRootWindowResizerRect(
     RenderWidgetHostImpl* render_widget_host) const {
   return gfx::Rect();
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
index 440584df..aa38066 100644
--- a/content/browser/renderer_host/render_widget_host_delegate.h
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
@@ -31,9 +31,7 @@
 class BrowserAccessibilityManager;
 class RenderWidgetHostImpl;
 class RenderWidgetHostInputEventRouter;
-class RenderWidgetHostViewBase;
 struct NativeWebKeyboardEvent;
-struct TextInputState;
 
 //
 // RenderWidgetHostDelegate
@@ -134,16 +132,6 @@
   virtual RenderWidgetHostImpl* GetFocusedRenderWidgetHost(
       RenderWidgetHostImpl* receiving_widget);
 
-  // Returns the current value of text input state. This should be the value
-  // obtained from the focused RWHV.
-  virtual const TextInputState* GetTextInputState();
-
-  // This method is called by any RWHV which receives an IPC regarding a change
-  // in the text input state. The IPC might or might not have lead to a change
-  // in state but this method must be called for IME related logic.
-  virtual void UpdateTextInputState(RenderWidgetHostViewBase* rwhv,
-                                    bool text_input_state_changed) {}
-
   // Notification that the renderer has become unresponsive. The
   // delegate can use this notification to show a warning to the user.
   virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host) {}
@@ -179,12 +167,12 @@
   // Notification that the widget has lost the mouse lock.
   virtual void LostMouseLock(RenderWidgetHostImpl* render_widget_host) {}
 
-  // Called when the widget has sent a compositor proto.  This is used in Blimp
+  // Called when the widget has sent a compositor proto.  This is used in Btlimp
   // mode with the RemoteChannel compositor.
   virtual void ForwardCompositorProto(RenderWidgetHostImpl* render_widget_host,
                                       const std::vector<uint8_t>& proto) {}
 
-  // Called when the visibility of the RenderFrameProxyHost in outer
+  // Called when the visibility of the RenderFrameProxyHost in outter
   // WebContents changes. This method is only called on an inner WebContents and
   // will eventually notify all the RenderWidgetHostViews belonging to that
   // WebContents.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index cbd5bc8..df29ba93 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -57,7 +57,6 @@
 #include "content/common/host_shared_bitmap_manager.h"
 #include "content/common/input_messages.h"
 #include "content/common/resize_params.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_messages.h"
 #include "content/public/browser/native_web_keyboard_event.h"
 #include "content/public/browser/notification_service.h"
@@ -1730,7 +1729,7 @@
 }
 
 void RenderWidgetHostImpl::OnTextInputStateChanged(
-    const TextInputState& params) {
+    const ViewHostMsg_TextInputState_Params& params) {
   if (view_)
     view_->TextInputStateChanged(params);
 }
@@ -2057,11 +2056,6 @@
 }
 
 void RenderWidgetHostImpl::DetachDelegate() {
-  // If |view_| has active text input state, it will not be able to update the
-  // |delegate_| about shut down and losing the state (see crbug.com/602144).
-  if (view_)
-    view_->TextInputStateChanged(TextInputState());
-
   delegate_ = NULL;
 }
 
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 7dfd14d..590536e 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -48,7 +48,7 @@
 
 struct FrameHostMsg_HittestData_Params;
 struct ViewHostMsg_SelectionBounds_Params;
-struct TextInputState;
+struct ViewHostMsg_TextInputState_Params;
 struct ViewHostMsg_UpdateRect_Params;
 
 namespace base {
@@ -571,7 +571,8 @@
   void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params);
   void OnQueueSyntheticGesture(const SyntheticGesturePacket& gesture_packet);
   void OnSetCursor(const WebCursor& cursor);
-  void OnTextInputStateChanged(const TextInputState& params);
+  void OnTextInputStateChanged(
+      const ViewHostMsg_TextInputState_Params& params);
 
   void OnImeCompositionRangeChanged(
       const gfx::Range& range,
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 4792102..2fd0ea5 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -24,7 +24,6 @@
 #include "content/common/input/synthetic_web_input_event_builders.h"
 #include "content/common/input_messages.h"
 #include "content/common/resize_params.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_messages.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/test/mock_render_process_host.h"
@@ -349,8 +348,7 @@
         unhandled_keyboard_event_type_(WebInputEvent::Undefined),
         handle_wheel_event_(false),
         handle_wheel_event_called_(false),
-        unresponsive_timer_fired_(false),
-        text_input_state_(new TextInputState()) {}
+        unresponsive_timer_fired_(false) {}
   ~MockRenderWidgetHostDelegate() override {}
 
   // Tests that make sure we ignore keyboard event acknowledgments to events we
@@ -387,10 +385,6 @@
 
   bool unresponsive_timer_fired() const { return unresponsive_timer_fired_; }
 
-  const TextInputState* GetTextInputState() override {
-    return text_input_state_.get();
-  }
-
  protected:
   bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
                               bool* is_keyboard_shortcut) override {
@@ -432,8 +426,6 @@
   bool handle_wheel_event_called_;
 
   bool unresponsive_timer_fired_;
-
-  std::unique_ptr<TextInputState> text_input_state_;
 };
 
 // RenderWidgetHostTest --------------------------------------------------------
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 3f5354e9..ae5b05b1 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -654,19 +654,22 @@
   return reinterpret_cast<intptr_t>(&ime_adapter_android_);
 }
 
-void RenderWidgetHostViewAndroid::UpdateInputMethodIfNecessary(
-    bool text_input_state_changed) {
-  DCHECK(text_input_state_changed);
+void RenderWidgetHostViewAndroid::TextInputStateChanged(
+    const ViewHostMsg_TextInputState_Params& params) {
+  if (params.is_non_ime_change) {
+    // Sends an acknowledgement to the renderer of a processed IME event.
+    host_->Send(new InputMsg_ImeEventAck(host_->GetRoutingID()));
+  }
+
   if (!content_view_core_)
     return;
 
-  const TextInputState* state = host_->delegate()->GetTextInputState();
-
   content_view_core_->UpdateImeAdapter(
-      GetNativeImeAdapter(), static_cast<int>(state->type), state->flags,
-      state->value, state->selection_start, state->selection_end,
-      state->composition_start, state->composition_end,
-      state->show_ime_if_needed, state->is_non_ime_change);
+      GetNativeImeAdapter(),
+      static_cast<int>(params.type), params.flags,
+      params.value, params.selection_start, params.selection_end,
+      params.composition_start, params.composition_end,
+      params.show_ime_if_needed, params.is_non_ime_change);
 }
 
 void RenderWidgetHostViewAndroid::UpdateBackgroundColor(SkColor color) {
@@ -812,10 +815,6 @@
   }
   surface_factory_.reset();
 
-  // The WebContentsImpl should be notified about us so that it will not hold
-  // an invalid text input state which was due to active text on this view.
-  NotifyHostDelegateAboutShutdown();
-
   // The RenderWidgetHost's destruction led here, so don't call it.
   host_ = NULL;
 
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index 3678520..24baf25 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -109,7 +109,8 @@
   float GetTopControlsHeight() const override;
   void UpdateCursor(const WebCursor& cursor) override;
   void SetIsLoading(bool is_loading) override;
-  void UpdateInputMethodIfNecessary(bool text_input_state_changed) override;
+  void TextInputStateChanged(
+      const ViewHostMsg_TextInputState_Params& params) override;
   void ImeCancelComposition() override;
   void ImeCompositionRangeChanged(
       const gfx::Range& range,
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index c542b02..c4f7a90 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -103,7 +103,6 @@
 #include "ui/base/win/hidden_window.h"
 #include "ui/display/win/screen_win.h"
 #include "ui/gfx/gdi_util.h"
-#include "ui/gfx/win/dpi.h"
 #endif
 
 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
@@ -370,6 +369,10 @@
       popup_parent_host_view_(NULL),
       popup_child_host_view_(NULL),
       is_loading_(false),
+      text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
+      text_input_mode_(ui::TEXT_INPUT_MODE_DEFAULT),
+      text_input_flags_(0),
+      can_compose_inline_(true),
       has_composition_text_(false),
       accept_return_character_(false),
       last_swapped_software_frame_scale_factor_(1.f),
@@ -856,18 +859,23 @@
   UpdateCursorIfOverSelf();
 }
 
-void RenderWidgetHostViewAura::UpdateInputMethodIfNecessary(
-    bool text_input_state_changed) {
-  if (!GetInputMethod())
-    return;
-
-  if (text_input_state_changed)
-    GetInputMethod()->OnTextInputTypeChanged(this);
-
-  const TextInputState* state = host_->delegate()->GetTextInputState();
-
-  if (state->show_ime_if_needed && state->type != ui::TEXT_INPUT_TYPE_NONE)
-    GetInputMethod()->ShowImeIfNeeded();
+void RenderWidgetHostViewAura::TextInputStateChanged(
+    const ViewHostMsg_TextInputState_Params& params) {
+  if (text_input_type_ != params.type ||
+      text_input_mode_ != params.mode ||
+      can_compose_inline_ != params.can_compose_inline ||
+      text_input_flags_ != params.flags) {
+    text_input_type_ = params.type;
+    text_input_mode_ = params.mode;
+    can_compose_inline_ = params.can_compose_inline;
+    text_input_flags_ = params.flags;
+    if (GetInputMethod())
+      GetInputMethod()->OnTextInputTypeChanged(this);
+  }
+  if (params.show_ime_if_needed && params.type != ui::TEXT_INPUT_TYPE_NONE) {
+    if (GetInputMethod())
+      GetInputMethod()->ShowImeIfNeeded();
+  }
 }
 
 void RenderWidgetHostViewAura::ImeCancelComposition() {
@@ -1018,7 +1026,8 @@
 
 void RenderWidgetHostViewAura::UpdateMouseLockRegion() {
   RECT window_rect =
-      gfx::win::DIPToScreenRect(window_->GetBoundsInScreen()).ToRECT();
+      gfx::Screen::GetScreen()->DIPToScreenRectInWindow(
+          window_, window_->GetBoundsInScreen()).ToRECT();
   ::ClipCursor(&window_rect);
 }
 
@@ -1112,7 +1121,7 @@
     }
   }
 
-  bounds = gfx::win::ScreenToDIPRect(bounds);
+  bounds = gfx::Screen::GetScreen()->ScreenToDIPRectInWindow(top_level, bounds);
 #endif
 
   return bounds;
@@ -1464,10 +1473,7 @@
 }
 
 void RenderWidgetHostViewAura::InsertText(const base::string16& text) {
-  DCHECK(RenderWidgetHostImpl::From(GetRenderWidgetHost())
-             ->delegate()
-             ->GetTextInputState()
-             ->type != ui::TEXT_INPUT_TYPE_NONE);
+  DCHECK(text_input_type_ != ui::TEXT_INPUT_TYPE_NONE);
   // TODO(wjmaclean): can host_ ever be null?
   if (host_)
     host_->ImeConfirmComposition(text, gfx::Range::InvalidRange(), false);
@@ -1490,27 +1496,19 @@
 }
 
 ui::TextInputType RenderWidgetHostViewAura::GetTextInputType() const {
-  if (host_->delegate())
-    return host_->delegate()->GetTextInputState()->type;
-  return text_input_state()->type;
+  return text_input_type_;
 }
 
 ui::TextInputMode RenderWidgetHostViewAura::GetTextInputMode() const {
-  if (host_->delegate())
-    return host_->delegate()->GetTextInputState()->mode;
-  return text_input_state()->mode;
+  return text_input_mode_;
 }
 
 int RenderWidgetHostViewAura::GetTextInputFlags() const {
-  if (host_->delegate())
-    return host_->delegate()->GetTextInputState()->flags;
-  return text_input_state()->flags;
+  return text_input_flags_;
 }
 
 bool RenderWidgetHostViewAura::CanComposeInline() const {
-  if (host_->delegate())
-    return host_->delegate()->GetTextInputState()->can_compose_inline;
-  return text_input_state()->can_compose_inline;
+  return can_compose_inline_;
 }
 
 gfx::Rect RenderWidgetHostViewAura::ConvertRectToScreen(
@@ -2330,10 +2328,6 @@
 // RenderWidgetHostViewAura, private:
 
 RenderWidgetHostViewAura::~RenderWidgetHostViewAura() {
-  // The WebContentsImpl should be notified about us so that it will not hold
-  // an invalid text input state which was due to active text on this view.
-  NotifyHostDelegateAboutShutdown();
-
   // Ask the RWH to drop reference to us.
   if (!is_guest_view_hack_)
     host_->ViewDestroyed();
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 6738131b..a8e3d3c 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -43,6 +43,8 @@
 #include "ui/gfx/geometry/rect.h"
 #include "ui/wm/public/activation_delegate.h"
 
+struct ViewHostMsg_TextInputState_Params;
+
 namespace aura {
 class WindowTracker;
 namespace client {
@@ -134,7 +136,8 @@
   void Focus() override;
   void UpdateCursor(const WebCursor& cursor) override;
   void SetIsLoading(bool is_loading) override;
-  void UpdateInputMethodIfNecessary(bool text_input_state_changed) override;
+  void TextInputStateChanged(
+      const ViewHostMsg_TextInputState_Params& params) override;
   void ImeCancelComposition() override;
   void ImeCompositionRangeChanged(
       const gfx::Range& range,
@@ -565,6 +568,14 @@
   // object.
   ui::MotionEventAura pointer_state_;
 
+  // The current text input type.
+  ui::TextInputType text_input_type_;
+  // The current text input mode corresponding to HTML5 inputmode attribute.
+  ui::TextInputMode text_input_mode_;
+  // The current text input flags.
+  int text_input_flags_;
+  bool can_compose_inline_;
+
   // Bounds for the selection.
   ui::SelectionBound selection_anchor_;
   ui::SelectionBound selection_focus_;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index 627bce81..c18f1e1a 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -43,7 +43,6 @@
 #include "content/common/input/input_event_utils.h"
 #include "content/common/input/synthetic_web_input_event_builders.h"
 #include "content/common/input_messages.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_messages.h"
 #include "content/public/browser/render_widget_host_view.h"
 #include "content/public/browser/render_widget_host_view_frame_subscriber.h"
@@ -155,8 +154,7 @@
 
 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate {
  public:
-  MockRenderWidgetHostDelegate()
-      : rwh_(nullptr), text_input_state_(new TextInputState()) {}
+  MockRenderWidgetHostDelegate() : rwh_(nullptr) {}
   ~MockRenderWidgetHostDelegate() override {}
   const NativeWebKeyboardEvent* last_event() const { return last_event_.get(); }
   void set_widget_host(RenderWidgetHostImpl* rwh) { rwh_ = rwh; }
@@ -168,11 +166,6 @@
     last_event_.reset(new NativeWebKeyboardEvent(event));
     return true;
   }
-
-  const TextInputState* GetTextInputState() override {
-    return text_input_state_.get();
-  }
-
   void Cut() override {}
   void Copy() override {}
   void Paste() override {}
@@ -185,7 +178,6 @@
  private:
   std::unique_ptr<NativeWebKeyboardEvent> last_event_;
   RenderWidgetHostImpl* rwh_;
-  std::unique_ptr<TextInputState> text_input_state_;
 
   DISALLOW_COPY_AND_ASSIGN(MockRenderWidgetHostDelegate);
 };
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index fd58003..c55aaec 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -10,18 +10,11 @@
 #include "content/browser/gpu/gpu_data_manager_impl.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
 #include "content/browser/renderer_host/render_process_host_impl.h"
-#include "content/browser/renderer_host/render_view_host_delegate.h"
-#include "content/browser/renderer_host/render_view_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_delegate.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_view_base_observer.h"
 #include "content/common/content_switches_internal.h"
-#include "content/common/input_messages.h"
-#include "content/common/site_isolation_policy.h"
-#include "content/common/text_input_state.h"
-#include "content/common/view_messages.h"
 #include "content/public/browser/render_widget_host_view_frame_subscriber.h"
-#include "content/public/common/browser_plugin_guest_mode.h"
 #include "ui/gfx/display.h"
 #include "ui/gfx/geometry/point_conversions.h"
 #include "ui/gfx/geometry/size_conversions.h"
@@ -48,7 +41,6 @@
       current_display_rotation_(gfx::Display::ROTATE_0),
       pinch_zoom_enabled_(content::IsPinchToZoomEnabled()),
       renderer_frame_number_(0),
-      text_input_state_(new TextInputState()),
       weak_factory_(this) {}
 
 RenderWidgetHostViewBase::~RenderWidgetHostViewBase() {
@@ -73,19 +65,6 @@
   DCHECK(!observers_.might_have_observers());
 }
 
-void RenderWidgetHostViewBase::NotifyHostDelegateAboutShutdown() {
-  RenderWidgetHostImpl* host =
-      RenderWidgetHostImpl::From(GetRenderWidgetHost());
-
-  if (!host || !host->delegate())
-    return;
-
-  bool has_active_text = text_input_state()->type != ui::TEXT_INPUT_TYPE_NONE;
-  text_input_state_.reset(new TextInputState());
-
-  host->delegate()->UpdateTextInputState(this, has_active_text);
-}
-
 bool RenderWidgetHostViewBase::OnMessageReceived(const IPC::Message& msg){
   return false;
 }
@@ -249,35 +228,6 @@
   return true;
 }
 
-void RenderWidgetHostViewBase::TextInputStateChanged(
-    const TextInputState& params) {
-  bool text_input_state_changed = true;
-#if !defined(OS_ANDROID)
-  if (params.type == text_input_state_->type &&
-      params.can_compose_inline == text_input_state_->can_compose_inline
-#if !defined(OS_MACOSX)
-      && params.mode == text_input_state_->mode &&
-      params.flags == text_input_state_->flags
-#endif
-      )
-    text_input_state_changed = false;
-#else
-  if (params.is_non_ime_change) {
-    // Sends an acknowledgement to the renderer of a processed IME event.
-    GetRenderWidgetHost()->Send(
-        new InputMsg_ImeEventAck(GetRenderWidgetHost()->GetRoutingID()));
-  }
-#endif
-
-  if (text_input_state_changed) {
-    *text_input_state_ = params;
-    RenderWidgetHostImpl* host =
-        RenderWidgetHostImpl::From(GetRenderWidgetHost());
-    if (host && host->delegate())
-      host->delegate()->UpdateTextInputState(this, text_input_state_changed);
-  }
-}
-
 base::WeakPtr<RenderWidgetHostViewBase> RenderWidgetHostViewBase::GetWeakPtr() {
   return weak_factory_.GetWeakPtr();
 }
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index ee9e358..76a1b64 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -41,6 +41,7 @@
 
 struct AccessibilityHostMsg_EventParams;
 struct ViewHostMsg_SelectionBounds_Params;
+struct ViewHostMsg_TextInputState_Params;
 
 namespace media {
 class VideoFrame;
@@ -69,7 +70,6 @@
 class WebCursor;
 struct DidOverscrollParams;
 struct NativeWebKeyboardEvent;
-struct TextInputState;
 
 // Basic implementation shared by concrete RenderWidgetHostView subclasses.
 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
@@ -126,22 +126,6 @@
   // changed since the last time.
   bool HasDisplayPropertyChanged(gfx::NativeView view);
 
-  // This method is exclusively called by the owner RenderWidgetHost to inform
-  // the view about a change in the input state which originated in the
-  // corresponding RenderWidget. This state is stored at the RWHV.
-  // Also, this change does not necessarily reflect the current state of the
-  // input since the text input could be due to a change in the focused
-  // child-frame's (in OOPIF) or the out of process content managed by
-  // BrowserPlugin.
-  void TextInputStateChanged(const TextInputState& params);
-
-  // The current text input state for the corresponding widget. This is used by
-  // the WebContents in determining the top level text input state, which is
-  // in turn used by the IME.
-  const TextInputState* text_input_state() const {
-    return text_input_state_.get();
-  }
-
   base::WeakPtr<RenderWidgetHostViewBase> GetWeakPtr();
 
   //----------------------------------------------------------------------------
@@ -256,12 +240,6 @@
                                                cc::SurfaceId original_surface,
                                                gfx::Point* transformed_point);
 
-  // This method is used by the WebContents owning this view to notify the view
-  // of a text input change in the tab. This method is called by the
-  // WebContentsImpl if the RenderWidgetHostView is a top-level view. The
-  // implementation is platform-specific.
-  virtual void UpdateInputMethodIfNecessary(bool text_input_state_changed) {}
-
   //----------------------------------------------------------------------------
   // The following static methods are implemented by each platform.
 
@@ -287,6 +265,10 @@
   // Indicates whether the page has finished loading.
   virtual void SetIsLoading(bool is_loading) = 0;
 
+  // Updates the state of the input method attached to the view.
+  virtual void TextInputStateChanged(
+      const ViewHostMsg_TextInputState_Params& params) = 0;
+
   // Cancel the ongoing composition of the input method attached to the view.
   virtual void ImeCancelComposition() = 0;
 
@@ -404,11 +386,6 @@
 
   void NotifyObserversAboutShutdown();
 
-  // This method should be called by RWHV during destruction or after a crash
-  // to make sure WebContents does not hold invalid text input state.
-  // TODO(ekaramad): Do we need to call this for top-level RWHV as well?
-  void NotifyHostDelegateAboutShutdown();
-
   // Whether this view is a popup and what kind of popup it is (select,
   // autofill...).
   blink::WebPopupType popup_type_;
@@ -436,6 +413,7 @@
   // The current selection range relative to the start of the web page.
   gfx::Range selection_range_;
 
+ protected:
   // The scale factor of the display the renderer is currently on.
   float current_device_scale_factor_;
 
@@ -457,9 +435,6 @@
 
   base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
 
-  // The last reported input state by the RenderWidget.
-  std::unique_ptr<TextInputState> text_input_state_;
-
   base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index cd41af5..bde64e7 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -39,6 +39,8 @@
 #import "ui/base/cocoa/tool_tip_base_view.h"
 #include "ui/gfx/display_observer.h"
 
+struct ViewHostMsg_TextInputState_Params;
+
 namespace content {
 class RenderWidgetHostImpl;
 class RenderWidgetHostViewMac;
@@ -283,7 +285,8 @@
   void Focus() override;
   void UpdateCursor(const WebCursor& cursor) override;
   void SetIsLoading(bool is_loading) override;
-  void UpdateInputMethodIfNecessary(bool text_input_state_changed) override;
+  void TextInputStateChanged(
+      const ViewHostMsg_TextInputState_Params& params) override;
   void ImeCancelComposition() override;
   void ImeCompositionRangeChanged(
       const gfx::Range& range,
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 6cd3067..ccdb111 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -1010,28 +1010,23 @@
   // like Chrome does on Windows, call |UpdateCursor()| here.
 }
 
-void RenderWidgetHostViewMac::UpdateInputMethodIfNecessary(
-    bool text_input_state_changed) {
-  if (!text_input_state_changed)
-    return;
+void RenderWidgetHostViewMac::TextInputStateChanged(
+const ViewHostMsg_TextInputState_Params& params) {
+  if (text_input_type_ != params.type
+      || can_compose_inline_ != params.can_compose_inline) {
+    text_input_type_ = params.type;
+    can_compose_inline_ = params.can_compose_inline;
+    if (HasFocus()) {
+      SetTextInputActive(true);
 
-  // TODO(ekaramad): The state tracking is all in WebContentsImpl now. Remove
-  // these member variables (crbug.com/602427).
-  const TextInputState* state =
-      render_widget_host_->delegate()->GetTextInputState();
-  text_input_type_ = state->type;
-  can_compose_inline_ = state->can_compose_inline;
-
-  if (HasFocus()) {
-    SetTextInputActive(true);
-
-    // Let AppKit cache the new input context to make IMEs happy.
-    // See http://crbug.com/73039.
-    [NSApp updateWindows];
+      // Let AppKit cache the new input context to make IMEs happy.
+      // See http://crbug.com/73039.
+      [NSApp updateWindows];
 
 #ifndef __LP64__
-    UseInputWindow(TSMGetActiveDocument(), !can_compose_inline_);
+      UseInputWindow(TSMGetActiveDocument(), !can_compose_inline_);
 #endif
+    }
   }
 }
 
@@ -1088,10 +1083,6 @@
   // we release render_widget_host_.
   NotifyObserversAboutShutdown();
 
-  // The WebContentsImpl should be notified about us so that it will not hold
-  // an invalid text input state which was due to active text on this view.
-  NotifyHostDelegateAboutShutdown();
-
   // We get this call just before |render_widget_host_| deletes
   // itself.  But we are owned by |cocoa_view_|, which may be retained
   // by some other code.  Examples are WebContentsViewMac's
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
index a2860a83..31222766 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -20,7 +20,6 @@
 #include "content/browser/gpu/compositor_util.h"
 #include "content/browser/renderer_host/render_widget_host_delegate.h"
 #include "content/common/input_messages.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_messages.h"
 #include "content/public/browser/notification_types.h"
 #include "content/public/browser/render_widget_host_view_mac_delegate.h"
@@ -143,20 +142,14 @@
 
 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate {
  public:
-  MockRenderWidgetHostDelegate() : text_input_state_(new TextInputState()) {}
+  MockRenderWidgetHostDelegate() {}
   ~MockRenderWidgetHostDelegate() override {}
 
-  const TextInputState* GetTextInputState() override {
-    return text_input_state_.get();
-  }
-
  private:
   void Cut() override {}
   void Copy() override {}
   void Paste() override {}
   void SelectAll() override {}
-
-  std::unique_ptr<TextInputState> text_input_state_;
 };
 
 class MockRenderWidgetHostImpl : public RenderWidgetHostImpl {
diff --git a/content/browser/renderer_host/render_widget_host_view_mus.cc b/content/browser/renderer_host/render_widget_host_view_mus.cc
index a1701347c..50a9df37 100644
--- a/content/browser/renderer_host/render_widget_host_view_mus.cc
+++ b/content/browser/renderer_host/render_widget_host_view_mus.cc
@@ -12,7 +12,6 @@
 #include "content/browser/renderer_host/render_process_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/common/render_widget_window_tree_client_factory.mojom.h"
-#include "content/common/text_input_state.h"
 #include "content/public/common/mojo_shell_connection.h"
 #include "services/shell/public/cpp/connector.h"
 #include "ui/aura/client/screen_position_client.h"
@@ -124,10 +123,6 @@
 }
 
 void RenderWidgetHostViewMus::Destroy() {
-  // The WebContentsImpl should be notified about us so that it will not hold
-  // an invalid text input state which was due to active text on this view.
-  NotifyHostDelegateAboutShutdown();
-
   delete aura_window_;
 }
 
@@ -191,9 +186,9 @@
 void RenderWidgetHostViewMus::SetIsLoading(bool is_loading) {
 }
 
-void RenderWidgetHostViewMus::UpdateInputMethodIfNecessary(
-    bool text_input_state_changed) {
-  // TODO: Implement the IME logic when input state changes.
+void RenderWidgetHostViewMus::TextInputStateChanged(
+    const ViewHostMsg_TextInputState_Params& params) {
+  // TODO(fsamuel): Implement an IME mojo app.
 }
 
 void RenderWidgetHostViewMus::ImeCancelComposition() {
diff --git a/content/browser/renderer_host/render_widget_host_view_mus.h b/content/browser/renderer_host/render_widget_host_view_mus.h
index b97d7c25..4dc9cec 100644
--- a/content/browser/renderer_host/render_widget_host_view_mus.h
+++ b/content/browser/renderer_host/render_widget_host_view_mus.h
@@ -67,7 +67,8 @@
   void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
   void UpdateCursor(const WebCursor& cursor) override;
   void SetIsLoading(bool is_loading) override;
-  void UpdateInputMethodIfNecessary(bool text_input_state_changed) override;
+  void TextInputStateChanged(
+      const ViewHostMsg_TextInputState_Params& params) override;
   void ImeCancelComposition() override;
 #if defined(OS_MACOSX) || defined(USE_AURA)
   void ImeCompositionRangeChanged(
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
index 45117a3..07e84bb 100644
--- a/content/browser/security_exploit_browsertest.cc
+++ b/content/browser/security_exploit_browsertest.cc
@@ -537,7 +537,7 @@
   params.should_update_history = false;
   params.gesture = NavigationGestureAuto;
   params.was_within_same_page = false;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(url);
   params.origin = url::Origin(GURL("http://bar.com/"));
 
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index 5a2be34..bd1d088 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -31,6 +31,7 @@
 #include "content/browser/renderer_host/render_view_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_input_event_router.h"
 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
+#include "content/browser/web_contents/web_contents_impl.h"
 #include "content/common/frame_messages.h"
 #include "content/common/input/synthetic_tap_gesture_params.h"
 #include "content/common/view_messages.h"
@@ -46,6 +47,7 @@
 #include "content/public/test/content_browser_test_utils.h"
 #include "content/public/test/test_navigation_observer.h"
 #include "content/public/test/test_utils.h"
+#include "content/shell/browser/shell.h"
 #include "content/test/content_browser_test_utils_internal.h"
 #include "content/test/test_frame_navigation_observer.h"
 #include "ipc/ipc_security_test_util.h"
@@ -6236,226 +6238,4 @@
   EXPECT_FALSE(rvh->is_swapped_out_);
 }
 
-// This class will sniff incoming IPC for ViewHostMsg_TextInputStateChanged.
-class TextInputStateChangedMessageFilter : public BrowserMessageFilter {
- public:
-  explicit TextInputStateChangedMessageFilter(
-      RenderWidgetHostImpl* render_widget_host)
-      : BrowserMessageFilter(ViewMsgStart), text_input_state_changed_(false) {
-    if (!render_widget_host || !render_widget_host->GetProcess())
-      text_input_state_changed_ = true;
-    old_state = *render_widget_host->GetView()->text_input_state();
-    render_widget_host->GetProcess()->AddFilter(this);
-  }
-
-  void WaitUntilTextInputStateChanges() {
-    if (!text_input_state_changed_) {
-      message_loop_runner_ = new MessageLoopRunner;
-      message_loop_runner_->Run();
-    }
-  }
-
- private:
-  ~TextInputStateChangedMessageFilter() override {}
-
-  bool OnMessageReceived(const IPC::Message& msg) override {
-    IPC_BEGIN_MESSAGE_MAP(TextInputStateChangedMessageFilter, msg)
-      IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
-                          OnTextInputStateChangedMessageReceived)
-    IPC_END_MESSAGE_MAP()
-    return false;
-  }
-
-  void OnTextInputStateChangedMessageReceived(const TextInputState& new_state) {
-    if (new_state.type != old_state.type || new_state.mode != old_state.mode ||
-        new_state.value != old_state.value) {
-      text_input_state_changed_ = true;
-      if (message_loop_runner_)
-        BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
-                                message_loop_runner_->QuitClosure());
-    }
-  }
-
-  bool text_input_state_changed_;
-  scoped_refptr<MessageLoopRunner> message_loop_runner_;
-  TextInputState old_state;
-
-  DISALLOW_COPY_AND_ASSIGN(TextInputStateChangedMessageFilter);
-};
-
-// Verify that when moving the focus between different frames, the WebContents
-// properly keeps track of the text input state.
-// The test loads a page with one input field, two out of process frames, and a
-// second input field positioned after the last <iframe>. Then a sequence of TAB
-// inputs are faked to navigate focus in between the different <input> elements.
-// After each change, we check with the RWHV of the frame as well as the
-// WebContents to make sure the text input state is as expected.
-IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, TextInputStateChanged) {
-  GURL main_page_url(embedded_test_server()->GetURL(
-      "a.com", "/textinput/page_with_input_iframeX2_input.html"));
-  NavigateToURL(shell(), main_page_url);
-
-  WebContents* contents = shell()->web_contents();
-
-  FrameTreeNode* root = web_contents()->GetFrameTree()->root();
-
-  FrameTreeNode* child_b = root->child_at(0);
-  GURL child_b_url(embedded_test_server()->GetURL(
-      "b.com", "/textinput/page_with_input.html"));
-  NavigateFrameToURL(child_b, child_b_url);
-  EXPECT_TRUE(WaitForRenderFrameReady(child_b->current_frame_host()));
-
-  FrameTreeNode* child_c = root->child_at(1);
-  GURL child_c_url(embedded_test_server()->GetURL(
-      "c.com", "/textinput/page_with_input.html"));
-  NavigateFrameToURL(child_c, child_c_url);
-  EXPECT_TRUE(WaitForRenderFrameReady(child_c->current_frame_host()));
-
-  RenderWidgetHostImpl* root_rwh =
-      root->current_frame_host()->GetRenderWidgetHost();
-  RenderWidgetHostViewBase* root_rwhv = root_rwh->GetView();
-
-  RenderWidgetHostImpl* child_b_rwh =
-      child_b->current_frame_host()->GetRenderWidgetHost();
-  RenderWidgetHostViewBase* child_b_rwhv = child_b_rwh->GetView();
-
-  RenderWidgetHostImpl* child_c_rwh =
-      child_c->current_frame_host()->GetRenderWidgetHost();
-  RenderWidgetHostViewBase* child_c_rwhv = child_c_rwh->GetView();
-
-  // Change the text value in <input> field of either frame so that we can
-  // later track the changes.
-  EXPECT_TRUE(
-      ExecuteScript(child_b->current_frame_host(),
-                    "document.querySelector('input').value = 'second';"));
-  EXPECT_TRUE(
-      ExecuteScript(child_c->current_frame_host(),
-                    "document.querySelector('input').value = 'third';"));
-
-  // Verify the input type is none in the beginning.
-  EXPECT_EQ(ui::TEXT_INPUT_TYPE_NONE, root_rwhv->text_input_state()->type);
-
-  // A helper function to send a tab key to the frame and wait for a state
-  // changed message.
-  auto press_tab_and_wait_for_text_input_state_change =
-      [contents](RenderWidgetHostImpl* rwh) {
-        scoped_refptr<TextInputStateChangedMessageFilter> filter =
-            new TextInputStateChangedMessageFilter(rwh);
-        SimulateKeyPress(contents, ui::VKEY_TAB, false, false, false, false);
-        filter->WaitUntilTextInputStateChanges();
-      };
-
-  // Send focus to the first input field.
-  press_tab_and_wait_for_text_input_state_change(root_rwh);
-  EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, root_rwhv->text_input_state()->type);
-  EXPECT_EQ("first", root_rwhv->text_input_state()->value);
-
-  // Verify the top-level state is changed.
-  EXPECT_EQ("first", web_contents()->GetTextInputState()->value);
-
-  // Send focus to the input field in frame b.
-  press_tab_and_wait_for_text_input_state_change(child_b_rwh);
-  EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, child_b_rwhv->text_input_state()->type);
-  EXPECT_EQ("second", child_b_rwhv->text_input_state()->value);
-
-  EXPECT_EQ("second", web_contents()->GetTextInputState()->value);
-
-  // Send focus to the input field in frame c.
-  press_tab_and_wait_for_text_input_state_change(child_c_rwh);
-  EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, child_c_rwhv->text_input_state()->type);
-  EXPECT_EQ("third", child_c_rwhv->text_input_state()->value);
-
-  EXPECT_EQ("third", web_contents()->GetTextInputState()->value);
-
-  // Send focus to the last input field in top frame.
-  press_tab_and_wait_for_text_input_state_change(root_rwh);
-  EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, root_rwhv->text_input_state()->type);
-  EXPECT_EQ("fourth", root_rwhv->text_input_state()->value);
-
-  EXPECT_EQ("fourth", web_contents()->GetTextInputState()->value);
-}
-
-// Disable this test on Android (http://crbug.com/603209)
-#if defined(OS_ANDROID)
-#define MAYBE_TextInputStateChangesAfterRendererCrashes \
-  DISABLED_TextInputStateChangesAfterRendererCrashes
-#else
-#define MAYBE_TextInputStateChangesAfterRendererCrashes \
-  TextInputStateChangesAfterRendererCrashes
-#endif
-
-IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
-                       MAYBE_TextInputStateChangesAfterRendererCrashes) {
-  GURL main_url(
-      embedded_test_server()->GetURL("a.com", "/page_with_iframe.html"));
-  NavigateToURL(shell(), main_url);
-  WebContentsImpl* contents = web_contents();
-
-  FrameTreeNode* root = contents->GetFrameTree()->root();
-
-  FrameTreeNode* child = root->child_at(0);
-  GURL child_url(embedded_test_server()->GetURL(
-      "b.com", "/textinput/page_with_input.html"));
-  NavigateFrameToURL(child, child_url);
-  EXPECT_TRUE(WaitForRenderFrameReady(child->current_frame_host()));
-
-  // Verify that the text input state is initially none.
-  EXPECT_EQ(ui::TEXT_INPUT_TYPE_NONE, contents->GetTextInputState()->type);
-
-  auto press_tab_and_wait_for_state_change =
-      [contents](RenderWidgetHostImpl* rwh) {
-        scoped_refptr<TextInputStateChangedMessageFilter> filter =
-            new TextInputStateChangedMessageFilter(rwh);
-        SimulateKeyPress(contents, ui::VKEY_TAB, false, false, false, false);
-        filter->WaitUntilTextInputStateChanges();
-      };
-
-  auto crash_renderer_and_wait_for_input_state_none = [contents](
-      RenderProcessHost* host) {
-    RenderProcessHostWatcher crash_observer(
-        host, RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
-    host->Shutdown(0, false);
-    crash_observer.Wait();
-
-    // We need to wait until the actual text input state update occurs.
-    while (contents->GetTextInputState()->type != ui::TEXT_INPUT_TYPE_NONE) {
-      scoped_refptr<MessageLoopRunner> loop_runner_ = new MessageLoopRunner();
-      BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE,
-                                     loop_runner_->QuitClosure(),
-                                     base::TimeDelta::FromMilliseconds(0LL));
-      loop_runner_->Run();
-    }
-  };
-
-  // Press a tab key to focus the <input> and verify that the top level
-  // WebContents sees it.
-  RenderWidgetHostImpl* child_rwh =
-      child->current_frame_host()->GetRenderWidgetHost();
-  press_tab_and_wait_for_state_change(child_rwh);
-  EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, contents->GetTextInputState()->type);
-
-  // Crash the renderer and wait until WebContentsImpl has updates the
-  // state.
-  RenderProcessHost* child_process = child_rwh->GetProcess();
-  crash_renderer_and_wait_for_input_state_none(child_process);
-
-  // Now repeat the same test for the top level RWHV.
-  // First remove the <iframe> and append an <input>
-  EXPECT_TRUE(ExecuteScript(contents,
-                            "var f = document.querySelector('iframe'); "
-                            "f.parentNode.removeChild(f);"));
-  EXPECT_TRUE(ExecuteScript(
-      contents, "document.body.appendChild(document.createElement('input'));"));
-
-  // Press tab to focus the <input> and observe the state change.
-  RenderWidgetHostImpl* root_rwh =
-      root->current_frame_host()->GetRenderWidgetHost();
-  press_tab_and_wait_for_state_change(root_rwh);
-  EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, contents->GetTextInputState()->type);
-
-  // Crash the tab renderer and observer the input state going back to none.
-  RenderProcessHost* host_process = root_rwh->GetProcess();
-  crash_renderer_and_wait_for_input_state_none(host_process);
-}
-
 }  // namespace content
diff --git a/content/browser/site_per_process_browsertest.h b/content/browser/site_per_process_browsertest.h
index 5753e19..16db097 100644
--- a/content/browser/site_per_process_browsertest.h
+++ b/content/browser/site_per_process_browsertest.h
@@ -7,15 +7,14 @@
 
 #include <string>
 
-#include "content/browser/web_contents/web_contents_impl.h"
 #include "content/public/test/content_browser_test.h"
-#include "content/shell/browser/shell.h"
 #include "content/test/content_browser_test_utils_internal.h"
 #include "url/gurl.h"
 
 namespace content {
 
 class FrameTreeNode;
+class Shell;
 
 class SitePerProcessBrowserTest : public ContentBrowserTest {
  public:
@@ -27,10 +26,6 @@
   void SetUpCommandLine(base::CommandLine* command_line) override;
   void SetUpOnMainThread() override;
 
-  WebContentsImpl* web_contents() {
-    return static_cast<WebContentsImpl*>(shell()->web_contents());
-  }
-
  private:
   FrameTreeVisualizer visualizer_;
 };
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc
index 58852c2..334b26e 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -469,8 +469,8 @@
   }
   partition->SetMediaURLRequestContext(
       partition_domain.empty() ?
-      browser_context_->GetMediaRequestContext() :
-      browser_context_->GetMediaRequestContextForStoragePartition(
+      browser_context_->CreateMediaRequestContext() :
+      browser_context_->CreateMediaRequestContextForStoragePartition(
           partition->GetPath(), in_memory));
 
   PostCreateInitialization(partition, in_memory);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 306adc50..a62145e 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -80,7 +80,6 @@
 #include "content/common/page_messages.h"
 #include "content/common/site_isolation_policy.h"
 #include "content/common/ssl_status_serialization.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_messages.h"
 #include "content/public/browser/ax_event_notification_details.h"
 #include "content/public/browser/browser_context.h"
@@ -404,7 +403,6 @@
       bluetooth_connected_device_count_(0),
       virtual_keyboard_requested_(false),
       page_scale_factor_is_one_(true),
-      text_input_state_(new TextInputState()),
       loading_weak_factory_(this),
       weak_factory_(this) {
   frame_tree_.SetFrameRemoveListener(
@@ -2313,44 +2311,6 @@
     browser_plugin_embedder_->DidSendScreenRects();
 }
 
-const TextInputState* WebContentsImpl::GetTextInputState() {
-  if (GetOuterWebContents())
-    return GetOuterWebContents()->GetTextInputState();
-  // A RWHV should update WebContentsImpl in its destruction path so that state
-  // type is reset to none.
-  DCHECK(view_with_active_text_input_ ||
-         text_input_state_->type == ui::TEXT_INPUT_TYPE_NONE);
-  return text_input_state_.get();
-}
-
-void WebContentsImpl::UpdateTextInputState(RenderWidgetHostViewBase* rwhv,
-                                           bool text_input_state_changed) {
-  // If there is an outer WebContents, let it process this update.
-  if (GetOuterWebContents()) {
-    return GetOuterWebContents()->UpdateTextInputState(
-        rwhv, text_input_state_changed);
-  }
-
-  // If this RWHV has a text input type of NONE, then there is nothing to
-  // report to the tab RWHV.
-  if (view_with_active_text_input_.get() != rwhv &&
-      rwhv->text_input_state()->type == ui::TEXT_INPUT_TYPE_NONE)
-    return;
-
-  if (rwhv->text_input_state()->type != ui::TEXT_INPUT_TYPE_NONE)
-    view_with_active_text_input_ = rwhv->GetWeakPtr();
-  else
-    view_with_active_text_input_.reset();
-
-  *text_input_state_ = *rwhv->text_input_state();
-
-  // The top level RWHV should know about the change.
-  RenderWidgetHostViewBase* tab_rwhv =
-      static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
-  if (tab_rwhv)
-    tab_rwhv->UpdateInputMethodIfNecessary(text_input_state_changed);
-}
-
 BrowserAccessibilityManager*
     WebContentsImpl::GetRootBrowserAccessibilityManager() {
   RenderFrameHostImpl* rfh = GetMainFrame();
@@ -3369,8 +3329,8 @@
   if (url.is_valid() && url.SchemeIsHTTPOrHTTPS()) {
     scoped_refptr<net::URLRequestContextGetter> request_context(
         resource_type == RESOURCE_TYPE_MEDIA ?
-            GetBrowserContext()->GetMediaRequestContextForRenderProcess(
-                GetRenderProcessHost()->GetID()) :
+            GetRenderProcessHost()->GetStoragePartition()->
+                GetMediaURLRequestContext() :
             GetRenderProcessHost()->GetStoragePartition()->
                 GetURLRequestContext());
     BrowserThread::PostTask(
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 5deddb09..36764b6 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -613,9 +613,6 @@
                               const std::vector<uint8_t>& proto) override;
   void OnRenderFrameProxyVisibilityChanged(bool visible) override;
   void SendScreenRects() override;
-  const TextInputState* GetTextInputState() override;
-  void UpdateTextInputState(RenderWidgetHostViewBase* rwhv,
-                            bool text_input_state_changed) override;
 
   // RenderFrameHostManager::Delegate ------------------------------------------
 
@@ -1359,13 +1356,6 @@
 
   bool page_scale_factor_is_one_;
 
-  // The RWHV which is currently focused.
-  base::WeakPtr<RenderWidgetHostViewBase> view_with_active_text_input_;
-
-  // A copy of the text input state from |view_with_active_text_input_| when
-  // there exists one, or empty (type == ui::TEXT_INPUT_TYPE_NONE) if otherwise.
-  std::unique_ptr<TextInputState> text_input_state_;
-
   base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_;
   base::WeakPtrFactory<WebContentsImpl> weak_factory_;
 
diff --git a/content/browser/webui/web_ui_mojo_browsertest.cc b/content/browser/webui/web_ui_mojo_browsertest.cc
index a9d0a90..5edfb2c 100644
--- a/content/browser/webui/web_ui_mojo_browsertest.cc
+++ b/content/browser/webui/web_ui_mojo_browsertest.cc
@@ -228,22 +228,5 @@
             other_shell->web_contents()->GetRenderProcessHost());
 }
 
-// Loads a webui page that connects to a test Mojo application via the browser's
-// Mojo shell interface.
-IN_PROC_BROWSER_TEST_F(WebUIMojoTest, ConnectToApplication) {
-  if (!IsGeneratedResourceAvailable(
-          "content/public/test/test_mojo_service.mojom"))
-    return;
-
-  ASSERT_TRUE(embedded_test_server()->Start());
-  NavigateToURL(shell(),
-                GURL("chrome://mojo-web-ui/web_ui_mojo_shell_test.html"));
-
-  DOMMessageQueue message_queue;
-  std::string message;
-  ASSERT_TRUE(message_queue.WaitForMessage(&message));
-  EXPECT_EQ("true", message);
-}
-
 }  // namespace
 }  // namespace content
diff --git a/content/child/process_control_impl.cc b/content/child/process_control_impl.cc
index 36ec78f5..b465db6 100644
--- a/content/child/process_control_impl.cc
+++ b/content/child/process_control_impl.cc
@@ -6,8 +6,8 @@
 
 #include <utility>
 
-#include "base/stl_util.h"
-#include "content/common/mojo/static_loader.h"
+#include "base/bind.h"
+#include "base/memory/ptr_util.h"
 #include "content/public/common/content_client.h"
 
 namespace content {
@@ -16,29 +16,36 @@
 }
 
 ProcessControlImpl::~ProcessControlImpl() {
-  STLDeleteValues(&name_to_loader_map_);
 }
 
 void ProcessControlImpl::LoadApplication(
     const mojo::String& name,
-    mojo::InterfaceRequest<shell::mojom::ShellClient> request,
+    shell::mojom::ShellClientRequest request,
     const LoadApplicationCallback& callback) {
-  // Only register loaders when we need it.
-  if (!has_registered_loaders_) {
-    DCHECK(name_to_loader_map_.empty());
-    RegisterLoaders(&name_to_loader_map_);
-    has_registered_loaders_ = true;
+  // Only register apps on first run.
+  if (!has_registered_apps_) {
+    DCHECK(apps_.empty());
+    ApplicationFactoryMap app_factories;
+    RegisterApplicationFactories(&app_factories);
+    for (const auto& factory : app_factories) {
+      std::unique_ptr<EmbeddedApplicationRunner> runner(
+          new EmbeddedApplicationRunner(factory.second, nullptr));
+      runner->SetQuitClosure(base::Bind(&ProcessControlImpl::OnApplicationQuit,
+                                        base::Unretained(this)));
+      apps_.insert(std::make_pair(factory.first, std::move(runner)));
+    }
+    has_registered_apps_ = true;
   }
 
-  auto it = name_to_loader_map_.find(name);
-  if (it == name_to_loader_map_.end()) {
+  auto it = apps_.find(name);
+  if (it == apps_.end()) {
     callback.Run(false);
     OnLoadFailed();
     return;
   }
 
   callback.Run(true);
-  it->second->Load(name, std::move(request));
+  it->second->BindShellClientRequest(std::move(request));
 }
 
 }  // namespace content
diff --git a/content/child/process_control_impl.h b/content/child/process_control_impl.h
index 2bf4e5f..0ae4ab44 100644
--- a/content/child/process_control_impl.h
+++ b/content/child/process_control_impl.h
@@ -5,42 +5,42 @@
 #ifndef CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_
 #define CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_
 
-#include <map>
+#include <memory>
+#include <unordered_map>
 
 #include "base/macros.h"
+#include "content/common/mojo/embedded_application_runner.h"
 #include "content/common/process_control.mojom.h"
-#include "mojo/public/cpp/bindings/interface_request.h"
 #include "services/shell/public/interfaces/shell_client.mojom.h"
 
-namespace shell {
-class Loader;
-}  // namespace shell
-
 namespace content {
 
 // Default implementation of the mojom::ProcessControl interface.
 class ProcessControlImpl : public mojom::ProcessControl {
  public:
+  using ApplicationFactoryMap =
+      std::unordered_map<std::string,
+                         EmbeddedApplicationRunner::FactoryCallback>;
+
   ProcessControlImpl();
   ~ProcessControlImpl() override;
 
-  using NameToLoaderMap = std::map<std::string, shell::Loader*>;
-
-  // Registers Mojo loaders for names.
-  virtual void RegisterLoaders(NameToLoaderMap* name_to_loader_map) = 0;
+  virtual void RegisterApplicationFactories(
+      ApplicationFactoryMap* factories) = 0;
+  virtual void OnApplicationQuit() {}
 
   // ProcessControl:
-  void LoadApplication(
-      const mojo::String& name,
-      mojo::InterfaceRequest<shell::mojom::ShellClient> request,
-      const LoadApplicationCallback& callback) override;
+  void LoadApplication(const mojo::String& name,
+                       shell::mojom::ShellClientRequest request,
+                       const LoadApplicationCallback& callback) override;
 
  private:
   // Called if a LoadApplication request fails.
   virtual void OnLoadFailed() {}
 
-  bool has_registered_loaders_ = false;
-  NameToLoaderMap name_to_loader_map_;
+  bool has_registered_apps_ = false;
+  std::unordered_map<std::string, std::unique_ptr<EmbeddedApplicationRunner>>
+      apps_;
 
   DISALLOW_COPY_AND_ASSIGN(ProcessControlImpl);
 };
diff --git a/content/common/bluetooth/bluetooth_messages.h b/content/common/bluetooth/bluetooth_messages.h
index 68b51e3..edd6d36 100644
--- a/content/common/bluetooth/bluetooth_messages.h
+++ b/content/common/bluetooth/bluetooth_messages.h
@@ -181,43 +181,6 @@
                      int /* request_id */,
                      blink::WebBluetoothError /* result */)
 
-// Informs the renderer that the value has been read.
-IPC_MESSAGE_CONTROL3(BluetoothMsg_ReadCharacteristicValueSuccess,
-                     int /* thread_id */,
-                     int /* request_id */,
-                     std::vector<uint8_t> /* value */)
-
-// Informs the renderer that an error occurred while reading the value.
-IPC_MESSAGE_CONTROL3(BluetoothMsg_ReadCharacteristicValueError,
-                     int /* thread_id */,
-                     int /* request_id */,
-                     blink::WebBluetoothError /* result */)
-
-// Informs the renderer that the user has successfully subscribed to
-// notifications from the device.
-IPC_MESSAGE_CONTROL2(BluetoothMsg_StartNotificationsSuccess,
-                     int /* thread_id */,
-                     int /* request_id */)
-
-// Informs the renderer that an error ocurred when trying to subscribe to
-// notifications from the device.
-IPC_MESSAGE_CONTROL3(BluetoothMsg_StartNotificationsError,
-                     int /* thread_id */,
-                     int /* request_id */,
-                     blink::WebBluetoothError)
-
-// Informs the renderer that the user has successfully unsubscribed from
-// notifications.
-IPC_MESSAGE_CONTROL2(BluetoothMsg_StopNotificationsSuccess,
-                     int /* thread_id */,
-                     int /* request_id */)
-
-// Informs the renderer that a characteristic's value changed.
-IPC_MESSAGE_CONTROL3(BluetoothMsg_CharacteristicValueChanged,
-                     int /* thread_id */,
-                     std::string /* characteristic_instance_id */,
-                     std::vector<uint8_t> /* value */)
-
 // Messages sent from the renderer to the browser.
 
 // Requests a bluetooth device from the browser.
@@ -264,36 +227,3 @@
                      int /* frame_routing_id */,
                      std::string /* service_instance_id */,
                      std::string /* characteristics_uuid */)
-
-// Reads the characteristics value from a bluetooth device.
-IPC_MESSAGE_CONTROL4(BluetoothHostMsg_ReadValue,
-                     int /* thread_id */,
-                     int /* request_id */,
-                     int /* frame_routing_id */,
-                     std::string /* characteristic_instance_id */)
-
-// Subscribes to notifications from a device's characteristic.
-IPC_MESSAGE_CONTROL4(BluetoothHostMsg_StartNotifications,
-                     int /* thread_id */,
-                     int /* request_id */,
-                     int /* frame_routing_id */,
-                     std::string /* characteristic_instance_id */)
-
-// Unsubscribes from notifications from a device's characteristic.
-IPC_MESSAGE_CONTROL4(BluetoothHostMsg_StopNotifications,
-                     int /* thread_id */,
-                     int /* request_id */,
-                     int /* frame_routing_id */,
-                     std::string /* characteristic_instance_id */)
-
-// Register to receive characteristic value changed events.
-IPC_MESSAGE_CONTROL3(BluetoothHostMsg_RegisterCharacteristic,
-                     int /* thread_id */,
-                     int /* frame_routing_id */,
-                     std::string /* characteristics_instance_id */)
-
-// Unregister from characteristic value changed events.
-IPC_MESSAGE_CONTROL3(BluetoothHostMsg_UnregisterCharacteristic,
-                     int /* thread_id */,
-                     int /* frame_routing_id */,
-                     std::string /* characteristics_instance_id */)
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index 43dce9b4..e10bedbb 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -232,8 +232,8 @@
   // The gesture that initiated this navigation.
   IPC_STRUCT_MEMBER(content::NavigationGesture, gesture)
 
-  // True if this was a post request.
-  IPC_STRUCT_MEMBER(bool, is_post)
+  // The HTTP method used by the navigation.
+  IPC_STRUCT_MEMBER(std::string, method)
 
   // The POST body identifier. -1 if it doesn't exist.
   IPC_STRUCT_MEMBER(int64_t, post_id)
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc
index 57e862a..868a60eb 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -12,8 +12,8 @@
 #include "base/callback_helpers.h"
 #include "base/strings/stringprintf.h"
 #include "cc/output/managed_memory_policy.h"
-#include "content/common/gpu/client/grcontext_for_gles2_interface.h"
 #include "gpu/command_buffer/client/gles2_implementation.h"
+#include "gpu/skia_bindings/grcontext_for_gles2_interface.h"
 #include "third_party/skia/include/gpu/GrContext.h"
 
 namespace content {
@@ -126,8 +126,8 @@
   if (gr_context_)
     return gr_context_->get();
 
-  gr_context_.reset(
-      new GrContextForGLES2Interface(context3d_->GetGLInterface()));
+  gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(
+      context3d_->GetGLInterface()));
 
   // If GlContext is already lost, also abandon the new GrContext.
   if (gr_context_->get() &&
@@ -141,7 +141,7 @@
   if (gr_context_) {
     DCHECK(lost_context_callback_proxy_);  // Is bound to thread.
     DCHECK(context_thread_checker_.CalledOnValidThread());
-    gr_context_->get()->resetContext(state);
+    gr_context_->ResetContext(state);
   }
 }
 
diff --git a/content/common/gpu/client/context_provider_command_buffer.h b/content/common/gpu/client/context_provider_command_buffer.h
index 134035a..433cefa 100644
--- a/content/common/gpu/client/context_provider_command_buffer.h
+++ b/content/common/gpu/client/context_provider_command_buffer.h
@@ -18,9 +18,11 @@
 #include "content/common/gpu/client/command_buffer_metrics.h"
 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
 
-namespace content {
-
+namespace skia_bindings {
 class GrContextForGLES2Interface;
+}  // namespace skia_bindings
+
+namespace content {
 
 // Implementation of cc::ContextProvider that provides a
 // WebGraphicsContext3DCommandBufferImpl context and a GrContext.
@@ -65,7 +67,7 @@
   base::ThreadChecker context_thread_checker_;
 
   std::unique_ptr<WebGraphicsContext3DCommandBufferImpl> context3d_;
-  std::unique_ptr<GrContextForGLES2Interface> gr_context_;
+  std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_;
 
   cc::ContextProvider::Capabilities capabilities_;
   CommandBufferContextType context_type_;
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator_win.cc b/content/common/gpu/media/dxva_video_decode_accelerator_win.cc
index 111193fe..b4ee8f0 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator_win.cc
+++ b/content/common/gpu/media/dxva_video_decode_accelerator_win.cc
@@ -1036,6 +1036,13 @@
   hr = Direct3DCreate9Ex(D3D_SDK_VERSION, d3d9_.Receive());
   RETURN_ON_HR_FAILURE(hr, "Direct3DCreate9Ex failed", false);
 
+  hr = d3d9_->CheckDeviceFormatConversion(
+      D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
+      static_cast<D3DFORMAT>(MAKEFOURCC('N', 'V', '1', '2')),
+      D3DFMT_X8R8G8B8);
+  RETURN_ON_HR_FAILURE(hr,
+      "D3D9 driver does not support H/W format conversion", false);
+
   base::win::ScopedComPtr<IDirect3DDevice9> angle_device =
       QueryDeviceObjectFromANGLE<IDirect3DDevice9>(EGL_D3D9_DEVICE_ANGLE);
   if (angle_device.get())
@@ -1063,8 +1070,7 @@
                                D3DDEVTYPE_HAL,
                                NULL,
                                D3DCREATE_FPU_PRESERVE |
-                               D3DCREATE_HARDWARE_VERTEXPROCESSING |
-                               D3DCREATE_DISABLE_PSGP_THREADING |
+                               D3DCREATE_MIXED_VERTEXPROCESSING |
                                D3DCREATE_MULTITHREADED,
                                &present_params,
                                NULL,
diff --git a/content/common/gpu/media/vt_video_decode_accelerator_mac.cc b/content/common/gpu/media/vt_video_decode_accelerator_mac.cc
index f6824c5b..d832870f 100644
--- a/content/common/gpu/media/vt_video_decode_accelerator_mac.cc
+++ b/content/common/gpu/media/vt_video_decode_accelerator_mac.cc
@@ -126,7 +126,7 @@
       format.InitializeInto());
   if (status) {
     OSSTATUS_DLOG(WARNING, status)
-        << "Failed to create CMVideoFormatDescription.";
+        << "Failed to create CMVideoFormatDescription";
     return false;
   }
 
@@ -163,7 +163,8 @@
       &callback,            // output_callback
       session.InitializeInto());
   if (status) {
-    OSSTATUS_DLOG(WARNING, status) << "Failed to create VTDecompressionSession";
+    OSSTATUS_DLOG(WARNING, status)
+        << "Failed to create VTDecompressionSession";
     return false;
   }
 
@@ -185,8 +186,7 @@
     paths[kModuleVt].push_back(FILE_PATH_LITERAL(
         "/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox"));
     if (!InitializeStubs(paths)) {
-      LOG(WARNING) << "Failed to initialize VideoToolbox framework. "
-                   << "Hardware accelerated video decoding will be disabled.";
+      DLOG(WARNING) << "Failed to initialize VideoToolbox framework";
       return false;
     }
   }
@@ -199,8 +199,7 @@
   const uint8_t pps_normal[] = {0x68, 0xe9, 0x7b, 0xcb};
   if (!CreateVideoToolboxSession(sps_normal, arraysize(sps_normal), pps_normal,
                                  arraysize(pps_normal), true)) {
-    LOG(WARNING) << "Failed to create hardware VideoToolbox session. "
-                 << "Hardware accelerated video decoding will be disabled.";
+    DLOG(WARNING) << "Failed to create hardware VideoToolbox session";
     return false;
   }
 
@@ -212,8 +211,7 @@
   const uint8_t pps_small[] = {0x68, 0xe9, 0x79, 0x72, 0xc0};
   if (!CreateVideoToolboxSession(sps_small, arraysize(sps_small), pps_small,
                                  arraysize(pps_small), false)) {
-    LOG(WARNING) << "Failed to create software VideoToolbox session. "
-                 << "Hardware accelerated video decoding will be disabled.";
+    DLOG(WARNING) << "Failed to create software VideoToolbox session";
     return false;
   }
 
@@ -418,7 +416,7 @@
           &kCFTypeDictionaryKeyCallBacks,
           &kCFTypeDictionaryValueCallBacks));
   if (!decoder_config.get()) {
-    DLOG(ERROR) << "Failed to create CFMutableDictionary.";
+    DLOG(ERROR) << "Failed to create CFMutableDictionary";
     NotifyError(PLATFORM_FAILURE, SFT_PLATFORM_ERROR);
     return false;
   }
@@ -432,7 +430,7 @@
   base::ScopedCFTypeRef<CFMutableDictionaryRef> image_config(
       BuildImageConfig(coded_dimensions));
   if (!image_config.get()) {
-    DLOG(ERROR) << "Failed to create decoder image configuration.";
+    DLOG(ERROR) << "Failed to create decoder image configuration";
     NotifyError(PLATFORM_FAILURE, SFT_PLATFORM_ERROR);
     return false;
   }
@@ -962,7 +960,7 @@
       return false;
 
     case TASK_DESTROY:
-      NOTREACHED() << "Can't destroy while in STATE_DECODING.";
+      NOTREACHED() << "Can't destroy while in STATE_DECODING";
       NotifyError(ILLEGAL_STATE, SFT_PLATFORM_ERROR);
       return false;
   }
diff --git a/content/common/mojo/embedded_application_runner.cc b/content/common/mojo/embedded_application_runner.cc
index 50d62a10..c220e9a 100644
--- a/content/common/mojo/embedded_application_runner.cc
+++ b/content/common/mojo/embedded_application_runner.cc
@@ -9,6 +9,7 @@
 #include "base/bind.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
+#include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/threading/thread_checker.h"
 #include "services/shell/public/cpp/shell_connection.h"
@@ -19,8 +20,11 @@
     : public base::RefCountedThreadSafe<Instance> {
  public:
   explicit Instance(
-      const EmbeddedApplicationRunner::FactoryCallback& callback)
-      : factory_callback_(callback) {
+      const EmbeddedApplicationRunner::FactoryCallback& callback,
+      const base::Closure& quit_closure)
+      : factory_callback_(callback),
+        quit_closure_(quit_closure),
+        quit_task_runner_(base::ThreadTaskRunnerHandle::Get()) {
     // This object may be used exclusively from a single thread which may be
     // different from the one that created it.
     thread_checker_.DetachFromThread();
@@ -56,14 +60,18 @@
       }
     }
 
-    if (shell_connections_.empty())
+    if (shell_connections_.empty()) {
       shell_client_.reset();
+      quit_task_runner_->PostTask(FROM_HERE, quit_closure_);
+    }
   }
 
   base::ThreadChecker thread_checker_;
   const FactoryCallback factory_callback_;
   std::unique_ptr<shell::ShellClient> shell_client_;
   std::vector<std::unique_ptr<shell::ShellConnection>> shell_connections_;
+  const base::Closure quit_closure_;
+  const scoped_refptr<base::SingleThreadTaskRunner> quit_task_runner_;
 
   DISALLOW_COPY_AND_ASSIGN(Instance);
 };
@@ -73,7 +81,10 @@
     const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
     : application_task_runner_(
           task_runner ? task_runner : base::ThreadTaskRunnerHandle::Get()),
-      instance_(new Instance(callback)) {
+      weak_factory_(this) {
+  instance_ = new Instance(callback,
+                           base::Bind(&EmbeddedApplicationRunner::OnQuit,
+                                      weak_factory_.GetWeakPtr()));
 }
 
 EmbeddedApplicationRunner::~EmbeddedApplicationRunner() {
@@ -87,4 +98,13 @@
                  base::Passed(&request)));
 }
 
+void EmbeddedApplicationRunner::SetQuitClosure(
+    const base::Closure& quit_closure) {
+  quit_closure_ = quit_closure;
+}
+
+void EmbeddedApplicationRunner::OnQuit() {
+  quit_closure_.Run();
+}
+
 }  // namespace content
diff --git a/content/common/mojo/embedded_application_runner.h b/content/common/mojo/embedded_application_runner.h
index 37b45897..737b503 100644
--- a/content/common/mojo/embedded_application_runner.h
+++ b/content/common/mojo/embedded_application_runner.h
@@ -10,6 +10,7 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "services/shell/public/cpp/shell_client.h"
 #include "services/shell/public/interfaces/shell_client.mojom.h"
@@ -41,9 +42,15 @@
   // bound to the running instance.
   void BindShellClientRequest(shell::mojom::ShellClientRequest request);
 
+  // Sets a callback to run after the application loses its last connection and
+  // is torn down.
+  void SetQuitClosure(const base::Closure& quit_closure);
+
  private:
   class Instance;
 
+  void OnQuit();
+
   // The TaskRunner on which the factory callback will be run. The
   // shell::ShellClient it returns will live and die on this TaskRunner's
   // thread.
@@ -53,6 +60,10 @@
   // |application_task_runner_|'s thread.
   scoped_refptr<Instance> instance_;
 
+  base::Closure quit_closure_;
+
+  base::WeakPtrFactory<EmbeddedApplicationRunner> weak_factory_;
+
   DISALLOW_COPY_AND_ASSIGN(EmbeddedApplicationRunner);
 };
 
diff --git a/content/common/mojo/static_loader.cc b/content/common/mojo/static_loader.cc
deleted file mode 100644
index ad48020..0000000
--- a/content/common/mojo/static_loader.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/common/mojo/static_loader.h"
-
-#include <utility>
-
-#include "base/bind.h"
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/task_runner.h"
-#include "base/thread_task_runner_handle.h"
-#include "base/threading/simple_thread.h"
-#include "mojo/public/cpp/bindings/interface_request.h"
-#include "services/shell/public/cpp/application_runner.h"
-#include "services/shell/public/cpp/shell_client.h"
-#include "services/shell/public/interfaces/shell_client.mojom.h"
-
-namespace content {
-
-namespace {
-
-class RunnerThread : public base::SimpleThread {
- public:
-  RunnerThread(const std::string& name,
-               shell::mojom::ShellClientRequest request,
-               scoped_refptr<base::TaskRunner> exit_task_runner,
-               const base::Closure& exit_callback,
-               const StaticLoader::ApplicationFactory& factory)
-      : base::SimpleThread("Mojo Application: " + name),
-        request_(std::move(request)),
-        exit_task_runner_(exit_task_runner),
-        exit_callback_(exit_callback),
-        factory_(factory) {}
-
-  void Run() override {
-    std::unique_ptr<shell::ApplicationRunner> runner(
-        new shell::ApplicationRunner(factory_.Run().release()));
-    runner->Run(request_.PassMessagePipe().release().value(),
-                false /* init_base */);
-    exit_task_runner_->PostTask(FROM_HERE, exit_callback_);
-  }
-
- private:
-  shell::mojom::ShellClientRequest request_;
-  scoped_refptr<base::TaskRunner> exit_task_runner_;
-  base::Closure exit_callback_;
-  StaticLoader::ApplicationFactory factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(RunnerThread);
-};
-
-}  // namespace
-
-StaticLoader::StaticLoader(const ApplicationFactory& factory)
-    : StaticLoader(factory, base::Closure()) {
-}
-
-StaticLoader::StaticLoader(const ApplicationFactory& factory,
-                           const base::Closure& quit_callback)
-    : factory_(factory), quit_callback_(quit_callback), weak_factory_(this) {
-}
-
-StaticLoader::~StaticLoader() {
-  if (thread_)
-    StopAppThread();
-}
-
-void StaticLoader::Load(const std::string& name,
-                        shell::mojom::ShellClientRequest request) {
-  if (thread_)
-    return;
-
-  // If the application's thread quits on its own before this loader dies, we
-  // reset the Thread object, allowing future Load requests to be fulfilled
-  // with a new app instance.
-  auto exit_callback = base::Bind(&StaticLoader::StopAppThread,
-                                  weak_factory_.GetWeakPtr());
-  thread_.reset(new RunnerThread(name, std::move(request),
-                                 base::ThreadTaskRunnerHandle::Get(),
-                                 exit_callback, factory_));
-  thread_->Start();
-}
-
-void StaticLoader::StopAppThread() {
-  thread_->Join();
-  thread_.reset();
-  if (!quit_callback_.is_null())
-    quit_callback_.Run();
-}
-
-}  // namespace content
diff --git a/content/common/mojo/static_loader.h b/content/common/mojo/static_loader.h
deleted file mode 100644
index fc231940..0000000
--- a/content/common/mojo/static_loader.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_COMMON_MOJO_STATIC_APPLICATION_LOADER_H_
-#define CONTENT_COMMON_MOJO_STATIC_APPLICATION_LOADER_H_
-
-#include <list>
-
-#include "base/callback.h"
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "services/shell/loader.h"
-
-namespace base {
-class SimpleThread;
-}
-
-namespace shell {
-class ShellClient;
-}
-
-namespace content {
-
-// An Loader which loads a single type of app from a given
-// shell::ShellClientFactory. A Load() request is fulfilled by creating an
-// instance of the app on a new thread. Only one instance of the app will run at
-// a time. Any Load requests received while the app is running will be dropped.
-class StaticLoader : public shell::Loader {
- public:
-  using ApplicationFactory =
-      base::Callback<std::unique_ptr<shell::ShellClient>()>;
-
-  // Constructs a static loader for |factory|.
-  explicit StaticLoader(const ApplicationFactory& factory);
-
-  // Constructs a static loader for |factory| with a closure that will be called
-  // when the loaded application quits.
-  StaticLoader(const ApplicationFactory& factory,
-                          const base::Closure& quit_callback);
-
-  ~StaticLoader() override;
-
-  // shell::Loader:
-  void Load(const std::string& name,
-            shell::mojom::ShellClientRequest request) override;
-
- private:
-  void StopAppThread();
-
-  // The factory used t create new instances of the application delegate.
-  ApplicationFactory factory_;
-
-  // If not null, this is run when the loaded application quits.
-  base::Closure quit_callback_;
-
-  // Thread for the application if currently running.
-  std::unique_ptr<base::SimpleThread> thread_;
-
-  base::WeakPtrFactory<StaticLoader> weak_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(StaticLoader);
-};
-
-}  // namespace content
-
-#endif  // CONTENT_COMMON_MOJO_STATIC_APPLICATION_LOADER_H_
diff --git a/content/common/text_input_state.cc b/content/common/text_input_state.cc
deleted file mode 100644
index bf6932b..0000000
--- a/content/common/text_input_state.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/common/text_input_state.h"
-
-namespace content {
-
-TextInputState::TextInputState()
-    : type(ui::TEXT_INPUT_TYPE_NONE),
-      mode(ui::TEXT_INPUT_MODE_DEFAULT),
-      flags(0),
-      can_compose_inline(true),
-      show_ime_if_needed(false) {}
-
-TextInputState::TextInputState(const TextInputState& other) = default;
-
-}  //  namespace content
diff --git a/content/common/text_input_state.h b/content/common/text_input_state.h
deleted file mode 100644
index 0be6069..0000000
--- a/content/common/text_input_state.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_COMMON_TEXT_INPUT_STATE_H_
-#define CONTENT_COMMON_TEXT_INPUT_STATE_H_
-
-#include <string>
-
-#include "content/common/content_export.h"
-#include "ui/base/ime/text_input_mode.h"
-#include "ui/base/ime/text_input_type.h"
-
-namespace content {
-
-struct CONTENT_EXPORT TextInputState {
-  TextInputState();
-  TextInputState(const TextInputState& other);
-
-  // Type of the input field.
-  ui::TextInputType type;
-
-  // The mode of input field.
-  ui::TextInputMode mode;
-
-  // The flags of input field (autocorrect, autocomplete, etc.)
-  int flags;
-
-  // The value of input field.
-  std::string value;
-
-  // The cursor position of the current selection start, or the caret position
-  // if nothing is selected.
-  int selection_start;
-
-  // The cursor position of the current selection end, or the caret position if
-  // nothing is selected.
-  int selection_end;
-
-  // The start position of the current composition, or -1 if there is none.
-  int composition_start;
-
-  // The end position of the current composition, or -1 if there is none.
-  int composition_end;
-
-  // Whether or not inline composition can be performed for the current input.
-  bool can_compose_inline;
-
-  // Whether or not the IME should be shown as a result of this update. Even if
-  // true, the IME will only be shown if the input is appropriate (e.g. not
-  // TEXT_INPUT_TYPE_NONE).
-  bool show_ime_if_needed;
-
-  // Whether this change is originated from non-IME (e.g., Javascript,
-  // Autofill).
-  bool is_non_ime_change;
-};
-
-}  // namespace content
-
-#endif  // CONTENT_COMMON_TEXT_INPUT_STATE_H_
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 88290b4..324bdef3 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -23,7 +23,6 @@
 #include "content/common/media/media_param_traits.h"
 #include "content/common/navigation_gesture.h"
 #include "content/common/resize_params.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_message_enums.h"
 #include "content/public/common/common_param_traits.h"
 #include "content/public/common/favicon_url.h"
@@ -293,20 +292,6 @@
   IPC_STRUCT_TRAITS_MEMBER(time)
 IPC_STRUCT_TRAITS_END()
 
-IPC_STRUCT_TRAITS_BEGIN(content::TextInputState)
-  IPC_STRUCT_TRAITS_MEMBER(type)
-  IPC_STRUCT_TRAITS_MEMBER(mode)
-  IPC_STRUCT_TRAITS_MEMBER(flags)
-  IPC_STRUCT_TRAITS_MEMBER(value)
-  IPC_STRUCT_TRAITS_MEMBER(selection_start)
-  IPC_STRUCT_TRAITS_MEMBER(selection_end)
-  IPC_STRUCT_TRAITS_MEMBER(composition_start)
-  IPC_STRUCT_TRAITS_MEMBER(composition_end)
-  IPC_STRUCT_TRAITS_MEMBER(can_compose_inline)
-  IPC_STRUCT_TRAITS_MEMBER(show_ime_if_needed)
-  IPC_STRUCT_TRAITS_MEMBER(is_non_ime_change)
-IPC_STRUCT_TRAITS_END()
-
 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params)
   // Routing ID of the view initiating the open.
   IPC_STRUCT_MEMBER(int, opener_id)
@@ -428,6 +413,45 @@
   IPC_STRUCT_MEMBER(bool, is_anchor_first)
 IPC_STRUCT_END()
 
+IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params)
+  // The type of input field
+  IPC_STRUCT_MEMBER(ui::TextInputType, type)
+
+  // The mode of input field
+  IPC_STRUCT_MEMBER(ui::TextInputMode, mode)
+
+  // The flags of the input field (autocorrect, autocomplete, etc.)
+  IPC_STRUCT_MEMBER(int, flags)
+
+  // The value of the input field
+  IPC_STRUCT_MEMBER(std::string, value)
+
+  // The cursor position of the current selection start, or the caret position
+  // if nothing is selected
+  IPC_STRUCT_MEMBER(int, selection_start)
+
+  // The cursor position of the current selection end, or the caret position
+  // if nothing is selected
+  IPC_STRUCT_MEMBER(int, selection_end)
+
+  // The start position of the current composition, or -1 if there is none
+  IPC_STRUCT_MEMBER(int, composition_start)
+
+  // The end position of the current composition, or -1 if there is none
+  IPC_STRUCT_MEMBER(int, composition_end)
+
+  // Whether or not inline composition can be performed for the current input.
+  IPC_STRUCT_MEMBER(bool, can_compose_inline)
+
+  // Whether or not the IME should be shown as a result of this update. Even if
+  // true, the IME will only be shown if the type is appropriate (e.g. not
+  // TEXT_INPUT_TYPE_NONE).
+  IPC_STRUCT_MEMBER(bool, show_ime_if_needed)
+
+  // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
+  IPC_STRUCT_MEMBER(bool, is_non_ime_change)
+IPC_STRUCT_END()
+
 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
   // The size of the RenderView when this message was generated.  This is
   // included so the host knows how large the view is from the perspective of
@@ -1133,7 +1157,7 @@
 
 // Required for updating text input state.
 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
-                    content::TextInputState /* input state */)
+                    ViewHostMsg_TextInputState_Params /* input state params */)
 
 // Sent when the renderer changes the zoom level for a particular url, so the
 // browser can update its records.  If the view is a plugin doc, then url is
diff --git a/content/content_common.gypi b/content/content_common.gypi
index c4a59dfa..78bd2fe 100644
--- a/content/content_common.gypi
+++ b/content/content_common.gypi
@@ -350,8 +350,6 @@
       'common/gpu/client/command_buffer_metrics.h',
       'common/gpu/client/context_provider_command_buffer.cc',
       'common/gpu/client/context_provider_command_buffer.h',
-      'common/gpu/client/grcontext_for_gles2_interface.cc',
-      'common/gpu/client/grcontext_for_gles2_interface.h',
       'common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc',
       'common/gpu/client/webgraphicscontext3d_command_buffer_impl.h',
       'common/gpu/media/fake_video_decode_accelerator.cc',
@@ -470,8 +468,6 @@
       'common/mojo/mojo_shell_connection_impl.h',
       'common/mojo/service_registry_impl.cc',
       'common/mojo/service_registry_impl.h',
-      'common/mojo/static_loader.cc',
-      'common/mojo/static_loader.h',
       'common/navigation_gesture.h',
       'common/navigation_params.cc',
       'common/navigation_params.h',
@@ -571,8 +567,6 @@
       'common/swapped_out_messages.cc',
       'common/swapped_out_messages.h',
       'common/text_input_client_messages.h',
-      'common/text_input_state.cc',
-      'common/text_input_state.h',
       'common/url_schemes.cc',
       'common/url_schemes.h',
       'common/user_agent.cc',
diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi
index 7c43fb9..9c71624 100644
--- a/content/content_renderer.gypi
+++ b/content/content_renderer.gypi
@@ -343,8 +343,6 @@
       'renderer/media/renderer_webmediaplayer_delegate.h',
       'renderer/media/renderer_webmidiaccessor_impl.cc',
       'renderer/media/renderer_webmidiaccessor_impl.h',
-      'renderer/media/track_audio_renderer.cc',
-      'renderer/media/track_audio_renderer.h',
       'renderer/media/video_capture_impl.cc',
       'renderer/media/video_capture_impl.h',
       'renderer/media/video_capture_impl_manager.cc',
@@ -476,8 +474,6 @@
       'renderer/usb/web_usb_client_impl.h',
       'renderer/usb/web_usb_device_impl.cc',
       'renderer/usb/web_usb_device_impl.h',
-      'renderer/wake_lock/wake_lock_dispatcher.cc',
-      'renderer/wake_lock/wake_lock_dispatcher.h',
       'renderer/web_frame_utils.cc',
       'renderer/web_frame_utils.h',
       'renderer/web_ui_extension.cc',
@@ -704,6 +700,8 @@
       'renderer/media/rtc_video_encoder_factory.h',
       'renderer/media/speech_recognition_audio_sink.cc',
       'renderer/media/speech_recognition_audio_sink.h',
+      'renderer/media/track_audio_renderer.cc',
+      'renderer/media/track_audio_renderer.h',
       'renderer/media/user_media_client_impl.cc',
       'renderer/media/video_track_adapter.cc',
       'renderer/media/video_track_adapter.h',
diff --git a/content/content_tests.gypi b/content/content_tests.gypi
index 41918f3..e69ad48 100644
--- a/content/content_tests.gypi
+++ b/content/content_tests.gypi
@@ -247,7 +247,6 @@
       'browser/media/session/mock_media_session_observer.h',
       'browser/memory/memory_pressure_controller_impl_browsertest.cc',
       'browser/message_port_provider_browsertest.cc',
-      'browser/mojo_shell_browsertest.cc',
       'browser/net_info_browsertest.cc',
       'browser/renderer_host/input/composited_scrolling_browsertest.cc',
       'browser/renderer_host/input/non_blocking_event_browsertest.cc',
@@ -303,6 +302,7 @@
     'content_browsertests_webrtc_sources': [
       'browser/media/webrtc/webrtc_audio_debug_recordings_browsertest.cc',
       'browser/media/webrtc/webrtc_browsertest.cc',
+      'browser/media/webrtc/webrtc_datachannel_browsertest.cc',
       'browser/media/webrtc/webrtc_getusermedia_browsertest.cc',
       'browser/media/webrtc/webrtc_internals_browsertest.cc',
       'browser/media/webrtc/webrtc_ip_permissions_browsertest.cc',
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index a24a1f4b..3dfba0c 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -184,7 +184,6 @@
 #if defined(OS_WIN)
   // Use a UI message loop because ANGLE and the desktop GL platform can
   // create child windows to render to.
-  base::MessagePumpForGpu::InitFactory();
   base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
 #elif defined(OS_LINUX) && defined(USE_X11)
   // We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX
diff --git a/content/gpu/gpu_process_control_impl.cc b/content/gpu/gpu_process_control_impl.cc
index 07c50169..f281b05 100644
--- a/content/gpu/gpu_process_control_impl.cc
+++ b/content/gpu/gpu_process_control_impl.cc
@@ -7,7 +7,6 @@
 #if defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS)
 #include "base/bind.h"
 #include "base/bind_helpers.h"
-#include "content/common/mojo/static_loader.h"
 #include "media/mojo/services/mojo_media_application_factory.h"
 #endif
 
@@ -17,12 +16,11 @@
 
 GpuProcessControlImpl::~GpuProcessControlImpl() {}
 
-void GpuProcessControlImpl::RegisterLoaders(
-    NameToLoaderMap* name_to_loader_map) {
+void GpuProcessControlImpl::RegisterApplicationFactories(
+    ApplicationFactoryMap* factories) {
 #if defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS)
-  (*name_to_loader_map)["mojo:media"] = new StaticLoader(
-      base::Bind(&media::CreateMojoMediaApplication),
-      base::Bind(&base::DoNothing));
+  factories->insert(std::make_pair(
+      "mojo:media", base::Bind(&media::CreateMojoMediaApplication)));
 #endif
 }
 
diff --git a/content/gpu/gpu_process_control_impl.h b/content/gpu/gpu_process_control_impl.h
index b886bb5..5e000709 100644
--- a/content/gpu/gpu_process_control_impl.h
+++ b/content/gpu/gpu_process_control_impl.h
@@ -17,7 +17,7 @@
   ~GpuProcessControlImpl() override;
 
   // ProcessControlImpl:
-  void RegisterLoaders(NameToLoaderMap* name_to_loader_map) override;
+  void RegisterApplicationFactories(ApplicationFactoryMap* factories) override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(GpuProcessControlImpl);
diff --git a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
index 48a7e1d..db674c1 100644
--- a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
+++ b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
@@ -316,13 +316,14 @@
 
     @Override
     public void evaluateJavaScript(String script, JavaScriptCallback callback) {
-        if (isDestroyed()) return;
+        if (isDestroyed() || script == null) return;
         nativeEvaluateJavaScript(mNativeWebContentsAndroid, script, callback);
     }
 
     @Override
     @VisibleForTesting
     public void evaluateJavaScriptForTests(String script, JavaScriptCallback callback) {
+        if (script == null) return;
         nativeEvaluateJavaScriptForTests(mNativeWebContentsAndroid, script, callback);
     }
 
diff --git a/content/public/app/BUILD.gn b/content/public/app/BUILD.gn
index 5dcb903..0b5dec8 100644
--- a/content/public/app/BUILD.gn
+++ b/content/public/app/BUILD.gn
@@ -146,8 +146,12 @@
   type = "exe"
   application_name = "content_browser"
   source = "mojo/content_browser_manifest.json"
-  packaged_applications = [ "user" ]
+  packaged_applications = [
+    "media",
+    "user",
+  ]
   deps = [
+    "//media/mojo/services:media_manifest",
     "//services/user:manifest",
   ]
 }
diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h
index d973c26..55208d4 100644
--- a/content/public/browser/browser_context.h
+++ b/content/public/browser/browser_context.h
@@ -173,20 +173,6 @@
   // Return whether this context is incognito. Default is false.
   virtual bool IsOffTheRecord() const = 0;
 
-  // Returns the default request context for media resources associated with
-  // this context.
-  // TODO(creis): Remove this version in favor of the one below.
-  virtual net::URLRequestContextGetter* GetMediaRequestContext() = 0;
-
-  // Returns the request context for media resources associated with this
-  // context and renderer process.
-  virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
-      int renderer_child_id) = 0;
-  virtual net::URLRequestContextGetter*
-      GetMediaRequestContextForStoragePartition(
-          const base::FilePath& partition_path,
-          bool in_memory) = 0;
-
   // Returns the resource context.
   virtual ResourceContext* GetResourceContext() = 0;
 
@@ -230,6 +216,17 @@
       bool in_memory,
       ProtocolHandlerMap* protocol_handlers,
       URLRequestInterceptorScopedVector request_interceptors) = 0;
+
+  // Creates the main net::URLRequestContextGetter for media resources. It's
+  // called only once.
+  virtual net::URLRequestContextGetter* CreateMediaRequestContext() = 0;
+
+  // Creates the media net::URLRequestContextGetter for a StoragePartition. It's
+  // called only once per partition_path.
+  virtual net::URLRequestContextGetter*
+      CreateMediaRequestContextForStoragePartition(
+          const base::FilePath& partition_path,
+          bool in_memory) = 0;
 };
 
 }  // namespace content
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index a76aa30..6301f85 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -31,7 +31,6 @@
 #include "content/browser/web_contents/web_contents_view.h"
 #include "content/common/input/synthetic_web_input_event_builders.h"
 #include "content/common/input_messages.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_messages.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/histogram_fetcher.h"
@@ -1236,18 +1235,4 @@
   return ack_result_;
 }
 
-TextInputStateTestExport::TextInputStateTestExport(
-    const ui::TextInputType& type,
-    const std::string& value)
-    : type_(type), value_(value) {}
-
-// static
-TextInputStateTestExport TextInputStateTestExport::FromWebContents(
-    WebContents* web_contents) {
-  const TextInputState* state =
-      static_cast<WebContentsImpl*>(web_contents)->GetTextInputState();
-
-  return TextInputStateTestExport(state->type, state->value);
-}
-
 }  // namespace content
diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
index 9229059e..fed1e73 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -27,7 +27,6 @@
 #include "ipc/message_filter.h"
 #include "third_party/WebKit/public/web/WebInputEvent.h"
 #include "ui/accessibility/ax_node_data.h"
-#include "ui/base/ime/text_input_type.h"
 #include "ui/events/keycodes/keyboard_codes.h"
 #include "url/gurl.h"
 
@@ -508,23 +507,6 @@
   DISALLOW_COPY_AND_ASSIGN(InputMsgWatcher);
 };
 
-class TextInputStateTestExport {
- public:
-  static TextInputStateTestExport FromWebContents(
-      content::WebContents* web_contents);
-
-  const ui::TextInputType& type() const { return type_; }
-
-  const std::string& value() const { return value_; }
-
- private:
-  TextInputStateTestExport(const ui::TextInputType& type,
-                           const std::string& value);
-
-  ui::TextInputType type_;
-  std::string value_;
-};
-
 }  // namespace content
 
 #endif  // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
diff --git a/content/public/test/test_browser_context.cc b/content/public/test/test_browser_context.cc
index 36d5263..f6bee79 100644
--- a/content/public/test/test_browser_context.cc
+++ b/content/public/test/test_browser_context.cc
@@ -90,23 +90,6 @@
   return NULL;
 }
 
-net::URLRequestContextGetter* TestBrowserContext::GetMediaRequestContext() {
-  return NULL;
-}
-
-net::URLRequestContextGetter*
-TestBrowserContext::GetMediaRequestContextForRenderProcess(
-    int renderer_child_id) {
-  return NULL;
-}
-
-net::URLRequestContextGetter*
-TestBrowserContext::GetMediaRequestContextForStoragePartition(
-    const base::FilePath& partition_path,
-    bool in_memory) {
-  return NULL;
-}
-
 ResourceContext* TestBrowserContext::GetResourceContext() {
   if (!resource_context_)
     resource_context_.reset(new MockResourceContext(
@@ -158,4 +141,15 @@
   return nullptr;
 }
 
+net::URLRequestContextGetter* TestBrowserContext::CreateMediaRequestContext() {
+  return NULL;
+}
+
+net::URLRequestContextGetter*
+TestBrowserContext::CreateMediaRequestContextForStoragePartition(
+    const base::FilePath& partition_path,
+    bool in_memory) {
+  return NULL;
+}
+
 }  // namespace content
diff --git a/content/public/test/test_browser_context.h b/content/public/test/test_browser_context.h
index 7031c3a..41af84b 100644
--- a/content/public/test/test_browser_context.h
+++ b/content/public/test/test_browser_context.h
@@ -40,12 +40,6 @@
       const base::FilePath& partition_path) override;
   bool IsOffTheRecord() const override;
   DownloadManagerDelegate* GetDownloadManagerDelegate() override;
-  net::URLRequestContextGetter* GetMediaRequestContext() override;
-  net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
-      int renderer_child_id) override;
-  net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
-      const base::FilePath& partition_path,
-      bool in_memory) override;
   ResourceContext* GetResourceContext() override;
   BrowserPluginGuestManager* GetGuestManager() override;
   storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
@@ -61,6 +55,10 @@
       bool in_memory,
       ProtocolHandlerMap* protocol_handlers,
       URLRequestInterceptorScopedVector request_interceptors)  override;
+  net::URLRequestContextGetter* CreateMediaRequestContext() override;
+  net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
+      const base::FilePath& partition_path,
+      bool in_memory) override;
 
  private:
   base::ScopedTempDir browser_context_dir_;
diff --git a/content/renderer/bluetooth/bluetooth_dispatcher.cc b/content/renderer/bluetooth/bluetooth_dispatcher.cc
index a57718c..6e967c3 100644
--- a/content/renderer/bluetooth/bluetooth_dispatcher.cc
+++ b/content/renderer/bluetooth/bluetooth_dispatcher.cc
@@ -34,8 +34,6 @@
 using blink::WebRequestDeviceOptions;
 using blink::WebString;
 using blink::WebVector;
-using NotificationsRequestType =
-    content::BluetoothDispatcher::NotificationsRequestType;
 
 struct BluetoothPrimaryServiceRequest {
   BluetoothPrimaryServiceRequest(
@@ -78,34 +76,6 @@
   std::unique_ptr<blink::WebBluetoothGetCharacteristicsCallbacks> callbacks;
 };
 
-// Struct that holds a pending Start/StopNotifications request.
-struct BluetoothNotificationsRequest {
-  BluetoothNotificationsRequest(
-      int frame_routing_id,
-      const std::string characteristic_instance_id,
-      blink::WebBluetoothRemoteGATTCharacteristic* characteristic,
-      blink::WebBluetoothNotificationsCallbacks* callbacks,
-      NotificationsRequestType type)
-      : frame_routing_id(frame_routing_id),
-        characteristic_instance_id(characteristic_instance_id),
-        characteristic(characteristic),
-        callbacks(callbacks),
-        type(type) {}
-  ~BluetoothNotificationsRequest() {}
-
-  const int frame_routing_id;
-  const std::string characteristic_instance_id;
-  // The characteristic object is owned by the execution context on
-  // the blink side which can destroy the object at any point. Since the
-  // object implements ActiveDOMObject, the object calls Stop when is getting
-  // destroyed, which in turn calls characteristicObjectRemoved.
-  // characteristicObjectRemoved will null any pointers to the object
-  // and queue a stop notifications request if necessary.
-  blink::WebBluetoothRemoteGATTCharacteristic* characteristic;
-  std::unique_ptr<blink::WebBluetoothNotificationsCallbacks> callbacks;
-  NotificationsRequestType type;
-};
-
 namespace content {
 
 namespace {
@@ -185,18 +155,6 @@
                       OnGetCharacteristicsSuccess);
   IPC_MESSAGE_HANDLER(BluetoothMsg_GetCharacteristicsError,
                       OnGetCharacteristicsError);
-  IPC_MESSAGE_HANDLER(BluetoothMsg_ReadCharacteristicValueSuccess,
-                      OnReadValueSuccess);
-  IPC_MESSAGE_HANDLER(BluetoothMsg_ReadCharacteristicValueError,
-                      OnReadValueError);
-  IPC_MESSAGE_HANDLER(BluetoothMsg_StartNotificationsSuccess,
-                      OnStartNotificationsSuccess)
-  IPC_MESSAGE_HANDLER(BluetoothMsg_StartNotificationsError,
-                      OnStartNotificationsError)
-  IPC_MESSAGE_HANDLER(BluetoothMsg_StopNotificationsSuccess,
-                      OnStopNotificationsSuccess)
-  IPC_MESSAGE_HANDLER(BluetoothMsg_CharacteristicValueChanged,
-                      OnCharacteristicValueChanged)
   IPC_MESSAGE_UNHANDLED(handled = false)
   IPC_END_MESSAGE_MAP()
   DCHECK(handled) << "Unhandled message:" << msg.type();
@@ -283,305 +241,10 @@
       service_instance_id.utf8(), characteristics_uuid.utf8()));
 }
 
-void BluetoothDispatcher::readValue(
-    int frame_routing_id,
-    const blink::WebString& characteristic_instance_id,
-    blink::WebBluetoothReadValueCallbacks* callbacks) {
-  int request_id = pending_read_value_requests_.Add(callbacks);
-  Send(new BluetoothHostMsg_ReadValue(CurrentWorkerId(), request_id,
-                                      frame_routing_id,
-                                      characteristic_instance_id.utf8()));
-}
-
-void BluetoothDispatcher::startNotifications(
-    int frame_routing_id,
-    const blink::WebString& characteristic_instance_id,
-    blink::WebBluetoothRemoteGATTCharacteristic* characteristic,
-    blink::WebBluetoothNotificationsCallbacks* callbacks) {
-  int request_id = QueueNotificationRequest(
-      frame_routing_id, characteristic_instance_id.utf8(), characteristic,
-      callbacks, NotificationsRequestType::START);
-  // The Notification subscription's state can change after a request
-  // finishes. To avoid resolving with a soon-to-be-invalid state we queue
-  // requests.
-  if (HasNotificationRequestResponsePending(
-          characteristic_instance_id.utf8())) {
-    return;
-  }
-
-  ResolveOrSendStartNotificationRequest(request_id);
-}
-
-void BluetoothDispatcher::stopNotifications(
-    int frame_routing_id,
-    const blink::WebString& characteristic_instance_id,
-    blink::WebBluetoothRemoteGATTCharacteristic* characteristic,
-    blink::WebBluetoothNotificationsCallbacks* callbacks) {
-  int request_id = QueueNotificationRequest(
-      frame_routing_id, characteristic_instance_id.utf8(), characteristic,
-      callbacks, NotificationsRequestType::STOP);
-  if (HasNotificationRequestResponsePending(
-          characteristic_instance_id.utf8())) {
-    return;
-  }
-
-  ResolveOrSendStopNotificationsRequest(request_id);
-}
-
-void BluetoothDispatcher::characteristicObjectRemoved(
-    int frame_routing_id,
-    const blink::WebString& characteristic_instance_id,
-    blink::WebBluetoothRemoteGATTCharacteristic* characteristic) {
-  // We need to remove references to the object from the following:
-  //  1) The set of active characteristics
-  //  2) The queue waiting for a response
-  //  3) The set of active notifications
-
-  // 1
-  // TODO(ortuno): We should only unregister a characteristic once
-  // there are no characteristic objects that have listeners attached.
-  // https://crbug.com/541388
-  UnregisterCharacteristicObject(frame_routing_id, characteristic_instance_id);
-
-  // 2
-  // If the object is in the queue we null the characteristic. If this is the
-  // first object waiting for a response OnStartNotificationsSuccess will make
-  // sure not to add the characteristic to the map and it will queue a Stop
-  // request. Otherwise ResolveOrSendStartNotificationRequest will make sure not
-  // to add it to active notification subscriptions.
-  bool found = false;
-  for (IDMap<BluetoothNotificationsRequest, IDMapOwnPointer>::iterator iter(
-           &pending_notifications_requests_);
-       !iter.IsAtEnd(); iter.Advance()) {
-    if (iter.GetCurrentValue()->characteristic == characteristic) {
-      found = true;
-      iter.GetCurrentValue()->characteristic = nullptr;
-    }
-  }
-
-  if (found) {
-    // A characteristic will never be in the set of active notifications
-    // and in the queue at the same time.
-    auto subscriptions_iter = active_notification_subscriptions_.find(
-        characteristic_instance_id.utf8());
-    if (subscriptions_iter != active_notification_subscriptions_.end()) {
-      DCHECK(!ContainsKey(subscriptions_iter->second, characteristic));
-    }
-    return;
-  }
-
-  // 3
-  // If the object is not in the queue then:
-  //   1. The subscription was inactive already: this characteristic
-  //      object didn't subscribe to notifications.
-  //   2. The subscription will become inactive: the characteristic
-  //      object that subscribed to notifications is getting destroyed.
-  //   3. The subscription will still be active: there are other
-  //      characteristic objects subscribed to notifications.
-
-  if (!HasActiveNotificationSubscription(characteristic_instance_id.utf8())) {
-    return;
-  }
-
-  // For 2 and 3 calling ResolveOrSendStopNotificationsRequest ensures the
-  // notification subscription is released.
-  // We pass in the characteristic so that ResolveOrSendStopNotificationsRequest
-  // can remove the characteristic from ActiveNotificationSubscriptions.
-  ResolveOrSendStopNotificationsRequest(QueueNotificationRequest(
-      frame_routing_id, characteristic_instance_id.utf8(), characteristic,
-      nullptr /* callbacks */, NotificationsRequestType::STOP));
-}
-
-void BluetoothDispatcher::registerCharacteristicObject(
-    int frame_routing_id,
-    const blink::WebString& characteristic_instance_id,
-    blink::WebBluetoothRemoteGATTCharacteristic* characteristic) {
-  // TODO(ortuno): After the Object manager is implemented, there will
-  // only be one object per characteristic. But for now we remove
-  // the previous object.
-  // https://crbug.com/495270
-  active_characteristics_.erase(characteristic_instance_id.utf8());
-
-  active_characteristics_.insert(
-      std::make_pair(characteristic_instance_id.utf8(), characteristic));
-
-  Send(new BluetoothHostMsg_RegisterCharacteristic(
-      CurrentWorkerId(), frame_routing_id, characteristic_instance_id.utf8()));
-}
-
 void BluetoothDispatcher::WillStopCurrentWorkerThread() {
   delete this;
 }
 
-int BluetoothDispatcher::QueueNotificationRequest(
-    int frame_routing_id,
-    const std::string& characteristic_instance_id,
-    blink::WebBluetoothRemoteGATTCharacteristic* characteristic,
-    blink::WebBluetoothNotificationsCallbacks* callbacks,
-    NotificationsRequestType type) {
-  int request_id =
-      pending_notifications_requests_.Add(new BluetoothNotificationsRequest(
-          frame_routing_id, characteristic_instance_id, characteristic,
-          callbacks, type));
-  notification_requests_queues_[characteristic_instance_id].push(request_id);
-
-  return request_id;
-}
-
-void BluetoothDispatcher::PopNotificationRequestQueueAndProcessNext(
-    int request_id) {
-  BluetoothNotificationsRequest* old_request =
-      pending_notifications_requests_.Lookup(request_id);
-
-  auto queue_iter = notification_requests_queues_.find(
-      old_request->characteristic_instance_id);
-
-  CHECK(queue_iter != notification_requests_queues_.end());
-
-  std::queue<int>& request_queue = queue_iter->second;
-
-  DCHECK(request_queue.front() == request_id);
-
-  // Remove old request and clean map if necessary.
-  request_queue.pop();
-  pending_notifications_requests_.Remove(request_id);
-  if (request_queue.empty()) {
-    notification_requests_queues_.erase(queue_iter);
-    return;
-  }
-
-  int next_request_id = request_queue.front();
-  BluetoothNotificationsRequest* next_request =
-      pending_notifications_requests_.Lookup(next_request_id);
-
-  switch (next_request->type) {
-    case NotificationsRequestType::START:
-      ResolveOrSendStartNotificationRequest(next_request_id);
-      return;
-    case NotificationsRequestType::STOP:
-      ResolveOrSendStopNotificationsRequest(next_request_id);
-      return;
-  }
-}
-
-bool BluetoothDispatcher::HasNotificationRequestResponsePending(
-    const std::string& characteristic_instance_id) {
-  return ContainsKey(notification_requests_queues_,
-                     characteristic_instance_id) &&
-         (notification_requests_queues_[characteristic_instance_id].size() > 1);
-}
-
-bool BluetoothDispatcher::HasActiveNotificationSubscription(
-    const std::string& characteristic_instance_id) {
-  return ContainsKey(active_notification_subscriptions_,
-                     characteristic_instance_id);
-}
-
-void BluetoothDispatcher::AddToActiveNotificationSubscriptions(
-    const std::string& characteristic_instance_id,
-    blink::WebBluetoothRemoteGATTCharacteristic* characteristic) {
-  active_notification_subscriptions_[characteristic_instance_id].insert(
-      characteristic);
-}
-
-bool BluetoothDispatcher::RemoveFromActiveNotificationSubscriptions(
-    const std::string& characteristic_instance_id,
-    blink::WebBluetoothRemoteGATTCharacteristic* characteristic) {
-  auto active_map =
-      active_notification_subscriptions_.find(characteristic_instance_id);
-
-  if (active_map == active_notification_subscriptions_.end()) {
-    return false;
-  }
-
-  active_map->second.erase(characteristic);
-
-  if (active_map->second.empty()) {
-    active_notification_subscriptions_.erase(active_map);
-    DCHECK(!HasActiveNotificationSubscription(characteristic_instance_id));
-    return true;
-  }
-  return false;
-}
-
-void BluetoothDispatcher::ResolveOrSendStartNotificationRequest(
-    int request_id) {
-  BluetoothNotificationsRequest* request =
-      pending_notifications_requests_.Lookup(request_id);
-  const int frame_routing_id = request->frame_routing_id;
-  const std::string& characteristic_instance_id =
-      request->characteristic_instance_id;
-  blink::WebBluetoothRemoteGATTCharacteristic* characteristic =
-      request->characteristic;
-  blink::WebBluetoothNotificationsCallbacks* callbacks =
-      request->callbacks.get();
-
-  // If an object is already subscribed to notifications from the characteristic
-  // no need to send an IPC again.
-  if (HasActiveNotificationSubscription(characteristic_instance_id)) {
-    // The object could have been destroyed while we waited.
-    if (characteristic != nullptr) {
-      AddToActiveNotificationSubscriptions(characteristic_instance_id,
-                                           characteristic);
-    }
-    callbacks->onSuccess();
-
-    PopNotificationRequestQueueAndProcessNext(request_id);
-    return;
-  }
-
-  Send(new BluetoothHostMsg_StartNotifications(CurrentWorkerId(), request_id,
-                                               frame_routing_id,
-                                               characteristic_instance_id));
-}
-
-void BluetoothDispatcher::ResolveOrSendStopNotificationsRequest(
-    int request_id) {
-  // The Notification subscription's state can change after a request
-  // finishes. To avoid resolving with a soon-to-be-invalid state we queue
-  // requests.
-  BluetoothNotificationsRequest* request =
-      pending_notifications_requests_.Lookup(request_id);
-  const int frame_routing_id = request->frame_routing_id;
-  const std::string& characteristic_instance_id =
-      request->characteristic_instance_id;
-  blink::WebBluetoothRemoteGATTCharacteristic* characteristic =
-      request->characteristic;
-  blink::WebBluetoothNotificationsCallbacks* callbacks =
-      request->callbacks.get();
-
-  // If removing turns the subscription inactive then stop.
-  if (RemoveFromActiveNotificationSubscriptions(characteristic_instance_id,
-                                                characteristic)) {
-    Send(new BluetoothHostMsg_StopNotifications(CurrentWorkerId(), request_id,
-                                                frame_routing_id,
-                                                characteristic_instance_id));
-    return;
-  }
-
-  // We could be processing a request with nullptr callbacks due to:
-  //   1) OnStartNotificationSuccess queues a Stop request because the object
-  //      got destroyed in characteristicObjectRemoved.
-  //   2) The last characteristic object that held this subscription got
-  //      destroyed in characteristicObjectRemoved.
-  if (callbacks != nullptr) {
-    callbacks->onSuccess();
-  }
-  PopNotificationRequestQueueAndProcessNext(request_id);
-}
-
-void BluetoothDispatcher::UnregisterCharacteristicObject(
-    int frame_routing_id,
-    const blink::WebString& characteristic_instance_id) {
-  int removed =
-      active_characteristics_.erase(characteristic_instance_id.utf8());
-  if (removed != 0) {
-    Send(new BluetoothHostMsg_UnregisterCharacteristic(
-        CurrentWorkerId(), frame_routing_id,
-        characteristic_instance_id.utf8()));
-  }
-}
-
 void BluetoothDispatcher::OnRequestDeviceSuccess(
     int thread_id,
     int request_id,
@@ -718,115 +381,4 @@
   pending_characteristics_requests_.Remove(request_id);
 }
 
-void BluetoothDispatcher::OnReadValueSuccess(
-    int thread_id,
-    int request_id,
-    const std::vector<uint8_t>& value) {
-  DCHECK(pending_read_value_requests_.Lookup(request_id)) << request_id;
-
-  // WebArrayBuffer is not accessible from Source/modules so we pass a
-  // WebVector instead.
-  pending_read_value_requests_.Lookup(request_id)->onSuccess(value);
-
-  pending_read_value_requests_.Remove(request_id);
-}
-
-void BluetoothDispatcher::OnReadValueError(int thread_id,
-                                           int request_id,
-                                           WebBluetoothError error) {
-  DCHECK(pending_read_value_requests_.Lookup(request_id)) << request_id;
-
-  pending_read_value_requests_.Lookup(request_id)
-      ->onError(WebBluetoothError(error));
-
-  pending_read_value_requests_.Remove(request_id);
-}
-
-void BluetoothDispatcher::OnStartNotificationsSuccess(int thread_id,
-                                                      int request_id) {
-  DCHECK(pending_notifications_requests_.Lookup(request_id)) << request_id;
-
-  BluetoothNotificationsRequest* request =
-      pending_notifications_requests_.Lookup(request_id);
-
-  DCHECK(notification_requests_queues_[request->characteristic_instance_id]
-             .front() == request_id);
-
-  // We only send an IPC for inactive notifications.
-  DCHECK(
-      !HasActiveNotificationSubscription(request->characteristic_instance_id));
-
-  AddToActiveNotificationSubscriptions(request->characteristic_instance_id,
-                                       request->characteristic);
-
-  // The object requesting the notification could have been destroyed
-  // while waiting for the subscription. characteristicRemoved
-  // nulls the characteristic when the corresponding js object gets destroyed.
-  // A Stop request must be issued as the subscription is no longer needed.
-  // The Stop requets is added to the end of the queue in case another
-  // Start request exists in the queue from another characteristic object,
-  // which would result in the subscription continuing.
-  if (request->characteristic == nullptr) {
-    QueueNotificationRequest(
-        request->frame_routing_id, request->characteristic_instance_id,
-        nullptr /* characteristic */, nullptr /* callbacks */,
-        NotificationsRequestType::STOP);
-  }
-
-  request->callbacks->onSuccess();
-
-  PopNotificationRequestQueueAndProcessNext(request_id);
-}
-
-void BluetoothDispatcher::OnStartNotificationsError(int thread_id,
-                                                    int request_id,
-                                                    WebBluetoothError error) {
-  DCHECK(pending_notifications_requests_.Lookup(request_id)) << request_id;
-
-  BluetoothNotificationsRequest* request =
-      pending_notifications_requests_.Lookup(request_id);
-
-  DCHECK(notification_requests_queues_[request->characteristic_instance_id]
-             .front() == request_id);
-
-  // We only send an IPC for inactive notifications.
-  DCHECK(
-      !HasActiveNotificationSubscription(request->characteristic_instance_id));
-
-  request->callbacks->onError(error);
-
-  PopNotificationRequestQueueAndProcessNext(request_id);
-}
-
-void BluetoothDispatcher::OnStopNotificationsSuccess(int thread_id,
-                                                     int request_id) {
-  DCHECK(pending_notifications_requests_.Lookup(request_id)) << request_id;
-
-  BluetoothNotificationsRequest* request =
-      pending_notifications_requests_.Lookup(request_id);
-
-  DCHECK(notification_requests_queues_[request->characteristic_instance_id]
-             .front() == request_id);
-
-  // We only send an IPC for inactive notifications.
-  DCHECK(
-      !HasActiveNotificationSubscription(request->characteristic_instance_id));
-
-  if (request->callbacks != nullptr) {
-    request->callbacks->onSuccess();
-  }
-
-  PopNotificationRequestQueueAndProcessNext(request_id);
-}
-
-void BluetoothDispatcher::OnCharacteristicValueChanged(
-    int thread_id,
-    const std::string& characteristic_instance_id,
-    const std::vector<uint8_t> new_value) {
-  auto active_iter = active_characteristics_.find(characteristic_instance_id);
-  if (active_iter != active_characteristics_.end()) {
-    active_iter->second->dispatchCharacteristicValueChanged(new_value);
-  }
-}
-
 }  // namespace content
diff --git a/content/renderer/bluetooth/bluetooth_dispatcher.h b/content/renderer/bluetooth/bluetooth_dispatcher.h
index 6eb83998..4886ef1 100644
--- a/content/renderer/bluetooth/bluetooth_dispatcher.h
+++ b/content/renderer/bluetooth/bluetooth_dispatcher.h
@@ -34,7 +34,6 @@
 struct BluetoothCharacteristicRequest;
 struct BluetoothCharacteristicsRequest;
 struct BluetoothPrimaryServiceRequest;
-struct BluetoothNotificationsRequest;
 
 namespace content {
 class ThreadSafeSender;
@@ -84,94 +83,11 @@
       const blink::WebString& service_instance_id,
       const blink::WebString& characteristics_uuid,
       blink::WebBluetoothGetCharacteristicsCallbacks* callbacks);
-  void readValue(int frame_routing_id,
-                 const blink::WebString& characteristic_instance_id,
-                 blink::WebBluetoothReadValueCallbacks* callbacks);
-  void startNotifications(int frame_routing_id,
-                          const blink::WebString& characteristic_instance_id,
-                          blink::WebBluetoothRemoteGATTCharacteristic* delegate,
-                          blink::WebBluetoothNotificationsCallbacks*);
-  void stopNotifications(int frame_routing_id,
-                         const blink::WebString& characteristic_instance_id,
-                         blink::WebBluetoothRemoteGATTCharacteristic* delegate,
-                         blink::WebBluetoothNotificationsCallbacks*);
-  void characteristicObjectRemoved(
-      int frame_routing_id,
-      const blink::WebString& characteristic_instance_id,
-      blink::WebBluetoothRemoteGATTCharacteristic* delegate);
-  void registerCharacteristicObject(
-      int frame_routing_id,
-      const blink::WebString& characteristic_instance_id,
-      blink::WebBluetoothRemoteGATTCharacteristic* characteristic);
 
   // WorkerThread::Observer implementation.
   void WillStopCurrentWorkerThread() override;
 
-  enum class NotificationsRequestType { START = 0, STOP = 1 };
-
  private:
-  // Notifications Queueing Notes:
-  // To avoid races and sending unnecessary IPC messages we implement
-  // a queueing system for notification requests. When receiving
-  // a notification request, the request is immediately queued. If
-  // there are no other pending requests then the request is processed.
-  // When a characteristic object gets destroyed BluetoothDispatcher
-  // gets notified by characteristicObjectRemoved. When this happens
-  // a stop request should be queued if the characteristic was subscribed
-  // to notifications.
-
-  // Helper functions for notification requests queue:
-
-  // Creates a notification request and queues it.
-  int QueueNotificationRequest(
-      int frame_routing_id,
-      const std::string& characteristic_instance_id,
-      blink::WebBluetoothRemoteGATTCharacteristic* characteristic,
-      blink::WebBluetoothNotificationsCallbacks* callbacks,
-      NotificationsRequestType type);
-  // Pops the last requests and runs the next request in the queue.
-  void PopNotificationRequestQueueAndProcessNext(int request_id);
-  // Checks if there is more than one request in the queue i.e. if there
-  // are other requests besides the one being processed.
-  bool HasNotificationRequestResponsePending(
-      const std::string& characteristic_instance_id);
-  // Checks if there are any objects subscribed to the characteristic's
-  // notifications.
-  bool HasActiveNotificationSubscription(
-      const std::string& characteristic_instance_id);
-  // Adds the object to the set of subscribed objects to a characteristic's
-  // notifications.
-  void AddToActiveNotificationSubscriptions(
-      const std::string& characteristic_instance_id,
-      blink::WebBluetoothRemoteGATTCharacteristic* characteristic);
-  // Removes the object from the set of subscribed object to the
-  // characteristic's notifications. Returns true if the subscription
-  // becomes inactive.
-  bool RemoveFromActiveNotificationSubscriptions(
-      const std::string& characteristic_instance_id,
-      blink::WebBluetoothRemoteGATTCharacteristic* characteristic);
-
-  // The following functions decide whether to resolve the request immediately
-  // or send an IPC to change the subscription state.
-  // You should never call these functions if PendingNotificationRequest
-  // is true since there is currently another request being processed.
-  void ResolveOrSendStartNotificationRequest(int request_id);
-  void ResolveOrSendStopNotificationsRequest(int request_id);
-
-  // Tells BluetoothDispatcherHost that we are no longer interested in
-  // events for the characteristic.
-  //
-  // TODO(ortuno): We should unregister a characteristic once there are no
-  // characteristic objects that have listeners attached.
-  // For now, we call this function when an object gets destroyed. So if there
-  // are two frames registered for notifications from the same characteristic
-  // and one of the characteristic objects gets destroyed both will stop
-  // receiving notifications.
-  // https://crbug.com/541388
-  void UnregisterCharacteristicObject(
-      int frame_routing_id,
-      const blink::WebString& characteristic_instance_id);
-
   // IPC Handlers, see definitions in bluetooth_messages.h.
   void OnRequestDeviceSuccess(int thread_id,
                               int request_id,
@@ -205,28 +121,9 @@
   void OnGetCharacteristicsError(int thread_id,
                                  int request_id,
                                  blink::WebBluetoothError error);
-  void OnReadValueSuccess(int thread_id,
-                          int request_id,
-                          const std::vector<uint8_t>& value);
-  void OnReadValueError(int thread_id,
-                        int request_id,
-                        blink::WebBluetoothError error);
-  void OnStartNotificationsSuccess(int thread_id, int request_id);
-  void OnStartNotificationsError(int thread_id,
-                                 int request_id,
-                                 blink::WebBluetoothError error);
-  void OnStopNotificationsSuccess(int thread_id, int request_id);
-  void OnCharacteristicValueChanged(
-      int thread_id,
-      const std::string& characteristic_instance_id,
-      const std::vector<uint8_t> value);
 
   scoped_refptr<ThreadSafeSender> thread_safe_sender_;
 
-  // Map of characteristic_instance_id to a queue of Notification Requests' IDs.
-  // See "Notifications Queueing Note" above.
-  std::map<std::string, std::queue<int>> notification_requests_queues_;
-
   // Tracks device requests sent to browser to match replies with callbacks.
   // Owns callback objects.
   IDMap<blink::WebBluetoothRequestDeviceCallbacks, IDMapOwnPointer>
@@ -245,28 +142,6 @@
   // Tracks requests to get characteristics from a service.
   IDMap<BluetoothCharacteristicsRequest, IDMapOwnPointer>
       pending_characteristics_requests_;
-  // Tracks requests to read from a characteristics.
-  IDMap<blink::WebBluetoothReadValueCallbacks, IDMapOwnPointer>
-      pending_read_value_requests_;
-  IDMap<BluetoothNotificationsRequest, IDMapOwnPointer>
-      pending_notifications_requests_;
-
-  // Map of characteristic_instance_id to a set of
-  // WebBluetoothRemoteGATTCharacteristic pointers. Keeps track of which
-  // objects are subscribed to notifications.
-  std::map<std::string, std::set<blink::WebBluetoothRemoteGATTCharacteristic*>>
-      active_notification_subscriptions_;
-
-  // Map of characteristic_instance_ids to
-  // WebBluetoothRemoteGATTCharacteristics.
-  // Keeps track of what characteristics have listeners.
-  // TODO(ortuno): We are assuming that there exists a single frame per
-  // dispatcher, so there could be at most one characteristic object per
-  // characteristic_instance_id. Change to a set when we support multiple
-  // frames.
-  // http://crbug.com/541388
-  std::map<std::string, blink::WebBluetoothRemoteGATTCharacteristic*>
-      active_characteristics_;
 
   DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcher);
 };
diff --git a/content/renderer/bluetooth/web_bluetooth_impl.cc b/content/renderer/bluetooth/web_bluetooth_impl.cc
index 01da671f..4dc301f 100644
--- a/content/renderer/bluetooth/web_bluetooth_impl.cc
+++ b/content/renderer/bluetooth/web_bluetooth_impl.cc
@@ -4,6 +4,8 @@
 
 #include "content/renderer/bluetooth/web_bluetooth_impl.h"
 
+#include <vector>
+
 #include "base/memory/ptr_util.h"
 #include "content/child/mojo/type_converters.h"
 #include "content/child/thread_safe_sender.h"
@@ -11,6 +13,7 @@
 #include "content/renderer/bluetooth/bluetooth_dispatcher.h"
 #include "ipc/ipc_message.h"
 #include "mojo/public/cpp/bindings/array.h"
+#include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothRemoteGATTCharacteristic.h"
 
 namespace content {
 
@@ -18,6 +21,7 @@
                                    ThreadSafeSender* thread_safe_sender,
                                    int frame_routing_id)
     : service_registry_(service_registry),
+      binding_(this),
       thread_safe_sender_(thread_safe_sender),
       frame_routing_id_(frame_routing_id) {}
 
@@ -67,8 +71,10 @@
 void WebBluetoothImpl::readValue(
     const blink::WebString& characteristic_instance_id,
     blink::WebBluetoothReadValueCallbacks* callbacks) {
-  GetDispatcher()->readValue(frame_routing_id_, characteristic_instance_id,
-                             callbacks);
+  GetWebBluetoothService().RemoteCharacteristicReadValue(
+      mojo::String::From(characteristic_instance_id),
+      base::Bind(&WebBluetoothImpl::OnReadValueComplete, base::Unretained(this),
+                 base::Passed(base::WrapUnique(callbacks))));
 }
 
 void WebBluetoothImpl::writeValue(
@@ -85,32 +91,61 @@
 
 void WebBluetoothImpl::startNotifications(
     const blink::WebString& characteristic_instance_id,
-    blink::WebBluetoothRemoteGATTCharacteristic* characteristic,
     blink::WebBluetoothNotificationsCallbacks* callbacks) {
-  GetDispatcher()->startNotifications(
-      frame_routing_id_, characteristic_instance_id, characteristic, callbacks);
+  GetWebBluetoothService().RemoteCharacteristicStartNotifications(
+      mojo::String::From(characteristic_instance_id),
+      base::Bind(&WebBluetoothImpl::OnStartNotificationsComplete,
+                 base::Unretained(this),
+                 base::Passed(base::WrapUnique(callbacks))));
 }
 
 void WebBluetoothImpl::stopNotifications(
     const blink::WebString& characteristic_instance_id,
-    blink::WebBluetoothRemoteGATTCharacteristic* characteristic,
     blink::WebBluetoothNotificationsCallbacks* callbacks) {
-  GetDispatcher()->stopNotifications(
-      frame_routing_id_, characteristic_instance_id, characteristic, callbacks);
+  GetWebBluetoothService().RemoteCharacteristicStopNotifications(
+      mojo::String::From(characteristic_instance_id),
+      base::Bind(&WebBluetoothImpl::OnStopNotificationsComplete,
+                 base::Unretained(this),
+                 base::Passed(base::WrapUnique(callbacks))));
 }
 
 void WebBluetoothImpl::characteristicObjectRemoved(
     const blink::WebString& characteristic_instance_id,
     blink::WebBluetoothRemoteGATTCharacteristic* characteristic) {
-  GetDispatcher()->characteristicObjectRemoved(
-      frame_routing_id_, characteristic_instance_id, characteristic);
+  active_characteristics_.erase(characteristic_instance_id.utf8());
 }
 
 void WebBluetoothImpl::registerCharacteristicObject(
     const blink::WebString& characteristic_instance_id,
     blink::WebBluetoothRemoteGATTCharacteristic* characteristic) {
-  GetDispatcher()->registerCharacteristicObject(
-      frame_routing_id_, characteristic_instance_id, characteristic);
+  // TODO(ortuno): After the Bluetooth Tree is implemented, there will
+  // only be one object per characteristic. But for now we replace
+  // the previous object.
+  // https://crbug.com/495270
+  active_characteristics_[characteristic_instance_id.utf8()] = characteristic;
+}
+
+void WebBluetoothImpl::RemoteCharacteristicValueChanged(
+    const mojo::String& characteristic_instance_id,
+    mojo::Array<uint8_t> value) {
+  // We post a task so that the event is fired after any pending promises have
+  // resolved.
+  base::ThreadTaskRunnerHandle::Get()->PostTask(
+      FROM_HERE,
+      base::Bind(&WebBluetoothImpl::DispatchCharacteristicValueChanged,
+                 base::Unretained(this), characteristic_instance_id,
+                 value.PassStorage()));
+}
+
+void WebBluetoothImpl::OnReadValueComplete(
+    std::unique_ptr<blink::WebBluetoothReadValueCallbacks> callbacks,
+    blink::mojom::WebBluetoothError error,
+    mojo::Array<uint8_t> value) {
+  if (error == blink::mojom::WebBluetoothError::SUCCESS) {
+    callbacks->onSuccess(value.PassStorage());
+  } else {
+    callbacks->onError(error);
+  }
 }
 
 void WebBluetoothImpl::OnWriteValueComplete(
@@ -124,6 +159,30 @@
   }
 }
 
+void WebBluetoothImpl::OnStartNotificationsComplete(
+    std::unique_ptr<blink::WebBluetoothNotificationsCallbacks> callbacks,
+    blink::mojom::WebBluetoothError error) {
+  if (error == blink::mojom::WebBluetoothError::SUCCESS) {
+    callbacks->onSuccess();
+  } else {
+    callbacks->onError(error);
+  }
+}
+
+void WebBluetoothImpl::OnStopNotificationsComplete(
+    std::unique_ptr<blink::WebBluetoothNotificationsCallbacks> callbacks) {
+  callbacks->onSuccess();
+}
+
+void WebBluetoothImpl::DispatchCharacteristicValueChanged(
+    const std::string& characteristic_instance_id,
+    const std::vector<uint8_t>& value) {
+  auto active_iter = active_characteristics_.find(characteristic_instance_id);
+  if (active_iter != active_characteristics_.end()) {
+    active_iter->second->dispatchCharacteristicValueChanged(value);
+  }
+}
+
 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() {
   return BluetoothDispatcher::GetOrCreateThreadSpecificInstance(
       thread_safe_sender_.get());
@@ -133,6 +192,11 @@
   if (!web_bluetooth_service_) {
     service_registry_->ConnectToRemoteService(
         mojo::GetProxy(&web_bluetooth_service_));
+    // Create an associated interface ptr and pass it to the WebBluetoothService
+    // so that it can send us events without us prompting.
+    blink::mojom::WebBluetoothServiceClientAssociatedPtrInfo ptr_info;
+    binding_.Bind(&ptr_info, web_bluetooth_service_.associated_group());
+    web_bluetooth_service_->SetClient(std::move(ptr_info));
   }
   return *web_bluetooth_service_;
 }
diff --git a/content/renderer/bluetooth/web_bluetooth_impl.h b/content/renderer/bluetooth/web_bluetooth_impl.h
index 682e2a3..789cbcb 100644
--- a/content/renderer/bluetooth/web_bluetooth_impl.h
+++ b/content/renderer/bluetooth/web_bluetooth_impl.h
@@ -7,12 +7,17 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
+#include <unordered_map>
+#include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
+#include "base/thread_task_runner_handle.h"
 #include "content/common/content_export.h"
+#include "mojo/public/cpp/bindings/associated_binding.h"
 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h"
 #include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom.h"
 
@@ -29,7 +34,8 @@
 // Implementation of blink::WebBluetooth. Passes calls through to the thread
 // specific BluetoothDispatcher.
 class CONTENT_EXPORT WebBluetoothImpl
-    : NON_EXPORTED_BASE(public blink::WebBluetooth) {
+    : NON_EXPORTED_BASE(public blink::mojom::WebBluetoothServiceClient),
+      NON_EXPORTED_BASE(public blink::WebBluetooth) {
  public:
   WebBluetoothImpl(ServiceRegistry* service_registry,
                    ThreadSafeSender* thread_safe_sender,
@@ -56,7 +62,6 @@
       const blink::WebString& service_instance_id,
       const blink::WebString& characteristics_uuid,
       blink::WebBluetoothGetCharacteristicsCallbacks* callbacks) override;
-
   void readValue(const blink::WebString& characteristic_instance_id,
                  blink::WebBluetoothReadValueCallbacks* callbacks) override;
   void writeValue(const blink::WebString& characteristic_instance_id,
@@ -64,11 +69,9 @@
                   blink::WebBluetoothWriteValueCallbacks*) override;
   void startNotifications(
       const blink::WebString& characteristic_instance_id,
-      blink::WebBluetoothRemoteGATTCharacteristic* characteristic,
       blink::WebBluetoothNotificationsCallbacks*) override;
   void stopNotifications(
       const blink::WebString& characteristic_instance_id,
-      blink::WebBluetoothRemoteGATTCharacteristic* characteristic,
       blink::WebBluetoothNotificationsCallbacks*) override;
   void characteristicObjectRemoved(
       const blink::WebString& characteristic_instance_id,
@@ -78,10 +81,29 @@
       blink::WebBluetoothRemoteGATTCharacteristic* characteristic) override;
 
  private:
+  // WebBluetoothServiceClient methods:
+  void RemoteCharacteristicValueChanged(
+      const mojo::String& characteristic_instance_id,
+      mojo::Array<uint8_t> value) override;
+
+  // Callbacks for WebBluetoothService calls:
+  void OnReadValueComplete(
+      std::unique_ptr<blink::WebBluetoothReadValueCallbacks> callbacks,
+      blink::mojom::WebBluetoothError error,
+      mojo::Array<uint8_t> value);
   void OnWriteValueComplete(
       const blink::WebVector<uint8_t>& value,
       std::unique_ptr<blink::WebBluetoothWriteValueCallbacks> callbacks,
       blink::mojom::WebBluetoothError error);
+  void OnStartNotificationsComplete(
+      std::unique_ptr<blink::WebBluetoothNotificationsCallbacks> callbacks,
+      blink::mojom::WebBluetoothError error);
+  void OnStopNotificationsComplete(
+      std::unique_ptr<blink::WebBluetoothNotificationsCallbacks> callbacks);
+
+  void DispatchCharacteristicValueChanged(
+      const std::string& characteristic_instance_id,
+      const std::vector<uint8_t>& value);
 
   BluetoothDispatcher* GetDispatcher();
 
@@ -89,6 +111,16 @@
   ServiceRegistry* const service_registry_;
   blink::mojom::WebBluetoothServicePtr web_bluetooth_service_;
 
+  // Map of characteristic_instance_ids to
+  // WebBluetoothRemoteGATTCharacteristics. When characteristicObjectRemoved is
+  // called the characteristic should be removed from the map.
+  // Keeps track of what characteristics have listeners.
+  std::unordered_map<std::string, blink::WebBluetoothRemoteGATTCharacteristic*>
+      active_characteristics_;
+
+  // Binding associated with |web_bluetooth_service_|.
+  mojo::AssociatedBinding<blink::mojom::WebBluetoothServiceClient> binding_;
+
   const scoped_refptr<ThreadSafeSender> thread_safe_sender_;
   const int frame_routing_id_;
 
diff --git a/content/renderer/media/webmediaplayer_ms_compositor.cc b/content/renderer/media/webmediaplayer_ms_compositor.cc
index 55819d3..1cd01e8 100644
--- a/content/renderer/media/webmediaplayer_ms_compositor.cc
+++ b/content/renderer/media/webmediaplayer_ms_compositor.cc
@@ -35,8 +35,6 @@
     const scoped_refptr<media::VideoFrame>& frame,
     media::SkCanvasVideoRenderer* video_renderer) {
   scoped_refptr<media::VideoFrame> new_frame;
-  const gfx::Size& size = frame->coded_size();
-
   if (frame->HasTextures()) {
     DCHECK(frame->format() == media::PIXEL_FORMAT_ARGB ||
            frame->format() == media::PIXEL_FORMAT_XRGB ||
@@ -64,22 +62,23 @@
     }
     libyuv::ARGBToI420(reinterpret_cast<uint8_t*>(bitmap.getPixels()),
                        bitmap.rowBytes(),
-                       new_frame->data(media::VideoFrame::kYPlane),
+                       new_frame->visible_data(media::VideoFrame::kYPlane),
                        new_frame->stride(media::VideoFrame::kYPlane),
-                       new_frame->data(media::VideoFrame::kUPlane),
+                       new_frame->visible_data(media::VideoFrame::kUPlane),
                        new_frame->stride(media::VideoFrame::kUPlane),
-                       new_frame->data(media::VideoFrame::kVPlane),
+                       new_frame->visible_data(media::VideoFrame::kVPlane),
                        new_frame->stride(media::VideoFrame::kVPlane),
-                       size.width(), size.height());
+                       bitmap.width(), bitmap.height());
   } else {
     DCHECK(frame->IsMappable());
     DCHECK(frame->format() == media::PIXEL_FORMAT_YV12 ||
            frame->format() == media::PIXEL_FORMAT_YV12A ||
            frame->format() == media::PIXEL_FORMAT_I420);
+    const gfx::Size& coded_size = frame->coded_size();
     new_frame = media::VideoFrame::CreateFrame(
         media::IsOpaque(frame->format()) ? media::PIXEL_FORMAT_I420
                                          : media::PIXEL_FORMAT_YV12A,
-        frame->coded_size(), frame->visible_rect(), frame->natural_size(),
+        coded_size, frame->visible_rect(), frame->natural_size(),
         frame->timestamp());
     libyuv::I420Copy(frame->data(media::VideoFrame::kYPlane),
                      frame->stride(media::VideoFrame::kYPlane),
@@ -93,14 +92,13 @@
                      new_frame->stride(media::VideoFrame::kUPlane),
                      new_frame->data(media::VideoFrame::kVPlane),
                      new_frame->stride(media::VideoFrame::kVPlane),
-                     size.width(), size.height());
+                     coded_size.width(), coded_size.height());
     if (frame->format() == media::PIXEL_FORMAT_YV12A) {
       libyuv::CopyPlane(frame->data(media::VideoFrame::kAPlane),
                         frame->stride(media::VideoFrame::kAPlane),
                         new_frame->data(media::VideoFrame::kAPlane),
                         new_frame->stride(media::VideoFrame::kAPlane),
-                        size.width(),
-                        size.height());
+                        coded_size.width(), coded_size.height());
     }
   }
 
diff --git a/content/renderer/media/webmediaplayer_ms_unittest.cc b/content/renderer/media/webmediaplayer_ms_unittest.cc
index 4eef03a..ade7f4b 100644
--- a/content/renderer/media/webmediaplayer_ms_unittest.cc
+++ b/content/renderer/media/webmediaplayer_ms_unittest.cc
@@ -25,6 +25,8 @@
 
 using TestFrame = std::pair<FrameType, scoped_refptr<media::VideoFrame>>;
 
+static const int kOddSizeOffset = 3;
+
 class FakeWebMediaPlayerDelegate
     : public media::WebMediaPlayerDelegate,
       public base::SupportsWeakPtr<FakeWebMediaPlayerDelegate> {
@@ -130,7 +132,8 @@
 
   // Methods for test use
   void QueueFrames(const std::vector<int>& timestamps_or_frame_type,
-                   bool opaque_frame = true);
+                   bool opaque_frame = true,
+                   bool odd_size_frame = false);
   bool Started() { return started_; }
   bool Paused() { return paused_; }
 
@@ -187,7 +190,8 @@
 
 void MockVideoFrameProvider::QueueFrames(
     const std::vector<int>& timestamp_or_frame_type,
-    bool opaque_frame) {
+    bool opaque_frame,
+    bool odd_size_frame) {
   for (const int token : timestamp_or_frame_type) {
     if (token < static_cast<int>(FrameType::MIN_TYPE)) {
       CHECK(false) << "Unrecognized frame type: " << token;
@@ -201,6 +205,10 @@
 
     if (token >= 0) {
       gfx::Size natural_size = media::TestVideoConfig::NormalCodedSize();
+      if (odd_size_frame) {
+        natural_size.SetSize(natural_size.width() - kOddSizeOffset,
+                             natural_size.height() - kOddSizeOffset);
+      }
       auto frame = media::VideoFrame::CreateZeroInitializedFrame(
           opaque_frame ? media::PIXEL_FORMAT_YV12 : media::PIXEL_FORMAT_YV12A,
           natural_size, gfx::Rect(natural_size), natural_size,
@@ -333,9 +341,10 @@
 //    WebMediaPlayerMSCompositor.
 // 7. When WebMediaPlayerMS::play gets called, evething paused in step 6 should
 //    be resumed.
-class WebMediaPlayerMSTest : public testing::TestWithParam<bool>,
-                             public blink::WebMediaPlayerClient,
-                             public cc::VideoFrameProvider::Client {
+class WebMediaPlayerMSTest
+    : public testing::TestWithParam<testing::tuple<bool, bool>> ,
+      public blink::WebMediaPlayerClient,
+      public cc::VideoFrameProvider::Client {
  public:
   WebMediaPlayerMSTest()
       : render_factory_(new MockRenderFactory(message_loop_.task_runner(),
@@ -574,7 +583,8 @@
 }
 
 TEST_P(WebMediaPlayerMSTest, PlayThenPause) {
-  const bool opaque_frame = GetParam();
+  const bool opaque_frame = testing::get<0>(GetParam());
+  const bool odd_size_frame = testing::get<1>(GetParam());
   // In the middle of this test, WebMediaPlayerMS::pause will be called, and we
   // are going to verify that during the pause stage, a frame gets freezed, and
   // cc::VideoFrameProviderClient should also be paused.
@@ -584,7 +594,7 @@
   int tokens[] = {0,   33,  66,  100, 133, kTestBrake, 166, 200, 233, 266,
                   300, 333, 366, 400, 433, 466,        500, 533, 566, 600};
   std::vector<int> timestamps(tokens, tokens + sizeof(tokens) / sizeof(int));
-  provider->QueueFrames(timestamps, opaque_frame);
+  provider->QueueFrames(timestamps, opaque_frame, odd_size_frame);
 
   EXPECT_CALL(*this, DoSetWebLayer(true));
   EXPECT_CALL(*this, DoStartRendering());
@@ -610,7 +620,8 @@
 }
 
 TEST_P(WebMediaPlayerMSTest, PlayThenPauseThenPlay) {
-  const bool opaque_frame = GetParam();
+  const bool opaque_frame = testing::get<0>(GetParam());
+  const bool odd_size_frame = testing::get<1>(GetParam());
   // Similary to PlayAndPause test above, this one focuses on testing that
   // WebMediaPlayerMS can be resumed after a period of paused status.
   MockVideoFrameProvider* provider = LoadAndGetFrameProvider(false);
@@ -620,7 +631,7 @@
                   200, 233,        266, 300, 333, 366,        400,
                   433, kTestBrake, 466, 500, 533, 566,        600};
   std::vector<int> timestamps(tokens, tokens + sizeof(tokens) / sizeof(int));
-  provider->QueueFrames(timestamps, opaque_frame);
+  provider->QueueFrames(timestamps, opaque_frame, odd_size_frame);
 
   EXPECT_CALL(*this, DoSetWebLayer(true));
   EXPECT_CALL(*this, DoStartRendering());
@@ -656,9 +667,12 @@
   EXPECT_CALL(*this, DoStopRendering());
 }
 
-INSTANTIATE_TEST_CASE_P(, WebMediaPlayerMSTest, ::testing::Bool());
+INSTANTIATE_TEST_CASE_P(,
+                        WebMediaPlayerMSTest,
+                        ::testing::Combine(::testing::Bool(),
+                                           ::testing::Bool()));
 
-TEST_F(WebMediaPlayerMSTest, BackgroudRendering) {
+TEST_F(WebMediaPlayerMSTest, BackgroundRendering) {
   // During this test, we will switch to background rendering mode, in which
   // WebMediaPlayerMS::pause does not get called, but
   // cc::VideoFrameProviderClient simply stops asking frames from
diff --git a/content/renderer/mus/compositor_mus_connection.cc b/content/renderer/mus/compositor_mus_connection.cc
index 0ae3a84..1a92d06 100644
--- a/content/renderer/mus/compositor_mus_connection.cc
+++ b/content/renderer/mus/compositor_mus_connection.cc
@@ -12,9 +12,11 @@
 #include "mojo/converters/input_events/input_events_type_converters.h"
 #include "ui/latency_info/latency_info.h"
 
+using mus::mojom::EventResult;
+
 namespace {
 
-void DoNothingBool(bool result) {}
+void DoNothingWithEventResult(EventResult result) {}
 
 }  // namespace
 
@@ -78,22 +80,22 @@
 
 void CompositorMusConnection::OnWindowInputEventOnMainThread(
     std::unique_ptr<blink::WebInputEvent> web_event,
-    const base::Callback<void(bool)>& ack) {
+    const base::Callback<void(EventResult)>& ack) {
   DCHECK(main_task_runner_->BelongsToCurrentThread());
   RenderWidgetMusConnection* connection =
       RenderWidgetMusConnection::Get(routing_id_);
   if (!connection) {
-    ack.Run(false);
+    ack.Run(EventResult::UNHANDLED);
     return;
   }
   connection->OnWindowInputEvent(std::move(web_event), ack);
 }
 
 void CompositorMusConnection::OnWindowInputEventAckOnMainThread(
-    const base::Callback<void(bool)>& ack,
-    bool handled) {
+    const base::Callback<void(EventResult)>& ack,
+    EventResult result) {
   DCHECK(main_task_runner_->BelongsToCurrentThread());
-  compositor_task_runner_->PostTask(FROM_HERE, base::Bind(ack, handled));
+  compositor_task_runner_->PostTask(FROM_HERE, base::Bind(ack, result));
 }
 
 void CompositorMusConnection::OnConnectionLost(
@@ -117,7 +119,7 @@
 void CompositorMusConnection::OnWindowInputEvent(
     mus::Window* window,
     const ui::Event& event,
-    std::unique_ptr<base::Callback<void(bool)>>* ack_callback) {
+    std::unique_ptr<base::Callback<void(EventResult)>>* ack_callback) {
   DCHECK(compositor_task_runner_->BelongsToCurrentThread());
   // TODO(moshayedi): Convert ui::Event directly to blink::WebInputEvent.
   std::unique_ptr<blink::WebInputEvent> web_event(
@@ -131,7 +133,8 @@
   // state.
   if (ack_state != INPUT_EVENT_ACK_STATE_NOT_CONSUMED)
     return;
-  base::Callback<void(bool)> ack = base::Bind(&::DoNothingBool);
+  base::Callback<void(EventResult)> ack =
+      base::Bind(&::DoNothingWithEventResult);
   const bool send_ack = WebInputEventTraits::ShouldBlockEventStream(*web_event);
   if (send_ack) {
     // Ultimately, this ACK needs to go back to the Mus client lib which is not
diff --git a/content/renderer/mus/compositor_mus_connection.h b/content/renderer/mus/compositor_mus_connection.h
index 636100e..68a4410 100644
--- a/content/renderer/mus/compositor_mus_connection.h
+++ b/content/renderer/mus/compositor_mus_connection.h
@@ -59,10 +59,11 @@
 
   void OnWindowInputEventOnMainThread(
       std::unique_ptr<blink::WebInputEvent> web_event,
-      const base::Callback<void(bool)>& ack);
+      const base::Callback<void(mus::mojom::EventResult)>& ack);
 
-  void OnWindowInputEventAckOnMainThread(const base::Callback<void(bool)>& ack,
-                                         bool handled);
+  void OnWindowInputEventAckOnMainThread(
+      const base::Callback<void(mus::mojom::EventResult)>& ack,
+      mus::mojom::EventResult result);
 
   // WindowTreeDelegate implementation:
   void OnConnectionLost(mus::WindowTreeConnection* connection) override;
@@ -72,7 +73,8 @@
   void OnWindowInputEvent(
       mus::Window* window,
       const ui::Event& event,
-      std::unique_ptr<base::Callback<void(bool)>>* ack_callback) override;
+      std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>*
+          ack_callback) override;
 
   const int routing_id_;
   mus::Window* root_;
diff --git a/content/renderer/mus/compositor_mus_connection_unittest.cc b/content/renderer/mus/compositor_mus_connection_unittest.cc
index c13a81d..71c58b5 100644
--- a/content/renderer/mus/compositor_mus_connection_unittest.cc
+++ b/content/renderer/mus/compositor_mus_connection_unittest.cc
@@ -29,6 +29,8 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/events/event_utils.h"
 
+using mus::mojom::EventResult;
+
 namespace {
 
 // Wrapper for the callback provided to
@@ -36,12 +38,12 @@
 // called, along with the result.
 class TestCallback : public base::RefCounted<TestCallback> {
  public:
-  TestCallback() : called_(false), result_(false) {}
+  TestCallback() : called_(false), result_(EventResult::UNHANDLED) {}
 
   bool called() { return called_; }
-  bool result() { return result_; }
+  EventResult result() { return result_; }
 
-  void BoolCallback(bool result) {
+  void ResultCallback(EventResult result) {
     called_ = true;
     result_ = result;
   }
@@ -52,7 +54,7 @@
   ~TestCallback() {}
 
   bool called_;
-  bool result_;
+  EventResult result_;
 
   DISALLOW_COPY_AND_ASSIGN(TestCallback);
 };
@@ -217,7 +219,7 @@
   void OnWindowInputEvent(
       mus::Window* window,
       const ui::Event& event,
-      std::unique_ptr<base::Callback<void(bool)>>* ack_callback);
+      std::unique_ptr<base::Callback<void(EventResult)>>* ack_callback);
 
   // Confirms the state of pending tasks enqueued on each task runner, and runs
   // until idle.
@@ -274,7 +276,7 @@
 void CompositorMusConnectionTest::OnWindowInputEvent(
     mus::Window* window,
     const ui::Event& event,
-    std::unique_ptr<base::Callback<void(bool)>>* ack_callback) {
+    std::unique_ptr<base::Callback<void(EventResult)>>* ack_callback) {
   compositor_connection_->OnWindowInputEvent(window, event, ack_callback);
 }
 
@@ -334,9 +336,9 @@
   mus::TestWindow test_window;
   std::unique_ptr<ui::Event> event(GenerateKeyEvent());
   scoped_refptr<TestCallback> test_callback(new TestCallback);
-  std::unique_ptr<base::Callback<void(bool)>> ack_callback(
-      new base::Callback<void(bool)>(
-          base::Bind(&::TestCallback::BoolCallback, test_callback)));
+  std::unique_ptr<base::Callback<void(EventResult)>> ack_callback(
+      new base::Callback<void(EventResult)>(
+          base::Bind(&::TestCallback::ResultCallback, test_callback)));
 
   OnWindowInputEvent(&test_window, *event.get(), &ack_callback);
   // OnWindowInputEvent is expected to clear the callback if it plans on
@@ -347,7 +349,7 @@
 
   // The ack callback should have been called
   EXPECT_TRUE(test_callback->called());
-  EXPECT_FALSE(test_callback->result());
+  EXPECT_EQ(EventResult::UNHANDLED, test_callback->result());
 }
 
 // Tests that for events which the renderer will ack, and consume, that
@@ -361,9 +363,9 @@
   mus::TestWindow test_window;
   std::unique_ptr<ui::Event> event(GenerateKeyEvent());
   scoped_refptr<TestCallback> test_callback(new TestCallback);
-  std::unique_ptr<base::Callback<void(bool)>> ack_callback(
-      new base::Callback<void(bool)>(
-          base::Bind(&::TestCallback::BoolCallback, test_callback)));
+  std::unique_ptr<base::Callback<void(EventResult)>> ack_callback(
+      new base::Callback<void(EventResult)>(
+          base::Bind(&::TestCallback::ResultCallback, test_callback)));
 
   OnWindowInputEvent(&test_window, *event.get(), &ack_callback);
   // OnWindowInputEvent is expected to clear the callback if it plans on
@@ -374,7 +376,7 @@
 
   // The ack callback should have been called
   EXPECT_TRUE(test_callback->called());
-  EXPECT_TRUE(test_callback->result());
+  EXPECT_EQ(EventResult::HANDLED, test_callback->result());
 }
 
 // Tests that when the RenderWidgetInputHandler does not ack before a new event
@@ -383,9 +385,9 @@
   mus::TestWindow test_window;
   std::unique_ptr<ui::Event> event1(GenerateKeyEvent());
   scoped_refptr<TestCallback> test_callback1(new TestCallback);
-  std::unique_ptr<base::Callback<void(bool)>> ack_callback1(
-      new base::Callback<void(bool)>(
-          base::Bind(&::TestCallback::BoolCallback, test_callback1)));
+  std::unique_ptr<base::Callback<void(EventResult)>> ack_callback1(
+      new base::Callback<void(EventResult)>(
+          base::Bind(&::TestCallback::ResultCallback, test_callback1)));
 
   OnWindowInputEvent(&test_window, *event1.get(), &ack_callback1);
   EXPECT_FALSE(ack_callback1.get());
@@ -400,9 +402,9 @@
 
   std::unique_ptr<ui::Event> event2(GenerateKeyEvent());
   scoped_refptr<TestCallback> test_callback2(new TestCallback);
-  std::unique_ptr<base::Callback<void(bool)>> ack_callback2(
-      new base::Callback<void(bool)>(
-          base::Bind(&::TestCallback::BoolCallback, test_callback2)));
+  std::unique_ptr<base::Callback<void(EventResult)>> ack_callback2(
+      new base::Callback<void(EventResult)>(
+          base::Bind(&::TestCallback::ResultCallback, test_callback2)));
   OnWindowInputEvent(&test_window, *event2.get(), &ack_callback2);
   EXPECT_FALSE(ack_callback2.get());
 
@@ -411,7 +413,7 @@
   // Only the most recent ack was called.
   EXPECT_FALSE(test_callback1->called());
   EXPECT_TRUE(test_callback2->called());
-  EXPECT_TRUE(test_callback2->result());
+  EXPECT_EQ(EventResult::HANDLED, test_callback2->result());
 }
 
 // Tests that when an input handler consumes the event, that
@@ -422,9 +424,9 @@
   mus::TestWindow test_window;
   std::unique_ptr<ui::Event> event(GenerateKeyEvent());
   scoped_refptr<TestCallback> test_callback(new TestCallback);
-  std::unique_ptr<base::Callback<void(bool)>> ack_callback(
-      new base::Callback<void(bool)>(
-          base::Bind(&::TestCallback::BoolCallback, test_callback)));
+  std::unique_ptr<base::Callback<void(EventResult)>> ack_callback(
+      new base::Callback<void(EventResult)>(
+          base::Bind(&::TestCallback::ResultCallback, test_callback)));
 
   OnWindowInputEvent(&test_window, *event.get(), &ack_callback);
 
@@ -442,9 +444,9 @@
                          gfx::Point(), ui::EF_NONE, 0, ui::EventTimeForNow());
 
   scoped_refptr<TestCallback> test_callback(new TestCallback);
-  std::unique_ptr<base::Callback<void(bool)>> ack_callback(
-      new base::Callback<void(bool)>(
-          base::Bind(&::TestCallback::BoolCallback, test_callback)));
+  std::unique_ptr<base::Callback<void(EventResult)>> ack_callback(
+      new base::Callback<void(EventResult)>(
+          base::Bind(&::TestCallback::ResultCallback, test_callback)));
 
   OnWindowInputEvent(&test_window, event, &ack_callback);
   EXPECT_TRUE(ack_callback.get());
@@ -466,9 +468,9 @@
                          gfx::Point(), ui::EF_NONE, 0, ui::EventTimeForNow());
 
   scoped_refptr<TestCallback> test_callback(new TestCallback);
-  scoped_ptr<base::Callback<void(bool)>> ack_callback(
-      new base::Callback<void(bool)>(
-          base::Bind(&::TestCallback::BoolCallback, test_callback)));
+  scoped_ptr<base::Callback<void(EventResult)>> ack_callback(
+      new base::Callback<void(EventResult)>(
+          base::Bind(&::TestCallback::ResultCallback, test_callback)));
 
   OnWindowInputEvent(&test_window, event, &ack_callback);
   // OnWindowInputEvent is expected to clear the callback if it plans on
@@ -479,7 +481,7 @@
 
   // The ack callback should have been called
   EXPECT_TRUE(test_callback->called());
-  EXPECT_TRUE(test_callback->result());
+  EXPECT_EQ(EventResult::HANDLED, test_callback->result());
 }
 
 }  // namespace content
diff --git a/content/renderer/mus/render_widget_mus_connection.cc b/content/renderer/mus/render_widget_mus_connection.cc
index 67777540..d1821e8b 100644
--- a/content/renderer/mus/render_widget_mus_connection.cc
+++ b/content/renderer/mus/render_widget_mus_connection.cc
@@ -127,7 +127,9 @@
     std::unique_ptr<InputEventAck> input_event_ack) {
   DCHECK(!pending_ack_.is_null());
   pending_ack_.Run(input_event_ack->state ==
-                   InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED);
+                           InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED
+                       ? mus::mojom::EventResult::HANDLED
+                       : mus::mojom::EventResult::UNHANDLED);
   pending_ack_.Reset();
 }
 
@@ -169,12 +171,12 @@
 
 void RenderWidgetMusConnection::OnWindowInputEvent(
     std::unique_ptr<blink::WebInputEvent> input_event,
-    const base::Callback<void(bool)>& ack) {
+    const base::Callback<void(mus::mojom::EventResult)>& ack) {
   DCHECK(thread_checker_.CalledOnValidThread());
   // If we don't yet have a RenderWidgetInputHandler then we don't yet have
   // an initialized RenderWidget.
   if (!input_handler_) {
-    ack.Run(false);
+    ack.Run(mus::mojom::EventResult::UNHANDLED);
     return;
   }
   // TODO(fsamuel): It would be nice to add this DCHECK but the reality is an
diff --git a/content/renderer/mus/render_widget_mus_connection.h b/content/renderer/mus/render_widget_mus_connection.h
index 4a626cc..478e88b 100644
--- a/content/renderer/mus/render_widget_mus_connection.h
+++ b/content/renderer/mus/render_widget_mus_connection.h
@@ -61,15 +61,16 @@
   bool WillHandleMouseEvent(const blink::WebMouseEvent& event) override;
 
   void OnConnectionLost();
-  void OnWindowInputEvent(std::unique_ptr<blink::WebInputEvent> input_event,
-                          const base::Callback<void(bool)>& ack);
+  void OnWindowInputEvent(
+      std::unique_ptr<blink::WebInputEvent> input_event,
+      const base::Callback<void(mus::mojom::EventResult)>& ack);
 
   const int routing_id_;
   RenderWidgetInputHandler* input_handler_;
   std::unique_ptr<mus::WindowSurfaceBinding> window_surface_binding_;
   scoped_refptr<CompositorMusConnection> compositor_mus_connection_;
 
-  base::Callback<void(bool)> pending_ack_;
+  base::Callback<void(mus::mojom::EventResult)> pending_ack_;
 
   // Used to verify single threaded access.
   base::ThreadChecker thread_checker_;
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 4a1b6f9..5fadcf68 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -126,7 +126,6 @@
 #include "content/renderer/skia_benchmarking_extension.h"
 #include "content/renderer/stats_collection_controller.h"
 #include "content/renderer/usb/web_usb_client_impl.h"
-#include "content/renderer/wake_lock/wake_lock_dispatcher.h"
 #include "content/renderer/web_frame_utils.h"
 #include "content/renderer/web_ui_extension.h"
 #include "content/renderer/websharedworker_proxy.h"
@@ -1018,7 +1017,6 @@
       contains_media_player_(false),
 #endif
       devtools_agent_(nullptr),
-      wakelock_dispatcher_(nullptr),
       geolocation_dispatcher_(NULL),
       push_messaging_dispatcher_(NULL),
       presentation_dispatcher_(NULL),
@@ -4057,12 +4055,6 @@
   impl->set_render_frame_id(routing_id_);
 }
 
-blink::WebWakeLockClient* RenderFrameImpl::wakeLockClient() {
-  if (!wakelock_dispatcher_)
-    wakelock_dispatcher_ = new WakeLockDispatcher(this);
-  return wakelock_dispatcher_;
-}
-
 blink::WebGeolocationClient* RenderFrameImpl::geolocationClient() {
   if (!geolocation_dispatcher_)
     geolocation_dispatcher_ = new GeolocationDispatcher(this);
@@ -4398,7 +4390,7 @@
   FrameHostMsg_DidCommitProvisionalLoad_Params params;
   params.http_status_code = response.httpStatusCode();
   params.url_is_unreachable = ds->hasUnreachableURL();
-  params.is_post = false;
+  params.method = "GET";
   params.intended_as_new_entry =
       navigation_state->request_params().intended_as_new_entry;
   params.did_create_new_entry = commit_type == blink::WebStandardCommit;
@@ -4466,6 +4458,15 @@
     params.page_state = SingleHistoryItemToPageState(item);
     post_id = ExtractPostId(item);
   }
+
+  // When using subframe navigation entries, method and post id are set for all
+  // frames. Otherwise, they are only set for the main frame navigation.
+  if (SiteIsolationPolicy::UseSubframeNavigationEntries()) {
+    params.method = request.httpMethod().latin1();
+    if (params.method == "POST")
+      params.post_id = post_id;
+  }
+
   params.frame_unique_name = item.target().utf8();
   params.item_sequence_number = item.itemSequenceNumber();
   params.document_sequence_number = item.documentSequenceNumber();
@@ -4535,10 +4536,12 @@
           frame, ds->request());
     }
 
-    base::string16 method = request.httpMethod();
-    if (base::EqualsASCII(method, "POST")) {
-      params.is_post = true;
-      params.post_id = post_id;
+    // When using subframe navigation entries, method and post id have already
+    // been set.
+    if (!SiteIsolationPolicy::UseSubframeNavigationEntries()) {
+      params.method = request.httpMethod().latin1();
+      if (params.method == "POST")
+        params.post_id = post_id;
     }
 
     // Send the user agent override back.
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index a5db1f9..eaadfa8 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -84,7 +84,6 @@
 class WebPresentationClient;
 class WebPushClient;
 class WebSecurityOrigin;
-class WebWakeLockClient;
 enum class WebCachePolicy;
 struct WebCompositionUnderline;
 struct WebContextMenuData;
@@ -578,7 +577,6 @@
                            unsigned long long requested_size,
                            blink::WebStorageQuotaCallbacks callbacks) override;
   void willOpenWebSocket(blink::WebSocketHandle* handle) override;
-  blink::WebWakeLockClient* wakeLockClient() override;
   blink::WebGeolocationClient* geolocationClient() override;
   blink::WebPushClient* pushClient() override;
   blink::WebPresentationClient* presentationClient() override;
@@ -1158,8 +1156,6 @@
   // local roots.
   DevToolsAgent* devtools_agent_;
 
-  WakeLockDispatcher* wakelock_dispatcher_;
-
   // The geolocation dispatcher attached to this frame, lazily initialized.
   GeolocationDispatcher* geolocation_dispatcher_;
 
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index 4e033d2..dcead01 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -27,7 +27,6 @@
 #include "content/common/frame_replication_state.h"
 #include "content/common/site_isolation_policy.h"
 #include "content/common/ssl_status_serialization.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_messages.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/native_web_keyboard_event.h"
@@ -618,7 +617,7 @@
   FrameHostMsg_DidCommitProvisionalLoad::Param host_nav_params;
   FrameHostMsg_DidCommitProvisionalLoad::Read(frame_navigate_msg,
                                               &host_nav_params);
-  EXPECT_TRUE(base::get<0>(host_nav_params).is_post);
+  EXPECT_EQ("POST", base::get<0>(host_nav_params).method);
 
   // Check post data sent to browser matches
   EXPECT_TRUE(base::get<0>(host_nav_params).page_state.IsValid());
@@ -1125,7 +1124,7 @@
     EXPECT_EQ(ViewHostMsg_TextInputStateChanged::ID, msg->type());
     ViewHostMsg_TextInputStateChanged::Param params;
     ViewHostMsg_TextInputStateChanged::Read(msg, &params);
-    TextInputState p = base::get<0>(params);
+    ViewHostMsg_TextInputState_Params p = base::get<0>(params);
     ui::TextInputType type = p.type;
     ui::TextInputMode input_mode = p.mode;
     bool can_compose_inline = p.can_compose_inline;
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 9f89777..3f2eb7c7 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -38,7 +38,6 @@
 #include "content/common/input/web_input_event_traits.h"
 #include "content/common/input_messages.h"
 #include "content/common/swapped_out_messages.h"
-#include "content/common/text_input_state.h"
 #include "content/common/view_messages.h"
 #include "content/public/common/content_features.h"
 #include "content/public/common/content_switches.h"
@@ -1076,7 +1075,7 @@
       || text_field_is_dirty_
 #endif
       ) {
-    TextInputState params;
+    ViewHostMsg_TextInputState_Params params;
     params.type = new_type;
     params.mode = new_mode;
     params.flags = new_info.flags;
diff --git a/content/renderer/wake_lock/wake_lock_dispatcher.cc b/content/renderer/wake_lock/wake_lock_dispatcher.cc
deleted file mode 100644
index 47c4a68..0000000
--- a/content/renderer/wake_lock/wake_lock_dispatcher.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/renderer/wake_lock/wake_lock_dispatcher.h"
-
-#include "content/public/common/service_registry.h"
-#include "content/public/renderer/render_frame.h"
-
-namespace content {
-
-WakeLockDispatcher::WakeLockDispatcher(RenderFrame* render_frame)
-    : RenderFrameObserver(render_frame), blink::WebWakeLockClient() {}
-
-WakeLockDispatcher::~WakeLockDispatcher() {}
-
-void WakeLockDispatcher::requestKeepScreenAwake(bool keepScreenAwake) {
-  if (!wake_lock_service_) {
-    render_frame()->GetServiceRegistry()->ConnectToRemoteService(
-        mojo::GetProxy(&wake_lock_service_));
-  }
-
-  if (keepScreenAwake) {
-    wake_lock_service_->RequestWakeLock();
-  } else {
-    wake_lock_service_->CancelWakeLock();
-  }
-}
-
-}  // namespace content
diff --git a/content/renderer/wake_lock/wake_lock_dispatcher.h b/content/renderer/wake_lock/wake_lock_dispatcher.h
deleted file mode 100644
index b16876b8..0000000
--- a/content/renderer/wake_lock/wake_lock_dispatcher.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_
-#define CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_
-
-#include "content/public/renderer/render_frame_observer.h"
-#include "third_party/WebKit/public/platform/modules/wake_lock/WebWakeLockClient.h"
-#include "third_party/WebKit/public/platform/modules/wake_lock/wake_lock_service.mojom.h"
-
-namespace content {
-
-// WakeLockDispatcher sends wake lock messages to the browser process using the
-// Mojo WakeLockService.
-class WakeLockDispatcher : public RenderFrameObserver,
-                           public blink::WebWakeLockClient {
- public:
-  explicit WakeLockDispatcher(RenderFrame* render_frame);
-  ~WakeLockDispatcher() override;
-
- private:
-  // WebWakeLockClient implementation.
-  void requestKeepScreenAwake(bool keepScreenAwake) override;
-
-  blink::mojom::WakeLockServicePtr wake_lock_service_;
-};
-
-}  // namespace content
-
-#endif  // CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_
diff --git a/content/renderer/webgraphicscontext3d_provider_impl.cc b/content/renderer/webgraphicscontext3d_provider_impl.cc
index 75de8d5d..74c2866f 100644
--- a/content/renderer/webgraphicscontext3d_provider_impl.cc
+++ b/content/renderer/webgraphicscontext3d_provider_impl.cc
@@ -29,6 +29,10 @@
   return provider_->GrContext();
 }
 
+gpu::Capabilities WebGraphicsContext3DProviderImpl::getCapabilities() {
+  return provider_->ContextCapabilities().gpu;
+}
+
 void WebGraphicsContext3DProviderImpl::setLostContextCallback(
     blink::WebClosure c) {
   provider_->SetLostContextCallback(c.TakeBaseCallback());
diff --git a/content/renderer/webgraphicscontext3d_provider_impl.h b/content/renderer/webgraphicscontext3d_provider_impl.h
index a59d9202..a17000f 100644
--- a/content/renderer/webgraphicscontext3d_provider_impl.h
+++ b/content/renderer/webgraphicscontext3d_provider_impl.h
@@ -33,6 +33,7 @@
   blink::WebGraphicsContext3D* context3d() override;
   gpu::gles2::GLES2Interface* contextGL() override;
   GrContext* grContext() override;
+  gpu::Capabilities getCapabilities() override;
   void setLostContextCallback(blink::WebClosure) override;
   void setErrorMessageCallback(
       blink::WebFunction<void(const char*, int32_t)>) override;
diff --git a/content/shell/BUILD.gn b/content/shell/BUILD.gn
index e12ee811..5437060f 100644
--- a/content/shell/BUILD.gn
+++ b/content/shell/BUILD.gn
@@ -13,6 +13,8 @@
 import("//tools/grit/grit_rule.gni")
 if (is_android) {
   import("//build/config/android/config.gni")
+} else if (is_mac) {
+  import("//build/config/mac/rules.gni")
 }
 
 declare_args() {
@@ -520,6 +522,18 @@
       ":content_shell_lib",
     ]
   }
+
+  mac_app_bundle("content_shell_helper_app") {
+    testonly = true
+    output_name = "$content_shell_product_name Helper"
+    sources = [
+      "app/shell_main.cc",
+    ]
+    deps = [
+      ":framework",
+    ]
+    info_plist = "app/helper-Info.plist"
+  }
 }
 
 mojom("mojo_bindings") {
diff --git a/content/shell/browser/shell_browser_context.cc b/content/shell/browser/shell_browser_context.cc
index 40b906a9..aad4a0e 100644
--- a/content/shell/browser/shell_browser_context.cc
+++ b/content/shell/browser/shell_browser_context.cc
@@ -147,33 +147,25 @@
 }
 
 net::URLRequestContextGetter*
-    ShellBrowserContext::GetMediaRequestContext()  {
-  return BrowserContext::GetDefaultStoragePartition(this)->
-      GetURLRequestContext();
-}
-
-net::URLRequestContextGetter*
-    ShellBrowserContext::GetMediaRequestContextForRenderProcess(
-        int renderer_child_id)  {
-  return BrowserContext::GetDefaultStoragePartition(this)->
-      GetURLRequestContext();
-}
-
-net::URLRequestContextGetter*
-    ShellBrowserContext::GetMediaRequestContextForStoragePartition(
-        const base::FilePath& partition_path,
-        bool in_memory) {
-  return BrowserContext::GetDefaultStoragePartition(this)->
-      GetURLRequestContext();
-}
-
-net::URLRequestContextGetter*
 ShellBrowserContext::CreateRequestContextForStoragePartition(
     const base::FilePath& partition_path,
     bool in_memory,
     ProtocolHandlerMap* protocol_handlers,
     URLRequestInterceptorScopedVector request_interceptors) {
-  return NULL;
+  return nullptr;
+}
+
+net::URLRequestContextGetter*
+    ShellBrowserContext::CreateMediaRequestContext()  {
+  DCHECK(url_request_getter_.get());
+  return url_request_getter_.get();
+}
+
+net::URLRequestContextGetter*
+    ShellBrowserContext::CreateMediaRequestContextForStoragePartition(
+        const base::FilePath& partition_path,
+        bool in_memory) {
+  return nullptr;
 }
 
 ResourceContext* ShellBrowserContext::GetResourceContext()  {
diff --git a/content/shell/browser/shell_browser_context.h b/content/shell/browser/shell_browser_context.h
index 179551f..3f2f502b 100644
--- a/content/shell/browser/shell_browser_context.h
+++ b/content/shell/browser/shell_browser_context.h
@@ -45,12 +45,6 @@
       const base::FilePath& partition_path) override;
   bool IsOffTheRecord() const override;
   DownloadManagerDelegate* GetDownloadManagerDelegate() override;
-  net::URLRequestContextGetter* GetMediaRequestContext() override;
-  net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
-      int renderer_child_id) override;
-  net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
-      const base::FilePath& partition_path,
-      bool in_memory) override;
   ResourceContext* GetResourceContext() override;
   BrowserPluginGuestManager* GetGuestManager() override;
   storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
@@ -66,6 +60,10 @@
       bool in_memory,
       ProtocolHandlerMap* protocol_handlers,
       URLRequestInterceptorScopedVector request_interceptors) override;
+  net::URLRequestContextGetter* CreateMediaRequestContext() override;
+  net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
+      const base::FilePath& partition_path,
+      bool in_memory) override;
 
  protected:
   // Contains URLRequestContextGetter required for resource loading.
diff --git a/content/shell/utility/shell_content_utility_client.cc b/content/shell/utility/shell_content_utility_client.cc
index ebd09fc..adbdafc 100644
--- a/content/shell/utility/shell_content_utility_client.cc
+++ b/content/shell/utility/shell_content_utility_client.cc
@@ -7,7 +7,6 @@
 #include <memory>
 
 #include "base/bind.h"
-#include "content/common/mojo/static_loader.h"
 #include "content/public/test/test_mojo_app.h"
 
 namespace content {
diff --git a/content/test/data/media/datachannel_test.html b/content/test/data/media/datachannel_test.html
new file mode 100644
index 0000000..3b6e3032
--- /dev/null
+++ b/content/test/data/media/datachannel_test.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<title>RTCDataChannel Content Browser Test</title>
+<script type="text/javascript" src="webrtc_test_utilities.js"></script>
+<script>
+
+// Tests that an RTCDataChannel with event handlers is not garbage-collected
+// prematurely.
+function testDataChannelGC() {
+  var pc1 = new webkitRTCPeerConnection(null);
+  var pc2 = new webkitRTCPeerConnection(null);
+
+  var iceCandidateHandler = function(rpc) {
+    return function(e) {
+      if (e.candidate) {
+        rpc.addIceCandidate(e.candidate);
+      }
+    }
+  };
+
+  pc1.addEventListener("icecandidate", iceCandidateHandler(pc2));
+  pc2.addEventListener("icecandidate", iceCandidateHandler(pc1));
+
+  var probesOk = 0;
+  var dc1 = pc1.createDataChannel(null);
+  dc1.addEventListener("open", function(e) {
+    console.log("dc1/open event");
+    var probe = 0;
+    var id = setInterval(function() {
+      console.log("dc1/time: probe #" + probe);
+      if (probe == 6) {
+        clearInterval(id);
+        assertEquals(6, probesOk);
+        reportTestSuccess();
+        return;
+      }
+      dc1.send("probe #" + probe);
+      if (probe == 3) {
+        gc();  // Force garbage collection (requires: --js-flags="--expose-gc").
+      }
+      probe++;
+    }, 10);
+  });
+
+  pc2.addEventListener("datachannel", function(e) {
+    console.log("pc2/datachannel event");
+    var dc2 = e.channel;
+    dc2.addEventListener("message", function(e) {
+      console.log("dc2/message event: " + JSON.stringify(e.data));
+      probesOk++;
+    });
+  });
+
+  console.log("creating offer");
+  pc1.createOffer(function(sdp1) {
+    pc1.setLocalDescription(sdp1);
+    pc2.setRemoteDescription(sdp1, function() {
+      console.log("creating answer");
+      pc2.createAnswer(function(sdp2) {
+        pc1.setRemoteDescription(sdp2);
+        pc2.setLocalDescription(sdp2);
+      }, error => failTest(error.toString()));
+    }, error => failTest(error.toString()));
+  }, error => failTest(error.toString()));
+}
+</script>
diff --git a/content/test/data/navigation_controller/form.html b/content/test/data/navigation_controller/form.html
new file mode 100644
index 0000000..c76c8c22
--- /dev/null
+++ b/content/test/data/navigation_controller/form.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<title>form</title>
+<script>
+// Simulate the user clicking on the submit button.
+function submitForm(name) {
+  var node = document.getElementById(name);
+  node.click();
+}
+</script>
+</head>
+<body>
+
+<form method="post" action="/echotitle">
+
+<p><input name="text" id="itext">
+<p><select name="select" id="iselect">
+ <option selected>a
+ <option>b
+ <option>c
+</select>
+<p><input type="submit" value="Submit" id="isubmit">
+
+</form>
+</body>
+</html>
diff --git a/content/test/data/navigation_controller/subframe_form.html b/content/test/data/navigation_controller/subframe_form.html
new file mode 100644
index 0000000..2ba378fc
--- /dev/null
+++ b/content/test/data/navigation_controller/subframe_form.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+<title>Subframe form</title>
+<script>
+// Simulate the user clicking on the submit button.
+function submitForm(name) {
+  var form = document.getElementById("form");
+  var node = form.contentDocument.getElementById(name);
+  node.click();
+  return true;
+}
+</script>
+</head>
+<body>
+<iframe src="form.html" id="form" name="form"></iframe>
+</body>
+</html>
diff --git a/content/test/data/textinput/page_with_input.html b/content/test/data/textinput/page_with_input.html
deleted file mode 100644
index 8491366f..0000000
--- a/content/test/data/textinput/page_with_input.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <title> Page with input field. </title>
-</head>
-<body>
-  <input type="text"/>
-</body>
-</html>
diff --git a/content/test/data/textinput/page_with_input_iframeX2_input.html b/content/test/data/textinput/page_with_input_iframeX2_input.html
deleted file mode 100644
index c21a22de..0000000
--- a/content/test/data/textinput/page_with_input_iframeX2_input.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <title> Page with input, two iframes, and another input. </title>
-</head>
-<body>
-  <input type="text" value="first"/>
-  <iframe></iframe>
-  <iframe></iframe>
-  <input type="text" value="fourth"/>
-</body>
-</html>
diff --git a/content/test/data/web_ui_mojo_shell_test.html b/content/test/data/web_ui_mojo_shell_test.html
deleted file mode 100644
index 39a0e1ae..0000000
--- a/content/test/data/web_ui_mojo_shell_test.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<html>
-<script src="web_ui_mojo_shell_test.js"></script>
-</html>
diff --git a/content/test/data/web_ui_mojo_shell_test.js b/content/test/data/web_ui_mojo_shell_test.js
deleted file mode 100644
index 63a0208..0000000
--- a/content/test/data/web_ui_mojo_shell_test.js
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-
-/**
- * This URL is defined in content/public/test/test_mojo_app.cc. It identifies
- * content_shell's out-of-process Mojo test app.
- */
-var TEST_APP_URL = 'system:content_mojo_test';
-
-
-define('main', [
-  'mojo/public/js/core',
-  'mojo/public/js/router',
-  'services/shell/public/interfaces/connector.mojom',
-  'content/public/renderer/frame_service_registry',
-  'content/public/test/test_mojo_service.mojom',
-], function (core, router, connectorMojom, serviceRegistry, testMojom) {
-
-  var connectToService = function(serviceProvider, iface) {
-    var pipe = core.createMessagePipe();
-    var service = new iface.proxyClass(new router.Router(pipe.handle0));
-    serviceProvider.getInterface(iface.name, pipe.handle1);
-    return service;
-  };
-
-  return function() {
-    domAutomationController.setAutomationId(0);
-    var connectorPipe =
-        serviceRegistry.connectToService(connectorMojom.Connector.name);
-    var connector = new connectorMojom.Connector.proxyClass(
-        new router.Router(connectorPipe));
-
-    var identity = {};
-    identity.name = TEST_APP_URL;
-    identity.user_id = connectorMojom.kInheritUserID;
-    identity.instance = "";
-    connector.connect(
-        identity,
-        function (services) {
-          var test = connectToService(services, testMojom.TestMojoService);
-          test.getRequestorName().then(function(response) {
-            domAutomationController.send(
-                response.name == 'chrome://mojo-web-ui/');
-          });
-        },
-        function (exposedServices) {},
-        null);
-  };
-});
diff --git a/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
index 6a157f5..7ee1229 100644
--- a/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
+++ b/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
@@ -326,18 +326,14 @@
         ['mac'], bug=483282)
     self.Fail('conformance2/textures/misc/compressed-tex-image.html',
         ['mac'], bug=565438)
-    self.Fail('conformance2/textures/misc/gl-get-tex-parameter.html',
-        ['mac'], bug=483282)
     self.Fail('conformance2/textures/misc/tex-new-formats.html',
         ['mac'], bug=483282)
     self.Fail('conformance2/textures/misc/tex-storage-compressed-formats.html',
         ['mac'], bug=295792)
     self.Fail('conformance2/renderbuffers/framebuffer-test.html',
         ['mac'], bug=483282)
-    self.Fail('conformance2/renderbuffers/readbuffer.html',
-        ['mac'], bug=570453)
-    self.Fail('conformance2/state/gl-object-get-calls.html',
-        ['mac'], bug=483282)
+    self.Fail('conformance2/rendering/framebuffer-completeness-unaffected.html',
+        ['mac'], bug=604053)
 
     # Mac Retina NVIDIA
     self.Fail('conformance2/rendering/draw-buffers.html',
@@ -364,8 +360,6 @@
     # Linux only.
     self.Fail('deqp/data/gles3/shaders/functions.html',
         ['linux'], bug=483282)
-    self.Skip('deqp/functional/gles3/shaderswitch.html',
-        ['linux'], bug=483282)
     self.Fail('conformance2/glsl3/vector-dynamic-indexing.html',
         ['linux'], bug=483282)
     self.Fail('conformance2/reading/read-pixels-from-fbo-test.html',
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
index c350d15..a1455d162 100644
--- a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
+++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
@@ -134,6 +134,8 @@
         ['mac', ('nvidia', 0xfd5), ('nvidia', 0xfe9)], bug=368912)
     self.Fail('conformance/textures/image_bitmap_from_image/*',
         ['mac', ('nvidia', 0xfd5), ('nvidia', 0xfe9)], bug=589930)
+    self.Fail('conformance/extensions/webgl-draw-buffers.html',
+        ['mavericks', ('nvidia', 0xfe9)], bug=586536)
 
     # Mac Retina AMD failures
     self.Fail('conformance/textures/image_bitmap_from_image/*',
diff --git a/content/test/test_render_frame_host.cc b/content/test/test_render_frame_host.cc
index 0cf705b..508f720 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -142,7 +142,7 @@
   params.did_create_new_entry = !is_auto_subframe;
   params.gesture = NavigationGestureUser;
   params.contents_mime_type = contents_mime_type_;
-  params.is_post = false;
+  params.method = "GET";
   params.http_status_code = 200;
   params.socket_address.set_host("2001:db8::1");
   params.socket_address.set_port(80);
@@ -299,7 +299,7 @@
   params.should_replace_current_entry = should_replace_entry;
   params.gesture = NavigationGestureUser;
   params.contents_mime_type = contents_mime_type_;
-  params.is_post = false;
+  params.method = "GET";
   params.http_status_code = response_code;
   params.socket_address.set_host("2001:db8::1");
   params.socket_address.set_port(80);
diff --git a/content/test/test_render_view_host.cc b/content/test/test_render_view_host.cc
index f459aa3b6..9d8399c 100644
--- a/content/test/test_render_view_host.cc
+++ b/content/test/test_render_view_host.cc
@@ -49,7 +49,7 @@
   params->security_info = std::string();
   params->gesture = NavigationGestureUser;
   params->was_within_same_page = false;
-  params->is_post = false;
+  params->method = "GET";
   params->page_state = PageState::CreateFromURL(url);
 }
 
@@ -122,10 +122,7 @@
   delete this;
 }
 
-void TestRenderWidgetHostView::Destroy() {
-  NotifyHostDelegateAboutShutdown();
-  delete this;
-}
+void TestRenderWidgetHostView::Destroy() { delete this; }
 
 gfx::Rect TestRenderWidgetHostView::GetViewBounds() const {
   return gfx::Rect();
diff --git a/content/test/test_render_view_host.h b/content/test/test_render_view_host.h
index 571b872d..02ad7cc 100644
--- a/content/test/test_render_view_host.h
+++ b/content/test/test_render_view_host.h
@@ -31,7 +31,7 @@
 // To use, derive your test base class from RenderViewHostImplTestHarness.
 
 struct FrameHostMsg_DidCommitProvisionalLoad_Params;
-struct TextInputState;
+struct ViewHostMsg_TextInputState_Params;
 
 namespace gfx {
 class Rect;
@@ -100,7 +100,8 @@
   void Focus() override {}
   void SetIsLoading(bool is_loading) override {}
   void UpdateCursor(const WebCursor& cursor) override {}
-  void UpdateInputMethodIfNecessary(bool text_input_state_changed) override {}
+  void TextInputStateChanged(
+      const ViewHostMsg_TextInputState_Params& params) override {}
   void ImeCancelComposition() override {}
   void ImeCompositionRangeChanged(
       const gfx::Range& range,
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc
index 2aad895..1233696 100644
--- a/content/test/test_web_contents.cc
+++ b/content/test/test_web_contents.cc
@@ -136,7 +136,7 @@
   params.security_info = std::string();
   params.gesture = NavigationGestureUser;
   params.was_within_same_page = false;
-  params.is_post = false;
+  params.method = "GET";
   params.page_state = PageState::CreateFromURL(url);
   params.contents_mime_type = std::string("text/html");
 
diff --git a/content/utility/utility_process_control_impl.cc b/content/utility/utility_process_control_impl.cc
index f717f868..f6f10f0 100644
--- a/content/utility/utility_process_control_impl.cc
+++ b/content/utility/utility_process_control_impl.cc
@@ -5,7 +5,6 @@
 #include "content/utility/utility_process_control_impl.h"
 
 #include "base/bind.h"
-#include "content/common/mojo/static_loader.h"
 #include "content/public/common/content_client.h"
 #include "content/public/utility/content_utility_client.h"
 #include "content/public/utility/utility_thread.h"
@@ -17,37 +16,27 @@
 
 namespace content {
 
-namespace {
-
-// Called when a static application terminates.
-void QuitProcess() {
-  UtilityThread::Get()->ReleaseProcessIfNeeded();
-}
-
-}  // namespace
-
 UtilityProcessControlImpl::UtilityProcessControlImpl() {}
 
 UtilityProcessControlImpl::~UtilityProcessControlImpl() {}
 
-void UtilityProcessControlImpl::RegisterLoaders(
-    NameToLoaderMap* name_to_loader_map) {
-  NameToLoaderMap& map_ref = *name_to_loader_map;
-
+void UtilityProcessControlImpl::RegisterApplicationFactories(
+    ApplicationFactoryMap* factories) {
   ContentUtilityClient::StaticMojoApplicationMap apps;
   GetContentClient()->utility()->RegisterMojoApplications(&apps);
-
-  for (const auto& entry : apps) {
-    map_ref[entry.first] =
-        new StaticLoader(entry.second, base::Bind(&QuitProcess));
-  }
+  for (const auto& entry : apps)
+    factories->insert(std::make_pair(entry.first, entry.second));
 
 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS)
-  map_ref["mojo:media"] = new StaticLoader(
-      base::Bind(&media::CreateMojoMediaApplication), base::Bind(&QuitProcess));
+  factories->insert(std::make_pair(
+      "mojo:media", base::Bind(&media::CreateMojoMediaApplication)));
 #endif
 }
 
+void UtilityProcessControlImpl::OnApplicationQuit() {
+  UtilityThread::Get()->ReleaseProcessIfNeeded();
+}
+
 void UtilityProcessControlImpl::OnLoadFailed() {
   UtilityThreadImpl* utility_thread =
       static_cast<UtilityThreadImpl*>(UtilityThread::Get());
diff --git a/content/utility/utility_process_control_impl.h b/content/utility/utility_process_control_impl.h
index 9d450fd2..65d9e1a 100644
--- a/content/utility/utility_process_control_impl.h
+++ b/content/utility/utility_process_control_impl.h
@@ -18,7 +18,8 @@
   ~UtilityProcessControlImpl() override;
 
   // ProcessControlImpl:
-  void RegisterLoaders(NameToLoaderMap* name_to_loader_map) override;
+  void RegisterApplicationFactories(ApplicationFactoryMap* factories) override;
+  void OnApplicationQuit() override;
 
  private:
   void OnLoadFailed() override;
diff --git a/device/usb/BUILD.gn b/device/usb/BUILD.gn
index db154526..0d3795bf 100644
--- a/device/usb/BUILD.gn
+++ b/device/usb/BUILD.gn
@@ -59,10 +59,6 @@
 
   if (is_android) {
     deps += [ ":jni_headers" ]
-    sources += [
-      "usb_device_handle_usbfs.cc",
-      "usb_device_handle_usbfs.h",
-    ]
   } else {
     sources += [
       "usb_context.cc",
@@ -80,17 +76,6 @@
     deps += [ "//third_party/libusb" ]
   }
 
-  if (is_linux || is_chromeos) {
-    sources += [
-      "usb_device_handle_usbfs.cc",
-      "usb_device_handle_usbfs.h",
-    ]
-    sources -= [
-      "usb_device_handle_impl.cc",
-      "usb_device_handle_impl.h",
-    ]
-  }
-
   if (is_chromeos) {
     deps += [
       "//chromeos",
diff --git a/device/usb/usb.gyp b/device/usb/usb.gyp
index bdac4ff9..ef2cf89 100644
--- a/device/usb/usb.gyp
+++ b/device/usb/usb.gyp
@@ -103,10 +103,6 @@
           'dependencies!': [
             '../../third_party/libusb/libusb.gyp:libusb',
           ],
-          'sources': [
-            'usb_device_handle_usbfs.cc',
-            'usb_device_handle_usbfs.h',
-          ],
           # These sources are libusb-specific.
           'sources!': [
             'usb_context.cc',
@@ -126,16 +122,6 @@
             '../../chromeos/chromeos.gyp:chromeos',
           ],
         }],
-        ['OS=="linux"', {
-          'sources': [
-            'usb_device_handle_usbfs.cc',
-            'usb_device_handle_usbfs.h',
-          ],
-          'sources!': [
-            'usb_device_handle_impl.cc',
-            'usb_device_handle_impl.h',
-          ]
-        }]
       ]
     },
     {
diff --git a/device/usb/usb_device_handle.h b/device/usb/usb_device_handle.h
index 32d25f3..7222964 100644
--- a/device/usb/usb_device_handle.h
+++ b/device/usb/usb_device_handle.h
@@ -120,6 +120,7 @@
   friend class base::RefCountedThreadSafe<UsbDeviceHandle>;
 
   UsbDeviceHandle();
+
   virtual ~UsbDeviceHandle();
 
  private:
diff --git a/device/usb/usb_device_handle_unittest.cc b/device/usb/usb_device_handle_unittest.cc
index f98b2e4..410f5ad 100644
--- a/device/usb/usb_device_handle_unittest.cc
+++ b/device/usb/usb_device_handle_unittest.cc
@@ -253,36 +253,6 @@
   handle->Close();
 }
 
-TEST_F(UsbDeviceHandleTest, ControlTransfer) {
-  if (!UsbTestGadget::IsTestEnabled())
-    return;
-
-  scoped_ptr<UsbTestGadget> gadget =
-      UsbTestGadget::Claim(io_thread_->task_runner());
-  ASSERT_TRUE(gadget.get());
-
-  TestOpenCallback open_device;
-  gadget->GetDevice()->Open(open_device.callback());
-  scoped_refptr<UsbDeviceHandle> handle = open_device.WaitForResult();
-  ASSERT_TRUE(handle.get());
-
-  scoped_refptr<net::IOBufferWithSize> buffer(new net::IOBufferWithSize(255));
-  TestCompletionCallback completion;
-  handle->ControlTransfer(USB_DIRECTION_INBOUND, UsbDeviceHandle::STANDARD,
-                          UsbDeviceHandle::DEVICE, 0x06, 0x0301, 0x0409, buffer,
-                          buffer->size(), 0, completion.callback());
-  completion.WaitForResult();
-  ASSERT_EQ(USB_TRANSFER_COMPLETED, completion.status());
-  const char expected_str[] = "\x18\x03G\0o\0o\0g\0l\0e\0 \0I\0n\0c\0.\0";
-  EXPECT_EQ(sizeof(expected_str) - 1, completion.transferred());
-  for (size_t i = 0; i < completion.transferred(); ++i) {
-    EXPECT_EQ(expected_str[i], buffer->data()[i]) << "Mismatch at index " << i
-                                                  << ".";
-  }
-
-  handle->Close();
-}
-
 TEST_F(UsbDeviceHandleTest, SetInterfaceAlternateSetting) {
   if (!UsbTestGadget::IsTestEnabled()) {
     return;
diff --git a/device/usb/usb_device_handle_usbfs.cc b/device/usb/usb_device_handle_usbfs.cc
deleted file mode 100644
index 693b21e..0000000
--- a/device/usb/usb_device_handle_usbfs.cc
+++ /dev/null
@@ -1,800 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "device/usb/usb_device_handle_usbfs.h"
-
-#if defined(OS_ANDROID) && __ANDROID_API__ < 21
-#include <linux/usb_ch9.h>
-#else
-#include <linux/usb/ch9.h>
-#endif
-
-#include <linux/usbdevice_fs.h>
-#include <sys/ioctl.h>
-
-#include <numeric>
-
-#include "base/bind.h"
-#include "base/cancelable_callback.h"
-#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_pump_libevent.h"
-#include "base/posix/eintr_wrapper.h"
-#include "base/stl_util.h"
-#include "base/thread_task_runner_handle.h"
-#include "base/threading/thread_restrictions.h"
-#include "components/device_event_log/device_event_log.h"
-#include "device/usb/usb_device_impl.h"
-#include "net/base/io_buffer.h"
-
-namespace device {
-
-namespace {
-
-uint8_t ConvertEndpointDirection(UsbEndpointDirection direction) {
-  switch (direction) {
-    case USB_DIRECTION_INBOUND:
-      return USB_DIR_IN;
-    case USB_DIRECTION_OUTBOUND:
-      return USB_DIR_OUT;
-  }
-  NOTREACHED();
-  return 0;
-}
-
-uint8_t ConvertRequestType(UsbDeviceHandle::TransferRequestType request_type) {
-  switch (request_type) {
-    case UsbDeviceHandle::STANDARD:
-      return USB_TYPE_STANDARD;
-    case UsbDeviceHandle::CLASS:
-      return USB_TYPE_CLASS;
-    case UsbDeviceHandle::VENDOR:
-      return USB_TYPE_VENDOR;
-    case UsbDeviceHandle::RESERVED:
-      return USB_TYPE_RESERVED;
-  }
-  NOTREACHED();
-  return 0;
-}
-
-uint8_t ConvertRecipient(UsbDeviceHandle::TransferRecipient recipient) {
-  switch (recipient) {
-    case UsbDeviceHandle::DEVICE:
-      return USB_RECIP_DEVICE;
-    case UsbDeviceHandle::INTERFACE:
-      return USB_RECIP_INTERFACE;
-    case UsbDeviceHandle::ENDPOINT:
-      return USB_RECIP_ENDPOINT;
-    case UsbDeviceHandle::OTHER:
-      return USB_RECIP_OTHER;
-  }
-  NOTREACHED();
-  return 0;
-}
-
-scoped_refptr<net::IOBuffer> BuildControlTransferBuffer(
-    UsbEndpointDirection direction,
-    UsbDeviceHandle::TransferRequestType request_type,
-    UsbDeviceHandle::TransferRecipient recipient,
-    uint8_t request,
-    uint16_t value,
-    uint16_t index,
-    scoped_refptr<net::IOBuffer> original_buffer,
-    size_t length) {
-  scoped_refptr<net::IOBuffer> new_buffer(
-      new net::IOBuffer(length + sizeof(usb_ctrlrequest)));
-  usb_ctrlrequest* setup =
-      reinterpret_cast<usb_ctrlrequest*>(new_buffer->data());
-  setup->bRequestType = ConvertEndpointDirection(direction) |
-                        ConvertRequestType(request_type) |
-                        ConvertRecipient(recipient);
-  setup->bRequest = request;
-  setup->wValue = value;
-  setup->wIndex = index;
-  setup->wLength = length;
-  memcpy(new_buffer->data() + sizeof(usb_ctrlrequest), original_buffer->data(),
-         length);
-  return new_buffer;
-}
-
-uint8_t ConvertTransferType(UsbTransferType type) {
-  switch (type) {
-    case USB_TRANSFER_CONTROL:
-      return USBDEVFS_URB_TYPE_CONTROL;
-    case USB_TRANSFER_ISOCHRONOUS:
-      return USBDEVFS_URB_TYPE_ISO;
-    case USB_TRANSFER_BULK:
-      return USBDEVFS_URB_TYPE_BULK;
-    case USB_TRANSFER_INTERRUPT:
-      return USBDEVFS_URB_TYPE_INTERRUPT;
-  }
-  NOTREACHED();
-  return 0;
-}
-
-UsbTransferStatus ConvertTransferResult(int rc) {
-  switch (rc) {
-    case 0:
-      return USB_TRANSFER_COMPLETED;
-    case EPIPE:
-      return USB_TRANSFER_STALLED;
-    case ENODEV:
-    case ESHUTDOWN:
-      return USB_TRANSFER_DISCONNECT;
-    default:
-      // TODO(reillyg): Add a specific error message whenever one of the cases
-      // above fails to match.
-      USB_LOG(ERROR) << "Unknown system error: "
-                     << logging::SystemErrorCodeToString(rc);
-      return USB_TRANSFER_ERROR;
-  }
-}
-
-}  // namespace
-
-class UsbDeviceHandleUsbfs::FileThreadHelper
-    : public base::MessagePumpLibevent::Watcher,
-      public base::MessageLoop::DestructionObserver {
- public:
-  FileThreadHelper(int fd,
-                   scoped_refptr<UsbDeviceHandleUsbfs> device_handle,
-                   scoped_refptr<base::SequencedTaskRunner> task_runner);
-  ~FileThreadHelper() override;
-
-  static void Start(scoped_ptr<FileThreadHelper> self);
-
-  // base::MessagePumpLibevent::Watcher overrides.
-  void OnFileCanReadWithoutBlocking(int fd) override;
-  void OnFileCanWriteWithoutBlocking(int fd) override;
-
-  // base::MessageLoop::DestructionObserver overrides.
-  void WillDestroyCurrentMessageLoop() override;
-
- private:
-  int fd_;
-  scoped_refptr<UsbDeviceHandleUsbfs> device_handle_;
-  scoped_refptr<base::SequencedTaskRunner> task_runner_;
-  base::MessagePumpLibevent::FileDescriptorWatcher file_watcher_;
-  base::ThreadChecker thread_checker_;
-
-  DISALLOW_COPY_AND_ASSIGN(FileThreadHelper);
-};
-
-UsbDeviceHandleUsbfs::FileThreadHelper::FileThreadHelper(
-    int fd,
-    scoped_refptr<UsbDeviceHandleUsbfs> device_handle,
-    scoped_refptr<base::SequencedTaskRunner> task_runner)
-    : fd_(fd), device_handle_(device_handle), task_runner_(task_runner) {}
-
-UsbDeviceHandleUsbfs::FileThreadHelper::~FileThreadHelper() {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  base::MessageLoop::current()->RemoveDestructionObserver(this);
-}
-
-// static
-void UsbDeviceHandleUsbfs::FileThreadHelper::Start(
-    scoped_ptr<FileThreadHelper> self) {
-  base::ThreadRestrictions::AssertIOAllowed();
-  self->thread_checker_.DetachFromThread();
-
-  // Linux indicates that URBs are available to reap by marking the file
-  // descriptor writable.
-  if (!base::MessageLoopForIO::current()->WatchFileDescriptor(
-          self->fd_, true, base::MessageLoopForIO::WATCH_WRITE,
-          &self->file_watcher_, self.get())) {
-    USB_LOG(ERROR) << "Failed to start watching device file descriptor.";
-  }
-
-  // |self| is now owned by the current message loop.
-  base::MessageLoop::current()->AddDestructionObserver(self.release());
-}
-
-void UsbDeviceHandleUsbfs::FileThreadHelper::OnFileCanReadWithoutBlocking(
-    int fd) {
-  NOTREACHED();  // Only listening for writability.
-}
-
-void UsbDeviceHandleUsbfs::FileThreadHelper::OnFileCanWriteWithoutBlocking(
-    int fd) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  DCHECK_EQ(fd_, fd);
-
-  const size_t MAX_URBS_PER_EVENT = 10;
-  std::vector<usbdevfs_urb*> urbs;
-  urbs.reserve(MAX_URBS_PER_EVENT);
-  for (size_t i = 0; i < MAX_URBS_PER_EVENT; ++i) {
-    usbdevfs_urb* urb;
-    int rc = HANDLE_EINTR(ioctl(fd_, USBDEVFS_REAPURBNDELAY, &urb));
-    if (rc) {
-      if (errno == EAGAIN)
-        break;
-      USB_PLOG(DEBUG) << "Failed to reap urbs";
-    } else {
-      urbs.push_back(urb);
-    }
-  }
-
-  task_runner_->PostTask(
-      FROM_HERE,
-      base::Bind(&UsbDeviceHandleUsbfs::ReapedUrbs, device_handle_, urbs));
-}
-
-void UsbDeviceHandleUsbfs::FileThreadHelper::WillDestroyCurrentMessageLoop() {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  delete this;
-}
-
-struct UsbDeviceHandleUsbfs::Transfer {
-  Transfer() = delete;
-  Transfer(scoped_refptr<net::IOBuffer> buffer,
-           const TransferCallback& callback);
-  Transfer(scoped_refptr<net::IOBuffer> buffer,
-           const IsochronousTransferCallback& callback);
-  ~Transfer();
-
-  void* operator new(std::size_t size, size_t number_of_iso_packets);
-
-  scoped_refptr<net::IOBuffer> control_transfer_buffer;
-  scoped_refptr<net::IOBuffer> buffer;
-  TransferCallback callback;
-  IsochronousTransferCallback isoc_callback;
-  base::CancelableClosure timeout_closure;
-  bool timed_out = false;
-
-  // The |urb| field must be the last in the struct so that the extra space
-  // allocated by the overridden new function above extends the length of its
-  // |iso_frame_desc| field.
-  usbdevfs_urb urb;
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(Transfer);
-};
-
-UsbDeviceHandleUsbfs::Transfer::Transfer(scoped_refptr<net::IOBuffer> buffer,
-                                         const TransferCallback& callback)
-    : buffer(buffer), callback(callback) {
-  memset(&urb, 0, sizeof(urb));
-  urb.usercontext = this;
-  urb.buffer = buffer->data();
-}
-
-UsbDeviceHandleUsbfs::Transfer::Transfer(
-    scoped_refptr<net::IOBuffer> buffer,
-    const IsochronousTransferCallback& callback)
-    : buffer(buffer), isoc_callback(callback) {
-  memset(&urb, 0, sizeof(urb) +
-                      sizeof(usbdevfs_iso_packet_desc) * urb.number_of_packets);
-  urb.usercontext = this;
-  urb.buffer = buffer->data();
-}
-
-UsbDeviceHandleUsbfs::Transfer::~Transfer() = default;
-
-void* UsbDeviceHandleUsbfs::Transfer::operator new(
-    std::size_t size,
-    size_t number_of_iso_packets) {
-  void* p = ::operator new(
-      size + sizeof(usbdevfs_iso_packet_desc) * number_of_iso_packets);
-  Transfer* transfer = static_cast<Transfer*>(p);
-  transfer->urb.number_of_packets = number_of_iso_packets;
-  return p;
-}
-
-UsbDeviceHandleUsbfs::UsbDeviceHandleUsbfs(
-    scoped_refptr<UsbDevice> device,
-    base::ScopedFD fd,
-    scoped_refptr<base::SequencedTaskRunner> blocking_task_runner)
-    : device_(device),
-      fd_(std::move(fd)),
-      blocking_task_runner_(blocking_task_runner) {
-  DCHECK(device_);
-  DCHECK(fd_.is_valid());
-  DCHECK(blocking_task_runner_);
-
-  task_runner_ = base::ThreadTaskRunnerHandle::Get();
-
-  scoped_ptr<FileThreadHelper> helper(
-      new FileThreadHelper(fd_.get(), this, task_runner_));
-  helper_ = helper.get();
-  blocking_task_runner_->PostTask(
-      FROM_HERE, base::Bind(&FileThreadHelper::Start, base::Passed(&helper)));
-}
-
-scoped_refptr<UsbDevice> UsbDeviceHandleUsbfs::GetDevice() const {
-  return device_;
-}
-
-void UsbDeviceHandleUsbfs::Close() {
-  // On the |task_runner_| thread check |device_| to see if the handle is
-  // closed. On the |blocking_task_runner_| thread check |fd_.is_valid()| to
-  // see if the handle is closed.
-  DCHECK(device_);
-#if !defined(OS_ANDROID)
-  static_cast<UsbDeviceImpl*>(device_.get())->HandleClosed(this);
-#endif
-  device_ = nullptr;
-  blocking_task_runner_->PostTask(
-      FROM_HERE, base::Bind(&UsbDeviceHandleUsbfs::CloseBlocking, this));
-}
-
-void UsbDeviceHandleUsbfs::SetConfiguration(int configuration_value,
-                                            const ResultCallback& callback) {
-  // USBDEVFS_SETCONFIGURATION synchronously issues a SET_CONFIGURATION request
-  // to the device so it must be performed on a thread where it is okay to
-  // block.
-  blocking_task_runner_->PostTask(
-      FROM_HERE, base::Bind(&UsbDeviceHandleUsbfs::SetConfigurationBlocking,
-                            this, configuration_value, callback));
-}
-
-void UsbDeviceHandleUsbfs::ClaimInterface(int interface_number,
-                                          const ResultCallback& callback) {
-  if (!device_) {
-    task_runner_->PostTask(FROM_HERE, base::Bind(callback, false));
-    return;
-  }
-
-  if (ContainsKey(interfaces_, interface_number)) {
-    USB_LOG(DEBUG) << "Interface " << interface_number << " already claimed.";
-    task_runner_->PostTask(FROM_HERE, base::Bind(callback, false));
-    return;
-  }
-
-  // It appears safe to assume that this ioctl will not block.
-  int rc = HANDLE_EINTR(
-      ioctl(fd_.get(), USBDEVFS_CLAIMINTERFACE, &interface_number));
-  if (rc) {
-    USB_PLOG(DEBUG) << "Failed to claim interface " << interface_number;
-  } else {
-    interfaces_[interface_number].alternate_setting = 0;
-    RefreshEndpointInfo();
-  }
-  task_runner_->PostTask(FROM_HERE, base::Bind(callback, rc == 0));
-}
-
-void UsbDeviceHandleUsbfs::ReleaseInterface(int interface_number,
-                                            const ResultCallback& callback) {
-  // USBDEVFS_RELEASEINTERFACE may issue a SET_INTERFACE request to the
-  // device to restore alternate setting 0 so it must be performed on a thread
-  // where it is okay to block.
-  blocking_task_runner_->PostTask(
-      FROM_HERE, base::Bind(&UsbDeviceHandleUsbfs::ReleaseInterfaceBlocking,
-                            this, interface_number, callback));
-}
-
-void UsbDeviceHandleUsbfs::SetInterfaceAlternateSetting(
-    int interface_number,
-    int alternate_setting,
-    const ResultCallback& callback) {
-  // USBDEVFS_SETINTERFACE is synchronous because it issues a SET_INTERFACE
-  // request to the device so it must be performed on a thread where it is okay
-  // to block.
-  blocking_task_runner_->PostTask(
-      FROM_HERE, base::Bind(&UsbDeviceHandleUsbfs::SetInterfaceBlocking, this,
-                            interface_number, alternate_setting, callback));
-}
-
-void UsbDeviceHandleUsbfs::ResetDevice(const ResultCallback& callback) {
-  // USBDEVFS_RESET is synchronous because it waits for the port to be reset
-  // and the device re-enumerated so it must be performed on a thread where it
-  // is okay to block.
-  blocking_task_runner_->PostTask(
-      FROM_HERE,
-      base::Bind(&UsbDeviceHandleUsbfs::ResetDeviceBlocking, this, callback));
-}
-
-void UsbDeviceHandleUsbfs::ClearHalt(uint8_t endpoint_address,
-                                     const ResultCallback& callback) {
-  // USBDEVFS_CLEAR_HALT is synchronous because it issues a CLEAR_FEATURE
-  // request to the device so it must be performed on a thread where it is okay
-  // to block.
-  blocking_task_runner_->PostTask(
-      FROM_HERE, base::Bind(&UsbDeviceHandleUsbfs::ClearHaltBlocking, this,
-                            endpoint_address, callback));
-}
-
-void UsbDeviceHandleUsbfs::ControlTransfer(UsbEndpointDirection direction,
-                                           TransferRequestType request_type,
-                                           TransferRecipient recipient,
-                                           uint8_t request,
-                                           uint16_t value,
-                                           uint16_t index,
-                                           scoped_refptr<net::IOBuffer> buffer,
-                                           size_t length,
-                                           unsigned int timeout,
-                                           const TransferCallback& callback) {
-  if (!device_) {
-    task_runner_->PostTask(
-        FROM_HERE, base::Bind(callback, USB_TRANSFER_DISCONNECT, nullptr, 0));
-    return;
-  }
-
-  scoped_ptr<Transfer> transfer(new (0) Transfer(buffer, callback));
-  transfer->control_transfer_buffer =
-      BuildControlTransferBuffer(direction, request_type, recipient, request,
-                                 value, index, buffer, length);
-  transfer->urb.type = USBDEVFS_URB_TYPE_CONTROL;
-  transfer->urb.endpoint = 0;
-  transfer->urb.buffer = transfer->control_transfer_buffer->data();
-  transfer->urb.buffer_length = 8 + length;
-
-  // USBDEVFS_SUBMITURB appears to be non-blocking as completion is reported
-  // by USBDEVFS_REAPURBNDELAY.
-  int rc = HANDLE_EINTR(ioctl(fd_.get(), USBDEVFS_SUBMITURB, &transfer->urb));
-  if (rc) {
-    rc = logging::GetLastSystemErrorCode();
-    USB_PLOG(DEBUG) << "Failed to submit control transfer";
-    task_runner_->PostTask(
-        FROM_HERE, base::Bind(callback, ConvertTransferResult(rc), nullptr, 0));
-  } else {
-    SetUpTimeoutCallback(transfer.get(), timeout);
-    transfers_.push_back(std::move(transfer));
-  }
-}
-
-void UsbDeviceHandleUsbfs::IsochronousTransferIn(
-    uint8_t endpoint_number,
-    const std::vector<uint32_t>& packet_lengths,
-    unsigned int timeout,
-    const IsochronousTransferCallback& callback) {
-  uint8_t endpoint_address = USB_DIR_IN | endpoint_number;
-  size_t total_length =
-      std::accumulate(packet_lengths.begin(), packet_lengths.end(), 0u);
-  IsochronousTransferInternal(endpoint_address, new net::IOBuffer(total_length),
-                              total_length, packet_lengths, timeout, callback);
-}
-
-void UsbDeviceHandleUsbfs::IsochronousTransferOut(
-    uint8_t endpoint_number,
-    scoped_refptr<net::IOBuffer> buffer,
-    const std::vector<uint32_t>& packet_lengths,
-    unsigned int timeout,
-    const IsochronousTransferCallback& callback) {
-  uint8_t endpoint_address = USB_DIR_OUT | endpoint_number;
-  size_t total_length =
-      std::accumulate(packet_lengths.begin(), packet_lengths.end(), 0u);
-  IsochronousTransferInternal(endpoint_address, buffer, total_length,
-                              packet_lengths, timeout, callback);
-}
-
-void UsbDeviceHandleUsbfs::GenericTransfer(UsbEndpointDirection direction,
-                                           uint8_t endpoint_number,
-                                           scoped_refptr<net::IOBuffer> buffer,
-                                           size_t length,
-                                           unsigned int timeout,
-                                           const TransferCallback& callback) {
-  if (!device_) {
-    task_runner_->PostTask(
-        FROM_HERE, base::Bind(callback, USB_TRANSFER_DISCONNECT, nullptr, 0));
-    return;
-  }
-
-  uint8_t endpoint_address =
-      ConvertEndpointDirection(direction) | endpoint_number;
-  auto it = endpoints_.find(endpoint_address);
-  if (it == endpoints_.end()) {
-    USB_LOG(USER) << "Endpoint address " << static_cast<int>(endpoint_address)
-                  << " is not part of a claimed interface.";
-    task_runner_->PostTask(
-        FROM_HERE, base::Bind(callback, USB_TRANSFER_ERROR, nullptr, 0));
-    return;
-  }
-
-  scoped_ptr<Transfer> transfer(new (0) Transfer(buffer, callback));
-  transfer->urb.endpoint = endpoint_address;
-  transfer->urb.buffer_length = length;
-  transfer->urb.type = ConvertTransferType(it->second.type);
-
-  // USBDEVFS_SUBMITURB appears to be non-blocking as completion is reported
-  // by USBDEVFS_REAPURBNDELAY. This code assumes a recent kernel that can
-  // accept arbitrarily large transfer requests, hopefully also using a scatter-
-  // gather list.
-  int rc = HANDLE_EINTR(ioctl(fd_.get(), USBDEVFS_SUBMITURB, &transfer->urb));
-  if (rc) {
-    rc = logging::GetLastSystemErrorCode();
-    USB_PLOG(DEBUG) << "Failed to submit transfer";
-    task_runner_->PostTask(
-        FROM_HERE, base::Bind(callback, ConvertTransferResult(rc), nullptr, 0));
-  } else {
-    SetUpTimeoutCallback(transfer.get(), timeout);
-    transfers_.push_back(std::move(transfer));
-  }
-}
-
-const UsbInterfaceDescriptor* UsbDeviceHandleUsbfs::FindInterfaceByEndpoint(
-    uint8_t endpoint_address) {
-  auto it = endpoints_.find(endpoint_address);
-  if (it != endpoints_.end())
-    return it->second.interface;
-  return nullptr;
-}
-
-UsbDeviceHandleUsbfs::~UsbDeviceHandleUsbfs() {
-  DCHECK(!device_) << "Handle must be closed before it is destroyed.";
-}
-
-void UsbDeviceHandleUsbfs::CloseBlocking() {
-  fd_.reset(-1);
-  delete helper_;
-}
-
-void UsbDeviceHandleUsbfs::SetConfigurationBlocking(
-    int configuration_value,
-    const ResultCallback& callback) {
-  if (!fd_.is_valid()) {
-    task_runner_->PostTask(FROM_HERE, base::Bind(callback, false));
-    return;
-  }
-
-  int rc = HANDLE_EINTR(
-      ioctl(fd_.get(), USBDEVFS_SETCONFIGURATION, &configuration_value));
-  if (rc)
-    USB_PLOG(DEBUG) << "Failed to set configuration " << configuration_value;
-  task_runner_->PostTask(
-      FROM_HERE, base::Bind(&UsbDeviceHandleUsbfs::SetConfigurationComplete,
-                            this, configuration_value, rc == 0, callback));
-}
-
-void UsbDeviceHandleUsbfs::SetConfigurationComplete(
-    int configuration_value,
-    bool success,
-    const ResultCallback& callback) {
-  if (success && device_) {
-#if !defined(OS_ANDROID)
-    static_cast<UsbDeviceImpl*>(device_.get())
-        ->ActiveConfigurationChanged(configuration_value);
-#endif
-    // TODO(reillyg): If all interfaces are unclaimed before a new configuration
-    // is set then this will do nothing. Investigate.
-    RefreshEndpointInfo();
-  }
-  callback.Run(success);
-}
-
-void UsbDeviceHandleUsbfs::ReleaseInterfaceBlocking(
-    int interface_number,
-    const ResultCallback& callback) {
-  if (!fd_.is_valid()) {
-    task_runner_->PostTask(FROM_HERE, base::Bind(callback, false));
-    return;
-  }
-
-  int rc = HANDLE_EINTR(
-      ioctl(fd_.get(), USBDEVFS_RELEASEINTERFACE, &interface_number));
-  if (rc) {
-    USB_PLOG(DEBUG) << "Failed to release interface " << interface_number;
-    task_runner_->PostTask(FROM_HERE, base::Bind(callback, false));
-  } else {
-    task_runner_->PostTask(
-        FROM_HERE, base::Bind(&UsbDeviceHandleUsbfs::ReleaseInterfaceComplete,
-                              this, interface_number, callback));
-  }
-}
-
-void UsbDeviceHandleUsbfs::ReleaseInterfaceComplete(
-    int interface_number,
-    const ResultCallback& callback) {
-  auto it = interfaces_.find(interface_number);
-  DCHECK(it != interfaces_.end());
-  interfaces_.erase(it);
-  RefreshEndpointInfo();
-  callback.Run(true);
-}
-
-void UsbDeviceHandleUsbfs::SetInterfaceBlocking(
-    int interface_number,
-    int alternate_setting,
-    const ResultCallback& callback) {
-  if (!fd_.is_valid()) {
-    task_runner_->PostTask(FROM_HERE, base::Bind(callback, false));
-    return;
-  }
-
-  usbdevfs_setinterface cmd = {0};
-  cmd.interface = interface_number;
-  cmd.altsetting = alternate_setting;
-  int rc = HANDLE_EINTR(ioctl(fd_.get(), USBDEVFS_SETINTERFACE, &cmd));
-  if (rc) {
-    USB_PLOG(DEBUG) << "Failed to set interface " << interface_number
-                    << " to alternate setting " << alternate_setting;
-  }
-  task_runner_->PostTask(FROM_HERE, base::Bind(callback, rc == 0));
-}
-
-void UsbDeviceHandleUsbfs::ResetDeviceBlocking(const ResultCallback& callback) {
-  if (!fd_.is_valid()) {
-    task_runner_->PostTask(FROM_HERE, base::Bind(callback, false));
-    return;
-  }
-
-  // TODO(reillyg): libusb releases interfaces before and then reclaims
-  // interfaces after a reset. We should probably do this too or document that
-  // callers have to call ClaimInterface as well.
-  int rc = HANDLE_EINTR(ioctl(fd_.get(), USBDEVFS_RESET, nullptr));
-  if (rc)
-    USB_PLOG(DEBUG) << "Failed to reset the device";
-  task_runner_->PostTask(FROM_HERE, base::Bind(callback, rc == 0));
-}
-
-void UsbDeviceHandleUsbfs::ClearHaltBlocking(uint8_t endpoint_address,
-                                             const ResultCallback& callback) {
-  if (!fd_.is_valid()) {
-    task_runner_->PostTask(FROM_HERE, base::Bind(callback, false));
-    return;
-  }
-
-  int tmp_endpoint = endpoint_address;
-  int rc = HANDLE_EINTR(ioctl(fd_.get(), USBDEVFS_CLEAR_HALT, &tmp_endpoint));
-  if (rc) {
-    USB_PLOG(DEBUG) << "Failed to clear the stall condition on endpoint "
-                    << static_cast<int>(endpoint_address);
-  }
-  task_runner_->PostTask(FROM_HERE, base::Bind(callback, rc == 0));
-}
-
-void UsbDeviceHandleUsbfs::IsochronousTransferInternal(
-    uint8_t endpoint_address,
-    scoped_refptr<net::IOBuffer> buffer,
-    size_t total_length,
-    const std::vector<uint32_t>& packet_lengths,
-    unsigned int timeout,
-    const IsochronousTransferCallback& callback) {
-  if (!device_) {
-    ReportIsochronousError(packet_lengths, callback, USB_TRANSFER_DISCONNECT);
-    return;
-  }
-
-  auto it = endpoints_.find(endpoint_address);
-  if (it == endpoints_.end()) {
-    USB_LOG(USER) << "Endpoint address " << static_cast<int>(endpoint_address)
-                  << " is not part of a claimed interface.";
-    ReportIsochronousError(packet_lengths, callback, USB_TRANSFER_ERROR);
-    return;
-  }
-
-  scoped_ptr<Transfer> transfer(new (packet_lengths.size())
-                                    Transfer(buffer, callback));
-  transfer->urb.type = USBDEVFS_URB_TYPE_ISO;
-  transfer->urb.endpoint = endpoint_address;
-  transfer->urb.buffer_length = total_length;
-
-  for (size_t i = 0; i < packet_lengths.size(); ++i)
-    transfer->urb.iso_frame_desc[i].length = packet_lengths[i];
-
-  // USBDEVFS_SUBMITURB appears to be non-blocking as completion is reported
-  // by USBDEVFS_REAPURBNDELAY. This code assumes a recent kernel that can
-  // accept arbitrarily large transfer requests, hopefully also using a scatter-
-  // gather list.
-  int rc = HANDLE_EINTR(ioctl(fd_.get(), USBDEVFS_SUBMITURB, &transfer->urb));
-  if (rc) {
-    rc = logging::GetLastSystemErrorCode();
-    USB_PLOG(DEBUG) << "Failed to submit transfer";
-    ReportIsochronousError(packet_lengths, callback, ConvertTransferResult(rc));
-  } else {
-    SetUpTimeoutCallback(transfer.get(), timeout);
-    transfers_.push_back(std::move(transfer));
-  }
-}
-
-void UsbDeviceHandleUsbfs::ReapedUrbs(const std::vector<usbdevfs_urb*>& urbs) {
-  for (const auto& urb : urbs) {
-    Transfer* this_transfer = static_cast<Transfer*>(urb->usercontext);
-    DCHECK_EQ(urb, &this_transfer->urb);
-    auto it = std::find_if(
-        transfers_.begin(), transfers_.end(),
-        [this_transfer](const scoped_ptr<Transfer>& transfer) -> bool {
-          return transfer.get() == this_transfer;
-        });
-    DCHECK(it != transfers_.end());
-    scoped_ptr<Transfer> transfer = std::move(*it);
-    transfers_.erase(it);
-    TransferComplete(std::move(transfer));
-  }
-}
-
-void UsbDeviceHandleUsbfs::TransferComplete(scoped_ptr<Transfer> transfer) {
-  if (transfer->timed_out)
-    return;
-
-  // The transfer will soon be freed. Cancel the timeout callback so that the
-  // raw pointer it holds to |transfer| is not used.
-  transfer->timeout_closure.Cancel();
-
-  if (transfer->urb.type == USBDEVFS_URB_TYPE_ISO) {
-    std::vector<IsochronousPacket> packets(transfer->urb.number_of_packets);
-    for (size_t i = 0; i < packets.size(); ++i) {
-      packets[i].length = transfer->urb.iso_frame_desc[i].length;
-      packets[i].transferred_length =
-          transfer->urb.iso_frame_desc[i].actual_length;
-      packets[i].status = ConvertTransferResult(
-          transfer->urb.status == 0 ? transfer->urb.iso_frame_desc[i].status
-                                    : transfer->urb.status);
-    }
-
-    transfer->isoc_callback.Run(transfer->buffer, packets);
-  } else {
-    if (transfer->urb.status == 0 &&
-        transfer->urb.type == USBDEVFS_URB_TYPE_CONTROL) {
-      // Copy the result of the control transfer back into the original buffer.
-      memcpy(transfer->buffer->data(),
-             transfer->control_transfer_buffer->data() + 8,
-             transfer->urb.actual_length);
-    }
-
-    transfer->callback.Run(ConvertTransferResult(-transfer->urb.status),
-                           transfer->buffer, transfer->urb.actual_length);
-  }
-}
-
-void UsbDeviceHandleUsbfs::RefreshEndpointInfo() {
-  endpoints_.clear();
-
-  const UsbConfigDescriptor* config = device_->GetActiveConfiguration();
-  if (!config)
-    return;
-
-  for (const auto& entry : interfaces_) {
-    auto interface_it = std::find_if(
-        config->interfaces.begin(), config->interfaces.end(),
-        [entry](const UsbInterfaceDescriptor& interface) {
-          uint8_t interface_number = entry.first;
-          uint8_t alternate_setting = entry.second.alternate_setting;
-          return interface.interface_number == interface_number &&
-                 interface.alternate_setting == alternate_setting;
-        });
-    DCHECK(interface_it != config->interfaces.end());
-
-    for (const auto& endpoint : interface_it->endpoints) {
-      EndpointInfo& info = endpoints_[endpoint.address];
-      info.type = endpoint.transfer_type;
-      info.interface = &*interface_it;
-    }
-  }
-}
-
-void UsbDeviceHandleUsbfs::ReportIsochronousError(
-    const std::vector<uint32_t>& packet_lengths,
-    const UsbDeviceHandle::IsochronousTransferCallback& callback,
-    UsbTransferStatus status) {
-  std::vector<UsbDeviceHandle::IsochronousPacket> packets(
-      packet_lengths.size());
-  for (size_t i = 0; i < packet_lengths.size(); ++i) {
-    packets[i].length = packet_lengths[i];
-    packets[i].transferred_length = 0;
-    packets[i].status = status;
-  }
-  task_runner_->PostTask(FROM_HERE, base::Bind(callback, nullptr, packets));
-}
-
-void UsbDeviceHandleUsbfs::SetUpTimeoutCallback(Transfer* transfer,
-                                                unsigned int timeout) {
-  if (timeout > 0) {
-    transfer->timeout_closure.Reset(
-        base::Bind(&UsbDeviceHandleUsbfs::TransferTimedOut, transfer));
-    task_runner_->PostDelayedTask(FROM_HERE,
-                                  transfer->timeout_closure.callback(),
-                                  base::TimeDelta::FromMilliseconds(timeout));
-  }
-}
-
-// static
-void UsbDeviceHandleUsbfs::TransferTimedOut(Transfer* transfer) {
-  // |transfer| must stay in |transfers_| as it is still being processed by the
-  // kernel and will be reaped later. Just tell the caller that the timeout
-  // elapsed.
-  transfer->timed_out = true;
-  if (transfer->urb.type == USBDEVFS_URB_TYPE_ISO) {
-    std::vector<IsochronousPacket> packets(transfer->urb.number_of_packets);
-    for (size_t i = 0; i < packets.size(); ++i) {
-      packets[i].length = transfer->urb.iso_frame_desc[i].length;
-      packets[i].transferred_length = 0;
-      packets[i].status = USB_TRANSFER_TIMEOUT;
-    }
-    transfer->isoc_callback.Run(transfer->buffer, packets);
-  } else {
-    transfer->callback.Run(USB_TRANSFER_TIMEOUT, transfer->buffer, 0);
-  }
-}
-
-}  // namespace device
diff --git a/device/usb/usb_device_handle_usbfs.h b/device/usb/usb_device_handle_usbfs.h
deleted file mode 100644
index c3800c1..0000000
--- a/device/usb/usb_device_handle_usbfs.h
+++ /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.
-
-#ifndef DEVICE_USB_USB_DEVICE_HANDLE_USBFS_H_
-#define DEVICE_USB_USB_DEVICE_HANDLE_USBFS_H_
-
-#include <list>
-#include <map>
-#include <vector>
-
-#include "base/files/scoped_file.h"
-#include "base/memory/scoped_ptr.h"
-#include "device/usb/usb_device_handle.h"
-
-struct usbdevfs_urb;
-
-namespace base {
-class SequencedTaskRunner;
-}
-
-namespace device {
-
-// Implementation of a USB device handle on top of the Linux USBFS ioctl
-// interface available on Linux, Chrome OS and Android.
-class UsbDeviceHandleUsbfs : public UsbDeviceHandle {
- public:
-  // Constructs a new device handle from an existing |device| and open file
-  // descriptor to that device. |blocking_task_runner| must have a
-  // MessageLoopForIO.
-  UsbDeviceHandleUsbfs(
-      scoped_refptr<UsbDevice> device,
-      base::ScopedFD fd,
-      scoped_refptr<base::SequencedTaskRunner> blocking_task_runner);
-
-  // UsbDeviceHandle implementation.
-  scoped_refptr<UsbDevice> GetDevice() const override;
-  void Close() override;
-  void SetConfiguration(int configuration_value,
-                        const ResultCallback& callback) override;
-  void ClaimInterface(int interface_number,
-                      const ResultCallback& callback) override;
-  void ReleaseInterface(int interface_number,
-                        const ResultCallback& callback) override;
-  void SetInterfaceAlternateSetting(int interface_number,
-                                    int alternate_setting,
-                                    const ResultCallback& callback) override;
-  void ResetDevice(const ResultCallback& callback) override;
-  void ClearHalt(uint8_t endpoint, const ResultCallback& callback) override;
-  void ControlTransfer(UsbEndpointDirection direction,
-                       TransferRequestType request_type,
-                       TransferRecipient recipient,
-                       uint8_t request,
-                       uint16_t value,
-                       uint16_t index,
-                       scoped_refptr<net::IOBuffer> buffer,
-                       size_t length,
-                       unsigned int timeout,
-                       const TransferCallback& callback) override;
-  void IsochronousTransferIn(
-      uint8_t endpoint_number,
-      const std::vector<uint32_t>& packet_lengths,
-      unsigned int timeout,
-      const IsochronousTransferCallback& callback) override;
-
-  void IsochronousTransferOut(
-      uint8_t endpoint_number,
-      scoped_refptr<net::IOBuffer> buffer,
-      const std::vector<uint32_t>& packet_lengths,
-      unsigned int timeout,
-      const IsochronousTransferCallback& callback) override;
-  void GenericTransfer(UsbEndpointDirection direction,
-                       uint8_t endpoint_number,
-                       scoped_refptr<net::IOBuffer> buffer,
-                       size_t length,
-                       unsigned int timeout,
-                       const TransferCallback& callback) override;
-  const UsbInterfaceDescriptor* FindInterfaceByEndpoint(
-      uint8_t endpoint_address) override;
-
- private:
-  class FileThreadHelper;
-  struct Transfer;
-  struct InterfaceInfo {
-    uint8_t alternate_setting;
-  };
-  struct EndpointInfo {
-    UsbTransferType type;
-    const UsbInterfaceDescriptor* interface;
-  };
-
-  ~UsbDeviceHandleUsbfs() override;
-  void CloseBlocking();
-  void SetConfigurationBlocking(int configuration_value,
-                                const ResultCallback& callback);
-  void SetConfigurationComplete(int configuration_value,
-                                bool success,
-                                const ResultCallback& callback);
-  void ReleaseInterfaceBlocking(int interface_number,
-                                const ResultCallback& callback);
-  void ReleaseInterfaceComplete(int interface_number,
-                                const ResultCallback& callback);
-  void SetInterfaceBlocking(int interface_number,
-                            int alternate_setting,
-                            const ResultCallback& callback);
-  void ResetDeviceBlocking(const ResultCallback& callback);
-  void ClearHaltBlocking(uint8_t endpoint_address,
-                         const ResultCallback& callback);
-  void IsochronousTransferInternal(uint8_t endpoint_address,
-                                   scoped_refptr<net::IOBuffer> buffer,
-                                   size_t total_length,
-                                   const std::vector<uint32_t>& packet_lengths,
-                                   unsigned int timeout,
-                                   const IsochronousTransferCallback& callback);
-  void ReapedUrbs(const std::vector<usbdevfs_urb*>& urbs);
-  void TransferComplete(scoped_ptr<Transfer> transfer);
-  void RefreshEndpointInfo();
-  void ReportIsochronousError(
-      const std::vector<uint32_t>& packet_lengths,
-      const UsbDeviceHandle::IsochronousTransferCallback& callback,
-      UsbTransferStatus status);
-  void SetUpTimeoutCallback(Transfer* transfer, unsigned int timeout);
-
-  static void TransferTimedOut(Transfer* transfer);
-
-  scoped_refptr<UsbDevice> device_;
-  base::ScopedFD fd_;
-  scoped_refptr<base::SequencedTaskRunner> task_runner_;
-  scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
-  base::ThreadChecker thread_checker_;
-
-  // Maps claimed interfaces by interface number to their current alternate
-  // setting.
-  std::map<uint8_t, InterfaceInfo> interfaces_;
-
-  // Maps endpoints (by endpoint address) to the interface they are a part of.
-  // Only endpoints of currently claimed and selected interface alternates are
-  // included in the map.
-  std::map<uint8_t, EndpointInfo> endpoints_;
-
-  // Helper object owned by the blocking task thread. It will be freed if that
-  // thread's message loop is destroyed but can also be freed by this class on
-  // destruction.
-  FileThreadHelper* helper_;
-
-  std::list<scoped_ptr<Transfer>> transfers_;
-};
-
-}  // namespace device
-
-#endif  // DEVICE_USB_USB_DEVICE_HANDLE_USBFS_H_
diff --git a/device/usb/usb_device_impl.cc b/device/usb/usb_device_impl.cc
index 520b9ef..4a134bf 100644
--- a/device/usb/usb_device_impl.cc
+++ b/device/usb/usb_device_impl.cc
@@ -4,14 +4,12 @@
 
 #include "device/usb/usb_device_impl.h"
 
-#include <fcntl.h>
 #include <stddef.h>
 
 #include <algorithm>
 
 #include "base/bind.h"
 #include "base/location.h"
-#include "base/posix/eintr_wrapper.h"
 #include "base/sequenced_task_runner.h"
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
@@ -20,15 +18,10 @@
 #include "components/device_event_log/device_event_log.h"
 #include "device/usb/usb_context.h"
 #include "device/usb/usb_descriptors.h"
+#include "device/usb/usb_device_handle_impl.h"
 #include "device/usb/usb_error.h"
 #include "third_party/libusb/src/libusb/libusb.h"
 
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
-#include "device/usb/usb_device_handle_usbfs.h"
-#else
-#include "device/usb/usb_device_handle_impl.h"
-#endif
-
 #if defined(OS_CHROMEOS)
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/permission_broker_client.h"
@@ -208,9 +201,9 @@
 #endif  // defined(OS_CHROMEOS)
 }
 
-void UsbDeviceImpl::HandleClosed(UsbDeviceHandle* handle) {
+void UsbDeviceImpl::HandleClosed(scoped_refptr<UsbDeviceHandle> handle) {
   DCHECK(thread_checker_.CalledOnValidThread());
-  handles_.remove(handle);
+  handles_.remove(handle.get());
 }
 
 const UsbConfigDescriptor* UsbDeviceImpl::GetActiveConfiguration() const {
@@ -257,15 +250,6 @@
   }
 }
 
-void UsbDeviceImpl::ActiveConfigurationChanged(int configuration_value) {
-  for (const auto& config : configurations_) {
-    if (config.configuration_value == configuration_value) {
-      active_configuration_ = &config;
-      return;
-    }
-  }
-}
-
 void UsbDeviceImpl::RefreshActiveConfiguration() {
   active_configuration_ = nullptr;
   libusb_config_descriptor* platform_config;
@@ -277,7 +261,13 @@
     return;
   }
 
-  ActiveConfigurationChanged(platform_config->bConfigurationValue);
+  for (const auto& config : configurations_) {
+    if (config.configuration_value == platform_config->bConfigurationValue) {
+      active_configuration_ = &config;
+      break;
+    }
+  }
+
   libusb_free_config_descriptor(platform_config);
 }
 
@@ -301,32 +291,21 @@
 void UsbDeviceImpl::OpenOnBlockingThreadWithFd(dbus::FileDescriptor fd,
                                                const OpenCallback& callback) {
   fd.CheckValidity();
-  if (fd.is_valid()) {
-    base::ScopedFD scoped_fd(fd.TakeValue());
-    task_runner_->PostTask(FROM_HERE,
-                           base::Bind(&UsbDeviceImpl::Opened, this,
-                                      base::Passed(&scoped_fd), callback));
+  DCHECK(fd.is_valid());
+
+  PlatformUsbDeviceHandle handle;
+  const int rv = libusb_open_fd(platform_device_, fd.TakeValue(), &handle);
+  if (LIBUSB_SUCCESS == rv) {
+    task_runner_->PostTask(
+        FROM_HERE, base::Bind(&UsbDeviceImpl::Opened, this, handle, callback));
   } else {
-    USB_LOG(EVENT) << "Did not get valid device handle from permission broker.";
+    USB_LOG(EVENT) << "Failed to open device: "
+                   << ConvertPlatformUsbErrorToString(rv);
     task_runner_->PostTask(FROM_HERE, base::Bind(callback, nullptr));
   }
 }
 
-#else
-#if defined(OS_LINUX)
-
-void UsbDeviceImpl::OpenOnBlockingThread(const OpenCallback& callback) {
-  base::ScopedFD fd(HANDLE_EINTR(open(device_path_.c_str(), O_RDWR)));
-  if (fd.is_valid()) {
-    task_runner_->PostTask(FROM_HERE, base::Bind(&UsbDeviceImpl::Opened, this,
-                                                 base::Passed(&fd), callback));
-  } else {
-    USB_PLOG(EVENT) << "Failed to open device";
-    task_runner_->PostTask(FROM_HERE, base::Bind(callback, nullptr));
-  }
-}
-
-#else
+#endif  // defined(OS_CHROMEOS)
 
 void UsbDeviceImpl::OpenOnBlockingThread(const OpenCallback& callback) {
   PlatformUsbDeviceHandle handle;
@@ -337,33 +316,17 @@
   } else {
     USB_LOG(EVENT) << "Failed to open device: "
                    << ConvertPlatformUsbErrorToString(rv);
+    task_runner_->PostTask(FROM_HERE, base::Bind(callback, nullptr));
   }
 }
 
-#endif  // defined(OS_LINUX)
-#endif  // defined(OS_CHROMEOS)
-
-#if defined(OS_LINUX)
-
-void UsbDeviceImpl::Opened(base::ScopedFD fd, const OpenCallback& callback) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  scoped_refptr<UsbDeviceHandle> device_handle =
-      new UsbDeviceHandleUsbfs(this, std::move(fd), blocking_task_runner_);
-  handles_.push_back(device_handle.get());
-  callback.Run(device_handle);
-}
-
-#else
-
 void UsbDeviceImpl::Opened(PlatformUsbDeviceHandle platform_handle,
                            const OpenCallback& callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
-  scoped_refptr<UsbDeviceHandle> device_handle = new UsbDeviceHandleImpl(
+  scoped_refptr<UsbDeviceHandleImpl> device_handle = new UsbDeviceHandleImpl(
       context_, this, platform_handle, blocking_task_runner_);
   handles_.push_back(device_handle.get());
   callback.Run(device_handle);
 }
 
-#endif  // defined(OS_LINUX)
-
 }  // namespace device
diff --git a/device/usb/usb_device_impl.h b/device/usb/usb_device_impl.h
index a5f36ba..aea9b54 100644
--- a/device/usb/usb_device_impl.h
+++ b/device/usb/usb_device_impl.h
@@ -13,7 +13,6 @@
 #include <utility>
 
 #include "base/callback.h"
-#include "base/files/scoped_file.h"
 #include "base/macros.h"
 #include "base/threading/thread_checker.h"
 #include "build/build_config.h"
@@ -75,7 +74,6 @@
  protected:
   friend class UsbServiceImpl;
   friend class UsbDeviceHandleImpl;
-  friend class UsbDeviceHandleUsbfs;
 
   // Called by UsbServiceImpl only;
   UsbDeviceImpl(scoped_refptr<UsbContext> context,
@@ -92,8 +90,7 @@
   void ReadAllConfigurations();
 
   // Called by UsbDeviceHandleImpl.
-  void HandleClosed(UsbDeviceHandle* handle);
-  void ActiveConfigurationChanged(int configuration_value);
+  void HandleClosed(scoped_refptr<UsbDeviceHandle> handle);
   void RefreshActiveConfiguration();
 
  private:
@@ -106,15 +103,10 @@
                           const std::string& error_message);
   void OpenOnBlockingThreadWithFd(dbus::FileDescriptor fd,
                                   const OpenCallback& callback);
-#else
+#endif
   void OpenOnBlockingThread(const OpenCallback& callback);
-#endif  // defined(OS_CHROMEOS)
-#if defined(OS_LINUX)
-  void Opened(base::ScopedFD fd, const OpenCallback& callback);
-#else
   void Opened(PlatformUsbDeviceHandle platform_handle,
               const OpenCallback& callback);
-#endif  // defined(OS_LINUX)
 
   base::ThreadChecker thread_checker_;
   PlatformUsbDevice platform_device_;
diff --git a/docs/windows_build_instructions.md b/docs/windows_build_instructions.md
index f91ebc9..826a4c4 100644
--- a/docs/windows_build_instructions.md
+++ b/docs/windows_build_instructions.md
@@ -8,51 +8,37 @@
 
 ### Setting up the environment for Visual Studio
 
-You must build with Visual Studio 2013 Update 4 or Visual Studio 2015
-Update 1, no other versions are supported.
+You must build with Visual Studio 2015 Update 2; no other version is
+supported.
 
 You must have Windows 7 x64 or later. x86 OSs are unsupported.
 
-1.  Get
-[depot\_tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up).
-2.  Follow the appropriate path below:
+## Step 1: Getting depot_tools
+
+Get [depot\_tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up).
+
+## Step 2: Getting the compiler toolchain
+
+Follow the appropriate path below:
 
 ### Open source contributors
 
-####For building with Visual Studio 2015 (default compiler as of March 11, 2016):
+As of March 11, 2016 Chromium requires Visual Studio 2015 to build.
 
-> Install Visual Studio 2015 Update 2 or later - Community Edition
-> should work if its license is appropriate for you. Use the Custom Install option
-> and select:
-> 
-> - Visual C++, which will select three sub-categories including MFC
-> - Universal Windows Apps Development Tools > Tools
-> - Universal Windows Apps Development Tools > Windows 10 SDK (10.0.10586)
-> 
-> You must have the 10586 SDK installed or else you will hit compile errors such
-> as redefined macros.
+Install Visual Studio 2015 Update 2 or later - Community Edition
+should work if its license is appropriate for you. Use the Custom Install option
+and select:
 
-#### For building with Visual Studio 2013 (no longer default as of March 11, 2016, and not recommended - requires setting `GYP_MSVS_VERSION=2013`):
+- Visual C++, which will select three sub-categories including MFC
+- Universal Windows Apps Development Tools > Tools
+- Universal Windows Apps Development Tools > Windows 10 SDK (10.0.10586)
 
-> Install [Visual Studio 2013
-> Community](http://www.visualstudio.com/products/visual-studio-community-vs)
-> or [Visual Studio 2013
-> Professional](http://www.visualstudio.com/products/visual-studio-professional-with-msdn-vs)
-> depending on which license is appropriate for you. You can deselect
-> the default options if you want, but you must make sure to install
-> "Microsoft Foundation Classes for C++".
-> 
-> You should also install the [Windows 10
-> SDK](https://dev.windows.com/en-us/downloads/windows-10-sdk) to the
-> default install location. You must have SDK version 10.0.10586 or
-> greater installed.
+You must have the 10586 SDK installed or else you will hit compile errors such
+as redefined macros.
 
 Run `set DEPOT_TOOLS_WIN_TOOLCHAIN=0`, or set that variable in your
 global environment.
 
-Visual Studio Express 2013 is **not** supported and will not be able to
-build Chromium.
-
 Compilation is done through ninja, **not** Visual Studio.
 
 ### Google employees
@@ -65,19 +51,19 @@
 Once you've done this, the toolchain will be installed automatically for
 you in Step 3, below (near the end of the step).
 
-The toolchain will be in `depot_tools\win_toolchain`, and windbg can be
-found in `depot_tools\win_toolchain\vs2013_files\win8sdk\Debuggers`.
+The toolchain will be in `depot_tools\win_toolchain\vs_files\<hash>`, and windbg
+can be found in `depot_tools\win_toolchain\vs_files\<hash>\win_sdk\Debuggers`.
 
 If you want the IDE for debugging and editing, you will need to install
 it separately, but this is optional and not needed to build Chromium.
 
-## Getting the Code
+## Step 3: Getting the Code
 
 Follow the steps to [check out the
 code](https://www.chromium.org/developers/how-tos/get-the-code) (largely
 `fetch chromium`).
 
-## Building
+## Step 4: Building
 
 Build the target you are interested in.
 
@@ -86,7 +72,7 @@
 ```
 
 Alternative (Graphical user interface): Open a generated .sln
-file such as all.sln, right-click the chrome project and select build.
+file such as chrome.sln, right-click the chrome project and select build.
 This will invoke the real step 4 above. Do not build the whole solution
 since that conflicts with ninja's build management and everything will
 explode.
diff --git a/extensions/browser/api/display_source/wifi_display/wifi_display_media_service_impl.cc b/extensions/browser/api/display_source/wifi_display/wifi_display_media_service_impl.cc
new file mode 100644
index 0000000..203caa9
--- /dev/null
+++ b/extensions/browser/api/display_source/wifi_display/wifi_display_media_service_impl.cc
@@ -0,0 +1,134 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "extensions/browser/api/display_source/wifi_display/wifi_display_media_service_impl.h"
+
+#include <string>
+#include <vector>
+
+#include "base/big_endian.h"
+#include "content/public/browser/browser_thread.h"
+#include "net/base/net_errors.h"
+
+using content::BrowserThread;
+
+namespace extensions {
+
+class WiFiDisplayMediaServiceImpl::PacketIOBuffer : public net::IOBuffer {
+ public:
+  explicit PacketIOBuffer(mojo::Array<uint8_t> array);
+
+  int size() const { return packet_data_.size(); }
+
+ private:
+  ~PacketIOBuffer() override;
+
+  std::vector<uint8_t> packet_data_;
+};
+
+WiFiDisplayMediaServiceImpl::PacketIOBuffer::PacketIOBuffer(
+    mojo::Array<uint8_t> array) {
+  array.Swap(&packet_data_);
+  data_ = reinterpret_cast<char*>(packet_data_.data());
+}
+
+WiFiDisplayMediaServiceImpl::PacketIOBuffer::~PacketIOBuffer() {
+  data_ = nullptr;
+}
+
+// static
+void WiFiDisplayMediaServiceImpl::Create(
+    WiFiDisplayMediaServiceRequest request) {
+  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+  new WiFiDisplayMediaServiceImpl(std::move(request));
+}
+
+// static
+void WiFiDisplayMediaServiceImpl::BindToRequest(
+    WiFiDisplayMediaServiceRequest request) {
+  BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
+                          base::Bind(WiFiDisplayMediaServiceImpl::Create,
+                                     base::Passed(std::move(request))));
+}
+
+WiFiDisplayMediaServiceImpl::WiFiDisplayMediaServiceImpl(
+    WiFiDisplayMediaServiceRequest request)
+    : binding_(this, std::move(request)),
+      last_send_code_(net::OK),
+      weak_factory_(this) {}
+
+WiFiDisplayMediaServiceImpl::~WiFiDisplayMediaServiceImpl() {}
+
+void WiFiDisplayMediaServiceImpl::SetDesinationPoint(
+    const mojo::String& ip_address,
+    int32_t port,
+    const SetDesinationPointCallback& callback) {
+  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+  net::IPAddress address;
+  if (!address.AssignFromIPLiteral(std::string(ip_address))) {
+    DVLOG(1) << "Failed to parse IP address from " << ip_address;
+    callback.Run(false);
+    return;
+  }
+  net::IPEndPoint end_point(address, static_cast<uint16_t>(port));
+
+  rtp_socket_.reset(new net::UDPSocket(net::DatagramSocket::DEFAULT_BIND,
+                                       net::RandIntCallback(), nullptr,
+                                       net::NetLog::Source()));
+  if (rtp_socket_->Open(end_point.GetFamily()) != net::OK ||
+      rtp_socket_->Connect(end_point) != net::OK) {
+    DVLOG(1) << "Could not connect to " << end_point.ToString();
+    callback.Run(false);
+    rtp_socket_.reset();
+    return;
+  }
+  callback.Run(true);
+}
+
+void WiFiDisplayMediaServiceImpl::SendMediaPacket(mojo::Array<uint8_t> packet) {
+  DCHECK(rtp_socket_);
+  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+
+  if (packet.size() >> 15) {
+    DVLOG(1) << "Packet size limit is exceeded, skipping.";
+    return;
+  }
+
+  if (last_send_code_ == net::ERR_IO_PENDING) {
+    VLOG(1) << "Cannot send because of pending IO, skipping";
+    return;
+  }
+
+  // Create, queue and send a write buffer.
+  scoped_refptr<PacketIOBuffer> write_buffer =
+      new PacketIOBuffer(std::move(packet));
+  write_buffers_.push(std::move(write_buffer));
+
+  Send();
+}
+
+void WiFiDisplayMediaServiceImpl::Send() {
+  DCHECK(!write_buffers_.empty());
+  last_send_code_ = rtp_socket_->Write(
+      write_buffers_.front().get(), write_buffers_.front()->size(),
+      base::Bind(&WiFiDisplayMediaServiceImpl::OnSent,
+                 weak_factory_.GetWeakPtr()));
+  if (last_send_code_ != net::ERR_IO_PENDING)
+    OnSent(last_send_code_);
+}
+
+void WiFiDisplayMediaServiceImpl::OnSent(int code) {
+  last_send_code_ = code;
+  if (code < 0) {
+    VLOG(1) << "Unrepairable UDP socket error.";
+    delete this;
+    return;
+  }
+  DCHECK(!write_buffers_.empty());
+  write_buffers_.pop();
+  if (!write_buffers_.empty())
+    Send();
+}
+
+}  // namespace extensions
diff --git a/extensions/browser/api/display_source/wifi_display/wifi_display_media_service_impl.h b/extensions/browser/api/display_source/wifi_display/wifi_display_media_service_impl.h
new file mode 100644
index 0000000..c44f93e
--- /dev/null
+++ b/extensions/browser/api/display_source/wifi_display/wifi_display_media_service_impl.h
@@ -0,0 +1,47 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef EXTENSIONS_BROWSER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_MEDIA_SERVICE_IMPL_H_
+#define EXTENSIONS_BROWSER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_MEDIA_SERVICE_IMPL_H_
+
+#include <memory>
+#include <queue>
+
+#include "extensions/common/mojo/wifi_display_session_service.mojom.h"
+#include "mojo/public/cpp/bindings/array.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+#include "net/base/io_buffer.h"
+#include "net/base/ip_endpoint.h"
+#include "net/udp/udp_socket.h"
+
+namespace extensions {
+
+class WiFiDisplayMediaServiceImpl : public WiFiDisplayMediaService {
+ public:
+  ~WiFiDisplayMediaServiceImpl() override;
+  static void BindToRequest(WiFiDisplayMediaServiceRequest request);
+
+  void SetDesinationPoint(const mojo::String& ip_address,
+                          int32_t port,
+                          const SetDesinationPointCallback& callback) override;
+  void SendMediaPacket(mojo::Array<uint8_t> packet) override;
+
+ private:
+  static void Create(WiFiDisplayMediaServiceRequest request);
+  explicit WiFiDisplayMediaServiceImpl(WiFiDisplayMediaServiceRequest request);
+  void Send();
+  void OnSent(int code);
+  mojo::StrongBinding<WiFiDisplayMediaService> binding_;
+  std::unique_ptr<net::UDPSocket> rtp_socket_;
+  class PacketIOBuffer;
+  std::queue<scoped_refptr<PacketIOBuffer>> write_buffers_;
+  int last_send_code_;
+  base::WeakPtrFactory<WiFiDisplayMediaServiceImpl> weak_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(WiFiDisplayMediaServiceImpl);
+};
+
+}  // namespace extensions
+
+#endif  // EXTENSIONS_BROWSER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_MEDIA_SERVICE_IMPL_H_
diff --git a/extensions/browser/mojo/service_registration.cc b/extensions/browser/mojo/service_registration.cc
index c6367f0..d6091eaf 100644
--- a/extensions/browser/mojo/service_registration.cc
+++ b/extensions/browser/mojo/service_registration.cc
@@ -22,6 +22,7 @@
 #include "extensions/common/switches.h"
 
 #if defined(ENABLE_WIFI_DISPLAY)
+#include "extensions/browser/api/display_source/wifi_display/wifi_display_media_service_impl.h"
 #include "extensions/browser/api/display_source/wifi_display/wifi_display_session_service_impl.h"
 #endif
 
@@ -65,6 +66,8 @@
     service_registry->AddService(
         base::Bind(WiFiDisplaySessionServiceImpl::BindToRequest,
                    render_frame_host->GetProcess()->GetBrowserContext()));
+    service_registry->AddService(
+        base::Bind(WiFiDisplayMediaServiceImpl::BindToRequest));
   }
 #endif
 }
diff --git a/extensions/extensions.gypi b/extensions/extensions.gypi
index c5486f7..c7b0a08 100644
--- a/extensions/extensions.gypi
+++ b/extensions/extensions.gypi
@@ -861,6 +861,8 @@
       'browser/api/networking_private/networking_private_linux.h',
     ],
     'extensions_browser_sources_wifi_display': [
+      'browser/api/display_source/wifi_display/wifi_display_media_service_impl.cc',
+      'browser/api/display_source/wifi_display/wifi_display_media_service_impl.h',
       'browser/api/display_source/wifi_display/wifi_display_session_service_impl.cc',
       'browser/api/display_source/wifi_display/wifi_display_session_service_impl.h',
     ],
@@ -941,8 +943,6 @@
       'renderer/native_handler.h',
       'renderer/object_backed_native_handler.cc',
       'renderer/object_backed_native_handler.h',
-      'renderer/print_native_handler.cc',
-      'renderer/print_native_handler.h',
       'renderer/process_info_native_handler.cc',
       'renderer/process_info_native_handler.h',
       'renderer/programmatic_script_injector.cc',
diff --git a/extensions/renderer/api_definitions_natives.cc b/extensions/renderer/api_definitions_natives.cc
index 96f1f2c..1db01d04 100644
--- a/extensions/renderer/api_definitions_natives.cc
+++ b/extensions/renderer/api_definitions_natives.cc
@@ -15,7 +15,7 @@
                                              ScriptContext* context)
     : ObjectBackedNativeHandler(context), dispatcher_(dispatcher) {
   RouteFunction(
-      "GetExtensionAPIDefinitionsForTest",
+      "GetExtensionAPIDefinitionsForTest", "test",
       base::Bind(&ApiDefinitionsNatives::GetExtensionAPIDefinitionsForTest,
                  base::Unretained(this)));
 }
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index ade98b88..a1ac1545 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -70,13 +70,10 @@
 #include "extensions/renderer/extensions_renderer_client.h"
 #include "extensions/renderer/file_system_natives.h"
 #include "extensions/renderer/guest_view/guest_view_internal_custom_bindings.h"
-#include "extensions/renderer/i18n_custom_bindings.h"
 #include "extensions/renderer/id_generator_custom_bindings.h"
-#include "extensions/renderer/lazy_background_page_native_handler.h"
 #include "extensions/renderer/logging_native_handler.h"
 #include "extensions/renderer/messaging_bindings.h"
 #include "extensions/renderer/module_system.h"
-#include "extensions/renderer/print_native_handler.h"
 #include "extensions/renderer/process_info_native_handler.h"
 #include "extensions/renderer/render_frame_observer_natives.h"
 #include "extensions/renderer/renderer_extension_registry.h"
@@ -824,15 +821,10 @@
   module_system->RegisterNativeHandler(
       "chrome", scoped_ptr<NativeHandler>(new ChromeNativeHandler(context)));
   module_system->RegisterNativeHandler(
-      "lazy_background_page",
-      scoped_ptr<NativeHandler>(new LazyBackgroundPageNativeHandler(context)));
-  module_system->RegisterNativeHandler(
       "logging", scoped_ptr<NativeHandler>(new LoggingNativeHandler(context)));
   module_system->RegisterNativeHandler("schema_registry",
                                        v8_schema_registry->AsNativeHandler());
   module_system->RegisterNativeHandler(
-      "print", scoped_ptr<NativeHandler>(new PrintNativeHandler(context)));
-  module_system->RegisterNativeHandler(
       "test_features",
       scoped_ptr<NativeHandler>(new TestFeaturesNativeHandler(context)));
   module_system->RegisterNativeHandler(
@@ -845,8 +837,7 @@
       "utils", scoped_ptr<NativeHandler>(new UtilsNativeHandler(context)));
   module_system->RegisterNativeHandler(
       "v8_context",
-      scoped_ptr<NativeHandler>(
-          new V8ContextNativeHandler(context, dispatcher)));
+      scoped_ptr<NativeHandler>(new V8ContextNativeHandler(context)));
   module_system->RegisterNativeHandler(
       "event_natives", scoped_ptr<NativeHandler>(new EventBindings(context)));
   module_system->RegisterNativeHandler(
@@ -895,8 +886,6 @@
       scoped_ptr<NativeHandler>(
           new GuestViewInternalCustomBindings(context)));
   module_system->RegisterNativeHandler(
-      "i18n", scoped_ptr<NativeHandler>(new I18NCustomBindings(context)));
-  module_system->RegisterNativeHandler(
       "id_generator",
       scoped_ptr<NativeHandler>(new IdGeneratorCustomBindings(context)));
   module_system->RegisterNativeHandler(
diff --git a/extensions/renderer/display_source_custom_bindings.cc b/extensions/renderer/display_source_custom_bindings.cc
index 1a021c1..a933297b2 100644
--- a/extensions/renderer/display_source_custom_bindings.cc
+++ b/extensions/renderer/display_source_custom_bindings.cc
@@ -29,10 +29,10 @@
 DisplaySourceCustomBindings::DisplaySourceCustomBindings(ScriptContext* context)
     : ObjectBackedNativeHandler(context),
       weak_factory_(this) {
-  RouteFunction("StartSession",
+  RouteFunction("StartSession", "displaySource",
                 base::Bind(&DisplaySourceCustomBindings::StartSession,
                            weak_factory_.GetWeakPtr()));
-  RouteFunction("TerminateSession",
+  RouteFunction("TerminateSession", "displaySource",
                 base::Bind(&DisplaySourceCustomBindings::TerminateSession,
                            weak_factory_.GetWeakPtr()));
 }
diff --git a/extensions/renderer/i18n_custom_bindings.cc b/extensions/renderer/i18n_custom_bindings.cc
index 08d9e75aa..fd353832 100644
--- a/extensions/renderer/i18n_custom_bindings.cc
+++ b/extensions/renderer/i18n_custom_bindings.cc
@@ -120,12 +120,12 @@
 I18NCustomBindings::I18NCustomBindings(ScriptContext* context)
     : ObjectBackedNativeHandler(context) {
   RouteFunction(
-      "GetL10nMessage",
+      "GetL10nMessage", "i18n",
       base::Bind(&I18NCustomBindings::GetL10nMessage, base::Unretained(this)));
-  RouteFunction("GetL10nUILanguage",
+  RouteFunction("GetL10nUILanguage", "i18n",
                 base::Bind(&I18NCustomBindings::GetL10nUILanguage,
                            base::Unretained(this)));
-  RouteFunction("DetectTextLanguage",
+  RouteFunction("DetectTextLanguage", "i18n",
                 base::Bind(&I18NCustomBindings::DetectTextLanguage,
                            base::Unretained(this)));
 }
diff --git a/extensions/renderer/lazy_background_page_native_handler.cc b/extensions/renderer/lazy_background_page_native_handler.cc
index f09beec..b7307776 100644
--- a/extensions/renderer/lazy_background_page_native_handler.cc
+++ b/extensions/renderer/lazy_background_page_native_handler.cc
@@ -16,11 +16,11 @@
     ScriptContext* context)
     : ObjectBackedNativeHandler(context) {
   RouteFunction(
-      "IncrementKeepaliveCount",
+      "IncrementKeepaliveCount", "tts",
       base::Bind(&LazyBackgroundPageNativeHandler::IncrementKeepaliveCount,
                  base::Unretained(this)));
   RouteFunction(
-      "DecrementKeepaliveCount",
+      "DecrementKeepaliveCount", "tts",
       base::Bind(&LazyBackgroundPageNativeHandler::DecrementKeepaliveCount,
                  base::Unretained(this)));
 }
diff --git a/extensions/renderer/object_backed_native_handler.cc b/extensions/renderer/object_backed_native_handler.cc
index 3ddf622..3728543d 100644
--- a/extensions/renderer/object_backed_native_handler.cc
+++ b/extensions/renderer/object_backed_native_handler.cc
@@ -15,6 +15,7 @@
 #include "extensions/renderer/script_context.h"
 #include "extensions/renderer/script_context_set.h"
 #include "extensions/renderer/v8_helpers.h"
+#include "third_party/WebKit/public/web/WebLocalFrame.h"
 #include "v8/include/v8.h"
 
 namespace extensions {
@@ -73,10 +74,14 @@
     std::string feature_name = *v8::String::Utf8Value(feature_name_string);
     // TODO(devlin): Eventually, we should fail if either script_context is null
     // or feature_name is empty.
-    if (script_context &&
-        !feature_name.empty() &&
-        !script_context->GetAvailability(feature_name).is_available()) {
-      return;
+    if (script_context && !feature_name.empty()) {
+      Feature::Availability availability =
+          script_context->GetAvailability(feature_name);
+      if (!availability.is_available()) {
+        DVLOG(1) << feature_name
+                 << " is not available: " << availability.message();
+        return;
+      }
     }
   }
   // This CHECK is *important*. Otherwise, we'll go around happily executing
@@ -84,6 +89,16 @@
   CHECK(handler_function_value->IsExternal());
   static_cast<HandlerFunction*>(
       handler_function_value.As<v8::External>()->Value())->Run(args);
+
+  // Verify that the return value, if any, is accessible by the context.
+  v8::ReturnValue<v8::Value> ret = args.GetReturnValue();
+  v8::Local<v8::Value> ret_value = ret.Get();
+  if (ret_value->IsObject() && !ret_value->IsNull() &&
+      !ContextCanAccessObject(context, v8::Local<v8::Object>::Cast(ret_value),
+                              true)) {
+    NOTREACHED() << "Insecure return value";
+    ret.SetUndefined();
+  }
 }
 
 void ObjectBackedNativeHandler::RouteFunction(
@@ -139,6 +154,23 @@
   NativeHandler::Invalidate();
 }
 
+// static
+bool ObjectBackedNativeHandler::ContextCanAccessObject(
+    const v8::Local<v8::Context>& context,
+    const v8::Local<v8::Object>& object,
+    bool allow_null_context) {
+  if (object->IsNull())
+    return true;
+  if (context == object->CreationContext())
+    return true;
+  ScriptContext* other_script_context =
+      ScriptContextSet::GetContextByObject(object);
+  if (!other_script_context || !other_script_context->web_frame())
+    return allow_null_context;
+
+  return blink::WebFrame::scriptCanAccess(other_script_context->web_frame());
+}
+
 void ObjectBackedNativeHandler::SetPrivate(v8::Local<v8::Object> obj,
                                            const char* key,
                                            v8::Local<v8::Value> value) {
diff --git a/extensions/renderer/object_backed_native_handler.h b/extensions/renderer/object_backed_native_handler.h
index 8e804c3..974abe1 100644
--- a/extensions/renderer/object_backed_native_handler.h
+++ b/extensions/renderer/object_backed_native_handler.h
@@ -58,6 +58,17 @@
 
   void Invalidate() override;
 
+  // Returns true if the given |context| is allowed to access the given
+  // |object|. This should be checked before returning any objects from another
+  // context.
+  // |allow_null_context| indicates that if there is no ScriptContext associated
+  // with the |object|, it should be allowed.
+  // TODO(devlin): It'd be nice to track down when when there's no ScriptContext
+  // and remove |allow_null_context|.
+  static bool ContextCanAccessObject(const v8::Local<v8::Context>& context,
+                                     const v8::Local<v8::Object>& object,
+                                     bool allow_null_context);
+
   // The following methods are convenience wrappers for methods on v8::Object
   // with the corresponding names.
   void SetPrivate(v8::Local<v8::Object> obj,
diff --git a/extensions/renderer/print_native_handler.cc b/extensions/renderer/print_native_handler.cc
deleted file mode 100644
index b6ee63a..0000000
--- a/extensions/renderer/print_native_handler.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "extensions/renderer/print_native_handler.h"
-
-#include <string>
-
-#include "base/bind.h"
-#include "base/strings/string_util.h"
-
-namespace extensions {
-
-PrintNativeHandler::PrintNativeHandler(ScriptContext* context)
-    : ObjectBackedNativeHandler(context) {
-  RouteFunction("Print",
-                base::Bind(&PrintNativeHandler::Print, base::Unretained(this)));
-}
-
-void PrintNativeHandler::Print(
-    const v8::FunctionCallbackInfo<v8::Value>& args) {
-  if (args.Length() < 1)
-    return;
-
-  std::vector<std::string> components;
-  for (int i = 0; i < args.Length(); ++i)
-    components.push_back(*v8::String::Utf8Value(args[i]));
-
-  LOG(ERROR) << base::JoinString(components, ",");
-}
-
-}  // namespace extensions
diff --git a/extensions/renderer/print_native_handler.h b/extensions/renderer/print_native_handler.h
deleted file mode 100644
index b2e5d37..0000000
--- a/extensions/renderer/print_native_handler.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef EXTENSIONS_RENDERER_PRINT_NATIVE_HANDLER_H_
-#define EXTENSIONS_RENDERER_PRINT_NATIVE_HANDLER_H_
-
-#include "extensions/renderer/object_backed_native_handler.h"
-
-namespace extensions {
-
-class PrintNativeHandler : public ObjectBackedNativeHandler {
- public:
-  explicit PrintNativeHandler(ScriptContext* context);
-
-  void Print(const v8::FunctionCallbackInfo<v8::Value>& args);
-};
-
-}  // namespace extensions
-
-#endif  // EXTENSIONS_RENDERER_PRINT_NATIVE_HANDLER_H_
diff --git a/extensions/renderer/render_frame_observer_natives.cc b/extensions/renderer/render_frame_observer_natives.cc
index 7c507b37..bd5d237 100644
--- a/extensions/renderer/render_frame_observer_natives.cc
+++ b/extensions/renderer/render_frame_observer_natives.cc
@@ -50,7 +50,7 @@
 RenderFrameObserverNatives::RenderFrameObserverNatives(ScriptContext* context)
     : ObjectBackedNativeHandler(context), weak_ptr_factory_(this) {
   RouteFunction(
-      "OnDocumentElementCreated",
+      "OnDocumentElementCreated", "app.window",
       base::Bind(&RenderFrameObserverNatives::OnDocumentElementCreated,
                  base::Unretained(this)));
 }
diff --git a/extensions/renderer/resources/last_error.js b/extensions/renderer/resources/last_error.js
index a205ab3..fc0c7b5e 100644
--- a/extensions/renderer/resources/last_error.js
+++ b/extensions/renderer/resources/last_error.js
@@ -108,7 +108,8 @@
  * method won't work if the real callback has been wrapped (etc).
  */
 function run(name, message, stack, callback, args) {
-  var targetChrome = GetGlobal(callback).chrome;
+  var global = GetGlobal(callback);
+  var targetChrome = global && global.chrome;
   set(name, message, stack, targetChrome);
   try {
     $Function.apply(callback, undefined, args);
diff --git a/extensions/renderer/resources/media_router_bindings.js b/extensions/renderer/resources/media_router_bindings.js
index 7b83e6f..4eaee9f 100644
--- a/extensions/renderer/resources/media_router_bindings.js
+++ b/extensions/renderer/resources/media_router_bindings.js
@@ -478,6 +478,11 @@
      * @type {function()}
      */
     this.enableMdnsDiscovery = null;
+
+    /**
+     * @type {function()}
+     */
+    this.updateMediaSinks = null;
   };
 
   /**
@@ -527,6 +532,7 @@
       'startObservingMediaRoutes',
       'connectRouteByRouteId',
       'enableMdnsDiscovery',
+      'updateMediaSinks',
     ];
     requiredHandlers.forEach(function(nextHandler) {
       if (handlers[nextHandler] === undefined) {
@@ -753,6 +759,14 @@
     this.handlers_.enableMdnsDiscovery();
   };
 
+  /**
+   * Requests that the provider manager update media sinks.
+   * @param {!string} sourceUrn
+   */
+  MediaRouteProvider.prototype.updateMediaSinks = function(sourceUrn) {
+    this.handlers_.updateMediaSinks(sourceUrn);
+  };
+
   mediaRouter = new MediaRouter(connector.bindHandleToProxy(
       serviceProvider.connectToService(
           mediaRouterMojom.MediaRouter.name),
diff --git a/extensions/renderer/resources/send_request.js b/extensions/renderer/resources/send_request.js
index 1692aaa79..9fed10e7 100644
--- a/extensions/renderer/resources/send_request.js
+++ b/extensions/renderer/resources/send_request.js
@@ -38,8 +38,10 @@
     // lastError needs to be set on the caller's chrome object no matter what,
     // though chances are it's the same as ours (it will be different when
     // calling API methods on other contexts).
-    if (request.callback)
-      callerChrome = natives.GetGlobal(request.callback).chrome;
+    if (request.callback) {
+      var global = natives.GetGlobal(request.callback);
+      callerChrome = global ? global.chrome : callerChrome;
+    }
 
     lastError.clear(chrome);
     if (callerChrome !== chrome)
diff --git a/extensions/renderer/runtime_custom_bindings.cc b/extensions/renderer/runtime_custom_bindings.cc
index 915abf8b..3e29213 100644
--- a/extensions/renderer/runtime_custom_bindings.cc
+++ b/extensions/renderer/runtime_custom_bindings.cc
@@ -32,10 +32,10 @@
   RouteFunction(
       "GetManifest",
       base::Bind(&RuntimeCustomBindings::GetManifest, base::Unretained(this)));
-  RouteFunction("OpenChannelToExtension",
+  RouteFunction("OpenChannelToExtension", "runtime.connect",
                 base::Bind(&RuntimeCustomBindings::OpenChannelToExtension,
                            base::Unretained(this)));
-  RouteFunction("OpenChannelToNativeApp",
+  RouteFunction("OpenChannelToNativeApp", "runtime.connectNative",
                 base::Bind(&RuntimeCustomBindings::OpenChannelToNativeApp,
                            base::Unretained(this)));
   RouteFunction("GetExtensionViews",
diff --git a/extensions/renderer/script_context_set.cc b/extensions/renderer/script_context_set.cc
index 35a05b6..33df67e5 100644
--- a/extensions/renderer/script_context_set.cc
+++ b/extensions/renderer/script_context_set.cc
@@ -80,6 +80,11 @@
   return nullptr;
 }
 
+ScriptContext* ScriptContextSet::GetContextByObject(
+    const v8::Local<v8::Object>& object) {
+  return GetContextByV8Context(object->CreationContext());
+}
+
 ScriptContext* ScriptContextSet::GetContextByV8Context(
     const v8::Local<v8::Context>& v8_context) {
   // g_context_set can be null in unittests.
diff --git a/extensions/renderer/script_context_set.h b/extensions/renderer/script_context_set.h
index a435614..3551397 100644
--- a/extensions/renderer/script_context_set.h
+++ b/extensions/renderer/script_context_set.h
@@ -78,6 +78,10 @@
   static ScriptContext* GetContextByV8Context(
       const v8::Local<v8::Context>& context);
 
+  // Returns the ScriptContext corresponding to the V8 context that created the
+  // given |object|.
+  static ScriptContext* GetContextByObject(const v8::Local<v8::Object>& object);
+
   // Synchronously runs |callback| with each ScriptContext that belongs to
   // |extension_id| in |render_frame|.
   //
diff --git a/extensions/renderer/send_request_natives.cc b/extensions/renderer/send_request_natives.cc
index 5b1bfb49..ef3e93b 100644
--- a/extensions/renderer/send_request_natives.cc
+++ b/extensions/renderer/send_request_natives.cc
@@ -68,8 +68,12 @@
     const v8::FunctionCallbackInfo<v8::Value>& args) {
   CHECK_EQ(1, args.Length());
   CHECK(args[0]->IsObject());
-  args.GetReturnValue().Set(
-      v8::Local<v8::Object>::Cast(args[0])->CreationContext()->Global());
+  v8::Local<v8::Context> v8_context =
+      v8::Local<v8::Object>::Cast(args[0])->CreationContext();
+  if (ContextCanAccessObject(context()->v8_context(), v8_context->Global(),
+                             false)) {
+    args.GetReturnValue().Set(v8_context->Global());
+  }
 }
 
 }  // namespace extensions
diff --git a/extensions/renderer/test_features_native_handler.cc b/extensions/renderer/test_features_native_handler.cc
index 0f22855..3b98c8e 100644
--- a/extensions/renderer/test_features_native_handler.cc
+++ b/extensions/renderer/test_features_native_handler.cc
@@ -14,7 +14,7 @@
 
 TestFeaturesNativeHandler::TestFeaturesNativeHandler(ScriptContext* context)
     : ObjectBackedNativeHandler(context) {
-  RouteFunction("GetAPIFeatures",
+  RouteFunction("GetAPIFeatures", "test",
                 base::Bind(&TestFeaturesNativeHandler::GetAPIFeatures,
                            base::Unretained(this)));
 }
diff --git a/extensions/renderer/test_native_handler.cc b/extensions/renderer/test_native_handler.cc
index 31e7dcb..7684c47 100644
--- a/extensions/renderer/test_native_handler.cc
+++ b/extensions/renderer/test_native_handler.cc
@@ -11,7 +11,7 @@
 TestNativeHandler::TestNativeHandler(ScriptContext* context)
     : ObjectBackedNativeHandler(context) {
   RouteFunction(
-      "GetWakeEventPage",
+      "GetWakeEventPage", "test",
       base::Bind(&TestNativeHandler::GetWakeEventPage, base::Unretained(this)));
 }
 
diff --git a/extensions/renderer/v8_context_native_handler.cc b/extensions/renderer/v8_context_native_handler.cc
index 7dbc2b8d..8285b66 100644
--- a/extensions/renderer/v8_context_native_handler.cc
+++ b/extensions/renderer/v8_context_native_handler.cc
@@ -6,27 +6,23 @@
 
 #include "base/bind.h"
 #include "extensions/common/features/feature.h"
-#include "extensions/renderer/dispatcher.h"
 #include "extensions/renderer/script_context.h"
+#include "extensions/renderer/script_context_set.h"
 #include "third_party/WebKit/public/web/WebLocalFrame.h"
 
 namespace extensions {
 
-V8ContextNativeHandler::V8ContextNativeHandler(ScriptContext* context,
-                                               Dispatcher* dispatcher)
-    : ObjectBackedNativeHandler(context),
-      context_(context),
-      dispatcher_(dispatcher) {
+V8ContextNativeHandler::V8ContextNativeHandler(ScriptContext* context)
+    : ObjectBackedNativeHandler(context), context_(context) {
   RouteFunction("GetAvailability",
                 base::Bind(&V8ContextNativeHandler::GetAvailability,
                            base::Unretained(this)));
   RouteFunction("GetModuleSystem",
                 base::Bind(&V8ContextNativeHandler::GetModuleSystem,
                            base::Unretained(this)));
-  RouteFunction(
-      "RunWithNativesEnabled",
-      base::Bind(&V8ContextNativeHandler::RunWithNativesEnabled,
-                 base::Unretained(this)));
+  RouteFunction("RunWithNativesEnabled", "test",
+                base::Bind(&V8ContextNativeHandler::RunWithNativesEnabled,
+                           base::Unretained(this)));
 }
 
 void V8ContextNativeHandler::GetAvailability(
@@ -50,10 +46,8 @@
     const v8::FunctionCallbackInfo<v8::Value>& args) {
   CHECK_EQ(args.Length(), 1);
   CHECK(args[0]->IsObject());
-  v8::Local<v8::Context> v8_context =
-      v8::Local<v8::Object>::Cast(args[0])->CreationContext();
-  ScriptContext* context =
-      dispatcher_->script_context_set().GetByV8Context(v8_context);
+  ScriptContext* context = ScriptContextSet::GetContextByObject(
+      v8::Local<v8::Object>::Cast(args[0]));
   if (blink::WebFrame::scriptCanAccess(context->web_frame()))
     args.GetReturnValue().Set(context->module_system()->NewInstance());
 }
diff --git a/extensions/renderer/v8_context_native_handler.h b/extensions/renderer/v8_context_native_handler.h
index da5098b2..956ef6c 100644
--- a/extensions/renderer/v8_context_native_handler.h
+++ b/extensions/renderer/v8_context_native_handler.h
@@ -13,7 +13,7 @@
 
 class V8ContextNativeHandler : public ObjectBackedNativeHandler {
  public:
-  V8ContextNativeHandler(ScriptContext* context, Dispatcher* dispatcher);
+  explicit V8ContextNativeHandler(ScriptContext* context);
 
  private:
   void GetAvailability(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -22,7 +22,6 @@
   void RunWithNativesEnabled(const v8::FunctionCallbackInfo<v8::Value>& args);
 
   ScriptContext* context_;
-  Dispatcher* dispatcher_;
 };
 
 }  // namespace extensions
diff --git a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt
index d185894..93af3d9 100644
--- a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt
+++ b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt
@@ -51,6 +51,14 @@
 
     INVALID_ENUM is generated if <usage> is not READ_WRTIE_CHROMIUM.
 
+    On OS X, driver bugs prevent the usage of memory buffers with RGB internal
+    format. As a workaround, the created GpuMemoryBuffer will always have
+    internal format RGBA. The caller is responsible for handling this
+    appropriately. The only support provided by this extension is that calls
+    that require parameter validation (such as copyTexImage2D and
+    copyTexSubImage2D) will perform paramter validation as if the internal
+    format were RGB.
+
 Errors
 
     None.
@@ -62,3 +70,4 @@
 Revision History
 
     9/29/2014   Documented the extension.
+    4/12/2016   Added details of OS X RGB workaround.
diff --git a/gpu/command_buffer/common/capabilities.h b/gpu/command_buffer/common/capabilities.h
index b01ccb8..f4bb19d 100644
--- a/gpu/command_buffer/common/capabilities.h
+++ b/gpu/command_buffer/common/capabilities.h
@@ -145,6 +145,13 @@
   bool flips_vertically;
   bool msaa_is_slow;
 
+  // When this parameter is true, a CHROMIUM image created with RGB format will
+  // actually have RGBA format. The client is responsible for handling most of
+  // the complexities associated with this. See
+  // gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt for more
+  // details.
+  bool chromium_image_rgb_emulation;
+
   int major_version;
   int minor_version;
 };
diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc
index ccd593a..3c4fad31 100644
--- a/gpu/command_buffer/service/framebuffer_manager.cc
+++ b/gpu/command_buffer/service/framebuffer_manager.cc
@@ -129,6 +129,8 @@
     return false;
   }
 
+  bool EmulatingRGB() const override { return false; }
+
  protected:
   ~RenderbufferAttachment() override {}
 
@@ -277,6 +279,10 @@
     return texture == texture_ref_.get() && level == level_;
   }
 
+  bool EmulatingRGB() const override {
+    return texture_ref_->texture()->EmulatingRGB();
+  }
+
  protected:
   ~TextureAttachment() override {}
 
@@ -537,6 +543,10 @@
     return 0;
   }
   const Attachment* attachment = it->second.get();
+  if (attachment->EmulatingRGB()) {
+    DCHECK_EQ(static_cast<GLenum>(GL_RGBA), attachment->internal_format());
+    return GL_RGB;
+  }
   return attachment->internal_format();
 }
 
diff --git a/gpu/command_buffer/service/framebuffer_manager.h b/gpu/command_buffer/service/framebuffer_manager.h
index 67257da..b6a2af30 100644
--- a/gpu/command_buffer/service/framebuffer_manager.h
+++ b/gpu/command_buffer/service/framebuffer_manager.h
@@ -62,6 +62,7 @@
     virtual void AddToSignature(
         TextureManager* texture_manager, std::string* signature) const = 0;
     virtual bool FormsFeedbackLoop(TextureRef* texture, GLint level) const = 0;
+    virtual bool EmulatingRGB() const = 0;
 
    protected:
     friend class base::RefCounted<Attachment>;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 767a7ca..27114203 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -1559,10 +1559,14 @@
   // Wrapper for glGetShaderiv
   void DoGetShaderiv(GLuint shader, GLenum pname, GLint* params);
 
+  // Helper for DoGetTexParameter{f|i}v.
+  void GetTexParameterImpl(
+      GLenum target, GLenum pname, GLfloat* fparams, GLint* iparams,
+      const char* function_name);
+
   // Wrappers for glGetTexParameter.
   void DoGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
   void DoGetTexParameteriv(GLenum target, GLenum pname, GLint* params);
-  void InitTextureMaxAnisotropyIfNeeded(GLenum target, GLenum pname);
 
   // Wrappers for glGetVertexAttrib.
   template <typename T>
@@ -3255,6 +3259,7 @@
 #if defined(OS_MACOSX)
   // This is unconditionally true on mac, no need to test for it at runtime.
   caps.iosurface = true;
+  caps.chromium_image_rgb_emulation = true;
 #endif
 
   caps.post_sub_buffer = supports_post_sub_buffer_;
@@ -8913,37 +8918,52 @@
   glGetSamplerParameteriv(sampler->service_id(), pname, params);
 }
 
-void GLES2DecoderImpl::DoGetTexParameterfv(
-    GLenum target, GLenum pname, GLfloat* params) {
-  InitTextureMaxAnisotropyIfNeeded(target, pname);
-  glGetTexParameterfv(target, pname, params);
-}
-
-void GLES2DecoderImpl::DoGetTexParameteriv(
-    GLenum target, GLenum pname, GLint* params) {
-  InitTextureMaxAnisotropyIfNeeded(target, pname);
-  glGetTexParameteriv(target, pname, params);
-}
-
-void GLES2DecoderImpl::InitTextureMaxAnisotropyIfNeeded(
-    GLenum target, GLenum pname) {
-  if (!workarounds().init_texture_max_anisotropy)
-    return;
-  if (pname != GL_TEXTURE_MAX_ANISOTROPY_EXT ||
-      !validators_->texture_parameter.IsValid(pname)) {
-    return;
-  }
-
+void GLES2DecoderImpl::GetTexParameterImpl(
+    GLenum target, GLenum pname, GLfloat* fparams, GLint* iparams,
+    const char* function_name) {
   TextureRef* texture_ref = texture_manager()->GetTextureInfoForTarget(
       &state_, target);
   if (!texture_ref) {
     LOCAL_SET_GL_ERROR(
-        GL_INVALID_OPERATION,
-        "glGetTexParamter{fi}v", "unknown texture for target");
+        GL_INVALID_OPERATION, function_name, "unknown texture for target");
     return;
   }
   Texture* texture = texture_ref->texture();
-  texture->InitTextureMaxAnisotropyIfNeeded(target);
+  switch (pname) {
+    case GL_TEXTURE_MAX_ANISOTROPY_EXT:
+      if (workarounds().init_texture_max_anisotropy) {
+        texture->InitTextureMaxAnisotropyIfNeeded(target);
+      }
+      break;
+    case GL_TEXTURE_IMMUTABLE_LEVELS:
+      if (feature_info_->gl_version_info().IsLowerThanGL(4, 2)) {
+        GLint levels = texture->GetImmutableLevels();
+        if (fparams) {
+          fparams[0] = static_cast<GLfloat>(levels);
+        } else {
+          iparams[0] = levels;
+        }
+        return;
+      }
+      break;
+    default:
+      break;
+  }
+  if (fparams) {
+    glGetTexParameterfv(target, pname, fparams);
+  } else {
+    glGetTexParameteriv(target, pname, iparams);
+  }
+}
+
+void GLES2DecoderImpl::DoGetTexParameterfv(
+    GLenum target, GLenum pname, GLfloat* params) {
+  GetTexParameterImpl(target, pname, params, nullptr, "glGetTexParameterfv");
+}
+
+void GLES2DecoderImpl::DoGetTexParameteriv(
+    GLenum target, GLenum pname, GLint* params) {
+  GetTexParameterImpl(target, pname, nullptr, params, "glGetTexParameteriv");
 }
 
 template <typename T>
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
index 68bfdcd..3756eac 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
@@ -175,6 +175,10 @@
     return group_->feature_info();
   }
 
+  FramebufferCompletenessCache* framebuffer_completeness_cache() const {
+    return group_->framebuffer_completeness_cache();
+  }
+
   ImageManager* GetImageManager() { return decoder_->GetImageManager(); }
 
   void DoCreateProgram(GLuint client_id, GLuint service_id);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
index 7ec620af..23adb5a9 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
@@ -49,6 +49,16 @@
 using ::testing::StrEq;
 using ::testing::StrictMock;
 
+namespace {
+class EmulatingRGBImageStub : public gl::GLImageStub {
+ protected:
+  ~EmulatingRGBImageStub() override {}
+  bool EmulatingRGB() const override {
+    return true;
+  }
+};
+}  // namespace
+
 namespace gpu {
 namespace gles2 {
 
@@ -3676,6 +3686,80 @@
       texture, kTarget, kLevel, kFormat, kType, kWidth, kHeight, kDepth));
 }
 
+// Test that copyTexImage2D uses the emulated internal format, rather than the
+// real internal format.
+TEST_P(GLES2DecoderWithShaderTest, CHROMIUMImageEmulatingRGB) {
+  const GLuint kFBOClientTextureId = 4100;
+  const GLuint kFBOServiceTextureId = 4101;
+  GLenum target = GL_TEXTURE_2D;
+  GLint level = 0;
+  GLsizei width = 1;
+  GLsizei height = 1;
+
+  // Generate the source framebuffer.
+  EXPECT_CALL(*gl_, GenTextures(_, _))
+      .WillOnce(SetArgPointee<1>(kFBOServiceTextureId))
+      .RetiresOnSaturation();
+  GenHelper<GenTexturesImmediate>(kFBOClientTextureId);
+  DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_,
+                    kServiceFramebufferId);
+
+  GLenum destination_texture_formats[] = {GL_RGBA, GL_RGB};
+  for (int use_rgb_emulation = 0; use_rgb_emulation < 2; ++ use_rgb_emulation) {
+    for (size_t destination_texture_index = 0; destination_texture_index < 2;
+         ++destination_texture_index) {
+      // Generate and bind the source image. Making a new image for each set of
+      // parameters is easier than trying to reuse images. Obviously there's no
+      // performance penalty.
+      int image_id = use_rgb_emulation * 2 + destination_texture_index;
+      scoped_refptr<gl::GLImage> image;
+      if (use_rgb_emulation)
+        image = new EmulatingRGBImageStub;
+      else
+        image = new gl::GLImageStub;
+      GetImageManager()->AddImage(image.get(), image_id);
+      EXPECT_FALSE(GetImageManager()->LookupImage(image_id) == NULL);
+      DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId);
+
+      DoBindTexImage2DCHROMIUM(GL_TEXTURE_2D, image_id);
+      DoFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, target,
+                             kFBOClientTextureId, kFBOServiceTextureId, level,
+                             GL_NO_ERROR);
+
+      GLenum destination_texture_format =
+          destination_texture_formats[destination_texture_index];
+      bool should_succeed =
+          !use_rgb_emulation || (destination_texture_format == GL_RGB);
+      if (should_succeed) {
+        EXPECT_CALL(*gl_, GetError())
+            .WillOnce(Return(GL_NO_ERROR))
+            .RetiresOnSaturation();
+        EXPECT_CALL(*gl_,
+                    CopyTexImage2D(GL_TEXTURE_2D, 0, destination_texture_format,
+                                   0, 0, 1, 1, 0))
+            .Times(1)
+            .RetiresOnSaturation();
+        EXPECT_CALL(*gl_, GetError())
+            .WillOnce(Return(GL_NO_ERROR))
+            .RetiresOnSaturation();
+      }
+
+      if (destination_texture_index == 0 || !framebuffer_completeness_cache()) {
+        EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER))
+            .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE))
+            .RetiresOnSaturation();
+      }
+
+      DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
+      CopyTexImage2D cmd;
+      cmd.Init(target, level, destination_texture_format, 0, 0, width, height);
+      EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+      GLenum expectation = should_succeed ? GL_NO_ERROR : GL_INVALID_OPERATION;
+      EXPECT_EQ(expectation, static_cast<GLenum>(GetGLError()));
+    }
+  }
+}
+
 // TODO(gman): Complete this test.
 // TEST_P(GLES2DecoderTest, CompressedTexImage2DGLError) {
 // }
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index 8297c6d0..97f3843 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -65,6 +65,7 @@
   bool can_render_;
   bool can_render_to_;
   bool npot_;
+  bool emulating_rgb_;
 
   // Since we will be hashing this signature structure, the padding must be
   // zero initialized. Although the C++11 specifications specify that this is
@@ -86,7 +87,8 @@
                    bool has_image,
                    bool can_render,
                    bool can_render_to,
-                   bool npot) {
+                   bool npot,
+                   bool emulating_rgb) {
     memset(this, 0, sizeof(TextureSignature));
     target_ = target;
     level_ = level;
@@ -113,6 +115,7 @@
     can_render_ = can_render;
     can_render_to_ = can_render_to;
     npot_ = npot;
+    emulating_rgb_ = emulating_rgb;
   }
 };
 
@@ -376,7 +379,8 @@
       estimated_size_(0),
       can_render_condition_(CAN_RENDER_ALWAYS),
       texture_max_anisotropy_initialized_(false),
-      compatibility_swizzle_(nullptr) {}
+      compatibility_swizzle_(nullptr),
+      emulating_rgb_(false) {}
 
 Texture::~Texture() {
   if (mailbox_manager_)
@@ -587,7 +591,8 @@
                                   info.image.get() != NULL,
                                   CanRender(feature_info),
                                   CanRenderTo(feature_info, level),
-                                  npot_);
+                                  npot_,
+                                  emulating_rgb_);
 
   signature->append(TextureTag, sizeof(TextureTag));
   signature->append(reinterpret_cast<const char*>(&signature_data),
@@ -866,6 +871,19 @@
     (*it)->manager()->UpdateNumImages(delta);
 }
 
+void Texture::UpdateEmulatingRGB() {
+  for (const FaceInfo& face_info : face_infos_) {
+    for (const LevelInfo& level_info : face_info.level_infos) {
+      if (level_info.image && level_info.image->EmulatingRGB()) {
+        emulating_rgb_ = true;
+        return;
+      }
+    }
+  }
+  emulating_rgb_ = false;
+}
+
+
 void Texture::IncAllFramebufferStateChangeCount() {
   for (RefSet::iterator it = refs_.begin(); it != refs_.end(); ++it)
     (*it)->manager()->IncFramebufferStateChangeCount();
@@ -1319,6 +1337,21 @@
   return true;
 }
 
+GLint Texture::GetImmutableLevels() const {
+  if (!immutable_)
+    return 0;
+  GLint levels = 0;
+  if (immutable_) {
+    DCHECK(face_infos_.size() > 0);
+    for (size_t ii = 0; ii < face_infos_[0].level_infos.size(); ++ii) {
+      const Texture::LevelInfo& info = face_infos_[0].level_infos[ii];
+      if (info.target != 0)
+        levels++;
+    }
+  }
+  return levels;
+}
+
 gfx::Rect Texture::GetLevelClearedRect(GLenum target, GLint level) const {
   size_t face_index = GLES2Util::GLTargetToFaceIndex(target);
   if (face_index >= face_infos_.size() ||
@@ -1445,6 +1478,7 @@
 
   UpdateCanRenderCondition();
   UpdateHasImages();
+  UpdateEmulatingRGB();
 }
 
 void Texture::SetLevelImage(GLenum target,
@@ -1621,6 +1655,10 @@
   }
 }
 
+bool Texture::EmulatingRGB() {
+  return emulating_rgb_;
+}
+
 TextureRef::TextureRef(TextureManager* manager,
                        GLuint client_id,
                        Texture* texture)
diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h
index 24851466..7a470ffa 100644
--- a/gpu/command_buffer/service/texture_manager.h
+++ b/gpu/command_buffer/service/texture_manager.h
@@ -246,6 +246,9 @@
     return immutable_;
   }
 
+  // Return 0 if it's not immutable.
+  GLint GetImmutableLevels() const;
+
   // Get the cleared rectangle for a particular level. Returns an empty
   // rectangle if level does not exist.
   gfx::Rect GetLevelClearedRect(GLenum target, GLint level) const;
@@ -269,6 +272,8 @@
 
   void ApplyFormatWorkarounds(FeatureInfo* feature_info);
 
+  bool EmulatingRGB();
+
  private:
   friend class MailboxManagerImpl;
   friend class MailboxManagerSync;
@@ -488,6 +493,10 @@
   // texture.
   void UpdateHasImages();
 
+  // Updates the flag that indicates whether this texture requires RGB
+  // emulation.
+  void UpdateEmulatingRGB();
+
   // Increment the framebuffer state change count in all the managers
   // referencing this texture.
   void IncAllFramebufferStateChangeCount();
@@ -592,6 +601,8 @@
 
   const CompatibilitySwizzle* compatibility_swizzle_;
 
+  bool emulating_rgb_;
+
   DISALLOW_COPY_AND_ASSIGN(Texture);
 };
 
diff --git a/gpu/command_buffer/service/texture_manager_unittest.cc b/gpu/command_buffer/service/texture_manager_unittest.cc
index 322e2dc..60e8755 100644
--- a/gpu/command_buffer/service/texture_manager_unittest.cc
+++ b/gpu/command_buffer/service/texture_manager_unittest.cc
@@ -166,6 +166,7 @@
   void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
                     uint64_t process_tracing_id,
                     const std::string& dump_name) override {}
+  bool EmulatingRGB() const override { return false; }
   void GetTextureMatrix(float matrix[16]) override {}
 
  protected:
diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp
index 4968aa3..8dcbb291 100644
--- a/gpu/gpu.gyp
+++ b/gpu/gpu.gyp
@@ -311,8 +311,11 @@
         '../ipc/ipc.gyp:test_support_ipc',
         '../skia/skia.gyp:skia',
         '../testing/gtest.gyp:gtest',
+        '../testing/gmock.gyp:gmock',
         '../third_party/mesa/mesa.gyp:mesa_headers',
         '../ui/gfx/gfx.gyp:gfx_test_support',
+        '../ui/gl/gl.gyp:gl_unittest_utils',
+        '../ui/gl/gl.gyp:gl_test_support',
         '../url/url.gyp:url_lib',
         'command_buffer_common',
         'command_buffer_service',
diff --git a/gpu/ipc/common/gpu_command_buffer_traits_multi.h b/gpu/ipc/common/gpu_command_buffer_traits_multi.h
index 1407373..a3d760fd 100644
--- a/gpu/ipc/common/gpu_command_buffer_traits_multi.h
+++ b/gpu/ipc/common/gpu_command_buffer_traits_multi.h
@@ -111,6 +111,7 @@
   IPC_STRUCT_TRAITS_MEMBER(surfaceless)
   IPC_STRUCT_TRAITS_MEMBER(flips_vertically)
   IPC_STRUCT_TRAITS_MEMBER(msaa_is_slow)
+  IPC_STRUCT_TRAITS_MEMBER(chromium_image_rgb_emulation)
 
   IPC_STRUCT_TRAITS_MEMBER(major_version)
   IPC_STRUCT_TRAITS_MEMBER(minor_version)
diff --git a/gpu/ipc/common/gpu_memory_buffer_support.cc b/gpu/ipc/common/gpu_memory_buffer_support.cc
index 0d1c510f..1cb386f94d 100644
--- a/gpu/ipc/common/gpu_memory_buffer_support.cc
+++ b/gpu/ipc/common/gpu_memory_buffer_support.cc
@@ -33,7 +33,8 @@
     case gfx::BufferUsage::GPU_READ:
     case gfx::BufferUsage::SCANOUT:
       return format == gfx::BufferFormat::BGRA_8888 ||
-             format == gfx::BufferFormat::RGBA_8888;
+             format == gfx::BufferFormat::RGBA_8888 ||
+             format == gfx::BufferFormat::BGRX_8888;
     case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE:
     case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT:
       return format == gfx::BufferFormat::R_8 ||
diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn
index 9ad2c9cd..85e0e36a 100644
--- a/gpu/ipc/service/BUILD.gn
+++ b/gpu/ipc/service/BUILD.gn
@@ -147,9 +147,12 @@
     "//gpu/ipc/common",
     "//ipc:test_support",
     "//skia",
+    "//testing/gmock",
     "//testing/gtest",
     "//third_party/mesa:mesa_headers",
     "//ui/gfx:test_support",
+    "//ui/gl:gl_unittest_utils",
+    "//ui/gl:test_support",
     "//url",
   ]
   libs = []
diff --git a/gpu/ipc/service/gpu_channel.cc b/gpu/ipc/service/gpu_channel.cc
index 7661318..672c800 100644
--- a/gpu/ipc/service/gpu_channel.cc
+++ b/gpu/ipc/service/gpu_channel.cc
@@ -944,6 +944,20 @@
     return;
   }
 
+  if (share_group && !share_group->decoder()) {
+    // This should catch test errors where we did not Initialize the
+    // share_group's CommandBuffer.
+    DLOG(ERROR) << "GpuChannel::OnCreateCommandBuffer(): shared context was "
+                   "not initialized";
+    return;
+  }
+
+  if (share_group && share_group->decoder()->WasContextLost()) {
+    DLOG(ERROR) << "GpuChannel::OnCreateCommandBuffer(): shared context was "
+                   "already lost";
+    return;
+  }
+
   scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub(
       this, sync_point_manager_, task_runner_.get(), share_group,
       surface_handle, mailbox_manager_.get(), preempted_flag_.get(),
diff --git a/gpu/ipc/service/gpu_channel_unittest.cc b/gpu/ipc/service/gpu_channel_unittest.cc
index 71c9d3a..b59ed38 100644
--- a/gpu/ipc/service/gpu_channel_unittest.cc
+++ b/gpu/ipc/service/gpu_channel_unittest.cc
@@ -4,12 +4,16 @@
 
 #include <stdint.h>
 
-#include "base/test/test_simple_task_runner.h"
+#include "base/memory/shared_memory.h"
+#include "base/test/test_message_loop.h"
 #include "gpu/ipc/common/gpu_messages.h"
 #include "gpu/ipc/service/gpu_channel.h"
 #include "gpu/ipc/service/gpu_channel_manager.h"
 #include "gpu/ipc/service/gpu_channel_test_common.h"
 #include "ipc/ipc_test_sink.h"
+#include "ui/gl/gl_context_stub_with_extensions.h"
+#include "ui/gl/gl_mock.h"
+#include "ui/gl/test/gl_surface_test_support.h"
 
 namespace gpu {
 
@@ -31,8 +35,12 @@
 
   void HandleMessage(GpuChannel* channel, IPC::Message* msg) {
     TestGpuChannel* test_channel = static_cast<TestGpuChannel*>(channel);
-    test_channel->HandleMessageForTesting(*msg);
 
+    // Some IPCs (such as GpuCommandBufferMsg_Initialize) will generate more
+    // delayed responses, drop those if they exist.
+    test_channel->sink()->ClearMessages();
+
+    test_channel->HandleMessageForTesting(*msg);
     if (msg->is_sync()) {
       const IPC::Message* reply_msg = test_channel->sink()->GetMessageAt(0);
       ASSERT_TRUE(reply_msg);
@@ -288,4 +296,187 @@
   EXPECT_TRUE(stub);
 }
 
+TEST_F(GpuChannelTest, CreateFailsIfSharedContextIsLost) {
+  // We need GL bindings to actually initialize command buffers.
+  gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress);
+  gfx::GLSurfaceTestSupport::InitializeOneOffWithMockBindings();
+
+  // This GLInterface is a stub for the gl driver.
+  std::unique_ptr<gfx::MockGLInterface> gl_interface(
+      new testing::NiceMock<gfx::MockGLInterface>);
+  // std::unique_ptr<gfx::MockGLInterface> gl_interface(new
+  // gfx::MockGLInterface);
+  gfx::MockGLInterface::SetGLInterface(gl_interface.get());
+
+  using testing::AnyNumber;
+  using testing::NotNull;
+  using testing::Return;
+  using testing::SetArgPointee;
+  using testing::SetArrayArgument;
+  // We need it to return non-null strings in order for things to not crash.
+  EXPECT_CALL(*gl_interface, GetString(GL_RENDERER))
+      .Times(AnyNumber())
+      .WillRepeatedly(Return(reinterpret_cast<const GLubyte*>("")));
+  EXPECT_CALL(*gl_interface, GetString(GL_VERSION))
+      .Times(AnyNumber())
+      .WillRepeatedly(Return(reinterpret_cast<const GLubyte*>("2.0")));
+  EXPECT_CALL(*gl_interface, GetString(GL_EXTENSIONS))
+      .Times(AnyNumber())
+      .WillRepeatedly(Return(
+          reinterpret_cast<const GLubyte*>("GL_EXT_framebuffer_object ")));
+  // And we need some values to be large enough to initialize ContextGroup.
+  EXPECT_CALL(*gl_interface, GetIntegerv(GL_MAX_RENDERBUFFER_SIZE, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArgPointee<1>(512));
+  EXPECT_CALL(*gl_interface, GetIntegerv(GL_MAX_VERTEX_ATTRIBS, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArgPointee<1>(8));
+  EXPECT_CALL(*gl_interface,
+              GetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArgPointee<1>(8));
+  EXPECT_CALL(*gl_interface, GetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArgPointee<1>(8));
+  EXPECT_CALL(*gl_interface, GetIntegerv(GL_MAX_TEXTURE_SIZE, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArgPointee<1>(2048));
+  EXPECT_CALL(*gl_interface,
+              GetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArgPointee<1>(2048));
+  EXPECT_CALL(*gl_interface, GetIntegerv(GL_MAX_VARYING_FLOATS, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArgPointee<1>(8 * 4));
+  EXPECT_CALL(*gl_interface,
+              GetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArgPointee<1>(128 * 4));
+  EXPECT_CALL(*gl_interface,
+              GetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArgPointee<1>(16 * 4));
+  EXPECT_CALL(*gl_interface,
+              GetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArgPointee<1>(32));
+  EXPECT_CALL(*gl_interface, GetIntegerv(GL_MAX_VIEWPORT_DIMS, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArgPointee<1>(1024 << 8));
+  // Allow generating non-0 resources so code does not DCHECK.
+  EXPECT_CALL(*gl_interface, GenFramebuffersEXT(1, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArgPointee<1>(1));
+  int texture_ids[] = {1, 2};
+  EXPECT_CALL(*gl_interface, GenTextures(1, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArrayArgument<1>(texture_ids, texture_ids + 1));
+  EXPECT_CALL(*gl_interface, GenTextures(2, NotNull()))
+      .Times(AnyNumber())
+      .WillRepeatedly(SetArrayArgument<1>(texture_ids, texture_ids + 2));
+  // And errors should be squashed.
+  EXPECT_CALL(*gl_interface, CheckFramebufferStatusEXT(GL_FRAMEBUFFER))
+      .Times(AnyNumber())
+      .WillRepeatedly(Return(GL_FRAMEBUFFER_COMPLETE));
+
+  // Dynamic bindings must be set up for the GLES2DecoderImpl, which requires a
+  // GLContext. Use a GLContextStub which does nothing but call through to our
+  // |gl_interface| above.
+  scoped_refptr<gfx::GLContextStub> context(new gfx::GLContextStub);
+  gfx::GLSurfaceTestSupport::InitializeDynamicMockBindings(context.get());
+
+  base::TestMessageLoop message_loop;
+
+  int32_t kClientId = 1;
+  GpuChannel* channel = CreateChannel(kClientId, false, false);
+  ASSERT_TRUE(channel);
+
+  // Create first context, we will share this one.
+  int32_t kSharedRouteId = 1;
+  {
+    SCOPED_TRACE("kSharedRouteId");
+    GPUCreateCommandBufferConfig init_params;
+    init_params.share_group_id = MSG_ROUTING_NONE;
+    init_params.stream_id = 0;
+    init_params.stream_priority = GpuStreamPriority::NORMAL;
+    init_params.attribs = std::vector<int>();
+    init_params.active_url = GURL();
+    init_params.gpu_preference = gfx::PreferIntegratedGpu;
+    bool succeeded = false;
+    HandleMessage(channel, new GpuChannelMsg_CreateCommandBuffer(
+                               kNullSurfaceHandle, gfx::Size(1, 1), init_params,
+                               kSharedRouteId, &succeeded));
+    EXPECT_TRUE(succeeded);
+  }
+  EXPECT_TRUE(channel->LookupCommandBuffer(kSharedRouteId));
+
+  // Initialize the command buffer.
+  {
+    SCOPED_TRACE("kSharedRouteId::Initialize");
+    base::SharedMemory shmem;
+    shmem.CreateAnonymous(10);
+    base::SharedMemoryHandle shmem_handle;
+    shmem.ShareToProcess(base::GetCurrentProcessHandle(), &shmem_handle);
+
+    gpu::Capabilities capabilities;
+    bool succeeded = false;
+    HandleMessage(channel,
+                  new GpuCommandBufferMsg_Initialize(
+                      kSharedRouteId, shmem_handle, &succeeded, &capabilities));
+    EXPECT_TRUE(succeeded);
+  }
+
+  // This context shares with the first one, this should be possible.
+  int32_t kFriendlyRouteId = 2;
+  {
+    SCOPED_TRACE("kFriendlyRouteId");
+    GPUCreateCommandBufferConfig init_params;
+    init_params.share_group_id = kSharedRouteId;
+    init_params.stream_id = 0;
+    init_params.stream_priority = GpuStreamPriority::NORMAL;
+    init_params.attribs = std::vector<int>();
+    init_params.active_url = GURL();
+    init_params.gpu_preference = gfx::PreferIntegratedGpu;
+    bool succeeded = false;
+    HandleMessage(channel, new GpuChannelMsg_CreateCommandBuffer(
+                               kNullSurfaceHandle, gfx::Size(1, 1), init_params,
+                               kFriendlyRouteId, &succeeded));
+    EXPECT_TRUE(succeeded);
+  }
+  EXPECT_TRUE(channel->LookupCommandBuffer(kFriendlyRouteId));
+
+  // The shared context is lost.
+  channel->LookupCommandBuffer(kSharedRouteId)->MarkContextLost();
+
+  // Meanwhile another context is being made pointing to the shared one. This
+  // should fail.
+  int32_t kAnotherRouteId = 3;
+  {
+    SCOPED_TRACE("kAnotherRouteId");
+    GPUCreateCommandBufferConfig init_params;
+    init_params.share_group_id = kSharedRouteId;
+    init_params.stream_id = 0;
+    init_params.stream_priority = GpuStreamPriority::NORMAL;
+    init_params.attribs = std::vector<int>();
+    init_params.active_url = GURL();
+    init_params.gpu_preference = gfx::PreferIntegratedGpu;
+    bool succeeded = false;
+    HandleMessage(channel, new GpuChannelMsg_CreateCommandBuffer(
+                               kNullSurfaceHandle, gfx::Size(1, 1), init_params,
+                               kAnotherRouteId, &succeeded));
+    EXPECT_FALSE(succeeded);
+  }
+  EXPECT_FALSE(channel->LookupCommandBuffer(kAnotherRouteId));
+
+  // The lost context is still around though (to verify the failure happened due
+  // to the shared context being lost, not due to it being deleted).
+  EXPECT_TRUE(channel->LookupCommandBuffer(kSharedRouteId));
+
+  // Destroy the command buffer we initialized before destoying GL.
+  HandleMessage(channel,
+                new GpuChannelMsg_DestroyCommandBuffer(kSharedRouteId));
+  gfx::MockGLInterface::SetGLInterface(nullptr);
+  gfx::ClearGLBindings();
+}
+
 }  // namespace gpu
diff --git a/gpu/skia_bindings/BUILD.gn b/gpu/skia_bindings/BUILD.gn
index 3205a4a..f9d96c3 100644
--- a/gpu/skia_bindings/BUILD.gn
+++ b/gpu/skia_bindings/BUILD.gn
@@ -6,6 +6,8 @@
   sources = [
     "gl_bindings_skia_cmd_buffer.cc",
     "gl_bindings_skia_cmd_buffer.h",
+    "grcontext_for_gles2_interface.cc",
+    "grcontext_for_gles2_interface.h",
   ]
   deps = [
     "//base",
diff --git a/content/common/gpu/client/grcontext_for_gles2_interface.cc b/gpu/skia_bindings/grcontext_for_gles2_interface.cc
similarity index 85%
rename from content/common/gpu/client/grcontext_for_gles2_interface.cc
rename to gpu/skia_bindings/grcontext_for_gles2_interface.cc
index cebdfd77..57a68f9 100644
--- a/content/common/gpu/client/grcontext_for_gles2_interface.cc
+++ b/gpu/skia_bindings/grcontext_for_gles2_interface.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 "content/common/gpu/client/grcontext_for_gles2_interface.h"
+#include "gpu/skia_bindings/grcontext_for_gles2_interface.h"
 
 #include <stddef.h>
 #include <string.h>
@@ -16,14 +16,14 @@
 #include "third_party/skia/include/gpu/GrContext.h"
 #include "third_party/skia/include/gpu/gl/GrGLInterface.h"
 
-namespace content {
+namespace skia_bindings {
 
 GrContextForGLES2Interface::GrContextForGLES2Interface(
     gpu::gles2::GLES2Interface* gl) {
   sk_sp<GrGLInterface> interface(
       skia_bindings::CreateGLES2InterfaceBindings(gl));
-  gr_context_ =
-      sk_sp<GrContext>(GrContext::Create(kOpenGL_GrBackend,
+  gr_context_ = sk_sp<GrContext>(
+      GrContext::Create(kOpenGL_GrBackend,
                         // GrContext takes ownership of |interface|.
                         reinterpret_cast<GrBackendContext>(interface.get())));
   if (gr_context_) {
@@ -51,6 +51,11 @@
     gr_context_->abandonContext();
 }
 
+void GrContextForGLES2Interface::ResetContext(uint32_t state) {
+  if (gr_context_)
+    gr_context_->resetContext(state);
+}
+
 void GrContextForGLES2Interface::FreeGpuResources() {
   if (gr_context_) {
     TRACE_EVENT_INSTANT0("gpu", "GrContext::freeGpuResources",
@@ -59,4 +64,4 @@
   }
 }
 
-}  // namespace content
+}  // namespace skia_bindings
diff --git a/content/common/gpu/client/grcontext_for_gles2_interface.h b/gpu/skia_bindings/grcontext_for_gles2_interface.h
similarity index 75%
rename from content/common/gpu/client/grcontext_for_gles2_interface.h
rename to gpu/skia_bindings/grcontext_for_gles2_interface.h
index 354092a9..3813fb4 100644
--- a/content/common/gpu/client/grcontext_for_gles2_interface.h
+++ b/gpu/skia_bindings/grcontext_for_gles2_interface.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CONTENT_COMMON_GPU_CLIENT_GRCONTEXT_FOR_GLES2_INTERFACE_H_
-#define CONTENT_COMMON_GPU_CLIENT_GRCONTEXT_FOR_GLES2_INTERFACE_H_
+#ifndef GPU_SKIA_BINDINGS_GRCONTEXT_FOR_GLES2_INTERFACE_H_
+#define GPU_SKIA_BINDINGS_GRCONTEXT_FOR_GLES2_INTERFACE_H_
 
 #include "base/macros.h"
 #include "third_party/skia/include/core/SkRefCnt.h"
@@ -16,7 +16,7 @@
 }
 }
 
-namespace content {
+namespace skia_bindings {
 
 // This class binds an offscreen GrContext to an offscreen context3d. The
 // context3d is used by the GrContext so must be valid as long as this class
@@ -29,6 +29,7 @@
   GrContext* get() { return gr_context_.get(); }
 
   void OnLostContext();
+  void ResetContext(uint32_t state);
   void FreeGpuResources();
 
  private:
@@ -37,6 +38,6 @@
   DISALLOW_COPY_AND_ASSIGN(GrContextForGLES2Interface);
 };
 
-}  // namespace content
+}  // namespace skia_bindings
 
-#endif  // CONTENT_COMMON_GPU_CLIENT_GRCONTEXT_FOR_GLES2_INTERFACE_H_
+#endif  // GPU_SKIA_BINDINGS_GRCONTEXT_FOR_GLES2_INTERFACE_H_
diff --git a/gpu/skia_bindings/skia_bindings.gyp b/gpu/skia_bindings/skia_bindings.gyp
index 7c3cf6a..322a379 100644
--- a/gpu/skia_bindings/skia_bindings.gyp
+++ b/gpu/skia_bindings/skia_bindings.gyp
@@ -18,6 +18,8 @@
       'sources': [
         'gl_bindings_skia_cmd_buffer.cc',
         'gl_bindings_skia_cmd_buffer.h',
+        'grcontext_for_gles2_interface.cc',
+        'grcontext_for_gles2_interface.h',
       ],
     }
   ]
diff --git a/headless/lib/browser/headless_browser_context.cc b/headless/lib/browser/headless_browser_context.cc
index bf1dcb2..59e50ae2 100644
--- a/headless/lib/browser/headless_browser_context.cc
+++ b/headless/lib/browser/headless_browser_context.cc
@@ -36,6 +36,10 @@
     url_request_context_getter_ = std::move(url_request_context_getter);
   }
 
+  net::URLRequestContextGetter* url_request_context_getter() {
+    return url_request_context_getter_.get();
+  }
+
  private:
   scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
 
@@ -93,26 +97,6 @@
   return false;
 }
 
-net::URLRequestContextGetter* HeadlessBrowserContext::GetMediaRequestContext() {
-  return content::BrowserContext::GetDefaultStoragePartition(this)->
-      GetURLRequestContext();
-}
-
-net::URLRequestContextGetter*
-HeadlessBrowserContext::GetMediaRequestContextForRenderProcess(
-    int renderer_child_id) {
-  return content::BrowserContext::GetDefaultStoragePartition(this)->
-      GetURLRequestContext();
-}
-
-net::URLRequestContextGetter*
-HeadlessBrowserContext::GetMediaRequestContextForStoragePartition(
-    const base::FilePath& partition_path,
-    bool in_memory) {
-  return content::BrowserContext::GetDefaultStoragePartition(this)->
-      GetURLRequestContext();
-}
-
 content::ResourceContext* HeadlessBrowserContext::GetResourceContext() {
   return resource_context_.get();
 }
@@ -176,6 +160,18 @@
   return nullptr;
 }
 
+net::URLRequestContextGetter*
+HeadlessBrowserContext::CreateMediaRequestContext() {
+  return resource_context_->url_request_context_getter();
+}
+
+net::URLRequestContextGetter*
+HeadlessBrowserContext::CreateMediaRequestContextForStoragePartition(
+    const base::FilePath& partition_path,
+    bool in_memory) {
+  return nullptr;
+}
+
 void HeadlessBrowserContext::SetOptionsForTesting(
     const HeadlessBrowser::Options& options) {
   options_ = options;
diff --git a/headless/lib/browser/headless_browser_context.h b/headless/lib/browser/headless_browser_context.h
index 663cbffd..865b3c7 100644
--- a/headless/lib/browser/headless_browser_context.h
+++ b/headless/lib/browser/headless_browser_context.h
@@ -27,12 +27,6 @@
       const base::FilePath& partition_path) override;
   base::FilePath GetPath() const override;
   bool IsOffTheRecord() const override;
-  net::URLRequestContextGetter* GetMediaRequestContext() override;
-  net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
-      int renderer_child_id) override;
-  net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
-      const base::FilePath& partition_path,
-      bool in_memory) override;
   content::ResourceContext* GetResourceContext() override;
   content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
   content::BrowserPluginGuestManager* GetGuestManager() override;
@@ -49,6 +43,10 @@
       bool in_memory,
       content::ProtocolHandlerMap* protocol_handlers,
       content::URLRequestInterceptorScopedVector request_interceptors) override;
+  net::URLRequestContextGetter* CreateMediaRequestContext() override;
+  net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
+      const base::FilePath& partition_path,
+      bool in_memory) override;
 
   const HeadlessBrowser::Options& options() const { return options_; }
   void SetOptionsForTesting(const HeadlessBrowser::Options& options);
diff --git a/ios/chrome/browser/experimental_flags.h b/ios/chrome/browser/experimental_flags.h
index ee80fcc7..a976492 100644
--- a/ios/chrome/browser/experimental_flags.h
+++ b/ios/chrome/browser/experimental_flags.h
@@ -15,9 +15,6 @@
 // Whether background crash report upload should generate a local notification.
 bool IsAlertOnBackgroundUploadEnabled();
 
-// Whether the new bookmark collection experience is enabled.
-bool IsBookmarkCollectionEnabled();
-
 // Whether the lru snapshot cache experiment is enabled.
 bool IsLRUSnapshotCacheEnabled();
 
diff --git a/ios/chrome/browser/experimental_flags.mm b/ios/chrome/browser/experimental_flags.mm
index 52a2801..5d516a3 100644
--- a/ios/chrome/browser/experimental_flags.mm
+++ b/ios/chrome/browser/experimental_flags.mm
@@ -36,10 +36,6 @@
       boolForKey:kEnableAlertOnBackgroundUpload];
 }
 
-bool IsBookmarkCollectionEnabled() {
-  return true;
-}
-
 bool IsLRUSnapshotCacheEnabled() {
   // Check if the experimental flag is forced on or off.
   base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
diff --git a/ios/web/web_state/ui/crw_web_controller+protected.h b/ios/web/web_state/ui/crw_web_controller+protected.h
index f004a56..261e42f 100644
--- a/ios/web/web_state/ui/crw_web_controller+protected.h
+++ b/ios/web/web_state/ui/crw_web_controller+protected.h
@@ -112,16 +112,6 @@
 #pragma mark Methods implemented by subclasses
 // Everything in this section must be implemented by subclasses.
 
-// If |contentView_| contains a web view, this is the web view it contains.
-// If not, it's nil.
-@property(nonatomic, readonly) WKWebView* webView;
-
-// The scroll view of |webView|.
-@property(nonatomic, readonly) UIScrollView* webScrollView;
-
-// The title of the page.
-@property(nonatomic, readonly) NSString* title;
-
 // Downloader for PassKit files. Lazy initialized.
 @property(nonatomic, readonly) CRWPassKitDownloader* passKitDownloader;
 
@@ -137,12 +127,6 @@
 
 - (CRWWebControllerPendingNavigationInfo*)pendingNavigationInfo;
 
-// Creates a web view if it's not yet created.
-- (void)ensureWebViewCreated;
-
-// Destroys the web view by setting webView property to nil.
-- (void)resetWebView;
-
 // Sets _documentURL to newURL, and updates any relevant state information.
 - (void)setDocumentURL:(const GURL&)newURL;
 
@@ -174,9 +158,6 @@
 - (void)applyWebViewScrollZoomScaleFromZoomState:
     (const web::PageZoomState&)zoomState;
 
-// Creates a web view with given |config|. No-op if web view is already created.
-- (void)ensureWebViewCreatedWithConfiguration:(WKWebViewConfiguration*)config;
-
 // Called when web controller receives a new message from the web page.
 - (void)didReceiveScriptMessage:(WKScriptMessage*)message;
 
@@ -231,6 +212,13 @@
 
 #pragma mark - Internal methods for use by subclasses
 
+// If |contentView_| contains a web view, this is the web view it contains.
+// If not, it's nil.
+@property(nonatomic, readonly) WKWebView* webView;
+
+// The scroll view of |webView|.
+@property(nonatomic, readonly) UIScrollView* webScrollView;
+
 // The web view's view of the current URL. During page transitions
 // this may not be the same as the session history's view of the current URL.
 // This method can change the state of the CRWWebController, as it will display
@@ -461,6 +449,15 @@
 // Extracts Referer value from WKNavigationAction request header.
 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action;
 
+// Loads POST request with body in |_wkWebView| by constructing an HTML page
+// that executes the request through JavaScript and replaces document with the
+// result.
+// Note that this approach includes multiple body encodings and decodings, plus
+// the data is passed to |_wkWebView| on main thread.
+// This is necessary because WKWebView ignores POST request body.
+// Workaround for https://bugs.webkit.org/show_bug.cgi?id=145410
+- (void)loadPOSTRequest:(NSMutableURLRequest*)request;
+
 @end
 
 #endif  // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_PROTECTED_H_
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index e435f22..a3dd7ee4 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -78,16 +78,20 @@
 #include "ios/web/web_state/frame_info.h"
 #import "ios/web/web_state/js/crw_js_early_script_manager.h"
 #import "ios/web/web_state/js/crw_js_plugin_placeholder_manager.h"
+#import "ios/web/web_state/js/crw_js_post_request_loader.h"
 #import "ios/web/web_state/js/crw_js_window_id_manager.h"
 #import "ios/web/web_state/page_viewport_state.h"
 #import "ios/web/web_state/ui/crw_context_menu_provider.h"
 #import "ios/web/web_state/ui/crw_swipe_recognizer_provider.h"
 #import "ios/web/web_state/ui/crw_web_controller+protected.h"
 #import "ios/web/web_state/ui/crw_web_controller_container_view.h"
+#import "ios/web/web_state/ui/crw_wk_script_message_router.h"
 #import "ios/web/web_state/ui/crw_wk_web_view_web_controller.h"
+#import "ios/web/web_state/ui/wk_web_view_configuration_provider.h"
 #import "ios/web/web_state/web_controller_observer_bridge.h"
 #include "ios/web/web_state/web_state_facade_delegate.h"
 #import "ios/web/web_state/web_state_impl.h"
+#import "ios/web/web_state/web_view_internal_creation_util.h"
 #import "ios/web/web_state/wk_web_view_security_util.h"
 #import "ios/web/webui/crw_web_ui_manager.h"
 #import "net/base/mac/url_conversions.h"
@@ -202,6 +206,8 @@
   base::WeakNSProtocol<id<CRWWebUserInterfaceDelegate>> _UIDelegate;
   base::WeakNSProtocol<id<CRWNativeContentProvider>> _nativeProvider;
   base::WeakNSProtocol<id<CRWSwipeRecognizerProvider>> _swipeRecognizerProvider;
+  // The WKWebView managed by this instance.
+  base::scoped_nsobject<WKWebView> _webView;
   // The CRWWebViewProxy is the wrapper to give components access to the
   // web view in a controlled and limited way.
   base::scoped_nsobject<CRWWebViewProxyImpl> _webViewProxy;
@@ -297,6 +303,8 @@
   BOOL _webProcessIsDead;
 
   std::unique_ptr<web::NewWindowInfo> _externalRequest;
+  // Object for loading POST requests with body.
+  base::scoped_nsobject<CRWJSPOSTRequestLoader> _POSTRequestLoader;
 
   // WebStateImpl instance associated with this CRWWebController, web controller
   // does not own this pointer.
@@ -377,12 +385,20 @@
 @property(nonatomic, readwrite) web::PageDisplayState pageDisplayState;
 // The currently displayed native controller, if any.
 @property(nonatomic, readwrite) id<CRWNativeContent> nativeController;
+// The title of the page.
+@property(nonatomic, readonly) NSString* title;
 // Activity indicator group ID for this web controller.
 @property(nonatomic, readonly) NSString* activityIndicatorGroupID;
 // Referrer for the current page; does not include the fragment.
 @property(nonatomic, readonly) NSString* currentReferrerString;
 // Identifier used for storing and retrieving certificates.
 @property(nonatomic, readonly) int certGroupID;
+// Dictionary where keys are the names of WKWebView properties and values are
+// selector names which should be called when a corresponding property has
+// changed. e.g. @{ @"URL" : @"webViewURLDidChange" } means that
+// -[self webViewURLDidChange] must be called every time when WKWebView.URL is
+// changed.
+@property(nonatomic, readonly) NSDictionary* WKWebViewObservers;
 // Removes the container view from the hierarchy and resets the ivar.
 - (void)resetContainerView;
 // Resets any state that is associated with a specific document object (e.g.,
@@ -398,6 +414,21 @@
 - (void)addPlaceholderOverlay;
 // Removes placeholder overlay.
 - (void)removePlaceholderOverlay;
+
+// Creates a web view if it's not yet created.
+- (void)ensureWebViewCreated;
+// Creates a web view with given |config|. No-op if web view is already created.
+- (void)ensureWebViewCreatedWithConfiguration:(WKWebViewConfiguration*)config;
+// Returns a new autoreleased web view created with given configuration.
+- (WKWebView*)createWebViewWithConfiguration:(WKWebViewConfiguration*)config;
+// Sets the value of the webView property, and performs its basic setup.
+- (void)setWebView:(WKWebView*)webView;
+// Destroys the web view by setting webView property to nil.
+- (void)resetWebView;
+// Returns the WKWebViewConfigurationProvider associated with the web
+// controller's BrowserState.
+- (web::WKWebViewConfigurationProvider&)webViewConfigurationProvider;
+
 // Returns |YES| if |url| should be loaded in a native view.
 - (BOOL)shouldLoadURLInNativeView:(const GURL&)url;
 // Loads the HTML into the page at the given URL.
@@ -571,6 +602,29 @@
              completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition,
                                          NSURLCredential*))completionHandler;
 
+// Called when WKWebView estimatedProgress has been changed.
+- (void)webViewEstimatedProgressDidChange;
+// Called when WKWebView certificateChain or hasOnlySecureContent property has
+// changed.
+- (void)webViewSecurityFeaturesDidChange;
+// Called when WKWebView loading state has been changed.
+- (void)webViewLoadingStateDidChange;
+// Called when WKWebView title has been changed.
+- (void)webViewTitleDidChange;
+// Called when WKWebView URL has been changed.
+- (void)webViewURLDidChange;
+// Returns YES if a KVO change to |newURL| could be a 'navigation' within the
+// document (hash change, pushState/replaceState, etc.). This should only be
+// used in the context of a URL KVO callback firing, and only if |isLoading| is
+// YES for the web view (since if it's not, no guesswork is needed).
+- (BOOL)isKVOChangePotentialSameDocumentNavigationToURL:(const GURL&)newURL;
+// Called when a non-document-changing URL change occurs. Updates the
+// _documentURL, and informs the superclass of the change.
+- (void)URLDidChangeWithoutDocumentChange:(const GURL&)URL;
+// Returns YES if there is currently a requested but uncommitted load for
+// |targetURL|.
+- (BOOL)isLoadRequestPendingForURL:(const GURL&)targetURL;
+
 // Handlers for JavaScript messages. |message| contains a JavaScript command and
 // data relevant to the message, and |context| contains contextual information
 // about web view state needed for some handlers.
@@ -870,6 +924,10 @@
   [self setNativeControllerWebUsageEnabled:_webUsageEnabled];
 }
 
+- (NSString*)title {
+  return [_webView title];
+}
+
 - (NSString*)activityIndicatorGroupID {
   return [NSString
       stringWithFormat:@"WKWebViewWebController.NetworkActivityIndicatorKey.%@",
@@ -884,6 +942,17 @@
   return self.webState->GetCertGroupId();
 }
 
+- (NSDictionary*)WKWebViewObservers {
+  return @{
+    @"certificateChain" : @"webViewSecurityFeaturesDidChange",
+    @"estimatedProgress" : @"webViewEstimatedProgressDidChange",
+    @"hasOnlySecureContent" : @"webViewSecurityFeaturesDidChange",
+    @"loading" : @"webViewLoadingStateDidChange",
+    @"title" : @"webViewTitleDidChange",
+    @"URL" : @"webViewURLDidChange",
+  };
+}
+
 // NativeControllerDelegate method, called to inform that title has changed.
 - (void)nativeContent:(id)content titleDidChange:(NSString*)title {
   // Responsiveness to delegate method was checked in setDelegate:.
@@ -1166,6 +1235,14 @@
   return [self currentNavigationURL];
 }
 
+- (WKWebView*)webView {
+  return _webView.get();
+}
+
+- (UIScrollView*)webScrollView {
+  return [_webView scrollView];
+}
+
 - (GURL)currentURL {
   web::URLVerificationTrustLevel trustLevel =
       web::URLVerificationTrustLevel::kNone;
@@ -4139,19 +4216,16 @@
 }
 
 - (void)didBlockPopupWithURL:(GURL)popupURL sourceURL:(GURL)sourceURL {
-  if (![self.delegate
-          respondsToSelector:@selector(webController:didBlockPopup:)]) {
-    return;
+  if ([_delegate respondsToSelector:@selector(webController:didBlockPopup:)]) {
+    base::WeakNSObject<CRWWebController> weakSelf(self);
+    dispatch_async(dispatch_get_main_queue(), ^{
+      [self queryPageReferrerPolicy:^(NSString* policy) {
+        [weakSelf didBlockPopupWithURL:popupURL
+                             sourceURL:sourceURL
+                        referrerPolicy:base::SysNSStringToUTF8(policy)];
+      }];
+    });
   }
-
-  base::WeakNSObject<CRWWebController> weakSelf(self);
-  dispatch_async(dispatch_get_main_queue(), ^{
-    [self queryPageReferrerPolicy:^(NSString* policy) {
-      [weakSelf didBlockPopupWithURL:popupURL
-                           sourceURL:sourceURL
-                      referrerPolicy:base::SysNSStringToUTF8(policy)];
-    }];
-  });
 }
 
 - (BOOL)isPutativeMainFrameRequest:(NSURLRequest*)request
@@ -4323,6 +4397,98 @@
   [self loadCancelled];
 }
 
+- (void)ensureWebViewCreated {
+  WKWebViewConfiguration* config =
+      [self webViewConfigurationProvider].GetWebViewConfiguration();
+  [self ensureWebViewCreatedWithConfiguration:config];
+}
+
+- (void)ensureWebViewCreatedWithConfiguration:(WKWebViewConfiguration*)config {
+  if (!_webView) {
+    [self setWebView:[self createWebViewWithConfiguration:config]];
+    // Notify super class about created web view. -webViewDidChange is not
+    // called from -setWebView:scriptMessageRouter: as the latter used in unit
+    // tests with fake web view, which cannot be added to view hierarchy.
+    [self webViewDidChange];
+  }
+}
+
+- (WKWebView*)createWebViewWithConfiguration:(WKWebViewConfiguration*)config {
+  return [web::CreateWKWebView(CGRectZero, config,
+                               self.webStateImpl->GetBrowserState(),
+                               [self useDesktopUserAgent]) autorelease];
+}
+
+- (void)setWebView:(WKWebView*)webView {
+  DCHECK_NE(_webView.get(), webView);
+
+  // Unwind the old web view.
+  // TODO(eugenebut): Remove CRWWKScriptMessageRouter once crbug.com/543374 is
+  // fixed.
+  CRWWKScriptMessageRouter* messageRouter =
+      [self webViewConfigurationProvider].GetScriptMessageRouter();
+  if (_webView) {
+    [messageRouter removeAllScriptMessageHandlersForWebView:_webView];
+  }
+  [_webView setNavigationDelegate:nil];
+  [_webView setUIDelegate:nil];
+  for (NSString* keyPath in self.WKWebViewObservers) {
+    [_webView removeObserver:self forKeyPath:keyPath];
+  }
+  [self clearActivityIndicatorTasks];
+
+  _webView.reset([webView retain]);
+
+  // Set up the new web view.
+  if (webView) {
+    base::WeakNSObject<CRWWebController> weakSelf(self);
+    void (^messageHandler)(WKScriptMessage*) = ^(WKScriptMessage* message) {
+      [weakSelf didReceiveScriptMessage:message];
+    };
+    [messageRouter setScriptMessageHandler:messageHandler
+                                      name:kScriptMessageName
+                                   webView:webView];
+    [messageRouter setScriptMessageHandler:messageHandler
+                                      name:kScriptImmediateName
+                                   webView:webView];
+  }
+  [_webView setNavigationDelegate:self];
+  [_webView setUIDelegate:self];
+  for (NSString* keyPath in self.WKWebViewObservers) {
+    [_webView addObserver:self forKeyPath:keyPath options:0 context:nullptr];
+  }
+  [self clearInjectedScriptManagers];
+  [self setDocumentURL:[self defaultURL]];
+}
+
+- (void)resetWebView {
+  [self setWebView:nil];
+}
+
+- (void)loadPOSTRequest:(NSMutableURLRequest*)request {
+  if (!_POSTRequestLoader) {
+    _POSTRequestLoader.reset([[CRWJSPOSTRequestLoader alloc] init]);
+  }
+
+  CRWWKScriptMessageRouter* messageRouter =
+      [self webViewConfigurationProvider].GetScriptMessageRouter();
+
+  [_POSTRequestLoader loadPOSTRequest:request
+                            inWebView:_webView
+                        messageRouter:messageRouter
+                    completionHandler:^(NSError* loadError) {
+                      if (loadError)
+                        [self handleLoadError:loadError inMainFrame:YES];
+                      else
+                        self.webStateImpl->SetContentsMimeType("text/html");
+                    }];
+}
+
+- (web::WKWebViewConfigurationProvider&)webViewConfigurationProvider {
+  web::BrowserState* browserState = self.webStateImpl->GetBrowserState();
+  return web::WKWebViewConfigurationProvider::FromBrowserState(browserState);
+}
+
 - (void)loadHTML:(NSString*)HTML forURL:(const GURL&)URL {
   // Remove the transient content view.
   [self clearTransientContentView];
@@ -4777,13 +4943,213 @@
 }
 
 #pragma mark -
+#pragma mark KVO Observation
+
+- (void)observeValueForKeyPath:(NSString*)keyPath
+                      ofObject:(id)object
+                        change:(NSDictionary*)change
+                       context:(void*)context {
+  NSString* dispatcherSelectorName = self.WKWebViewObservers[keyPath];
+  DCHECK(dispatcherSelectorName);
+  if (dispatcherSelectorName)
+    [self performSelector:NSSelectorFromString(dispatcherSelectorName)];
+}
+
+- (void)webViewEstimatedProgressDidChange {
+  if ([self.delegate
+          respondsToSelector:@selector(webController:didUpdateProgress:)]) {
+    [self.delegate webController:self
+               didUpdateProgress:[self.webView estimatedProgress]];
+  }
+}
+
+- (void)webViewSecurityFeaturesDidChange {
+  if (self.loadPhase == web::LOAD_REQUESTED) {
+    // Do not update SSL Status for pending load. It will be updated in
+    // |webView:didCommitNavigation:| callback.
+    return;
+  }
+  [self updateSSLStatusForCurrentNavigationItem];
+}
+
+- (void)webViewLoadingStateDidChange {
+  if ([self.webView isLoading]) {
+    [self addActivityIndicatorTask];
+  } else {
+    [self clearActivityIndicatorTasks];
+    if ([self currentNavItem] &&
+        [self currentBackForwardListItemHolder]->navigation_type() ==
+            WKNavigationTypeBackForward) {
+      // A fast back/forward may not call |webView:didFinishNavigation:|, so
+      // finishing the navigation should be signalled explicitly.
+      [self didFinishNavigation];
+    }
+  }
+}
+
+- (void)webViewTitleDidChange {
+  // WKWebView's title becomes empty when the web process dies; ignore that
+  // update.
+  if (self.webProcessIsDead) {
+    DCHECK_EQ(self.title.length, 0U);
+    return;
+  }
+
+  if ([self.delegate
+          respondsToSelector:@selector(webController:titleDidChange:)]) {
+    DCHECK(self.title);
+    [self.delegate webController:self titleDidChange:self.title];
+  }
+}
+
+- (void)webViewURLDidChange {
+  // TODO(stuartmorgan): Determine if there are any cases where this still
+  // happens, and if so whether anything should be done when it does.
+  if (![self.webView URL]) {
+    DVLOG(1) << "Received nil URL callback";
+    return;
+  }
+  GURL URL(net::GURLWithNSURL([self.webView URL]));
+  // URL changes happen at three points:
+  // 1) When a load starts; at this point, the load is provisional, and
+  //    it should be ignored until it's committed, since the document/window
+  //    objects haven't changed yet.
+  // 2) When a non-document-changing URL change happens (hash change,
+  //    history.pushState, etc.). This URL change happens instantly, so should
+  //    be reported.
+  // 3) When a navigation error occurs after provisional navigation starts,
+  //    the URL reverts to the previous URL without triggering a new navigation.
+  //
+  // If |isLoading| is NO, then it must be case 2 or 3. If the last committed
+  // URL (_documentURL) matches the current URL, assume that it is a revert from
+  // navigation failure and do nothing. If the URL does not match, assume it is
+  // a non-document-changing URL change, and handle accordingly.
+  //
+  // If |isLoading| is YES, then it could either be case 1, or it could be case
+  // 2 on a page that hasn't finished loading yet. If it's possible that it
+  // could be a same-page navigation (in which case there may not be any other
+  // callback about the URL having changed), then check the actual page URL via
+  // JavaScript. If the origin of the new URL matches the last committed URL,
+  // then check window.location.href, and if it matches, trust it. The origin
+  // check ensures that if a site somehow corrupts window.location.href it can't
+  // do a redirect to a slow-loading target page while it is still loading to
+  // spoof the origin. On a document-changing URL change, the
+  // window.location.href will match the previous URL at this stage, not the web
+  // view's current URL.
+  if (![self.webView isLoading]) {
+    if (self.documentURL == URL)
+      return;
+    [self URLDidChangeWithoutDocumentChange:URL];
+  } else if ([self isKVOChangePotentialSameDocumentNavigationToURL:URL]) {
+    [self.webView
+        evaluateJavaScript:@"window.location.href"
+         completionHandler:^(id result, NSError* error) {
+           // If the web view has gone away, or the location
+           // couldn't be retrieved, abort.
+           if (!self.webView || ![result isKindOfClass:[NSString class]]) {
+             return;
+           }
+           GURL JSURL([result UTF8String]);
+           // Check that window.location matches the new URL. If
+           // it does not, this is a document-changing URL change as
+           // the window location would not have changed to the new
+           // URL when the script was called.
+           BOOL windowLocationMatchesNewURL = JSURL == URL;
+           // Re-check origin in case navigaton has occured since
+           // start of JavaScript evaluation.
+           BOOL newURLOriginMatchesDocumentURLOrigin =
+               self.documentURL.GetOrigin() == URL.GetOrigin();
+           // Check that the web view URL still matches the new URL.
+           // TODO(crbug.com/563568): webViewURLMatchesNewURL check
+           // may drop same document URL changes if pending URL
+           // change occurs immediately after. Revisit heuristics to
+           // prevent this.
+           BOOL webViewURLMatchesNewURL =
+               net::GURLWithNSURL([self.webView URL]) == URL;
+           // Check that the new URL is different from the current
+           // document URL. If not, URL change should not be reported.
+           BOOL URLDidChangeFromDocumentURL = URL != self.documentURL;
+           if (windowLocationMatchesNewURL &&
+               newURLOriginMatchesDocumentURLOrigin &&
+               webViewURLMatchesNewURL && URLDidChangeFromDocumentURL) {
+             [self URLDidChangeWithoutDocumentChange:URL];
+           }
+         }];
+  }
+}
+
+- (BOOL)isKVOChangePotentialSameDocumentNavigationToURL:(const GURL&)newURL {
+  DCHECK([self.webView isLoading]);
+  // If the origin changes, it can't be same-document.
+  if (self.documentURL.GetOrigin().is_empty() ||
+      self.documentURL.GetOrigin() != newURL.GetOrigin()) {
+    return NO;
+  }
+  if (self.loadPhase == web::LOAD_REQUESTED) {
+    // Normally LOAD_REQUESTED indicates that this is a regular, pending
+    // navigation, but it can also happen during a fast-back navigation across
+    // a hash change, so that case is potentially a same-document navigation.
+    return web::GURLByRemovingRefFromGURL(newURL) ==
+           web::GURLByRemovingRefFromGURL(self.documentURL);
+  }
+  // If it passes all the checks above, it might be (but there's no guarantee
+  // that it is).
+  return YES;
+}
+
+- (void)URLDidChangeWithoutDocumentChange:(const GURL&)newURL {
+  DCHECK(newURL == net::GURLWithNSURL([self.webView URL]));
+  DCHECK_EQ(self.documentURL.host(), newURL.host());
+  DCHECK(self.documentURL != newURL);
+
+  // If called during window.history.pushState or window.history.replaceState
+  // JavaScript evaluation, only update the document URL. This callback does not
+  // have any information about the state object and cannot create (or edit) the
+  // navigation entry for this page change. Web controller will sync with
+  // history changes when a window.history.didPushState or
+  // window.history.didReplaceState message is received, which should happen in
+  // the next runloop.
+  //
+  // Otherwise, simulate the whole delegate flow for a load (since the
+  // superclass currently doesn't have a clean separation between URL changes
+  // and document changes). Note that the order of these calls is important:
+  // registering a load request logically comes before updating the document
+  // URL, but also must come first since it uses state that is reset on URL
+  // changes.
+  if (!self.changingHistoryState) {
+    // If this wasn't a previously-expected load (e.g., certain back/forward
+    // navigations), register the load request.
+    if (![self isLoadRequestPendingForURL:newURL])
+      [self registerLoadRequest:newURL];
+  }
+
+  [self setDocumentURL:newURL];
+
+  if (!self.changingHistoryState) {
+    [self didStartLoadingURL:self.documentURL updateHistory:YES];
+    [self updateSSLStatusForCurrentNavigationItem];
+    [self didFinishNavigation];
+  }
+}
+
+- (BOOL)isLoadRequestPendingForURL:(const GURL&)targetURL {
+  if (self.loadPhase != web::LOAD_REQUESTED)
+    return NO;
+
+  web::NavigationItem* pendingItem =
+      self.webState->GetNavigationManager()->GetPendingItem();
+  return pendingItem && pendingItem->GetURL() == targetURL;
+}
+
+#pragma mark -
 #pragma mark Testing-Only Methods
 
-- (void)injectWebViewContentView:(id)webViewContentView {
+- (void)injectWebViewContentView:(CRWWebViewContentView*)webViewContentView {
   [self removeWebViewAllowingCachedReconstruction:NO];
 
   _lastRegisteredRequestURL = _defaultURL;
   [self.containerView displayWebViewContentView:webViewContentView];
+  [self setWebView:static_cast<WKWebView*>(webViewContentView.webView)];
 }
 
 - (void)resetInjectedWebViewContentView {
diff --git a/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm b/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
index 21336698..ad2bf71 100644
--- a/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
+++ b/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
@@ -31,14 +31,11 @@
 #import "ios/web/public/web_state/ui/crw_web_view_content_view.h"
 #import "ios/web/web_state/error_translation_util.h"
 #include "ios/web/web_state/frame_info.h"
-#import "ios/web/web_state/js/crw_js_post_request_loader.h"
 #import "ios/web/web_state/js/crw_js_window_id_manager.h"
 #import "ios/web/web_state/ui/crw_web_controller+protected.h"
 #import "ios/web/web_state/ui/crw_wk_script_message_router.h"
 #import "ios/web/web_state/ui/web_view_js_utils.h"
-#import "ios/web/web_state/ui/wk_web_view_configuration_provider.h"
 #import "ios/web/web_state/web_state_impl.h"
-#import "ios/web/web_state/web_view_internal_creation_util.h"
 #import "ios/web/web_state/wk_web_view_security_util.h"
 #import "net/base/mac/url_conversions.h"
 #include "net/cert/x509_certificate.h"
@@ -64,109 +61,27 @@
 #pragma mark -
 
 @interface CRWWKWebViewWebController () {
-  // The WKWebView managed by this instance.
-  base::scoped_nsobject<WKWebView> _wkWebView;
-
   // The actual URL of the document object (i.e., the last committed URL).
   // TODO(crbug.com/549616): Remove this in favor of just updating the
   // navigation manager and treating that as authoritative. For now, this allows
   // sharing the flow that's currently in the superclass.
   GURL _documentURL;
 
-  // Object for loading POST requests with body.
-  base::scoped_nsobject<CRWJSPOSTRequestLoader> _POSTRequestLoader;
-
   // YES if the user has interacted with the content area since the last URL
   // change.
   BOOL _interactionRegisteredSinceLastURLChange;
 }
 
-// Dictionary where keys are the names of WKWebView properties and values are
-// selector names which should be called when a corresponding property has
-// changed. e.g. @{ @"URL" : @"webViewURLDidChange" } means that
-// -[self webViewURLDidChange] must be called every time when WKWebView.URL is
-// changed.
-@property(nonatomic, readonly) NSDictionary* wkWebViewObservers;
-
-// Loads POST request with body in |_wkWebView| by constructing an HTML page
-// that executes the request through JavaScript and replaces document with the
-// result.
-// Note that this approach includes multiple body encodings and decodings, plus
-// the data is passed to |_wkWebView| on main thread.
-// This is necessary because WKWebView ignores POST request body.
-// Workaround for https://bugs.webkit.org/show_bug.cgi?id=145410
-- (void)loadPOSTRequest:(NSMutableURLRequest*)request;
-
-// Returns the WKWebViewConfigurationProvider associated with the web
-// controller's BrowserState.
-- (web::WKWebViewConfigurationProvider&)webViewConfigurationProvider;
-
-// Returns a new autoreleased web view created with given configuration.
-- (WKWebView*)createWebViewWithConfiguration:(WKWebViewConfiguration*)config;
-
-// Sets the value of the webView property, and performs its basic setup.
-- (void)setWebView:(WKWebView*)webView;
-
 // Returns YES if the given WKBackForwardListItem is valid to use for
 // navigation.
 - (BOOL)isBackForwardListItemValid:(WKBackForwardListItem*)item;
 
-// Returns YES if a KVO change to |newURL| could be a 'navigation' within the
-// document (hash change, pushState/replaceState, etc.). This should only be
-// used in the context of a URL KVO callback firing, and only if |isLoading| is
-// YES for the web view (since if it's not, no guesswork is needed).
-- (BOOL)isKVOChangePotentialSameDocumentNavigationToURL:(const GURL&)newURL;
-
-// Called when a non-document-changing URL change occurs. Updates the
-// _documentURL, and informs the superclass of the change.
-- (void)URLDidChangeWithoutDocumentChange:(const GURL&)URL;
-
-// Returns YES if there is currently a requested but uncommitted load for
-// |targetURL|.
-- (BOOL)isLoadRequestPendingForURL:(const GURL&)targetURL;
-
-// Called when WKWebView estimatedProgress has been changed.
-- (void)webViewEstimatedProgressDidChange;
-
-// Called when WKWebView certificateChain or hasOnlySecureContent property has
-// changed.
-- (void)webViewSecurityFeaturesDidChange;
-
-// Called when WKWebView loading state has been changed.
-- (void)webViewLoadingStateDidChange;
-
-// Called when WKWebView title has been changed.
-- (void)webViewTitleDidChange;
-
-// Called when WKWebView URL has been changed.
-- (void)webViewURLDidChange;
-
 @end
 
 @implementation CRWWKWebViewWebController
 
-#pragma mark -
-#pragma mark Testing-Only Methods
-
-- (void)injectWebViewContentView:(CRWWebViewContentView*)webViewContentView {
-  [super injectWebViewContentView:webViewContentView];
-  [self setWebView:static_cast<WKWebView*>(webViewContentView.webView)];
-}
-
 #pragma mark - Protected property implementations
 
-- (WKWebView*)webView {
-  return _wkWebView.get();
-}
-
-- (UIScrollView*)webScrollView {
-  return [_wkWebView scrollView];
-}
-
-- (NSString*)title {
-  return [_wkWebView title];
-}
-
 - (GURL)documentURL {
   return _documentURL;
 }
@@ -184,16 +99,6 @@
 
 #pragma mark Protected method implementations
 
-- (void)ensureWebViewCreated {
-  WKWebViewConfiguration* config =
-      [self webViewConfigurationProvider].GetWebViewConfiguration();
-  [self ensureWebViewCreatedWithConfiguration:config];
-}
-
-- (void)resetWebView {
-  [self setWebView:nil];
-}
-
 - (GURL)webURLWithTrustLevel:(web::URLVerificationTrustLevel*)trustLevel {
   DCHECK(trustLevel);
   *trustLevel = web::URLVerificationTrustLevel::kAbsolute;
@@ -207,7 +112,7 @@
 // non-HTML contents (e.g. PDF documents).
 - (web::WebViewDocumentType)webViewDocumentType {
   // This happens during tests.
-  if (!_wkWebView) {
+  if (!self.webView) {
     return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
   }
 
@@ -278,10 +183,10 @@
     [self registerLoadRequest:[self currentNavigationURL]
                      referrer:[self currentSessionEntryReferrer]
                    transition:[self currentTransition]];
-    if ([self currentNavigationURL] == net::GURLWithNSURL([_wkWebView URL])) {
-      [_wkWebView reload];
+    if ([self currentNavigationURL] == net::GURLWithNSURL([self.webView URL])) {
+      [self.webView reload];
     } else {
-      [_wkWebView goToBackForwardListItem:holder->back_forward_list_item()];
+      [self.webView goToBackForwardListItem:holder->back_forward_list_item()];
     }
   };
 
@@ -319,7 +224,7 @@
 }
 
 - (void)abortWebLoad {
-  [_wkWebView stopLoading];
+  [self.webView stopLoading];
   [self.pendingNavigationInfo setCancelled:YES];
 }
 
@@ -349,100 +254,6 @@
 
 #pragma mark Private methods
 
-- (NSDictionary*)wkWebViewObservers {
-  return @{
-    @"certificateChain" : @"webViewSecurityFeaturesDidChange",
-    @"estimatedProgress" : @"webViewEstimatedProgressDidChange",
-    @"hasOnlySecureContent" : @"webViewSecurityFeaturesDidChange",
-    @"loading" : @"webViewLoadingStateDidChange",
-    @"title" : @"webViewTitleDidChange",
-    @"URL" : @"webViewURLDidChange",
-  };
-}
-
-- (void)loadPOSTRequest:(NSMutableURLRequest*)request {
-  if (!_POSTRequestLoader) {
-    _POSTRequestLoader.reset([[CRWJSPOSTRequestLoader alloc] init]);
-  }
-
-  CRWWKScriptMessageRouter* messageRouter =
-      [self webViewConfigurationProvider].GetScriptMessageRouter();
-
-  [_POSTRequestLoader loadPOSTRequest:request
-                            inWebView:_wkWebView
-                        messageRouter:messageRouter
-                    completionHandler:^(NSError* loadError) {
-                      if (loadError)
-                        [self handleLoadError:loadError inMainFrame:YES];
-                      else
-                        self.webStateImpl->SetContentsMimeType("text/html");
-                    }];
-}
-
-- (web::WKWebViewConfigurationProvider&)webViewConfigurationProvider {
-  DCHECK(self.webStateImpl);
-  web::BrowserState* browserState = self.webStateImpl->GetBrowserState();
-  return web::WKWebViewConfigurationProvider::FromBrowserState(browserState);
-}
-
-- (void)ensureWebViewCreatedWithConfiguration:(WKWebViewConfiguration*)config {
-  if (!_wkWebView) {
-    [self setWebView:[self createWebViewWithConfiguration:config]];
-    // Notify super class about created web view. -webViewDidChange is not
-    // called from -setWebView:scriptMessageRouter: as the latter used in unit
-    // tests with fake web view, which cannot be added to view hierarchy.
-    [self webViewDidChange];
-  }
-}
-
-- (WKWebView*)createWebViewWithConfiguration:(WKWebViewConfiguration*)config {
-  return [web::CreateWKWebView(CGRectZero, config,
-                               self.webStateImpl->GetBrowserState(),
-                               [self useDesktopUserAgent]) autorelease];
-}
-
-- (void)setWebView:(WKWebView*)webView {
-  DCHECK_NE(_wkWebView.get(), webView);
-
-  // Unwind the old web view.
-  // TODO(eugenebut): Remove CRWWKScriptMessageRouter once crbug.com/543374 is
-  // fixed.
-  CRWWKScriptMessageRouter* messageRouter =
-      [self webViewConfigurationProvider].GetScriptMessageRouter();
-  if (_wkWebView) {
-    [messageRouter removeAllScriptMessageHandlersForWebView:_wkWebView];
-  }
-  [_wkWebView setNavigationDelegate:nil];
-  [_wkWebView setUIDelegate:nil];
-  for (NSString* keyPath in self.wkWebViewObservers) {
-    [_wkWebView removeObserver:self forKeyPath:keyPath];
-  }
-  [self clearActivityIndicatorTasks];
-
-  _wkWebView.reset([webView retain]);
-
-  // Set up the new web view.
-  if (webView) {
-    base::WeakNSObject<CRWWKWebViewWebController> weakSelf(self);
-    void (^messageHandler)(WKScriptMessage*) = ^(WKScriptMessage* message) {
-      [weakSelf didReceiveScriptMessage:message];
-    };
-    [messageRouter setScriptMessageHandler:messageHandler
-                                      name:kScriptMessageName
-                                   webView:webView];
-    [messageRouter setScriptMessageHandler:messageHandler
-                                      name:kScriptImmediateName
-                                   webView:webView];
-  }
-  [_wkWebView setNavigationDelegate:self];
-  [_wkWebView setUIDelegate:self];
-  for (NSString* keyPath in self.wkWebViewObservers) {
-    [_wkWebView addObserver:self forKeyPath:keyPath options:0 context:nullptr];
-  }
-  [self clearInjectedScriptManagers];
-  [self setDocumentURL:[self defaultURL]];
-}
-
 - (void)setDocumentURL:(const GURL&)newURL {
   if (newURL != _documentURL) {
     _documentURL = newURL;
@@ -453,7 +264,7 @@
 - (BOOL)isBackForwardListItemValid:(WKBackForwardListItem*)item {
   // The current back-forward list item MUST be in the WKWebView's back-forward
   // list to be valid.
-  WKBackForwardList* list = [_wkWebView backForwardList];
+  WKBackForwardList* list = [self.webView backForwardList];
   return list.currentItem == item ||
          [list.forwardList indexOfObject:item] != NSNotFound ||
          [list.backList indexOfObject:item] != NSNotFound;
@@ -471,69 +282,6 @@
     [self.delegate webControllerWebProcessDidCrash:self];
 }
 
-- (BOOL)isKVOChangePotentialSameDocumentNavigationToURL:(const GURL&)newURL {
-  DCHECK([_wkWebView isLoading]);
-  // If the origin changes, it can't be same-document.
-  if (_documentURL.GetOrigin().is_empty() ||
-      _documentURL.GetOrigin() != newURL.GetOrigin()) {
-    return NO;
-  }
-  if (self.loadPhase == web::LOAD_REQUESTED) {
-    // Normally LOAD_REQUESTED indicates that this is a regular, pending
-    // navigation, but it can also happen during a fast-back navigation across
-    // a hash change, so that case is potentially a same-document navigation.
-    return web::GURLByRemovingRefFromGURL(newURL) ==
-           web::GURLByRemovingRefFromGURL(_documentURL);
-  }
-  // If it passes all the checks above, it might be (but there's no guarantee
-  // that it is).
-  return YES;
-}
-
-- (void)URLDidChangeWithoutDocumentChange:(const GURL&)newURL {
-  DCHECK(newURL == net::GURLWithNSURL([_wkWebView URL]));
-  DCHECK_EQ(_documentURL.host(), newURL.host());
-  DCHECK(_documentURL != newURL);
-
-  // If called during window.history.pushState or window.history.replaceState
-  // JavaScript evaluation, only update the document URL. This callback does not
-  // have any information about the state object and cannot create (or edit) the
-  // navigation entry for this page change. Web controller will sync with
-  // history changes when a window.history.didPushState or
-  // window.history.didReplaceState message is received, which should happen in
-  // the next runloop.
-  //
-  // Otherwise, simulate the whole delegate flow for a load (since the
-  // superclass currently doesn't have a clean separation between URL changes
-  // and document changes). Note that the order of these calls is important:
-  // registering a load request logically comes before updating the document
-  // URL, but also must come first since it uses state that is reset on URL
-  // changes.
-  if (!self.changingHistoryState) {
-    // If this wasn't a previously-expected load (e.g., certain back/forward
-    // navigations), register the load request.
-    if (![self isLoadRequestPendingForURL:newURL])
-      [self registerLoadRequest:newURL];
-  }
-
-  [self setDocumentURL:newURL];
-
-  if (!self.changingHistoryState) {
-    [self didStartLoadingURL:_documentURL updateHistory:YES];
-    [self updateSSLStatusForCurrentNavigationItem];
-    [self didFinishNavigation];
-  }
-}
-
-- (BOOL)isLoadRequestPendingForURL:(const GURL&)targetURL {
-  if (self.loadPhase != web::LOAD_REQUESTED)
-    return NO;
-
-  web::NavigationItem* pendingItem =
-      self.webState->GetNavigationManager()->GetPendingItem();
-  return pendingItem && pendingItem->GetURL() == targetURL;
-}
-
 #pragma mark -
 #pragma mark CRWWebViewScrollViewProxyObserver
 
@@ -555,141 +303,4 @@
        stringResultHandler:nil];
 }
 
-#pragma mark -
-#pragma mark KVO Observation
-
-- (void)observeValueForKeyPath:(NSString*)keyPath
-                      ofObject:(id)object
-                        change:(NSDictionary*)change
-                       context:(void*)context {
-  NSString* dispatcherSelectorName = self.wkWebViewObservers[keyPath];
-  DCHECK(dispatcherSelectorName);
-  if (dispatcherSelectorName)
-    [self performSelector:NSSelectorFromString(dispatcherSelectorName)];
-}
-
-- (void)webViewEstimatedProgressDidChange {
-  if ([self.delegate respondsToSelector:
-          @selector(webController:didUpdateProgress:)]) {
-    [self.delegate webController:self
-               didUpdateProgress:[_wkWebView estimatedProgress]];
-  }
-}
-
-- (void)webViewSecurityFeaturesDidChange {
-  if (self.loadPhase == web::LOAD_REQUESTED) {
-    // Do not update SSL Status for pending load. It will be updated in
-    // |webView:didCommitNavigation:| callback.
-    return;
-  }
-  [self updateSSLStatusForCurrentNavigationItem];
-}
-
-- (void)webViewLoadingStateDidChange {
-  if ([_wkWebView isLoading]) {
-    [self addActivityIndicatorTask];
-  } else {
-    [self clearActivityIndicatorTasks];
-    if ([self currentNavItem] &&
-        [self currentBackForwardListItemHolder]->navigation_type() ==
-            WKNavigationTypeBackForward) {
-      // A fast back/forward may not call |webView:didFinishNavigation:|, so
-      // finishing the navigation should be signalled explicitly.
-      [self didFinishNavigation];
-    }
-  }
-}
-
-- (void)webViewTitleDidChange {
-  // WKWebView's title becomes empty when the web process dies; ignore that
-  // update.
-  if (self.webProcessIsDead) {
-    DCHECK_EQ(self.title.length, 0U);
-    return;
-  }
-
-  if ([self.delegate respondsToSelector:
-          @selector(webController:titleDidChange:)]) {
-    DCHECK(self.title);
-    [self.delegate webController:self titleDidChange:self.title];
-  }
-}
-
-- (void)webViewURLDidChange {
-  // TODO(stuartmorgan): Determine if there are any cases where this still
-  // happens, and if so whether anything should be done when it does.
-  if (![_wkWebView URL]) {
-    DVLOG(1) << "Received nil URL callback";
-    return;
-  }
-  GURL url(net::GURLWithNSURL([_wkWebView URL]));
-  // URL changes happen at three points:
-  // 1) When a load starts; at this point, the load is provisional, and
-  //    it should be ignored until it's committed, since the document/window
-  //    objects haven't changed yet.
-  // 2) When a non-document-changing URL change happens (hash change,
-  //    history.pushState, etc.). This URL change happens instantly, so should
-  //    be reported.
-  // 3) When a navigation error occurs after provisional navigation starts,
-  //    the URL reverts to the previous URL without triggering a new navigation.
-  //
-  // If |isLoading| is NO, then it must be case 2 or 3. If the last committed
-  // URL (_documentURL) matches the current URL, assume that it is a revert from
-  // navigation failure and do nothing. If the URL does not match, assume it is
-  // a non-document-changing URL change, and handle accordingly.
-  //
-  // If |isLoading| is YES, then it could either be case 1, or it could be case
-  // 2 on a page that hasn't finished loading yet. If it's possible that it
-  // could be a same-page navigation (in which case there may not be any other
-  // callback about the URL having changed), then check the actual page URL via
-  // JavaScript. If the origin of the new URL matches the last committed URL,
-  // then check window.location.href, and if it matches, trust it. The origin
-  // check ensures that if a site somehow corrupts window.location.href it can't
-  // do a redirect to a slow-loading target page while it is still loading to
-  // spoof the origin. On a document-changing URL change, the
-  // window.location.href will match the previous URL at this stage, not the web
-  // view's current URL.
-  if (![_wkWebView isLoading]) {
-    if (_documentURL == url)
-      return;
-    [self URLDidChangeWithoutDocumentChange:url];
-  } else if ([self isKVOChangePotentialSameDocumentNavigationToURL:url]) {
-    [_wkWebView evaluateJavaScript:@"window.location.href"
-                 completionHandler:^(id result, NSError* error) {
-                     // If the web view has gone away, or the location
-                     // couldn't be retrieved, abort.
-                     if (!_wkWebView ||
-                         ![result isKindOfClass:[NSString class]]) {
-                       return;
-                     }
-                     GURL jsURL([result UTF8String]);
-                     // Check that window.location matches the new URL. If
-                     // it does not, this is a document-changing URL change as
-                     // the window location would not have changed to the new
-                     // URL when the script was called.
-                     BOOL windowLocationMatchesNewURL = jsURL == url;
-                     // Re-check origin in case navigaton has occured since
-                     // start of JavaScript evaluation.
-                     BOOL newURLOriginMatchesDocumentURLOrigin =
-                         _documentURL.GetOrigin() == url.GetOrigin();
-                     // Check that the web view URL still matches the new URL.
-                     // TODO(crbug.com/563568): webViewURLMatchesNewURL check
-                     // may drop same document URL changes if pending URL
-                     // change occurs immediately after. Revisit heuristics to
-                     // prevent this.
-                     BOOL webViewURLMatchesNewURL =
-                         net::GURLWithNSURL([_wkWebView URL]) == url;
-                     // Check that the new URL is different from the current
-                     // document URL. If not, URL change should not be reported.
-                     BOOL URLDidChangeFromDocumentURL = url != _documentURL;
-                     if (windowLocationMatchesNewURL &&
-                         newURLOriginMatchesDocumentURLOrigin &&
-                         webViewURLMatchesNewURL &&
-                         URLDidChangeFromDocumentURL) {
-                       [self URLDidChangeWithoutDocumentChange:url];
-                     }
-                 }];
-  }
-}
-
 @end
diff --git a/mash/BUILD.gn b/mash/BUILD.gn
index f1e1ec2b..42f43bd 100644
--- a/mash/BUILD.gn
+++ b/mash/BUILD.gn
@@ -12,6 +12,7 @@
   deps = [
     ":mash_unittests",
     "//components/leveldb",
+    "//mash/catalog_viewer",
     "//mash/example",
     "//mash/init",
     "//mash/login",
diff --git a/mash/catalog_viewer/BUILD.gn b/mash/catalog_viewer/BUILD.gn
new file mode 100644
index 0000000..cfe5428
--- /dev/null
+++ b/mash/catalog_viewer/BUILD.gn
@@ -0,0 +1,59 @@
+# 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("//build/config/ui.gni")
+import("//mojo/public/mojo_application.gni")
+import("//mojo/public/mojo_application_manifest.gni")
+import("//mojo/public/tools/bindings/mojom.gni")
+
+source_set("lib") {
+  sources = [
+    "catalog_viewer.cc",
+    "catalog_viewer.h",
+  ]
+
+  deps = [
+    "//base",
+    "//mojo/public/cpp/bindings",
+    "//services/catalog/public/interfaces",
+    "//services/shell/public/cpp",
+    "//services/shell/public/cpp:sources",
+    "//services/shell/public/interfaces",
+    "//services/tracing/public/cpp",
+    "//ui/resources",
+    "//ui/views",
+    "//ui/views/mus:for_mojo_application",
+  ]
+
+  data_deps = [
+    "//components/mus",
+  ]
+}
+
+mojo_native_application("catalog_viewer") {
+  sources = [
+    "main.cc",
+  ]
+
+  deps = [
+    ":lib",
+    "//base",
+    "//mojo/public/cpp/bindings",
+    "//services/shell/public/cpp",
+    "//services/shell/public/cpp:sources",
+    "//services/shell/public/interfaces",
+    "//ui/views/mus:for_mojo_application",
+  ]
+
+  resources = [ "$root_out_dir/views_mus_resources.pak" ]
+
+  data_deps = [
+    ":manifest",
+  ]
+}
+
+mojo_application_manifest("manifest") {
+  application_name = "catalog_viewer"
+  source = "manifest.json"
+}
diff --git a/mash/catalog_viewer/catalog_viewer.cc b/mash/catalog_viewer/catalog_viewer.cc
new file mode 100644
index 0000000..66027f1
--- /dev/null
+++ b/mash/catalog_viewer/catalog_viewer.cc
@@ -0,0 +1,186 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mash/catalog_viewer/catalog_viewer.h"
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/bind.h"
+#include "base/macros.h"
+#include "base/memory/ptr_util.h"
+#include "base/memory/weak_ptr.h"
+#include "base/strings/utf_string_conversions.h"
+#include "mojo/public/cpp/bindings/binding.h"
+#include "services/catalog/public/interfaces/catalog.mojom.h"
+#include "services/shell/public/cpp/connection.h"
+#include "services/shell/public/cpp/connector.h"
+#include "ui/base/models/table_model.h"
+#include "ui/base/resource/resource_bundle.h"
+#include "ui/resources/grit/ui_resources.h"
+#include "ui/views/background.h"
+#include "ui/views/controls/table/table_view.h"
+#include "ui/views/controls/table/table_view_observer.h"
+#include "ui/views/mus/aura_init.h"
+#include "ui/views/mus/window_manager_connection.h"
+#include "ui/views/widget/widget_delegate.h"
+
+namespace mash {
+namespace catalog_viewer {
+namespace {
+
+using shell::mojom::InstanceInfoPtr;
+
+class CatalogViewerContents : public views::WidgetDelegateView,
+                              public ui::TableModel {
+ public:
+  CatalogViewerContents(catalog::mojom::CatalogPtr catalog)
+      : catalog_(std::move(catalog)),
+        table_view_(nullptr),
+        table_view_parent_(nullptr),
+        observer_(nullptr),
+        weak_ptr_factory_(this) {
+    table_view_ = new views::TableView(this, GetColumns(), views::TEXT_ONLY,
+                                       false);
+    set_background(views::Background::CreateStandardPanelBackground());
+
+    table_view_parent_ = table_view_->CreateParentIfNecessary();
+    AddChildView(table_view_parent_);
+
+    catalog_->GetEntries(nullptr,
+                         base::Bind(&CatalogViewerContents::OnGotCatalogEntries,
+                                    weak_ptr_factory_.GetWeakPtr()));
+    // We don't want to show an empty UI so we just block until we have all the
+    // data.
+    catalog_.WaitForIncomingResponse();
+  }
+  ~CatalogViewerContents() override {
+    table_view_->SetModel(nullptr);
+    base::MessageLoop::current()->QuitWhenIdle();
+  }
+
+ private:
+  struct Entry {
+    Entry(const std::string& name, const std::string& url)
+        : name(name), url(url) {}
+    std::string name;
+    std::string url;
+  };
+
+
+  // Overridden from views::WidgetDelegate:
+  views::View* GetContentsView() override { return this; }
+  base::string16 GetWindowTitle() const override {
+    // TODO(beng): use resources.
+    return base::ASCIIToUTF16("Applications");
+  }
+  bool CanResize() const override { return true; }
+  bool CanMaximize() const override { return true; }
+  bool CanMinimize() const override { return true; }
+
+  gfx::ImageSkia GetWindowAppIcon() override {
+    // TODO(jamescook): Create a new .pak file for this app and make a custom
+    // icon, perhaps one that looks like the Chrome OS task viewer icon.
+    ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+    return *rb.GetImageSkiaNamed(IDR_NOTIFICATION_SETTINGS);
+  }
+
+  // Overridden from views::View:
+  void Layout() override {
+    gfx::Rect bounds = GetLocalBounds();
+    bounds.Inset(10, 10);
+    table_view_parent_->SetBoundsRect(bounds);
+  }
+
+  // Overridden from ui::TableModel:
+  int RowCount() override {
+    return static_cast<int>(entries_.size());
+  }
+  base::string16 GetText(int row, int column_id) override {
+    switch(column_id) {
+    case 0:
+      DCHECK(row < static_cast<int>(entries_.size()));
+      return base::UTF8ToUTF16(entries_[row].name);
+    case 1:
+      DCHECK(row < static_cast<int>(entries_.size()));
+      return base::UTF8ToUTF16(entries_[row].url);
+    default:
+      NOTREACHED();
+      break;
+    }
+    return base::string16();
+  }
+  void SetObserver(ui::TableModelObserver* observer) override {
+    observer_ = observer;
+  }
+
+  void OnGotCatalogEntries(
+      mojo::Map<mojo::String, catalog::mojom::CatalogEntryPtr> entries) {
+    entries_.clear();
+    for (auto& entry : entries)
+      entries_.push_back(Entry(entry.second->display_name, entry.first));
+    observer_->OnModelChanged();
+  }
+
+  static std::vector<ui::TableColumn> GetColumns() {
+    std::vector<ui::TableColumn> columns;
+
+    ui::TableColumn name_column;
+    name_column.id = 0;
+    // TODO(beng): use resources.
+    name_column.title = base::ASCIIToUTF16("Name");
+    name_column.width = -1;
+    name_column.percent = 0.4f;
+    name_column.sortable = true;
+    columns.push_back(name_column);
+
+    ui::TableColumn url_column;
+    url_column.id = 1;
+    // TODO(beng): use resources.
+    url_column.title = base::ASCIIToUTF16("URL");
+    url_column.width = -1;
+    url_column.percent = 0.4f;
+    url_column.sortable = true;
+    columns.push_back(url_column);
+
+    return columns;
+  }
+
+  catalog::mojom::CatalogPtr catalog_;
+
+  views::TableView* table_view_;
+  views::View* table_view_parent_;
+  ui::TableModelObserver* observer_;
+
+  std::vector<Entry> entries_;
+
+  base::WeakPtrFactory<CatalogViewerContents> weak_ptr_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(CatalogViewerContents);
+};
+
+}  // namespace
+
+CatalogViewer::CatalogViewer() {}
+CatalogViewer::~CatalogViewer() {}
+
+void CatalogViewer::Initialize(shell::Connector* connector,
+                               const shell::Identity& identity,
+                               uint32_t id) {
+  tracing_.Initialize(connector, identity.name());
+
+  aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
+  views::WindowManagerConnection::Create(connector);
+
+  catalog::mojom::CatalogPtr catalog;
+  connector->ConnectToInterface("mojo:catalog", &catalog);
+
+  views::Widget* window = views::Widget::CreateWindowWithContextAndBounds(
+      new CatalogViewerContents(std::move(catalog)), nullptr,
+      gfx::Rect(25, 25, 500, 600));
+  window->Show();
+}
+
+}  // namespace catalog_viewer
+}  // namespace mash
diff --git a/mash/catalog_viewer/catalog_viewer.h b/mash/catalog_viewer/catalog_viewer.h
new file mode 100644
index 0000000..36c4a2ff
--- /dev/null
+++ b/mash/catalog_viewer/catalog_viewer.h
@@ -0,0 +1,43 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MASH_CATALOG_VIEWER_CATALOG_VIEWER_H_
+#define MASH_CATALOG_VIEWER_CATALOG_VIEWER_H_
+
+#include <map>
+#include <memory>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "services/shell/public/cpp/shell_client.h"
+#include "services/tracing/public/cpp/tracing_impl.h"
+
+namespace views {
+class AuraInit;
+}
+
+namespace mash {
+namespace catalog_viewer {
+
+class CatalogViewer : public shell::ShellClient {
+ public:
+  CatalogViewer();
+  ~CatalogViewer() override;
+
+ private:
+  // shell::ShellClient:
+  void Initialize(shell::Connector* connector,
+                  const shell::Identity& identity,
+                  uint32_t id) override;
+
+  mojo::TracingImpl tracing_;
+  std::unique_ptr<views::AuraInit> aura_init_;
+
+  DISALLOW_COPY_AND_ASSIGN(CatalogViewer);
+};
+
+}  // namespace catalog_viewer
+}  // namespace mash
+
+#endif  // MASH_CATALOG_VIEWER_CATALOG_VIEWER_H_
diff --git a/mash/catalog_viewer/main.cc b/mash/catalog_viewer/main.cc
new file mode 100644
index 0000000..2703fe70
--- /dev/null
+++ b/mash/catalog_viewer/main.cc
@@ -0,0 +1,12 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mash/catalog_viewer/catalog_viewer.h"
+#include "mojo/public/c/system/main.h"
+#include "services/shell/public/cpp/application_runner.h"
+
+MojoResult MojoMain(MojoHandle shell_handle) {
+  shell::ApplicationRunner runner(new mash::catalog_viewer::CatalogViewer);
+  return runner.Run(shell_handle);
+}
diff --git a/mash/catalog_viewer/manifest.json b/mash/catalog_viewer/manifest.json
new file mode 100644
index 0000000..fb81a6e8
--- /dev/null
+++ b/mash/catalog_viewer/manifest.json
@@ -0,0 +1,5 @@
+{
+  "name": "mojo:catalog_viewer",
+  "display_name": "Catalog Viewer",
+  "capabilities": { "*": [ "*" ] }
+}
diff --git a/mash/shelf/public/interfaces/BUILD.gn b/mash/shelf/public/interfaces/BUILD.gn
index 3b73282..9d87ca48 100644
--- a/mash/shelf/public/interfaces/BUILD.gn
+++ b/mash/shelf/public/interfaces/BUILD.gn
@@ -7,6 +7,7 @@
 mojom("interfaces") {
   sources = [
     "shelf.mojom",
+    "shelf_constants.mojom",
   ]
 
   deps = [
diff --git a/mash/shelf/public/interfaces/shelf.mojom b/mash/shelf/public/interfaces/shelf.mojom
index befe2a6..3e7887b2 100644
--- a/mash/shelf/public/interfaces/shelf.mojom
+++ b/mash/shelf/public/interfaces/shelf.mojom
@@ -4,6 +4,7 @@
 
 module mash.shelf.mojom;
 
+import "mash/shelf/public/interfaces/shelf_constants.mojom";
 import "skia/public/interfaces/bitmap.mojom";
 
 // TODO(msw): Add support for multiple displays (with unified and multi-shelf).
@@ -39,12 +40,6 @@
   ItemReordered(uint32 order);
 };
 
-// These values match ash::ShelfAlignment.
-enum Alignment { BOTTOM, LEFT, RIGHT, };
-
-// These values match ash::ShelfAutoHideBehavior.
-enum AutoHideBehavior { ALWAYS, NEVER, HIDDEN, };
-
 // ContextMenuItems may be used to supplement ash shelf item context menus.
 struct ContextMenuItem {
   enum Type { ITEM, CHECK, RADIO, SEPARATOR, SUBMENU };
diff --git a/mash/shelf/public/interfaces/shelf_constants.mojom b/mash/shelf/public/interfaces/shelf_constants.mojom
new file mode 100644
index 0000000..e281c47
--- /dev/null
+++ b/mash/shelf/public/interfaces/shelf_constants.mojom
@@ -0,0 +1,11 @@
+// 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.
+
+module mash.shelf.mojom;
+
+// These values match ash::ShelfAlignment.
+enum Alignment { BOTTOM, LEFT, RIGHT, };
+
+// These values match ash::ShelfAutoHideBehavior.
+enum AutoHideBehavior { ALWAYS, NEVER, HIDDEN, };
diff --git a/mash/wm/public/interfaces/BUILD.gn b/mash/wm/public/interfaces/BUILD.gn
index 5bc2601..591bc8d 100644
--- a/mash/wm/public/interfaces/BUILD.gn
+++ b/mash/wm/public/interfaces/BUILD.gn
@@ -8,6 +8,7 @@
   sources = [
     "ash_window_type.mojom",
     "container.mojom",
+    "shelf_layout.mojom",
     "user_window_controller.mojom",
   ]
 }
diff --git a/mash/wm/public/interfaces/shelf_layout.mojom b/mash/wm/public/interfaces/shelf_layout.mojom
new file mode 100644
index 0000000..f146186
--- /dev/null
+++ b/mash/wm/public/interfaces/shelf_layout.mojom
@@ -0,0 +1,14 @@
+// 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.
+
+module mash.wm.mojom;
+
+import "mash/shelf/public/interfaces/shelf_constants.mojom";
+
+// Used by mojo:ash_sysui to push the current shelf state to its layout manager.
+interface ShelfLayout {
+  // TODO: Update preferred sizes with alignment to avoid flicker during layout.
+  SetAlignment(mash.shelf.mojom.Alignment alignment);
+  SetAutoHideBehavior(mash.shelf.mojom.AutoHideBehavior auto_hide);
+};
\ No newline at end of file
diff --git a/mash/wm/root_window_controller.cc b/mash/wm/root_window_controller.cc
index d610dc2..53356d48 100644
--- a/mash/wm/root_window_controller.cc
+++ b/mash/wm/root_window_controller.cc
@@ -91,6 +91,12 @@
   }
 }
 
+ShelfLayout* RootWindowController::GetShelfLayoutManager() {
+  return static_cast<ShelfLayout*>(
+      layout_manager_[GetWindowForContainer(mojom::Container::USER_SHELF)]
+          .get());
+}
+
 RootWindowController::RootWindowController(WindowManagerApplication* app)
     : app_(app), root_(nullptr), window_count_(0) {
   window_manager_.reset(new WindowManager);
diff --git a/mash/wm/root_window_controller.h b/mash/wm/root_window_controller.h
index d3f31421..8e7471ae 100644
--- a/mash/wm/root_window_controller.h
+++ b/mash/wm/root_window_controller.h
@@ -31,6 +31,7 @@
 
 class LayoutManager;
 class ShadowController;
+class ShelfLayout;
 class WindowManager;
 class WindowManagerApplication;
 
@@ -65,6 +66,8 @@
 
   void OnAccelerator(uint32_t id, const ui::Event& event);
 
+  ShelfLayout* GetShelfLayoutManager();
+
  private:
   explicit RootWindowController(WindowManagerApplication* app);
   ~RootWindowController() override;
diff --git a/mash/wm/shelf_layout.cc b/mash/wm/shelf_layout.cc
index e87dc76..a62dfea 100644
--- a/mash/wm/shelf_layout.cc
+++ b/mash/wm/shelf_layout.cc
@@ -26,7 +26,10 @@
 
 }  // namespace
 
-ShelfLayout::ShelfLayout(mus::Window* owner) : LayoutManager(owner) {
+ShelfLayout::ShelfLayout(mus::Window* owner)
+    : LayoutManager(owner),
+      alignment_(mash::shelf::mojom::Alignment::BOTTOM),
+      auto_hide_behavior_(mash::shelf::mojom::AutoHideBehavior::NEVER) {
   AddLayoutProperty(mus::mojom::WindowManager::kPreferredSize_Property);
 }
 
@@ -37,20 +40,54 @@
 // shelf restarts.
 
 void ShelfLayout::LayoutWindow(mus::Window* window) {
-  // TODO(msw): Support additional shelf alignments and RTL UI.
-  gfx::Size size = GetWindowPreferredSize(window);
-  const int y = owner()->bounds().height() - size.height();
   const mojom::AshWindowType ash_window_type = GetAshWindowType(window);
-  if (ash_window_type == mojom::AshWindowType::SHELF) {
-    size.set_width(owner()->bounds().width());
-    window->SetBounds(gfx::Rect(0, y, size.width(), size.height()));
-  } else if (ash_window_type == mojom::AshWindowType::STATUS_AREA) {
-    window->SetBounds(gfx::Rect(owner()->bounds().width() - size.width(), y,
-                                size.width(), size.height()));
+  gfx::Size size = GetWindowPreferredSize(window);
+
+  if (alignment_ == mash::shelf::mojom::Alignment::BOTTOM) {
+    const int y = owner()->bounds().height() - size.height();
+    if (ash_window_type == mojom::AshWindowType::SHELF) {
+      size.set_width(owner()->bounds().width());
+      window->SetBounds(gfx::Rect(0, y, size.width(), size.height()));
+    } else if (ash_window_type == mojom::AshWindowType::STATUS_AREA) {
+      // TODO(msw): Place the status area on the left for RTL UIs.
+      window->SetBounds(gfx::Rect(owner()->bounds().width() - size.width(), y,
+                                  size.width(), size.height()));
+    } else {
+      NOTREACHED() << "Unknown window in USER_SHELF container.";
+    }
   } else {
-    NOTREACHED() << "Unknown window in USER_SHELF container.";
+    const int x = (alignment_ == mash::shelf::mojom::Alignment::LEFT)
+                      ? 0
+                      : (owner()->bounds().width() - size.width());
+    if (ash_window_type == mojom::AshWindowType::SHELF) {
+      size.set_height(owner()->bounds().height());
+      window->SetBounds(gfx::Rect(x, 0, size.width(), size.height()));
+    } else if (ash_window_type == mojom::AshWindowType::STATUS_AREA) {
+      window->SetBounds(gfx::Rect(x, owner()->bounds().height() - size.height(),
+                                  size.width(), size.height()));
+    } else {
+      NOTREACHED() << "Unknown window in USER_SHELF container.";
+    }
   }
 }
 
+void ShelfLayout::SetAlignment(mash::shelf::mojom::Alignment alignment) {
+  if (alignment_ == alignment)
+    return;
+
+  alignment_ = alignment;
+  for (mus::Window* window : owner()->children())
+    LayoutWindow(window);
+}
+
+void ShelfLayout::SetAutoHideBehavior(
+    mash::shelf::mojom::AutoHideBehavior auto_hide) {
+  if (auto_hide_behavior_ == auto_hide)
+    return;
+
+  auto_hide_behavior_ = auto_hide;
+  NOTIMPLEMENTED();
+}
+
 }  // namespace wm
 }  // namespace mash
diff --git a/mash/wm/shelf_layout.h b/mash/wm/shelf_layout.h
index 44f318230..ccef7da3 100644
--- a/mash/wm/shelf_layout.h
+++ b/mash/wm/shelf_layout.h
@@ -7,12 +7,13 @@
 
 #include "base/macros.h"
 #include "mash/wm/layout_manager.h"
+#include "mash/wm/public/interfaces/shelf_layout.mojom.h"
 
 namespace mash {
 namespace wm {
 
 // Lays out the shelf within shelf containers.
-class ShelfLayout : public LayoutManager {
+class ShelfLayout : public LayoutManager, public mojom::ShelfLayout {
  public:
   explicit ShelfLayout(mus::Window* owner);
   ~ShelfLayout() override;
@@ -21,6 +22,14 @@
   // Overridden from LayoutManager:
   void LayoutWindow(mus::Window* window) override;
 
+  // Overridden from mojom::ShelfLayout:
+  void SetAlignment(mash::shelf::mojom::Alignment alignment) override;
+  void SetAutoHideBehavior(
+      mash::shelf::mojom::AutoHideBehavior auto_hide) override;
+
+  mash::shelf::mojom::Alignment alignment_;
+  mash::shelf::mojom::AutoHideBehavior auto_hide_behavior_;
+
   DISALLOW_COPY_AND_ASSIGN(ShelfLayout);
 };
 
diff --git a/mash/wm/window_manager_application.cc b/mash/wm/window_manager_application.cc
index 6562980..a4ad33c 100644
--- a/mash/wm/window_manager_application.cc
+++ b/mash/wm/window_manager_application.cc
@@ -14,6 +14,7 @@
 #include "mash/wm/accelerator_registrar_impl.h"
 #include "mash/wm/root_window_controller.h"
 #include "mash/wm/root_windows_observer.h"
+#include "mash/wm/shelf_layout.h"
 #include "mash/wm/user_window_controller_impl.h"
 #include "mojo/converters/input_events/input_events_type_converters.h"
 #include "services/shell/public/cpp/connection.h"
@@ -67,10 +68,18 @@
   // TODO(msw): figure out if this should be per display, or global.
   user_window_controller_->Initialize(root_controller);
   for (auto& request : user_window_controller_requests_)
-    user_window_controller_binding_.AddBinding(user_window_controller_.get(),
-                                               std::move(*request));
+    user_window_controller_bindings_.AddBinding(user_window_controller_.get(),
+                                                std::move(*request));
   user_window_controller_requests_.clear();
 
+  // TODO(msw): figure out if this should be per display, or global.
+  if (root_controller == (*root_controllers_.begin())) {
+    ShelfLayout* shelf_layout = root_controller->GetShelfLayoutManager();
+    for (auto& request : shelf_layout_requests_)
+      shelf_layout_bindings_.AddBinding(shelf_layout, std::move(*request));
+    shelf_layout_requests_.clear();
+  }
+
   FOR_EACH_OBSERVER(RootWindowsObserver, root_windows_observers_,
                     OnRootWindowControllerAdded(root_controller));
 }
@@ -121,7 +130,8 @@
 }
 
 bool WindowManagerApplication::AcceptConnection(shell::Connection* connection) {
-  connection->AddInterface<mash::wm::mojom::UserWindowController>(this);
+  connection->AddInterface<mojom::ShelfLayout>(this);
+  connection->AddInterface<mojom::UserWindowController>(this);
   connection->AddInterface<mus::mojom::AcceleratorRegistrar>(this);
   if (connection->GetRemoteIdentity().name() == "mojo:mash_session")
     connection->GetInterface(&session_);
@@ -130,13 +140,27 @@
 
 void WindowManagerApplication::Create(
     shell::Connection* connection,
-    mojo::InterfaceRequest<mash::wm::mojom::UserWindowController> request) {
+    mojo::InterfaceRequest<mojom::ShelfLayout> request) {
+  // TODO(msw): Handle multiple shelves (one per display).
   if (!root_controllers_.empty() && (*root_controllers_.begin())->root()) {
-    user_window_controller_binding_.AddBinding(user_window_controller_.get(),
-                                               std::move(request));
+    ShelfLayout* shelf_layout =
+        (*root_controllers_.begin())->GetShelfLayoutManager();
+    shelf_layout_bindings_.AddBinding(shelf_layout, std::move(request));
+  } else {
+    shelf_layout_requests_.push_back(base::WrapUnique(
+        new mojo::InterfaceRequest<mojom::ShelfLayout>(std::move(request))));
+  }
+}
+
+void WindowManagerApplication::Create(
+    shell::Connection* connection,
+    mojo::InterfaceRequest<mojom::UserWindowController> request) {
+  if (!root_controllers_.empty() && (*root_controllers_.begin())->root()) {
+    user_window_controller_bindings_.AddBinding(user_window_controller_.get(),
+                                                std::move(request));
   } else {
     user_window_controller_requests_.push_back(base::WrapUnique(
-        new mojo::InterfaceRequest<mash::wm::mojom::UserWindowController>(
+        new mojo::InterfaceRequest<mojom::UserWindowController>(
             std::move(request))));
   }
 }
diff --git a/mash/wm/window_manager_application.h b/mash/wm/window_manager_application.h
index a0d77dd..9577d88 100644
--- a/mash/wm/window_manager_application.h
+++ b/mash/wm/window_manager_application.h
@@ -18,6 +18,7 @@
 #include "components/mus/public/interfaces/window_manager_factory.mojom.h"
 #include "components/mus/public/interfaces/window_tree_host.mojom.h"
 #include "mash/session/public/interfaces/session.mojom.h"
+#include "mash/wm/public/interfaces/shelf_layout.mojom.h"
 #include "mash/wm/public/interfaces/user_window_controller.mojom.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/binding_set.h"
@@ -49,7 +50,8 @@
 class WindowManagerApplication
     : public shell::ShellClient,
       public mus::mojom::WindowManagerFactory,
-      public shell::InterfaceFactory<mash::wm::mojom::UserWindowController>,
+      public shell::InterfaceFactory<mojom::ShelfLayout>,
+      public shell::InterfaceFactory<mojom::UserWindowController>,
       public shell::InterfaceFactory<mus::mojom::AcceleratorRegistrar> {
  public:
   WindowManagerApplication();
@@ -92,12 +94,16 @@
                   uint32_t id) override;
   bool AcceptConnection(shell::Connection* connection) override;
 
-  // InterfaceFactory<mash::wm::mojom::UserWindowController>:
+  // shell::InterfaceFactory<mojom::ShelfLayout>:
   void Create(shell::Connection* connection,
-              mojo::InterfaceRequest<mash::wm::mojom::UserWindowController>
-                  request) override;
+              mojo::InterfaceRequest<mojom::ShelfLayout> request) override;
 
-  // InterfaceFactory<mus::mojom::AcceleratorRegistrar>:
+  // shell::InterfaceFactory<mojom::UserWindowController>:
+  void Create(
+      shell::Connection* connection,
+      mojo::InterfaceRequest<mojom::UserWindowController> request) override;
+
+  // shell::InterfaceFactory<mus::mojom::AcceleratorRegistrar>:
   void Create(shell::Connection* connection,
               mojo::InterfaceRequest<mus::mojom::AcceleratorRegistrar> request)
       override;
@@ -114,13 +120,19 @@
   std::unique_ptr<ui::mojo::UIInit> ui_init_;
   std::unique_ptr<views::AuraInit> aura_init_;
 
+  // The ShelfLayout object is created once OnEmbed() is called. Until that
+  // time |shelf_layout_requests_| stores pending interface requests.
+  mojo::BindingSet<mojom::ShelfLayout> shelf_layout_bindings_;
+  std::vector<scoped_ptr<mojo::InterfaceRequest<mojom::ShelfLayout>>>
+      shelf_layout_requests_;
+
   // |user_window_controller_| is created once OnEmbed() is called. Until that
   // time |user_window_controller_requests_| stores pending interface requests.
   std::unique_ptr<UserWindowControllerImpl> user_window_controller_;
-  mojo::BindingSet<mash::wm::mojom::UserWindowController>
-      user_window_controller_binding_;
-  std::vector<std::unique_ptr<
-      mojo::InterfaceRequest<mash::wm::mojom::UserWindowController>>>
+  mojo::BindingSet<mojom::UserWindowController>
+      user_window_controller_bindings_;
+  std::vector<
+      std::unique_ptr<mojo::InterfaceRequest<mojom::UserWindowController>>>
       user_window_controller_requests_;
 
   std::set<AcceleratorRegistrarImpl*> accelerator_registrars_;
diff --git a/media/base/demuxer.h b/media/base/demuxer.h
index 027264b..e2c68eb 100644
--- a/media/base/demuxer.h
+++ b/media/base/demuxer.h
@@ -67,7 +67,7 @@
       EncryptedMediaInitDataCB;
 
   // Notifies demuxer clients that media track configuration has been updated
-  // (e.g. the inital stream metadata has been parsed successfully, or a new
+  // (e.g. the initial stream metadata has been parsed successfully, or a new
   // init segment has been parsed successfully in MSE case).
   typedef base::Callback<void(scoped_ptr<MediaTracks>)> MediaTracksUpdatedCB;
 
@@ -134,6 +134,18 @@
   // Returns the memory usage in bytes for the demuxer.
   virtual int64_t GetMemoryUsage() const = 0;
 
+  // Notifies the demuxer that blink track ids have been assigned to |tracks|.
+  // The |track_ids| collection must contain blink track ids in the same
+  // sequence as media tracks in |tracks|. The collection sizes must be the
+  // same.
+  virtual void OnTrackIdsAssigned(const MediaTracks& tracks,
+                                  const std::vector<unsigned>& track_ids) = 0;
+
+  // Finds a DemuxerStream corresponding to the given blink |track_id|. Note
+  // that the input track id is blink track id and not bytestream track id.
+  virtual const DemuxerStream* GetDemuxerStreamByTrackId(
+      unsigned track_id) const = 0;
+
  private:
   DISALLOW_COPY_AND_ASSIGN(Demuxer);
 };
diff --git a/media/base/media_tracks.cc b/media/base/media_tracks.cc
index 832e5a8..070e8c7 100644
--- a/media/base/media_tracks.cc
+++ b/media/base/media_tracks.cc
@@ -14,30 +14,66 @@
 
 MediaTracks::~MediaTracks() {}
 
-void MediaTracks::AddAudioTrack(const AudioDecoderConfig& config,
-                                const std::string& id,
-                                const std::string& kind,
-                                const std::string& label,
-                                const std::string& language) {
+const MediaTrack* MediaTracks::AddAudioTrack(const AudioDecoderConfig& config,
+                                             const std::string& id,
+                                             const std::string& kind,
+                                             const std::string& label,
+                                             const std::string& language) {
   DCHECK(config.IsValidConfig());
   CHECK(audio_configs_.find(id) == audio_configs_.end());
   scoped_ptr<MediaTrack> track = make_scoped_ptr(
       new MediaTrack(MediaTrack::Audio, id, kind, label, language));
   tracks_.push_back(std::move(track));
   audio_configs_[id] = config;
+  return tracks_.back().get();
 }
 
-void MediaTracks::AddVideoTrack(const VideoDecoderConfig& config,
-                                const std::string& id,
-                                const std::string& kind,
-                                const std::string& label,
-                                const std::string& language) {
+const MediaTrack* MediaTracks::AddVideoTrack(const VideoDecoderConfig& config,
+                                             const std::string& id,
+                                             const std::string& kind,
+                                             const std::string& label,
+                                             const std::string& language) {
   DCHECK(config.IsValidConfig());
   CHECK(video_configs_.find(id) == video_configs_.end());
   scoped_ptr<MediaTrack> track = make_scoped_ptr(
       new MediaTrack(MediaTrack::Video, id, kind, label, language));
   tracks_.push_back(std::move(track));
   video_configs_[id] = config;
+  return tracks_.back().get();
+}
+
+void MediaTracks::SetDemuxerStreamForMediaTrack(const MediaTrack* track,
+                                                const DemuxerStream* stream) {
+  DCHECK(track_to_demux_stream_map_.find(track) ==
+         track_to_demux_stream_map_.end());
+
+  bool track_found = false;
+  for (const auto& t : tracks_) {
+    if (t.get() == track) {
+      track_found = true;
+      break;
+    }
+  }
+  CHECK(track_found);
+
+  track_to_demux_stream_map_[track] = stream;
+}
+
+MediaTracks::TrackIdToDemuxStreamMap MediaTracks::OnTrackIdsAssigned(
+    const std::vector<unsigned>& track_ids) const {
+  TrackIdToDemuxStreamMap result;
+  CHECK_EQ(tracks().size(), track_ids.size());
+  CHECK_EQ(track_to_demux_stream_map_.size(), tracks().size());
+  for (size_t i = 0; i < track_ids.size(); ++i) {
+    const MediaTrack* track = tracks()[i].get();
+    DCHECK(track);
+    const auto& it = track_to_demux_stream_map_.find(track);
+    CHECK(it != track_to_demux_stream_map_.end());
+    DVLOG(3) << "OnTrackIdsAssigned track_id=" << track_ids[i]
+             << " DemuxerStream=" << it->second;
+    result[track_ids[i]] = it->second;
+  }
+  return result;
 }
 
 const AudioDecoderConfig& MediaTracks::getAudioConfig(
diff --git a/media/base/media_tracks.h b/media/base/media_tracks.h
index 4e0fbb0f..b45f81d 100644
--- a/media/base/media_tracks.h
+++ b/media/base/media_tracks.h
@@ -17,30 +17,47 @@
 namespace media {
 
 class AudioDecoderConfig;
+class DemuxerStream;
 class VideoDecoderConfig;
 
 class MEDIA_EXPORT MediaTracks {
  public:
   typedef std::vector<scoped_ptr<MediaTrack>> MediaTracksCollection;
+  typedef std::map<unsigned, const DemuxerStream*> TrackIdToDemuxStreamMap;
 
   MediaTracks();
   ~MediaTracks();
 
   // Callers need to ensure that track id is unique.
-  void AddAudioTrack(const AudioDecoderConfig& config,
-                     const std::string& id,
-                     const std::string& kind,
-                     const std::string& label,
-                     const std::string& language);
+  const MediaTrack* AddAudioTrack(const AudioDecoderConfig& config,
+                                  const std::string& id,
+                                  const std::string& kind,
+                                  const std::string& label,
+                                  const std::string& language);
   // Callers need to ensure that track id is unique.
-  void AddVideoTrack(const VideoDecoderConfig& config,
-                     const std::string& id,
-                     const std::string& kind,
-                     const std::string& label,
-                     const std::string& language);
+  const MediaTrack* AddVideoTrack(const VideoDecoderConfig& config,
+                                  const std::string& id,
+                                  const std::string& kind,
+                                  const std::string& label,
+                                  const std::string& language);
 
   const MediaTracksCollection& tracks() const { return tracks_; }
 
+  // TODO(servolk,wolenetz): Consider refactoring media track creation in MSE to
+  // simplify track id to DemuxerStream mapping. crbug.com/604088
+
+  // Notifies MediaTracks that a given media |track| object is backed by the
+  // given DemuxerStream |stream| object.
+  void SetDemuxerStreamForMediaTrack(const MediaTrack* track,
+                                     const DemuxerStream* stream);
+  // Notifies MediaTracks that external (blink) track ids have been assigned to
+  // the media |tracks_|. The size and ordering of |track_ids| must match the
+  // size and ordering of tracks in the |tracks_| collection, and
+  // |track_to_demux_stream_map_| must have an entry for each track in |tracks_|
+  // (set by SetDemuxerStreamForMediaTrack()).
+  TrackIdToDemuxStreamMap OnTrackIdsAssigned(
+      const std::vector<unsigned>& track_ids) const;
+
   const AudioDecoderConfig& getAudioConfig(const std::string& id) const;
   const VideoDecoderConfig& getVideoConfig(const std::string& id) const;
 
@@ -54,6 +71,10 @@
   std::map<std::string, AudioDecoderConfig> audio_configs_;
   std::map<std::string, VideoDecoderConfig> video_configs_;
 
+  typedef std::map<const MediaTrack*, const DemuxerStream*>
+      TrackToDemuxStreamMap;
+  TrackToDemuxStreamMap track_to_demux_stream_map_;
+
   DISALLOW_COPY_AND_ASSIGN(MediaTracks);
 };
 
diff --git a/media/base/mock_filters.h b/media/base/mock_filters.h
index f60c9cd..d1c150a1 100644
--- a/media/base/mock_filters.h
+++ b/media/base/mock_filters.h
@@ -18,6 +18,7 @@
 #include "media/base/decoder_buffer.h"
 #include "media/base/decryptor.h"
 #include "media/base/demuxer.h"
+#include "media/base/media_tracks.h"
 #include "media/base/pipeline.h"
 #include "media/base/pipeline_status.h"
 #include "media/base/renderer.h"
@@ -115,6 +116,10 @@
   MOCK_CONST_METHOD0(GetTimelineOffset, base::Time());
   MOCK_CONST_METHOD0(GetMemoryUsage, int64_t());
 
+  MOCK_METHOD2(OnTrackIdsAssigned,
+               void(const MediaTracks&, const std::vector<unsigned>&));
+  MOCK_CONST_METHOD1(GetDemuxerStreamByTrackId, const DemuxerStream*(unsigned));
+
  private:
   DISALLOW_COPY_AND_ASSIGN(MockDemuxer);
 };
diff --git a/media/base/pipeline.h b/media/base/pipeline.h
index db326c2..07e197b 100644
--- a/media/base/pipeline.h
+++ b/media/base/pipeline.h
@@ -19,6 +19,7 @@
 namespace media {
 
 class Demuxer;
+class DemuxerStream;
 class Renderer;
 class VideoFrame;
 
@@ -155,6 +156,15 @@
 
   virtual void SetCdm(CdmContext* cdm_context,
                       const CdmAttachedCB& cdm_attached_cb) = 0;
+
+  // Notifies pipeline that the set of enabled audio streams/tracks has changed.
+  virtual void OnEnabledAudioStreamsChanged(
+      const std::vector<const DemuxerStream*>& enabledAudioStreams) {}
+
+  // Notifies pipeline that the selected video stream has changed. The input
+  // parameter |selectedVideoStream| can be null, which means video is disabled.
+  virtual void OnSelectedVideoStreamChanged(
+      const DemuxerStream* selectedVideoStream) {}
 };
 
 }  // namespace media
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc
index 5f4705b5..7971a2a 100644
--- a/media/base/pipeline_impl.cc
+++ b/media/base/pipeline_impl.cc
@@ -204,6 +204,36 @@
                             cdm_attached_cb));
 }
 
+void PipelineImpl::OnEnabledAudioStreamsChanged(
+    const std::vector<const DemuxerStream*>& enabledAudioStreams) {
+  if (!task_runner_->BelongsToCurrentThread()) {
+    task_runner_->PostTask(
+        FROM_HERE, base::Bind(&PipelineImpl::OnEnabledAudioStreamsChanged,
+                              weak_factory_.GetWeakPtr(), enabledAudioStreams));
+    return;
+  }
+  base::AutoLock auto_lock(lock_);
+  DCHECK(task_runner_->BelongsToCurrentThread());
+  if (renderer_) {
+    renderer_->OnEnabledAudioStreamsChanged(enabledAudioStreams);
+  }
+}
+
+void PipelineImpl::OnSelectedVideoStreamChanged(
+    const DemuxerStream* selectedVideoStream) {
+  if (!task_runner_->BelongsToCurrentThread()) {
+    task_runner_->PostTask(
+        FROM_HERE, base::Bind(&PipelineImpl::OnSelectedVideoStreamChanged,
+                              weak_factory_.GetWeakPtr(), selectedVideoStream));
+    return;
+  }
+  base::AutoLock auto_lock(lock_);
+  DCHECK(task_runner_->BelongsToCurrentThread());
+  if (renderer_) {
+    renderer_->OnSelectedVideoStreamChanged(selectedVideoStream);
+  }
+}
+
 void PipelineImpl::SetErrorForTesting(PipelineStatus status) {
   OnError(status);
 }
diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h
index 7a6da3a7..a26b224 100644
--- a/media/base/pipeline_impl.h
+++ b/media/base/pipeline_impl.h
@@ -111,6 +111,10 @@
   PipelineStatistics GetStatistics() const override;
   void SetCdm(CdmContext* cdm_context,
               const CdmAttachedCB& cdm_attached_cb) override;
+  void OnEnabledAudioStreamsChanged(
+      const std::vector<const DemuxerStream*>& enabledAudioStreams) override;
+  void OnSelectedVideoStreamChanged(
+      const DemuxerStream* selectedVideoStream) override;
 
  private:
   friend class MediaLog;
diff --git a/media/base/renderer.h b/media/base/renderer.h
index 89e349a9..bedbb34 100644
--- a/media/base/renderer.h
+++ b/media/base/renderer.h
@@ -5,6 +5,8 @@
 #ifndef MEDIA_BASE_RENDERER_H_
 #define MEDIA_BASE_RENDERER_H_
 
+#include <vector>
+
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
@@ -16,6 +18,7 @@
 
 namespace media {
 
+class DemuxerStream;
 class DemuxerStreamProvider;
 class VideoFrame;
 
@@ -77,6 +80,22 @@
   // Returns whether |this| renders video.
   virtual bool HasVideo() = 0;
 
+  // TODO(servolk,wolenetz): Enable media track handling in mojo, then make sure
+  // OnEnabledAudioStreamsChanged and OnSelectedVideoStreamChanged are
+  // implemented by all media renderers and make them pure virtual here.
+  // crbug.com/604083
+
+  // Notifies renderer that the set of enabled audio streams/tracks has changed.
+  // The input parameter |enabledAudioStreams| might be empty, which means that
+  // all audio tracks should be disabled/muted.
+  virtual void OnEnabledAudioStreamsChanged(
+      const std::vector<const DemuxerStream*>& enabledAudioStreams) {}
+
+  // Notifies renderer that the selected video stream has changed. The input
+  // parameter |selectedVideoStream| can be null, which means video is disabled.
+  virtual void OnSelectedVideoStreamChanged(
+      const DemuxerStream* selectedVideoStream) {}
+
  private:
   DISALLOW_COPY_AND_ASSIGN(Renderer);
 };
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index d1f5f2e..f26a75b1 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -7,6 +7,7 @@
 #include <algorithm>
 #include <cmath>
 #include <limits>
+#include <sstream>
 #include <string>
 #include <utility>
 
@@ -563,6 +564,45 @@
   return pipeline_metadata_.has_audio;
 }
 
+void WebMediaPlayerImpl::enabledAudioTracksChanged(
+    const blink::WebVector<blink::WebMediaPlayer::TrackId>& enabledTrackIds) {
+  DCHECK(main_task_runner_->BelongsToCurrentThread());
+  CHECK(demuxer_.get());
+
+  std::vector<const DemuxerStream*> enabledAudioStreams;
+  std::stringstream trackIdsStr;
+  for (const auto& trackId : enabledTrackIds) {
+    const DemuxerStream* s = demuxer_->GetDemuxerStreamByTrackId(trackId);
+    CHECK(s);
+    enabledAudioStreams.push_back(s);
+    trackIdsStr << trackId << " ";
+  }
+  MEDIA_LOG(INFO, media_log_)
+      << "WebMediaPlayerImpl::enabledAudioTracksChanged enabledTrackIds="
+      << trackIdsStr.str();
+  pipeline_.OnEnabledAudioStreamsChanged(enabledAudioStreams);
+}
+
+void WebMediaPlayerImpl::selectedVideoTrackChanged(
+    blink::WebMediaPlayer::TrackId* selectedTrackId) {
+  DCHECK(main_task_runner_->BelongsToCurrentThread());
+  CHECK(demuxer_.get());
+
+  const DemuxerStream* selectedVideoStream = nullptr;
+  if (selectedTrackId) {
+    selectedVideoStream = demuxer_->GetDemuxerStreamByTrackId(*selectedTrackId);
+    CHECK(selectedVideoStream);
+    MEDIA_LOG(INFO, media_log_)
+        << "WebMediaPlayerImpl::selectedVideoTrackChanged selectedTrackId="
+        << *selectedTrackId << " selectedVideoStream=" << selectedVideoStream;
+  } else {
+    MEDIA_LOG(INFO, media_log_) << "WebMediaPlayerImpl::"
+                                   "selectedVideoTrackChanged "
+                                   "selectedTrackId=none";
+  }
+  pipeline_.OnSelectedVideoStreamChanged(selectedVideoStream);
+}
+
 blink::WebSize WebMediaPlayerImpl::naturalSize() const {
   DCHECK(main_task_runner_->BelongsToCurrentThread());
 
@@ -826,6 +866,7 @@
   DCHECK(!chunk_demuxer_);
 
   // Report the media track information to blink.
+  std::vector<blink::WebMediaPlayer::TrackId> blinkTrackIds;
   for (const auto& track : tracks->tracks()) {
     if (track->type() == MediaTrack::Audio) {
       auto track_id = client_->addAudioTrack(
@@ -834,7 +875,7 @@
           blink::WebString::fromUTF8(track->label()),
           blink::WebString::fromUTF8(track->language()),
           /*enabled*/ true);
-      (void)track_id;
+      blinkTrackIds.push_back(track_id);
     } else if (track->type() == MediaTrack::Video) {
       auto track_id = client_->addVideoTrack(
           blink::WebString::fromUTF8(track->id()),
@@ -842,12 +883,14 @@
           blink::WebString::fromUTF8(track->label()),
           blink::WebString::fromUTF8(track->language()),
           /*selected*/ true);
-      (void)track_id;
+      blinkTrackIds.push_back(track_id);
     } else {
       // Text tracks are not supported through this code path yet.
       NOTREACHED();
     }
   }
+
+  demuxer_->OnTrackIdsAssigned(*tracks.get(), blinkTrackIds);
 }
 
 void WebMediaPlayerImpl::OnWaitingForDecryptionKey() {
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
index 59b021f..abca43c62 100644
--- a/media/blink/webmediaplayer_impl.h
+++ b/media/blink/webmediaplayer_impl.h
@@ -127,6 +127,13 @@
   bool hasVideo() const override;
   bool hasAudio() const override;
 
+  void enabledAudioTracksChanged(
+      const blink::WebVector<blink::WebMediaPlayer::TrackId>& enabledTrackIds)
+      override;
+  // |selectedTrackId| is null if no track is selected.
+  void selectedVideoTrackChanged(
+      blink::WebMediaPlayer::TrackId* selectedTrackId) override;
+
   // Dimensions of the video.
   blink::WebSize naturalSize() const override;
 
diff --git a/media/blink/websourcebuffer_impl.cc b/media/blink/websourcebuffer_impl.cc
index 9386f52..fffc4b1 100644
--- a/media/blink/websourcebuffer_impl.cc
+++ b/media/blink/websourcebuffer_impl.cc
@@ -189,6 +189,8 @@
 
   std::vector<blink::WebMediaPlayer::TrackId> blinkTrackIds =
       client_->initializationSegmentReceived(trackInfoVector);
+
+  demuxer_->OnTrackIdsAssigned(*tracks.get(), blinkTrackIds);
 }
 
 }  // namespace media
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index 53ce1f3..fc5c073 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -17,6 +17,7 @@
 #include "base/stl_util.h"
 #include "media/base/audio_decoder_config.h"
 #include "media/base/bind_to_current_loop.h"
+#include "media/base/media_tracks.h"
 #include "media/base/stream_parser_buffer.h"
 #include "media/base/timestamp_constants.h"
 #include "media/base/video_decoder_config.h"
@@ -1002,32 +1003,31 @@
   base::ResetAndReturn(&init_cb_).Run(PIPELINE_OK);
 }
 
-ChunkDemuxerStream*
-ChunkDemuxer::CreateDemuxerStream(DemuxerStream::Type type) {
-  switch (type) {
-    case DemuxerStream::AUDIO:
+ChunkDemuxerStream* ChunkDemuxer::CreateDemuxerStream(
+    const MediaTrack& media_track) {
+  // Demuxer streams can only be created when ChunkDemuxer::AppendData is in
+  // progress.
+  lock_.AssertAcquired();
+  switch (media_track.type()) {
+    case MediaTrack::Audio:
       if (audio_)
         return NULL;
       audio_.reset(
           new ChunkDemuxerStream(DemuxerStream::AUDIO, splice_frames_enabled_));
       return audio_.get();
       break;
-    case DemuxerStream::VIDEO:
+    case MediaTrack::Video:
       if (video_)
         return NULL;
       video_.reset(
           new ChunkDemuxerStream(DemuxerStream::VIDEO, splice_frames_enabled_));
       return video_.get();
       break;
-    case DemuxerStream::TEXT: {
+    case MediaTrack::Text: {
       return new ChunkDemuxerStream(DemuxerStream::TEXT,
                                     splice_frames_enabled_);
       break;
     }
-    case DemuxerStream::UNKNOWN:
-    case DemuxerStream::NUM_TYPES:
-      NOTREACHED();
-      return NULL;
   }
   NOTREACHED();
   return NULL;
@@ -1040,6 +1040,31 @@
   host_->AddTextStream(text_stream, config);
 }
 
+void ChunkDemuxer::OnTrackIdsAssigned(const MediaTracks& tracks,
+                                      const std::vector<unsigned>& track_ids) {
+  // New tracks and therefore track id assignements can happen only during
+  // ChunkDemuxer::AppendData processing, which should be holding the lock.
+  lock_.AssertAcquired();
+
+  const auto& new_track_id_map = tracks.OnTrackIdsAssigned(track_ids);
+
+  // ChunkDemuxer might have multiple media track sets (since it can have
+  // multiple SourceBuffers), so we need to merge the map for the current set of
+  // tracks with the global |track_id_to_demux_stream_| map shared across all
+  // SourceBuffers.
+  for (const auto& it : new_track_id_map) {
+    track_id_to_demux_stream_[it.first] = it.second;
+  }
+}
+
+const DemuxerStream* ChunkDemuxer::GetDemuxerStreamByTrackId(
+    unsigned track_id) const {
+  base::AutoLock auto_lock(lock_);
+  const auto& it = track_id_to_demux_stream_.find(track_id);
+  CHECK(it != track_id_to_demux_stream_.end());
+  return it->second;
+}
+
 bool ChunkDemuxer::IsValidId(const std::string& source_id) const {
   lock_.AssertAcquired();
   return source_state_map_.count(source_id) > 0u;
diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
index 969afb22..bd08a8e2 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -19,6 +19,7 @@
 #include "media/base/byte_queue.h"
 #include "media/base/demuxer.h"
 #include "media/base/demuxer_stream.h"
+#include "media/base/media_tracks.h"
 #include "media/base/ranges.h"
 #include "media/base/stream_parser.h"
 #include "media/filters/media_source_state.h"
@@ -208,6 +209,15 @@
   void SetTracksWatcher(const std::string& id,
                         const MediaTracksUpdatedCB& tracks_updated_cb);
 
+  // Notifies the demuxer that track ids has been assigned to a media tracks.
+  void OnTrackIdsAssigned(const MediaTracks& tracks,
+                          const std::vector<unsigned>& track_ids) override;
+
+  // Finds a DemuxerStream corresponding to the given blink |track_id|. Note
+  // that the input track id is blink track id and not bytestream track id.
+  const DemuxerStream* GetDemuxerStreamByTrackId(
+      unsigned track_id) const override;
+
   // Removed an ID & associated resources that were previously added with
   // AddId().
   void RemoveId(const std::string& id);
@@ -318,10 +328,10 @@
   // MediaSourceState callbacks.
   void OnSourceInitDone(const StreamParser::InitParameters& params);
 
-  // Creates a DemuxerStream for the specified |type|.
+  // Creates a DemuxerStream for the specified |media_track|.
   // Returns a new ChunkDemuxerStream instance if a stream of this type
   // has not been created before. Returns NULL otherwise.
-  ChunkDemuxerStream* CreateDemuxerStream(DemuxerStream::Type type);
+  ChunkDemuxerStream* CreateDemuxerStream(const MediaTrack& media_track);
 
   void OnNewTextTrack(ChunkDemuxerStream* text_stream,
                       const TextTrackConfig& config);
@@ -385,6 +395,8 @@
   // Incremented in AddId(), decremented in OnSourceInitDone().
   int pending_source_init_done_count_;
 
+  MediaTracks::TrackIdToDemuxStreamMap track_id_to_demux_stream_;
+
   base::TimeDelta duration_;
 
   // The duration passed to the last SetDuration(). If
diff --git a/media/filters/chunk_demuxer_unittest.cc b/media/filters/chunk_demuxer_unittest.cc
index a6828da..bb783783 100644
--- a/media/filters/chunk_demuxer_unittest.cc
+++ b/media/filters/chunk_demuxer_unittest.cc
@@ -82,6 +82,8 @@
 const int kVideoTrackEntryHeaderSize =
     kVideoTrackSizeOffset + kVideoTrackSizeWidth;
 
+// Track numbers AKA bytestream track ids. Bytestream track ids might change
+// within a single playback session if there is only one track of a given type.
 const int kVideoTrackNum = 1;
 const int kAudioTrackNum = 2;
 const int kTextTrackNum = 3;
@@ -89,6 +91,14 @@
 const int kAlternateAudioTrackNum = 5;
 const int kAlternateTextTrackNum = 6;
 
+// These value represent externally assigned track ids (for example track ids
+// assigned by blink). Not to be confused with bytestream track ids above. The
+// main difference is that these track ids must stay the same for the duration
+// of the playback session, whereas track numbers / bytestream track ids might
+// change in subsequent init segments.
+const int kVideoTrackId = 10;
+const int kAudioTrackId = 11;
+
 const int kAudioBlockDuration = 23;
 const int kVideoBlockDuration = 33;
 const int kTextBlockDuration = 100;
@@ -1400,6 +1410,18 @@
     DCHECK(tracks.get());
     DCHECK_GT(tracks->tracks().size(), 0u);
 
+    std::vector<unsigned> track_ids;
+    for (const auto& track : tracks->tracks()) {
+      if (track->type() == MediaTrack::Audio) {
+        track_ids.push_back(kAudioTrackId);
+      } else if (track->type() == MediaTrack::Video) {
+        track_ids.push_back(kVideoTrackId);
+      } else {
+        NOTREACHED();
+      }
+    }
+    demuxer_->OnTrackIdsAssigned(*tracks.get(), track_ids);
+
     InitSegmentReceivedMock(tracks);
   }
 
@@ -1599,6 +1621,8 @@
   DemuxerStream* video_stream = demuxer_->GetStream(DemuxerStream::VIDEO);
   ASSERT_TRUE(audio_stream);
   ASSERT_TRUE(video_stream);
+  ASSERT_EQ(audio_stream, demuxer_->GetDemuxerStreamByTrackId(kAudioTrackId));
+  ASSERT_EQ(video_stream, demuxer_->GetDemuxerStreamByTrackId(kVideoTrackId));
 
   AppendMuxedCluster(MuxedStreamInfo(kAudioTrackNum, "0K 23K", 23),
                      MuxedStreamInfo(kVideoTrackNum, "0K 30", 30));
@@ -1612,6 +1636,8 @@
   CheckExpectedRanges("{ [0,92) }");
   CheckExpectedBuffers(audio_stream, "0K 23K 46K 69K");
   CheckExpectedBuffers(video_stream, "0K 30 60K");
+  ASSERT_EQ(audio_stream, demuxer_->GetDemuxerStreamByTrackId(kAudioTrackId));
+  ASSERT_EQ(video_stream, demuxer_->GetDemuxerStreamByTrackId(kVideoTrackId));
 
   ShutdownDemuxer();
 }
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index c7e00ce5..c3d8525e 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -1221,22 +1221,25 @@
 
     // Note when we find our audio/video stream (we only want one of each) and
     // record src= playback UMA stats for the stream's decoder config.
+    const MediaTrack* media_track = nullptr;
     if (codec_type == AVMEDIA_TYPE_AUDIO) {
       CHECK(!audio_stream);
       audio_stream = stream;
       audio_config = streams_[i]->audio_decoder_config();
       RecordAudioCodecStats(audio_config);
 
-      media_tracks->AddAudioTrack(audio_config, track_id, "main", track_label,
-                                  track_language);
+      media_track = media_tracks->AddAudioTrack(audio_config, track_id, "main",
+                                                track_label, track_language);
+      media_tracks->SetDemuxerStreamForMediaTrack(media_track, streams_[i]);
     } else if (codec_type == AVMEDIA_TYPE_VIDEO) {
       CHECK(!video_stream);
       video_stream = stream;
       video_config = streams_[i]->video_decoder_config();
       RecordVideoCodecStats(video_config, stream->codec->color_range);
 
-      media_tracks->AddVideoTrack(video_config, track_id, "main", track_label,
-                                  track_language);
+      media_track = media_tracks->AddVideoTrack(video_config, track_id, "main",
+                                                track_label, track_language);
+      media_tracks->SetDemuxerStreamForMediaTrack(media_track, streams_[i]);
     }
 
     max_duration = std::max(max_duration, streams_[i]->duration());
@@ -1595,4 +1598,16 @@
   }
 }
 
+void FFmpegDemuxer::OnTrackIdsAssigned(const MediaTracks& tracks,
+                                       const std::vector<unsigned>& track_ids) {
+  track_id_to_demux_stream_ = tracks.OnTrackIdsAssigned(track_ids);
+}
+
+const DemuxerStream* FFmpegDemuxer::GetDemuxerStreamByTrackId(
+    unsigned track_id) const {
+  const auto& it = track_id_to_demux_stream_.find(track_id);
+  CHECK(it != track_id_to_demux_stream_.end());
+  return it->second;
+}
+
 }  // namespace media
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index b89196d..73aded71 100644
--- a/media/filters/ffmpeg_demuxer.h
+++ b/media/filters/ffmpeg_demuxer.h
@@ -25,6 +25,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <map>
 #include <string>
 #include <utility>
 #include <vector>
@@ -38,6 +39,7 @@
 #include "media/base/decoder_buffer.h"
 #include "media/base/decoder_buffer_queue.h"
 #include "media/base/demuxer.h"
+#include "media/base/media_tracks.h"
 #include "media/base/pipeline_status.h"
 #include "media/base/text_track_config.h"
 #include "media/base/video_decoder_config.h"
@@ -223,6 +225,15 @@
   // timeline.
   base::TimeDelta start_time() const { return start_time_; }
 
+  // Notifies the demuxer that track ids has been assigned to a media tracks.
+  void OnTrackIdsAssigned(const MediaTracks& tracks,
+                          const std::vector<unsigned>& track_ids) override;
+
+  // Finds a DemuxerStream corresponding to the given blink |track_id|. Note
+  // that the input track id is blink track id and not bytestream track id.
+  const DemuxerStream* GetDemuxerStreamByTrackId(
+      unsigned track_id) const override;
+
  private:
   // To allow tests access to privates.
   friend class FFmpegDemuxerTest;
@@ -334,6 +345,8 @@
 
   const MediaTracksUpdatedCB media_tracks_updated_cb_;
 
+  MediaTracks::TrackIdToDemuxStreamMap track_id_to_demux_stream_;
+
   // NOTE: Weak pointers must be invalidated before all other member variables.
   base::WeakPtrFactory<FFmpegDemuxer> weak_factory_;
 
diff --git a/media/filters/media_source_state.cc b/media/filters/media_source_state.cc
index 98028b4..d59011d6 100644
--- a/media/filters/media_source_state.cc
+++ b/media/filters/media_source_state.cc
@@ -480,9 +480,22 @@
     const StreamParser::TextTrackConfigMap& text_configs) {
   DCHECK_GE(state_, PENDING_PARSER_CONFIG);
   DCHECK(tracks.get());
-  media_tracks_ = std::move(tracks);
-  const AudioDecoderConfig& audio_config = media_tracks_->getFirstAudioConfig();
-  const VideoDecoderConfig& video_config = media_tracks_->getFirstVideoConfig();
+
+  const MediaTrack* audio_track = nullptr;
+  const MediaTrack* video_track = nullptr;
+  AudioDecoderConfig audio_config;
+  VideoDecoderConfig video_config;
+  for (const auto& track : tracks->tracks()) {
+    if (!audio_track && track->type() == MediaTrack::Audio &&
+        tracks->getAudioConfig(track->id()).IsValidConfig()) {
+      audio_config = tracks->getAudioConfig(track->id());
+      audio_track = track.get();
+    } else if (!video_track && track->type() == MediaTrack::Video &&
+               tracks->getVideoConfig(track->id()).IsValidConfig()) {
+      video_config = tracks->getVideoConfig(track->id());
+      video_track = track.get();
+    }
+  }
 
   DVLOG(1) << "OnNewConfigs(" << allow_audio << ", " << allow_video << ", "
            << audio_config.IsValidConfig() << ", "
@@ -530,7 +543,8 @@
     }
 
     if (!audio_) {
-      audio_ = create_demuxer_stream_cb_.Run(DemuxerStream::AUDIO);
+      DCHECK(audio_track);
+      audio_ = create_demuxer_stream_cb_.Run(*audio_track);
 
       if (!audio_) {
         DVLOG(1) << "Failed to create an audio stream.";
@@ -558,7 +572,8 @@
     }
 
     if (!video_) {
-      video_ = create_demuxer_stream_cb_.Run(DemuxerStream::VIDEO);
+      DCHECK(video_track);
+      video_ = create_demuxer_stream_cb_.Run(*video_track);
 
       if (!video_) {
         DVLOG(1) << "Failed to create a video stream.";
@@ -578,8 +593,11 @@
   if (text_stream_map_.empty()) {
     for (TextConfigItr itr = text_configs.begin(); itr != text_configs.end();
          ++itr) {
+      // TODO(servolk): Look into unifying text tracks code path with audio and
+      // video track code paths.
+      MediaTrack dummy_text_track(MediaTrack::Text, "", "", "", "");
       ChunkDemuxerStream* const text_stream =
-          create_demuxer_stream_cb_.Run(DemuxerStream::TEXT);
+          create_demuxer_stream_cb_.Run(dummy_text_track);
       if (!frame_processor_->AddTrack(itr->first, text_stream)) {
         success &= false;
         MEDIA_LOG(ERROR, media_log_) << "Failed to add text track ID "
@@ -651,12 +669,21 @@
 
   frame_processor_->SetAllTrackBuffersNeedRandomAccessPoint();
 
+  if (audio_track) {
+    DCHECK(audio_);
+    tracks->SetDemuxerStreamForMediaTrack(audio_track, audio_);
+  }
+  if (video_track) {
+    DCHECK(video_);
+    tracks->SetDemuxerStreamForMediaTrack(video_track, video_);
+  }
+
   DVLOG(1) << "OnNewConfigs() : " << (success ? "success" : "failed");
   if (success) {
     if (state_ == PENDING_PARSER_CONFIG)
       state_ = PENDING_PARSER_INIT;
     DCHECK(!init_segment_received_cb_.is_null());
-    init_segment_received_cb_.Run(std::move(media_tracks_));
+    init_segment_received_cb_.Run(std::move(tracks));
   }
 
   return success;
diff --git a/media/filters/media_source_state.h b/media/filters/media_source_state.h
index 89974a6..616cd44 100644
--- a/media/filters/media_source_state.h
+++ b/media/filters/media_source_state.h
@@ -20,12 +20,13 @@
 
 class ChunkDemuxerStream;
 class FrameProcessor;
+class MediaTrack;
 
 // Contains state belonging to a source id.
 class MEDIA_EXPORT MediaSourceState {
  public:
   // Callback signature used to create ChunkDemuxerStreams.
-  typedef base::Callback<ChunkDemuxerStream*(DemuxerStream::Type)>
+  typedef base::Callback<ChunkDemuxerStream*(const MediaTrack&)>
       CreateDemuxerStreamCB;
 
   typedef base::Callback<void(ChunkDemuxerStream*, const TextTrackConfig&)>
@@ -190,8 +191,6 @@
   // The object used to parse appended data.
   scoped_ptr<StreamParser> stream_parser_;
 
-  scoped_ptr<MediaTracks> media_tracks_;
-
   ChunkDemuxerStream* audio_;  // Not owned by |this|.
   ChunkDemuxerStream* video_;  // Not owned by |this|.
 
diff --git a/media/mojo/services/BUILD.gn b/media/mojo/services/BUILD.gn
index af9b783..00d946d 100644
--- a/media/mojo/services/BUILD.gn
+++ b/media/mojo/services/BUILD.gn
@@ -240,6 +240,11 @@
   ]
 }
 
+mojo_application_manifest("media_manifest") {
+  application_name = "media"
+  source = "media_manifest.json"
+}
+
 # Note, the following tests must be loaded via mojo_runner as an app, e.g.
 #
 #   mojo/tools/apptest_runner.py
diff --git a/media/mojo/services/media_manifest.json b/media/mojo/services/media_manifest.json
new file mode 100644
index 0000000..48ba085f
--- /dev/null
+++ b/media/mojo/services/media_manifest.json
@@ -0,0 +1,6 @@
+{
+  "name": "mojo:media",
+  "process-group": "browser",
+  "display_name": "Media Service",
+  "capabilities": { "*": ["*"] }
+}
diff --git a/media/renderers/renderer_impl.cc b/media/renderers/renderer_impl.cc
index 38f49d4..26ea9384 100644
--- a/media/renderers/renderer_impl.cc
+++ b/media/renderers/renderer_impl.cc
@@ -205,8 +205,16 @@
   DVLOG(1) << __FUNCTION__;
   DCHECK(task_runner_->BelongsToCurrentThread());
 
-  if (audio_renderer_)
-    audio_renderer_->SetVolume(volume);
+  audio_volume_ = volume;
+  if (!audio_renderer_)
+    return;
+
+  if (audio_stream_currently_disabled_) {
+    DVLOG(1) << "SetVolume ignored since audio stream is currently disabled.";
+    return;
+  }
+
+  audio_renderer_->SetVolume(volume);
 }
 
 base::TimeDelta RendererImpl::GetMediaTime() {
@@ -225,6 +233,52 @@
   return video_renderer_ != NULL;
 }
 
+void RendererImpl::OnEnabledAudioStreamsChanged(
+    const std::vector<const DemuxerStream*>& enabledAudioStreams) {
+  DCHECK(task_runner_->BelongsToCurrentThread());
+  DemuxerStream* audio_stream =
+      demuxer_stream_provider_->GetStream(DemuxerStream::AUDIO);
+
+  bool audio_stream_enabled = false;
+  for (const DemuxerStream* demuxer_stream : enabledAudioStreams) {
+    DCHECK_EQ(demuxer_stream->type(), DemuxerStream::AUDIO);
+    DCHECK_EQ(demuxer_stream, audio_stream);
+    audio_stream_enabled = true;
+  }
+
+  // TODO(servolk,wolenetz): Need to find a way to completely disable audio
+  // (i.e. stop audio decoder and switch video to wall clock) when audio stream
+  // is disabled, but for now just set volume to 0. crbug.com/599709
+  if (audio_renderer_) {
+    if (audio_stream_enabled && audio_stream_currently_disabled_) {
+      DVLOG(3) << __FUNCTION__ << " enabled audio. SetVolume=" << audio_volume_;
+      audio_stream_currently_disabled_ = false;
+      audio_renderer_->SetVolume(audio_volume_);
+    } else if (!audio_stream_enabled) {
+      DVLOG(3) << __FUNCTION__ << " disabled audio. SetVolume=0";
+      DCHECK(!audio_stream_currently_disabled_);
+      audio_stream_currently_disabled_ = true;
+      audio_renderer_->SetVolume(0);
+    }
+  }
+}
+
+void RendererImpl::OnSelectedVideoStreamChanged(
+    const DemuxerStream* selectedVideoStream) {
+  DCHECK(task_runner_->BelongsToCurrentThread());
+  DemuxerStream* video_stream =
+      demuxer_stream_provider_->GetStream(DemuxerStream::VIDEO);
+  if (selectedVideoStream) {
+    DVLOG(3) << __FUNCTION__ << " selectedVideoStream=" << selectedVideoStream;
+    DCHECK_EQ(selectedVideoStream->type(), DemuxerStream::VIDEO);
+    CHECK_EQ(selectedVideoStream, video_stream);
+  } else {
+    DVLOG(3) << __FUNCTION__ << " selectedVideoStream=none";
+    // TODO(servolk,wolenetz): Need to find a way to stop video decoding and
+    // rendering when the video stream is deselected. crbug.com/599709
+  }
+}
+
 void RendererImpl::DisableUnderflowForTesting() {
   DVLOG(1) << __FUNCTION__;
   DCHECK(task_runner_->BelongsToCurrentThread());
diff --git a/media/renderers/renderer_impl.h b/media/renderers/renderer_impl.h
index fc17f6c..6345ecf 100644
--- a/media/renderers/renderer_impl.h
+++ b/media/renderers/renderer_impl.h
@@ -63,6 +63,10 @@
   base::TimeDelta GetMediaTime() final;
   bool HasAudio() final;
   bool HasVideo() final;
+  void OnEnabledAudioStreamsChanged(
+      const std::vector<const DemuxerStream*>& enabledAudioStreams) final;
+  void OnSelectedVideoStreamChanged(
+      const DemuxerStream* selectedVideoStream) final;
 
   // Helper functions for testing purposes. Must be called before Initialize().
   void DisableUnderflowForTesting();
@@ -151,6 +155,9 @@
   scoped_ptr<AudioRenderer> audio_renderer_;
   scoped_ptr<VideoRenderer> video_renderer_;
 
+  bool audio_stream_currently_disabled_ = false;
+  float audio_volume_ = 1.0f;
+
   // Renderer-provided time source used to control playback.
   TimeSource* time_source_;
   scoped_ptr<WallClockTimeSource> wall_clock_time_source_;
diff --git a/media/test/pipeline_integration_test.cc b/media/test/pipeline_integration_test.cc
index 5411600..1748fc38 100644
--- a/media/test/pipeline_integration_test.cc
+++ b/media/test/pipeline_integration_test.cc
@@ -617,7 +617,7 @@
 
     CHECK_EQ(chunk_demuxer_->AddId(kSourceId, type, codecs), ChunkDemuxer::kOk);
     chunk_demuxer_->SetTracksWatcher(
-        kSourceId, base::Bind(&MockMediaSource::InitSegmentReceivedWrapper,
+        kSourceId, base::Bind(&MockMediaSource::InitSegmentReceived,
                               base::Unretained(this)));
 
     AppendData(initial_append_size_);
@@ -634,12 +634,21 @@
     return last_timestamp_offset_;
   }
 
-  // A workaround for gtest mocks not allowing moving scoped_ptrs.
-  void InitSegmentReceivedWrapper(scoped_ptr<MediaTracks> tracks) {
-    InitSegmentReceived(tracks);
+  void InitSegmentReceived(scoped_ptr<MediaTracks> tracks) {
+    CHECK(tracks.get());
+    EXPECT_GT(tracks->tracks().size(), 0u);
+    CHECK(chunk_demuxer_);
+    // Generate track ids.
+    std::vector<unsigned> track_ids;
+    for (size_t track_id = 1; track_id <= tracks->tracks().size(); ++track_id) {
+      track_ids.push_back(track_id);
+    }
+
+    chunk_demuxer_->OnTrackIdsAssigned(*tracks.get(), track_ids);
+    InitSegmentReceivedMock(tracks);
   }
 
-  MOCK_METHOD1(InitSegmentReceived, void(scoped_ptr<MediaTracks>&));
+  MOCK_METHOD1(InitSegmentReceivedMock, void(scoped_ptr<MediaTracks>&));
 
  private:
   scoped_refptr<DecoderBuffer> file_data_;
@@ -693,7 +702,7 @@
     hashing_enabled_ = test_type & kHashed;
     clockless_playback_ = test_type & kClockless;
 
-    EXPECT_CALL(*source, InitSegmentReceived(_)).Times(AtLeast(1));
+    EXPECT_CALL(*source, InitSegmentReceivedMock(_)).Times(AtLeast(1));
     EXPECT_CALL(*this, OnMetadata(_))
         .Times(AtMost(1))
         .WillRepeatedly(SaveArg<0>(&metadata_));
@@ -727,7 +736,7 @@
 
   void StartPipelineWithEncryptedMedia(MockMediaSource* source,
                                        FakeEncryptedMedia* encrypted_media) {
-    EXPECT_CALL(*source, InitSegmentReceived(_)).Times(AtLeast(1));
+    EXPECT_CALL(*source, InitSegmentReceivedMock(_)).Times(AtLeast(1));
     EXPECT_CALL(*this, OnMetadata(_))
         .Times(AtMost(1))
         .WillRepeatedly(SaveArg<0>(&metadata_));
@@ -2135,4 +2144,63 @@
             demuxer_->GetStartTime());
 }
 
+TEST_F(PipelineIntegrationTest, AudioTrackMuteUnmute) {
+  ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm"));
+
+  // Start playback and play a little, to ensure demuxer streams are created.
+  Play();
+  ASSERT_TRUE(
+      WaitUntilCurrentTimeIsAfter(base::TimeDelta::FromMilliseconds(200)));
+  Pause();
+
+  const DemuxerStream* demux_stream = demuxer_->GetDemuxerStreamByTrackId(2);
+  EXPECT_NE(demux_stream, nullptr);
+  EXPECT_EQ(demux_stream->type(), DemuxerStream::AUDIO);
+
+  // TODO(servolk): Find a way to verify that audio is really muted/unmuted.
+  // This should mute the audio stream.
+  std::vector<const DemuxerStream*> enabledAudioStreams;
+  pipeline_->OnEnabledAudioStreamsChanged(enabledAudioStreams);
+
+  Play();
+  ASSERT_TRUE(
+      WaitUntilCurrentTimeIsAfter(base::TimeDelta::FromMilliseconds(500)));
+  Pause();
+
+  // This should unmute the audio stream.
+  enabledAudioStreams.push_back(demux_stream);
+  pipeline_->OnEnabledAudioStreamsChanged(enabledAudioStreams);
+
+  Play();
+  ASSERT_TRUE(WaitUntilOnEnded());
+}
+
+TEST_F(PipelineIntegrationTest, VideoTrackSelectDeselect) {
+  ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm"));
+
+  // Start playback and play a little, to ensure demuxer streams are created.
+  Play();
+  ASSERT_TRUE(
+      WaitUntilCurrentTimeIsAfter(base::TimeDelta::FromMilliseconds(200)));
+  Pause();
+
+  const DemuxerStream* demux_stream = demuxer_->GetDemuxerStreamByTrackId(1);
+  EXPECT_NE(demux_stream, nullptr);
+  EXPECT_EQ(demux_stream->type(), DemuxerStream::VIDEO);
+
+  // Deselect video stream.
+  pipeline_->OnSelectedVideoStreamChanged(nullptr);
+
+  Play();
+  ASSERT_TRUE(
+      WaitUntilCurrentTimeIsAfter(base::TimeDelta::FromMilliseconds(500)));
+  Pause();
+
+  // Select video stream.
+  pipeline_->OnSelectedVideoStreamChanged(demux_stream);
+
+  Play();
+  ASSERT_TRUE(WaitUntilOnEnded());
+}
+
 }  // namespace media
diff --git a/media/test/pipeline_integration_test_base.cc b/media/test/pipeline_integration_test_base.cc
index 17647ba..9c20aeb 100644
--- a/media/test/pipeline_integration_test_base.cc
+++ b/media/test/pipeline_integration_test_base.cc
@@ -83,6 +83,15 @@
 void PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB(
     scoped_ptr<MediaTracks> tracks) {
   CHECK(tracks);
+  CHECK(demuxer_);
+
+  // Generate track ids.
+  std::vector<unsigned> track_ids;
+  for (size_t track_id = 1; track_id <= tracks->tracks().size(); ++track_id) {
+    track_ids.push_back(track_id);
+  }
+
+  demuxer_->OnTrackIdsAssigned(*tracks.get(), track_ids);
 }
 
 void PipelineIntegrationTestBase::OnEnded() {
@@ -273,16 +282,14 @@
     scoped_ptr<DataSource> data_source) {
   data_source_ = std::move(data_source);
 
-  Demuxer::MediaTracksUpdatedCB tracks_updated_cb =
-      base::Bind(&PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB,
-                 base::Unretained(this));
-
 #if !defined(MEDIA_DISABLE_FFMPEG)
   demuxer_ = scoped_ptr<Demuxer>(new FFmpegDemuxer(
       message_loop_.task_runner(), data_source_.get(),
       base::Bind(&PipelineIntegrationTestBase::DemuxerEncryptedMediaInitDataCB,
                  base::Unretained(this)),
-      tracks_updated_cb, new MediaLog()));
+      base::Bind(&PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB,
+                 base::Unretained(this)),
+      new MediaLog()));
 #endif
 }
 
diff --git a/mojo/edk/embedder/embedder_unittest.cc b/mojo/edk/embedder/embedder_unittest.cc
index c781f42e..b21d898e 100644
--- a/mojo/edk/embedder/embedder_unittest.cc
+++ b/mojo/edk/embedder/embedder_unittest.cc
@@ -12,6 +12,7 @@
 
 #include "base/bind.h"
 #include "base/command_line.h"
+#include "base/files/file.h"
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/shared_memory.h"
@@ -422,41 +423,53 @@
   END_CHILD()
 }
 
-const base::SharedMemoryHandle::Type kTestHandleTypes[] = {
-  base::SharedMemoryHandle::MACH,
-  base::SharedMemoryHandle::POSIX,
-  base::SharedMemoryHandle::POSIX,
-  base::SharedMemoryHandle::MACH,
+enum class HandleType {
+  POSIX,
+  MACH,
+  MACH_NULL,
 };
 
-// Test that we can mix file descriptor and mach port handles.
+const HandleType kTestHandleTypes[] = {
+  HandleType::MACH,
+  HandleType::MACH_NULL,
+  HandleType::POSIX,
+  HandleType::POSIX,
+  HandleType::MACH,
+};
+
+// Test that we can mix file descriptors and mach port handles.
 TEST_F(EmbedderTest, MultiprocessMixMachAndFds) {
   const size_t kShmSize = 1234;
   RUN_CHILD_ON_PIPE(MultiprocessMixMachAndFdsClient, server_mp)
-    // 1. Create the base::SharedMemory objects and mojo handles from them.
+    // 1. Create fds or Mach objects and mojo handles from them.
     MojoHandle platform_handles[arraysize(kTestHandleTypes)];
     for (size_t i = 0; i < arraysize(kTestHandleTypes); i++) {
       const auto type = kTestHandleTypes[i];
-      base::SharedMemoryCreateOptions options;
-      options.size = kShmSize;
-      options.type = type;
-      base::SharedMemory shared_memory;
-      ASSERT_TRUE(shared_memory.Create(options));
-      base::SharedMemoryHandle shm_handle = base::SharedMemory::DuplicateHandle(
-          shared_memory.handle());
       ScopedPlatformHandle scoped_handle;
-      if (type == base::SharedMemoryHandle::POSIX)
-        scoped_handle.reset(PlatformHandle(shm_handle.GetFileDescriptor().fd));
-      else
+      if (type == HandleType::POSIX) {
+        // The easiest source of fds is opening /dev/null.
+        base::File file(base::FilePath("/dev/null"),
+                        base::File::FLAG_OPEN | base::File::FLAG_WRITE);
+        ASSERT_TRUE(file.IsValid());
+        scoped_handle.reset(PlatformHandle(file.TakePlatformFile()));
+        EXPECT_EQ(PlatformHandle::Type::POSIX, scoped_handle.get().type);
+      } else if (type == HandleType::MACH_NULL) {
+        scoped_handle.reset(PlatformHandle(
+            static_cast<mach_port_t>(MACH_PORT_NULL)));
+        EXPECT_EQ(PlatformHandle::Type::MACH, scoped_handle.get().type);
+      } else {
+        base::SharedMemoryCreateOptions options;
+        options.size = kShmSize;
+        options.type = base::SharedMemoryHandle::MACH;
+        base::SharedMemory shared_memory;
+        ASSERT_TRUE(shared_memory.Create(options));
+        base::SharedMemoryHandle shm_handle =
+            base::SharedMemory::DuplicateHandle(shared_memory.handle());
         scoped_handle.reset(PlatformHandle(shm_handle.GetMemoryObject()));
+        EXPECT_EQ(PlatformHandle::Type::MACH, scoped_handle.get().type);
+      }
       ASSERT_EQ(MOJO_RESULT_OK, CreatePlatformHandleWrapper(
           std::move(scoped_handle), platform_handles + i));
-
-      // Map the shared memory object and write the type into it. 'P' for POSIX,
-      // and 'M' for Mach.
-      ASSERT_TRUE(shared_memory.Map(kShmSize));
-      static_cast<char*>(shared_memory.memory())[0] =
-          type == base::SharedMemoryHandle::POSIX ? 'P' : 'M';
     }
 
     // 2. Send all the handles to the child.
@@ -470,8 +483,7 @@
 
 DEFINE_TEST_CLIENT_TEST_WITH_PIPE(MultiprocessMixMachAndFdsClient, EmbedderTest,
                                   client_mp) {
-  const int kNumHandles = 4;
-  const size_t kShmSize = 1234;
+  const int kNumHandles = arraysize(kTestHandleTypes);
   MojoHandle platform_handles[kNumHandles];
 
   // 1. Read from |client_mp|, which should have a message containing
@@ -479,29 +491,24 @@
   EXPECT_EQ("hello",
             ReadMessageWithHandles(client_mp, platform_handles, kNumHandles));
 
-  // 2. Extract each handle, map it, and verify the type.
+  // 2. Extract each handle, and verify the type.
   for (int i = 0; i < kNumHandles; i++) {
+    const auto type = kTestHandleTypes[i];
     ScopedPlatformHandle scoped_handle;
     ASSERT_EQ(MOJO_RESULT_OK,
               PassWrappedPlatformHandle(platform_handles[i], &scoped_handle));
-    base::SharedMemoryHandle shm_handle;
-    char type = 0;
-    if (scoped_handle.get().type == PlatformHandle::Type::POSIX) {
-      shm_handle = base::SharedMemoryHandle(scoped_handle.release().handle,
-                                            false);
-      type = 'P';
+    if (type == HandleType::POSIX) {
+      EXPECT_NE(0, scoped_handle.get().handle);
+      EXPECT_EQ(PlatformHandle::Type::POSIX, scoped_handle.get().type);
+    } else if (type == HandleType::MACH_NULL) {
+      EXPECT_EQ(static_cast<mach_port_t>(MACH_PORT_NULL),
+                scoped_handle.get().port);
+      EXPECT_EQ(PlatformHandle::Type::MACH, scoped_handle.get().type);
     } else {
-      shm_handle = base::SharedMemoryHandle(scoped_handle.release().port,
-                                            kShmSize, base::GetCurrentProcId());
-      type = 'M';
+      EXPECT_NE(static_cast<mach_port_t>(MACH_PORT_NULL),
+                scoped_handle.get().port);
+      EXPECT_EQ(PlatformHandle::Type::MACH, scoped_handle.get().type);
     }
-
-    // Verify the type order.
-    EXPECT_EQ(kTestHandleTypes[i], shm_handle.GetType());
-
-    base::SharedMemory shared_memory(shm_handle, false);
-    ASSERT_TRUE(shared_memory.Map(kShmSize));
-    EXPECT_EQ(type, static_cast<char*>(shared_memory.memory())[0]);
   }
 
   // 3. Say bye!
diff --git a/mojo/edk/system/channel.cc b/mojo/edk/system/channel.cc
index ac666cf..69fe59d 100644
--- a/mojo/edk/system/channel.cc
+++ b/mojo/edk/system/channel.cc
@@ -53,7 +53,10 @@
   // serialised into the message buffer. Since there could be a mix of fds and
   // mach ports, we store the mach ports as an <index, port> pair (of uint32_t),
   // so that the original ordering of handles can be re-created.
-  extra_header_size = max_handles * sizeof(MachPortsEntry);
+  if (max_handles) {
+    extra_header_size =
+        sizeof(MachPortsExtraHeader) + (max_handles * sizeof(MachPortsEntry));
+  }
 #endif
   // Pad extra header data to be aliged to |kChannelMessageAlignment| bytes.
   if (extra_header_size % kChannelMessageAlignment) {
@@ -96,10 +99,14 @@
     for (size_t i = 0; i < max_handles_; ++i)
       handles()[i] = PlatformHandle();
 #elif defined(OS_MACOSX) && !defined(OS_IOS)
-    mach_ports_ = reinterpret_cast<MachPortsEntry*>(mutable_extra_header());
+    mach_ports_header_ =
+        reinterpret_cast<MachPortsExtraHeader*>(mutable_extra_header());
+    mach_ports_header_->num_ports = 0;
     // Initialize all handles to invalid values.
-    for (size_t i = 0; i < max_handles_; ++i)
-      mach_ports_[i] = {0, static_cast<uint32_t>(MACH_PORT_NULL)};
+    for (size_t i = 0; i < max_handles_; ++i) {
+      mach_ports_header_->entries[i] =
+          {0, static_cast<uint32_t>(MACH_PORT_NULL)};
+    }
 #endif
   }
 }
@@ -241,16 +248,21 @@
 
 #if defined(OS_MACOSX) && !defined(OS_IOS)
   size_t mach_port_index = 0;
-  for (size_t i = 0; i < max_handles_; ++i)
-    mach_ports_[i] = {0, static_cast<uint32_t>(MACH_PORT_NULL)};
-  for (size_t i = 0; i < handle_vector_->size(); i++) {
-    if ((*handle_vector_)[i].type == PlatformHandle::Type::MACH ||
-        (*handle_vector_)[i].type == PlatformHandle::Type::MACH_NAME) {
-      mach_port_t port = (*handle_vector_)[i].port;
-      mach_ports_[mach_port_index].index = i;
-      mach_ports_[mach_port_index].mach_port = port;
-      mach_port_index++;
+  if (mach_ports_header_) {
+    for (size_t i = 0; i < max_handles_; ++i) {
+      mach_ports_header_->entries[i] =
+          {0, static_cast<uint32_t>(MACH_PORT_NULL)};
     }
+    for (size_t i = 0; i < handle_vector_->size(); i++) {
+      if ((*handle_vector_)[i].type == PlatformHandle::Type::MACH ||
+          (*handle_vector_)[i].type == PlatformHandle::Type::MACH_NAME) {
+        mach_port_t port = (*handle_vector_)[i].port;
+        mach_ports_header_->entries[mach_port_index].index = i;
+        mach_ports_header_->entries[mach_port_index].mach_port = port;
+        mach_port_index++;
+      }
+    }
+    mach_ports_header_->num_ports = static_cast<uint16_t>(mach_port_index);
   }
 #endif
 }
@@ -266,8 +278,13 @@
   header_->num_handles = 0;
   return moved_handles;
 #elif defined(OS_MACOSX) && !defined(OS_IOS)
-  for (size_t i = 0; i < max_handles_; ++i)
-    mach_ports_[i] = {0, static_cast<uint32_t>(MACH_PORT_NULL)};
+  if (mach_ports_header_) {
+    for (size_t i = 0; i < max_handles_; ++i) {
+      mach_ports_header_->entries[i] =
+          {0, static_cast<uint32_t>(MACH_PORT_NULL)};
+    }
+    mach_ports_header_->num_ports = 0;
+  }
   header_->num_handles = 0;
   return std::move(handle_vector_);
 #else
diff --git a/mojo/edk/system/channel.h b/mojo/edk/system/channel.h
index 9932c9c..7234cb0 100644
--- a/mojo/edk/system/channel.h
+++ b/mojo/edk/system/channel.h
@@ -69,13 +69,28 @@
 
 #if defined(OS_MACOSX) && !defined(OS_IOS)
     struct MachPortsEntry {
+      // Index of Mach port in the original vector of PlatformHandles.
       uint16_t index;
+
+      // Mach port name.
       uint32_t mach_port;
       static_assert(sizeof(mach_port_t) <= sizeof(uint32_t),
                     "mach_port_t must be no larger than uint32_t");
     };
     static_assert(sizeof(MachPortsEntry) == 6,
                   "sizeof(MachPortsEntry) must be 6 bytes");
+
+    // Structure of the extra header field when present on OSX.
+    struct MachPortsExtraHeader {
+      // Actual number of Mach ports encoded in the extra header.
+      uint16_t num_ports;
+
+      // Array of encoded Mach ports. If |num_ports| > 0, |entires[0]| through
+      // to |entries[num_ports-1]| inclusive are valid.
+      MachPortsEntry entries[0];
+    };
+    static_assert(sizeof(MachPortsExtraHeader) == 2,
+                  "sizeof(MachPortsExtraHeader) must be 2 bytes");
 #endif
 #pragma pack(pop)
 
@@ -155,7 +170,7 @@
 
 #if defined(OS_MACOSX) && !defined(OS_IOS)
     // On OSX, handles are serialised into the extra header section.
-    MachPortsEntry* mach_ports_ = nullptr;
+    MachPortsExtraHeader* mach_ports_header_ = nullptr;
 #endif
 
     DISALLOW_COPY_AND_ASSIGN(Message);
diff --git a/mojo/edk/system/channel_posix.cc b/mojo/edk/system/channel_posix.cc
index bc759e0..8dac516bf 100644
--- a/mojo/edk/system/channel_posix.cc
+++ b/mojo/edk/system/channel_posix.cc
@@ -140,20 +140,19 @@
     // On OSX, we can have mach ports which are located in the extra header
     // section.
     using MachPortsEntry = Channel::Message::MachPortsEntry;
-    CHECK(extra_header_size >= num_handles * sizeof(MachPortsEntry));
-    size_t num_mach_ports = 0;
-    const MachPortsEntry* mach_ports =
-        reinterpret_cast<const MachPortsEntry*>(extra_header);
-    for (size_t i = 0; i < num_handles; i++) {
-      if (mach_ports[i].mach_port != MACH_PORT_NULL)
-        num_mach_ports++;
-    }
+    using MachPortsExtraHeader = Channel::Message::MachPortsExtraHeader;
+    CHECK(extra_header_size >=
+          sizeof(MachPortsExtraHeader) + num_handles * sizeof(MachPortsEntry));
+    const MachPortsExtraHeader* mach_ports_header =
+        reinterpret_cast<const MachPortsExtraHeader*>(extra_header);
+    size_t num_mach_ports = mach_ports_header->num_ports;
     CHECK(num_mach_ports <= num_handles);
     if (incoming_platform_handles_.size() + num_mach_ports < num_handles)
       return nullptr;
 
     ScopedPlatformHandleVectorPtr handles(
         new PlatformHandleVector(num_handles));
+    const MachPortsEntry* mach_ports = mach_ports_header->entries;
     for (size_t i = 0, mach_port_index = 0; i < num_handles; ++i) {
       if (mach_port_index < num_mach_ports &&
           mach_ports[mach_port_index].index == i) {
diff --git a/mojo/edk/system/mach_port_relay.cc b/mojo/edk/system/mach_port_relay.cc
index 2dd40e5..22beb65 100644
--- a/mojo/edk/system/mach_port_relay.cc
+++ b/mojo/edk/system/mach_port_relay.cc
@@ -27,6 +27,11 @@
     if (handle->type != PlatformHandle::Type::MACH_NAME)
       continue;
 
+    if (handle->port == MACH_PORT_NULL) {
+      handle->type = PlatformHandle::Type::MACH;
+      continue;
+    }
+
     base::mac::ScopedMachReceiveRight message_port(handle->port);
     base::mac::ScopedMachSendRight received_port(
         base::ReceiveMachPort(message_port.get()));
@@ -72,8 +77,13 @@
     if (handle->type != PlatformHandle::Type::MACH)
       continue;
 
+    if (handle->port == MACH_PORT_NULL) {
+      handle->type = PlatformHandle::Type::MACH_NAME;
+      num_sent++;
+      continue;
+    }
+
     mach_port_name_t intermediate_port;
-    DCHECK(handle->port != MACH_PORT_NULL);
     intermediate_port = base::CreateIntermediateMachPort(
         task_port, base::mac::ScopedMachSendRight(handle->port), nullptr);
     if (intermediate_port == MACH_PORT_NULL) {
@@ -111,6 +121,12 @@
     if (handle->type != PlatformHandle::Type::MACH_NAME)
       continue;
 
+    if (handle->port == MACH_PORT_NULL) {
+      handle->type = PlatformHandle::Type::MACH;
+      num_received++;
+      continue;
+    }
+
     mach_port_t extracted_right = MACH_PORT_NULL;
     mach_msg_type_name_t extracted_right_type;
     kern_return_t kr =
diff --git a/mojo/mojo_public.gyp b/mojo/mojo_public.gyp
index 8fa264c..b377329 100644
--- a/mojo/mojo_public.gyp
+++ b/mojo/mojo_public.gyp
@@ -121,6 +121,7 @@
       ],
       'sources': [
         'public/cpp/bindings/array.h',
+        'public/cpp/bindings/array_traits.h',
         'public/cpp/bindings/associated_binding.h',
         'public/cpp/bindings/associated_group.h',
         'public/cpp/bindings/associated_interface_ptr.h',
@@ -136,6 +137,7 @@
         'public/cpp/bindings/lib/array_internal.h',
         'public/cpp/bindings/lib/array_serialization.h',
         'public/cpp/bindings/lib/array_serialization_traits.h',
+        'public/cpp/bindings/lib/array_traits_standard.h',
         'public/cpp/bindings/lib/associated_group.cc',
         'public/cpp/bindings/lib/associated_interface_ptr_state.h',
         'public/cpp/bindings/lib/binding_state.h',
@@ -173,6 +175,11 @@
         'public/cpp/bindings/lib/message_internal.h',
         'public/cpp/bindings/lib/multiplex_router.cc',
         'public/cpp/bindings/lib/multiplex_router.h',
+        'public/cpp/bindings/lib/native_struct.cc',
+        'public/cpp/bindings/lib/native_struct_data.cc',
+        'public/cpp/bindings/lib/native_struct_data.h',
+        'public/cpp/bindings/lib/native_struct_serialization.cc',
+        'public/cpp/bindings/lib/native_struct_serialization.h',
         'public/cpp/bindings/lib/no_interface.cc',
         'public/cpp/bindings/lib/pickle_buffer.cc',
         'public/cpp/bindings/lib/pickle_buffer.h',
@@ -206,9 +213,11 @@
         'public/cpp/bindings/lib/wtf_string_serialization.h',
         'public/cpp/bindings/message.h',
         'public/cpp/bindings/message_filter.h',
+        'public/cpp/bindings/native_struct.h',
         'public/cpp/bindings/no_interface.h',
         'public/cpp/bindings/stl_converters.h',
         'public/cpp/bindings/string.h',
+        'public/cpp/bindings/struct_ptr.h',
         'public/cpp/bindings/strong_binding.h',
         'public/cpp/bindings/type_converter.h',
         # This comes from the mojo_interface_bindings_cpp_sources dependency.
@@ -228,6 +237,7 @@
         '..'
       ],
       'sources': [
+        'public/cpp/bindings/lib/array_traits_wtf.h',
         'public/cpp/bindings/lib/wtf_array_serialization.h',
         'public/cpp/bindings/lib/wtf_serialization.h',
         'public/cpp/bindings/lib/wtf_string_serialization.cc',
diff --git a/mojo/public/cpp/bindings/BUILD.gn b/mojo/public/cpp/bindings/BUILD.gn
index f0d11e65..93df9a3 100644
--- a/mojo/public/cpp/bindings/BUILD.gn
+++ b/mojo/public/cpp/bindings/BUILD.gn
@@ -5,6 +5,7 @@
 source_set("bindings") {
   sources = [
     "array.h",
+    "array_traits.h",
     "associated_binding.h",
     "associated_group.h",
     "associated_interface_ptr.h",
@@ -20,6 +21,7 @@
     "lib/array_internal.h",
     "lib/array_serialization.h",
     "lib/array_serialization_traits.h",
+    "lib/array_traits_standard.h",
     "lib/associated_group.cc",
     "lib/associated_interface_ptr_state.h",
     "lib/binding_state.h",
@@ -56,6 +58,11 @@
     "lib/message_internal.h",
     "lib/multiplex_router.cc",
     "lib/multiplex_router.h",
+    "lib/native_struct.cc",
+    "lib/native_struct_data.cc",
+    "lib/native_struct_data.h",
+    "lib/native_struct_serialization.cc",
+    "lib/native_struct_serialization.h",
     "lib/no_interface.cc",
     "lib/pickle_buffer.cc",
     "lib/pickle_buffer.h",
@@ -90,6 +97,7 @@
     "map.h",
     "message.h",
     "message_filter.h",
+    "native_struct.h",
     "no_interface.h",
     "stl_converters.h",
     "string.h",
@@ -129,6 +137,7 @@
 
 source_set("wtf_support") {
   sources = [
+    "lib/array_traits_wtf.h",
     "lib/wtf_array_serialization.h",
     "lib/wtf_serialization.h",
     "lib/wtf_string_serialization.cc",
diff --git a/mojo/public/cpp/bindings/array.h b/mojo/public/cpp/bindings/array.h
index e9bd6838..d94feb0 100644
--- a/mojo/public/cpp/bindings/array.h
+++ b/mojo/public/cpp/bindings/array.h
@@ -30,10 +30,10 @@
  public:
   using ConstRefType = typename std::vector<T>::const_reference;
   using RefType = typename std::vector<T>::reference;
-  using ElementType = T;
 
-  using Data_ =
-      internal::Array_Data<typename internal::WrapperTraits<T>::DataType>;
+  using Element = T;
+  using Data_ = internal::Array_Data<
+      typename internal::GetDataTypeAsArrayElement<T>::Data>;
 
   using iterator = typename std::vector<T>::iterator;
   using const_iterator = typename std::vector<T>::const_iterator;
diff --git a/mojo/public/cpp/bindings/array_traits.h b/mojo/public/cpp/bindings/array_traits.h
new file mode 100644
index 0000000..10fc073
--- /dev/null
+++ b/mojo/public/cpp/bindings/array_traits.h
@@ -0,0 +1,20 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_PUBLIC_CPP_BINDINGS_ARRAY_TRAITS_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_ARRAY_TRAITS_H_
+
+namespace mojo {
+
+// This must be specialized for any UserType to be serialized/deserialized as
+// a mojom array.
+//
+// TODO(yzshen): This is work in progress. Add better documentation once the
+// interface becomes more stable.
+template <typename UserType>
+struct ArrayTraits;
+
+}  // namespace mojo
+
+#endif  // MOJO_PUBLIC_CPP_BINDINGS_ARRAY_TRAITS_H_
diff --git a/mojo/public/cpp/bindings/lib/array_internal.h b/mojo/public/cpp/bindings/lib/array_internal.h
index 1b823ba7..74f7782 100644
--- a/mojo/public/cpp/bindings/lib/array_internal.h
+++ b/mojo/public/cpp/bindings/lib/array_internal.h
@@ -369,14 +369,14 @@
 template <typename T>
 class Array_Data {
  public:
-  typedef ArrayDataTraits<T> Traits;
-  typedef typename Traits::StorageType StorageType;
-  typedef typename Traits::Ref Ref;
-  typedef typename Traits::ConstRef ConstRef;
-  typedef ArraySerializationHelper<T,
-                                   IsHandle<T>::value,
-                                   IsUnionDataType<T>::value>
-      Helper;
+  using Traits = ArrayDataTraits<T>;
+  using StorageType = typename Traits::StorageType;
+  using Ref = typename Traits::Ref;
+  using ConstRef = typename Traits::ConstRef;
+  using Helper = ArraySerializationHelper<T,
+                                          IsHandle<T>::value,
+                                          IsUnionDataType<T>::value>;
+  using Element = T;
 
   // Returns null if |num_elements| or the corresponding storage size cannot be
   // stored in uint32_t.
diff --git a/mojo/public/cpp/bindings/lib/array_serialization.h b/mojo/public/cpp/bindings/lib/array_serialization.h
index d5a59af..91fa5d71 100644
--- a/mojo/public/cpp/bindings/lib/array_serialization.h
+++ b/mojo/public/cpp/bindings/lib/array_serialization.h
@@ -15,26 +15,27 @@
 template <typename E>
 inline size_t GetSerializedSize_(const Array<E>& input,
                                  internal::SerializationContext* context) {
-  return internal::ArraySerializationImpl<Array<E>>::GetSerializedSize(input,
+  return internal::ArraySerializationImpl<Array<E>,
+                                          Array<E>>::GetSerializedSize(input,
                                                                        context);
 }
 
-template <typename E, typename F>
+template <typename E>
 inline void SerializeArray_(
     Array<E> input,
     internal::Buffer* buf,
-    internal::Array_Data<F>** output,
+    typename Array<E>::Data_** output,
     const internal::ArrayValidateParams* validate_params,
     internal::SerializationContext* context) {
-  return internal::ArraySerializationImpl<Array<E>>::template Serialize<F>(
+  return internal::ArraySerializationImpl<Array<E>, Array<E>>::Serialize(
       std::move(input), buf, output, validate_params, context);
 }
 
-template <typename E, typename F>
-inline bool Deserialize_(internal::Array_Data<F>* input,
+template <typename E>
+inline bool Deserialize_(typename Array<E>::Data_* input,
                          Array<E>* output,
                          internal::SerializationContext* context) {
-  return internal::ArraySerializationImpl<Array<E>>::template Deserialize<F>(
+  return internal::ArraySerializationImpl<Array<E>, Array<E>>::Deserialize(
       input, output, context);
 }
 
diff --git a/mojo/public/cpp/bindings/lib/array_serialization_traits.h b/mojo/public/cpp/bindings/lib/array_serialization_traits.h
index 17817e01..379a6fd 100644
--- a/mojo/public/cpp/bindings/lib/array_serialization_traits.h
+++ b/mojo/public/cpp/bindings/lib/array_serialization_traits.h
@@ -26,25 +26,56 @@
 namespace mojo {
 namespace internal {
 
-template <typename ArrayType,
-          typename ElementType,
-          typename ElementDataType,
-          bool is_union = IsUnionDataType<
-              typename RemovePointer<ElementDataType>::type>::value>
+enum class ArraySerializerType {
+  BOOLEAN,
+  // Except boolean.
+  POD,
+  HANDLE,
+  POINTER,
+  UNION
+};
+
+template <typename T>
+struct GetArraySerializerType {
+  static const ArraySerializerType value =
+      IsUnionDataType<T>::value
+          ? ArraySerializerType::UNION
+          : (std::is_pointer<T>::value
+                 ? ArraySerializerType::POINTER
+                 : (IsHandle<T>::value ? ArraySerializerType::HANDLE
+                                       : (std::is_same<T, bool>::value
+                                              ? ArraySerializerType::BOOLEAN
+                                              : ArraySerializerType::POD)));
+};
+
+template <typename MojomType,
+          typename UserType,
+          ArraySerializerType type =
+              GetArraySerializerType<typename MojomType::Data_::Element>::value>
 struct ArraySerializer;
 
 // Handles serialization and deserialization of arrays of pod types.
-template <typename ArrayType, typename E, typename F>
-struct ArraySerializer<ArrayType, E, F, false> {
-  static_assert(sizeof(E) == sizeof(F), "Incorrect array serializer");
-  static size_t GetSerializedSize(const ArrayType& input,
+template <typename MojomType, typename UserType>
+struct ArraySerializer<MojomType, UserType, ArraySerializerType::POD> {
+  using Data = typename MojomType::Data_;
+  using DataElement = typename Data::Element;
+  using Element = typename MojomType::Element;
+  using Traits = ArrayTraits<UserType>;
+  using UserElement = typename Traits::Element;
+
+  static_assert(sizeof(Element) == sizeof(DataElement),
+                "Incorrect array serializer");
+  static_assert(std::is_same<Element, UserElement>::value,
+                "Incorrect array serializer");
+
+  static size_t GetSerializedSize(const UserType& input,
                                   SerializationContext* context) {
-    return sizeof(Array_Data<F>) + Align(input.size() * sizeof(E));
+    return sizeof(Data) + Align(Traits::GetSize(input) * sizeof(DataElement));
   }
 
-  static void SerializeElements(ArrayType input,
+  static void SerializeElements(UserType input,
                                 Buffer* buf,
-                                Array_Data<F>* output,
+                                Data* output,
                                 const ArrayValidateParams* validate_params,
                                 SerializationContext* context) {
     DCHECK(!validate_params->element_is_nullable)
@@ -52,31 +83,41 @@
     DCHECK(!validate_params->element_validate_params)
         << "Primitive type should not have array validate params";
 
-    if (input.size())
-      memcpy(output->storage(), &input.storage()[0], input.size() * sizeof(E));
+    if (Traits::GetSize(input)) {
+      memcpy(output->storage(), Traits::GetData(input),
+             Traits::GetSize(input) * sizeof(DataElement));
+    }
   }
-  static bool DeserializeElements(Array_Data<F>* input,
-                                  ArrayType* output,
+
+  static bool DeserializeElements(Data* input,
+                                  UserType* output,
                                   SerializationContext* context) {
-    ArrayType result(input->size());
-    if (input->size())
-      memcpy(&result.front(), input->storage(), input->size() * sizeof(E));
-    output->Swap(&result);
+    Traits::Resize(*output, input->size());
+    if (input->size()) {
+      memcpy(Traits::GetData(*output), input->storage(),
+             input->size() * sizeof(DataElement));
+    }
     return true;
   }
 };
 
 // Serializes and deserializes arrays of bools.
-template <typename ArrayType>
-struct ArraySerializer<ArrayType, bool, bool, false> {
-  static size_t GetSerializedSize(const ArrayType& input,
+template <typename MojomType, typename UserType>
+struct ArraySerializer<MojomType, UserType, ArraySerializerType::BOOLEAN> {
+  using Traits = ArrayTraits<UserType>;
+  using Data = typename MojomType::Data_;
+
+  static_assert(std::is_same<bool, typename UserType::Element>::value,
+                "Incorrect array serializer");
+
+  static size_t GetSerializedSize(const UserType& input,
                                   SerializationContext* context) {
-    return sizeof(Array_Data<bool>) + Align((input.size() + 7) / 8);
+    return sizeof(Data) + Align((Traits::GetSize(input) + 7) / 8);
   }
 
-  static void SerializeElements(ArrayType input,
+  static void SerializeElements(UserType input,
                                 Buffer* buf,
-                                Array_Data<bool>* output,
+                                Data* output,
                                 const ArrayValidateParams* validate_params,
                                 SerializationContext* context) {
     DCHECK(!validate_params->element_is_nullable)
@@ -85,110 +126,123 @@
         << "Primitive type should not have array validate params";
 
     // TODO(darin): Can this be a memcpy somehow instead of a bit-by-bit copy?
-    for (size_t i = 0; i < input.size(); ++i)
-      output->at(i) = input[i];
+    size_t size = Traits::GetSize(input);
+    for (size_t i = 0; i < size; ++i)
+      output->at(i) = Traits::GetAt(input, i);
   }
-  static bool DeserializeElements(Array_Data<bool>* input,
-                                  ArrayType* output,
+  static bool DeserializeElements(Data* input,
+                                  UserType* output,
                                   SerializationContext* context) {
-    ArrayType result(input->size());
+    Traits::Resize(*output, input->size());
     // TODO(darin): Can this be a memcpy somehow instead of a bit-by-bit copy?
     for (size_t i = 0; i < input->size(); ++i)
-      result.at(i) = input->at(i);
-    output->Swap(&result);
+      Traits::GetAt(*output, i) = input->at(i);
     return true;
   }
 };
 
 // Serializes and deserializes arrays of handles.
-template <typename ArrayType, typename H>
-struct ArraySerializer<ArrayType, ScopedHandleBase<H>, H, false> {
-  static size_t GetSerializedSize(const ArrayType& input,
+template <typename MojomType, typename UserType>
+struct ArraySerializer<MojomType, UserType, ArraySerializerType::HANDLE> {
+  using Data = typename MojomType::Data_;
+  using DataElement = typename Data::Element;
+  using Element = typename MojomType::Element;
+  using Traits = ArrayTraits<UserType>;
+  using UserElement = typename Traits::Element;
+
+  static_assert(std::is_same<Element, UserElement>::value,
+                "Incorrect array serializer");
+
+  static size_t GetSerializedSize(const UserType& input,
                                   SerializationContext* context) {
-    return sizeof(Array_Data<H>) + Align(input.size() * sizeof(H));
+    return sizeof(Data) + Align(Traits::GetSize(input) * sizeof(DataElement));
   }
 
-  static void SerializeElements(ArrayType input,
+  static void SerializeElements(UserType input,
                                 Buffer* buf,
-                                Array_Data<H>* output,
+                                Data* output,
                                 const ArrayValidateParams* validate_params,
                                 SerializationContext* context) {
     DCHECK(!validate_params->element_validate_params)
         << "Handle type should not have array validate params";
 
-    for (size_t i = 0; i < input.size(); ++i) {
-      output->at(i) = input[i].release();  // Transfer ownership of the handle.
+    size_t size = Traits::GetSize(input);
+    for (size_t i = 0; i < size; ++i) {
+      // Transfer ownership of the handle.
+      output->at(i) = Traits::GetAt(input, i).release();
       MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING(
           !validate_params->element_is_nullable && !output->at(i).is_valid(),
           VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE,
           MakeMessageWithArrayIndex(
-              "invalid handle in array expecting valid handles", input.size(),
-              i));
+              "invalid handle in array expecting valid handles", size, i));
     }
   }
-  static bool DeserializeElements(Array_Data<H>* input,
-                                  ArrayType* output,
+  static bool DeserializeElements(Data* input,
+                                  UserType* output,
                                   SerializationContext* context) {
-    ArrayType result(input->size());
-    for (size_t i = 0; i < input->size(); ++i)
-      result.at(i) = MakeScopedHandle(FetchAndReset(&input->at(i)));
-    output->Swap(&result);
+    Traits::Resize(*output, input->size());
+    for (size_t i = 0; i < input->size(); ++i) {
+      Traits::GetAt(*output, i) =
+          MakeScopedHandle(FetchAndReset(&input->at(i)));
+    }
     return true;
   }
 };
 
 // This template must only apply to pointer mojo entity (strings, structs,
-// arrays and maps). This is done by ensuring that WrapperTraits<S>::DataType is
-// a pointer.
-template <typename ArrayType, typename S>
-struct ArraySerializer<
-    ArrayType,
-    S,
-    typename EnableIf<IsPointer<typename WrapperTraits<S>::DataType>::value,
-                      typename WrapperTraits<S>::DataType>::type,
-    false> {
-  typedef
-      typename RemovePointer<typename WrapperTraits<S>::DataType>::type S_Data;
-  static size_t GetSerializedSize(const ArrayType& input,
+// arrays and maps).
+template <typename MojomType, typename UserType>
+struct ArraySerializer<MojomType, UserType, ArraySerializerType::POINTER> {
+  using Data = typename MojomType::Data_;
+  using DataElement = typename Data::Element;
+  using Element = typename MojomType::Element;
+  using Traits = ArrayTraits<UserType>;
+  using UserElement = typename Traits::Element;
+
+  static size_t GetSerializedSize(const UserType& input,
                                   SerializationContext* context) {
-    size_t size = sizeof(Array_Data<S_Data*>) +
-                  input.size() * sizeof(StructPointer<S_Data>);
-    for (size_t i = 0; i < input.size(); ++i)
-      size += GetSerializedSize_(input[i], context);
+    size_t element_count = Traits::GetSize(input);
+    size_t size =
+        sizeof(Data) +
+        element_count *
+            sizeof(
+                StructPointer<typename std::remove_pointer<DataElement>::type>);
+    for (size_t i = 0; i < element_count; ++i)
+      size += GetSerializedSize_(Traits::GetAt(input, i), context);
     return size;
   }
 
-  static void SerializeElements(ArrayType input,
+  static void SerializeElements(UserType input,
                                 Buffer* buf,
-                                Array_Data<S_Data*>* output,
+                                Data* output,
                                 const ArrayValidateParams* validate_params,
                                 SerializationContext* context) {
-    for (size_t i = 0; i < input.size(); ++i) {
-      S_Data* element;
-      SerializeCaller<S>::Run(std::move(input[i]), buf, &element,
-                              validate_params->element_validate_params,
-                              context);
+    size_t size = Traits::GetSize(input);
+    for (size_t i = 0; i < size; ++i) {
+      DataElement element;
+      SerializeCaller<Element>::Run(
+          std::move(Traits::GetAt(input, i)), buf, &element,
+          validate_params->element_validate_params, context);
       output->at(i) = element;
       MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING(
           !validate_params->element_is_nullable && !element,
           VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
           MakeMessageWithArrayIndex("null in array expecting valid pointers",
-                                    input.size(), i));
+                                    size, i));
     }
   }
-  static bool DeserializeElements(Array_Data<S_Data*>* input,
-                                  ArrayType* output,
+  static bool DeserializeElements(Data* input,
+                                  UserType* output,
                                   SerializationContext* context) {
     bool success = true;
-    ArrayType result(input->size());
+    Traits::Resize(*output, input->size());
     for (size_t i = 0; i < input->size(); ++i) {
       // Note that we rely on complete deserialization taking place in order to
       // transfer ownership of all encoded handles. Therefore we don't
       // short-circuit on failure here.
-      if (!Deserialize_(input->at(i), &result[i], context))
+      if (!Deserialize_(input->at(i), &Traits::GetAt(*output, i), context))
         success = false;
     }
-    output->Swap(&result);
     return success;
   }
 
@@ -201,7 +255,7 @@
   struct SerializeCaller {
     static void Run(T input,
                     Buffer* buf,
-                    typename WrapperTraits<T>::DataType* output,
+                    DataElement* output,
                     const ArrayValidateParams* validate_params,
                     SerializationContext* context) {
       DCHECK(!validate_params)
@@ -215,7 +269,7 @@
   struct SerializeCaller<T, true, false> {
     static void Run(T input,
                     Buffer* buf,
-                    typename T::Data_** output,
+                    DataElement* output,
                     const ArrayValidateParams* validate_params,
                     SerializationContext* context) {
       SerializeArray_(std::move(input), buf, output, validate_params, context);
@@ -226,7 +280,7 @@
   struct SerializeCaller<Map<T, U>, false, false> {
     static void Run(Map<T, U> input,
                     Buffer* buf,
-                    typename Map<T, U>::Data_** output,
+                    DataElement* output,
                     const ArrayValidateParams* validate_params,
                     SerializationContext* context) {
       SerializeMap_(std::move(input), buf, output, validate_params, context);
@@ -237,7 +291,7 @@
   struct SerializeCaller<T, false, true> {
     static void Run(const T& input,
                     Buffer* buf,
-                    String_Data** output,
+                    DataElement* output,
                     const ArrayValidateParams* validate_params,
                     SerializationContext* context) {
       DCHECK(validate_params && !validate_params->element_validate_params &&
@@ -251,200 +305,209 @@
 };
 
 // Handles serialization and deserialization of arrays of unions.
-template <typename ArrayType, typename U, typename U_Data>
-struct ArraySerializer<ArrayType, U, U_Data, true> {
-  static size_t GetSerializedSize(const ArrayType& input,
+template <typename MojomType, typename UserType>
+struct ArraySerializer<MojomType, UserType, ArraySerializerType::UNION> {
+  using Data = typename MojomType::Data_;
+  using DataElement = typename Data::Element;
+  using Element = typename MojomType::Element;
+  using Traits = ArrayTraits<UserType>;
+  using UserElement = typename Traits::Element;
+
+  static_assert(std::is_same<Element, UserElement>::value,
+                "Incorrect array serializer");
+
+  static size_t GetSerializedSize(const UserType& input,
                                   SerializationContext* context) {
-    size_t size = sizeof(Array_Data<U_Data>);
-    for (size_t i = 0; i < input.size(); ++i) {
-      // GetSerializedSize_ will account for both the data in the union and the
-      // space in the array used to hold the union.
-      size += GetSerializedSize_(input[i], false, context);
+    size_t element_count = Traits::GetSize(input);
+    size_t size = sizeof(Data);
+    for (size_t i = 0; i < element_count; ++i) {
+      // Call GetSerializedSize_ with |inlined| set to false, so that it will
+      // account for both the data in the union and the space in the array used
+      // to hold the union.
+      size += GetSerializedSize_(Traits::GetAt(input, i), false, context);
     }
     return size;
   }
 
-  static void SerializeElements(ArrayType input,
+  static void SerializeElements(UserType input,
                                 Buffer* buf,
-                                Array_Data<U_Data>* output,
+                                Data* output,
                                 const ArrayValidateParams* validate_params,
                                 SerializationContext* context) {
-    for (size_t i = 0; i < input.size(); ++i) {
-      U_Data* result = output->storage() + i;
-      SerializeUnion_(std::move(input[i]), buf, &result, true, context);
+    size_t size = Traits::GetSize(input);
+    for (size_t i = 0; i < size; ++i) {
+      DataElement* result = output->storage() + i;
+      SerializeUnion_(std::move(Traits::GetAt(input, i)), buf, &result, true,
+                      context);
       MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING(
           !validate_params->element_is_nullable && output->at(i).is_null(),
           VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
           MakeMessageWithArrayIndex("null in array expecting valid unions",
-                                    input.size(), i));
+                                    size, i));
     }
   }
 
-  static bool DeserializeElements(Array_Data<U_Data>* input,
-                                  ArrayType* output,
+  static bool DeserializeElements(Data* input,
+                                  UserType* output,
                                   SerializationContext* context) {
     bool success = true;
-    ArrayType result(input->size());
+    Traits::Resize(*output, input->size());
     for (size_t i = 0; i < input->size(); ++i) {
       // Note that we rely on complete deserialization taking place in order to
       // transfer ownership of all encoded handles. Therefore we don't
       // short-circuit on failure here.
-      if (!Deserialize_(&input->at(i), &result[i], context))
+      if (!Deserialize_(&input->at(i), &Traits::GetAt(*output, i), context))
         success = false;
     }
-    output->Swap(&result);
     return success;
   }
 };
 
 // Another layer of abstraction to switch between standard mojom type
 // serializers and native-only serializers.
-template <typename ArrayType,
+template <typename MojomType,
+          typename UserType,
           bool use_native =
-              ShouldUseNativeSerializer<typename ArrayType::ElementType>::value>
+              ShouldUseNativeSerializer<typename MojomType::Element>::value>
 struct ArraySerializationStrategy;
 
 // Serialization strategy for standard mojom types. This branches further
 // by choosing an ArraySerializer specialization from above.
-template <typename ArrayType>
-struct ArraySerializationStrategy<ArrayType, false> {
-  template <class DataType>
-  using Serializer =
-      ArraySerializer<ArrayType, typename ArrayType::ElementType, DataType>;
+template <typename MojomType, typename UserType>
+struct ArraySerializationStrategy<MojomType, UserType, false> {
+  using Serializer = ArraySerializer<MojomType, UserType>;
+  using Traits = ArrayTraits<UserType>;
+  using Data = typename MojomType::Data_;
 
-  static size_t GetSerializedSize(const ArrayType& input,
+  static size_t GetSerializedSize(const UserType& input,
                                   SerializationContext* context) {
-    DCHECK(input);
-    return Serializer<typename WrapperTraits<
-        typename ArrayType::ElementType>::DataType>::GetSerializedSize(input,
-                                                                       context);
+    DCHECK(!Traits::IsNull(input));
+    return Serializer::GetSerializedSize(input, context);
   }
 
-  template <typename F>
-  static void Serialize(ArrayType input,
+  static void Serialize(UserType input,
                         Buffer* buf,
-                        Array_Data<F>** output,
+                        Data** output,
                         const ArrayValidateParams* validate_params,
                         SerializationContext* context) {
-    DCHECK(input);
-    Array_Data<F>* result = Array_Data<F>::New(input.size(), buf);
+    DCHECK(!Traits::IsNull(input));
+    Data* result = Data::New(Traits::GetSize(input), buf);
     if (result) {
-      Serializer<F>::SerializeElements(std::move(input), buf, result,
-                                       validate_params, context);
+      Serializer::SerializeElements(std::move(input), buf, result,
+                                    validate_params, context);
     }
     *output = result;
   }
 
-  template <typename F>
-  static bool Deserialize(Array_Data<F>* input,
-                          ArrayType* output,
+  static bool Deserialize(Data* input,
+                          UserType* output,
                           SerializationContext* context) {
     DCHECK(input);
-    return Serializer<F>::DeserializeElements(input, output, context);
+    return Serializer::DeserializeElements(input, output, context);
   }
 };
 
 // Serialization for arrays of native-only types, which are opaquely serialized
 // as arrays of uint8_t arrays.
-template <typename ArrayType>
-struct ArraySerializationStrategy<ArrayType, true> {
-  static size_t GetSerializedSize(const ArrayType& input,
+template <typename MojomType, typename UserType>
+struct ArraySerializationStrategy<MojomType, UserType, true> {
+  using Traits = ArrayTraits<UserType>;
+  using Data = typename MojomType::Data_;
+
+  static_assert(
+      std::is_same<Data, Array_Data<NativeStruct_Data*>>::value,
+      "Mismatched types for serializing array of native-only structs.");
+
+  static size_t GetSerializedSize(const UserType& input,
                                   SerializationContext* context) {
-    DCHECK(input);
-    DCHECK_LE(input.size(), std::numeric_limits<uint32_t>::max());
-    size_t size = ArrayDataTraits<Array_Data<uint8_t>*>::GetStorageSize(
-        static_cast<uint32_t>(input.size()));
-    for (size_t i = 0; i < input.size(); ++i) {
-      size_t element_size = GetSerializedSizeNative_(input[i], context);
+    DCHECK(!Traits::IsNull(input));
+
+    size_t element_count = Traits::GetSize(input);
+    DCHECK_LE(element_count, std::numeric_limits<uint32_t>::max());
+    size_t size = ArrayDataTraits<NativeStruct_Data*>::GetStorageSize(
+        static_cast<uint32_t>(element_count));
+    for (size_t i = 0; i < element_count; ++i) {
+      size_t element_size =
+          GetSerializedSizeNative_(Traits::GetAt(input, i), context);
       DCHECK_LT(element_size, std::numeric_limits<uint32_t>::max());
-      size += ArrayDataTraits<uint8_t>::GetStorageSize(
-          static_cast<uint32_t>(element_size));
+      size += static_cast<uint32_t>(element_size);
     }
     return size;
   }
 
-  template <typename F>
-  static void Serialize(ArrayType input,
+  static void Serialize(UserType input,
                         Buffer* buf,
-                        Array_Data<F>** output,
+                        Data** output,
                         const ArrayValidateParams* validate_params,
                         SerializationContext* context) {
-    static_assert(
-        std::is_same<F, Array_Data<uint8_t>*>::value,
-        "Native-only type array must serialize to array of byte arrays.");
-    DCHECK(input);
+    DCHECK(!Traits::IsNull(input));
     DCHECK(validate_params);
     // TODO(rockot): We may want to support nullable (i.e. scoped_ptr<T>)
     // elements here.
     DCHECK(!validate_params->element_is_nullable);
-    Array_Data<Array_Data<uint8_t>*>* result =
-        Array_Data<Array_Data<uint8_t>*>::New(input.size(), buf);
-    for (size_t i = 0; i < input.size(); ++i)
-      SerializeNative_(input[i], buf, &result->at(i), context);
+    size_t element_count = Traits::GetSize(input);
+    Data* result = Data::New(element_count, buf);
+    for (size_t i = 0; i < element_count; ++i)
+      SerializeNative_(Traits::GetAt(input, i), buf, &result->at(i), context);
     *output = result;
   }
 
-  template <typename F>
-  static bool Deserialize(Array_Data<F>* input,
-                          ArrayType* output,
+  static bool Deserialize(Data* input,
+                          UserType* output,
                           SerializationContext* context) {
-    static_assert(
-        std::is_same<F, Array_Data<uint8_t>*>::value,
-        "Native-only type array must deserialize from array of byte arrays.");
     DCHECK(input);
 
-    ArrayType result(input->size());
+    Traits::Resize(*output, input->size());
     bool success = true;
     for (size_t i = 0; i < input->size(); ++i) {
       // We don't short-circuit on failure since we can't know what the native
       // type's ParamTraits' expectations are.
-      if (!DeserializeNative_(input->at(i), &result[i], context))
+      if (!DeserializeNative_(input->at(i), &Traits::GetAt(*output, i),
+                              context))
         success = false;
     }
-    output->Swap(&result);
     return success;
   }
 };
 
-template <typename ArrayType>
+template <typename MojomType, typename UserType>
 struct ArraySerializationImpl {
-  using Strategy = ArraySerializationStrategy<ArrayType>;
+  using Traits = ArrayTraits<UserType>;
+  using Strategy = ArraySerializationStrategy<MojomType, UserType>;
 
-  static size_t GetSerializedSize(const ArrayType& input,
+  static size_t GetSerializedSize(const UserType& input,
                                   SerializationContext* context) {
-    if (!input)
+    if (Traits::IsNull(input))
       return 0;
     return Strategy::GetSerializedSize(input, context);
   }
 
-  template <typename F>
-  static void Serialize(ArrayType input,
+  static void Serialize(UserType input,
                         internal::Buffer* buf,
-                        internal::Array_Data<F>** output,
+                        typename MojomType::Data_** output,
                         const internal::ArrayValidateParams* validate_params,
                         SerializationContext* context) {
-    if (input) {
+    if (!Traits::IsNull(input)) {
       MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING(
           validate_params->expected_num_elements != 0 &&
-              input.size() != validate_params->expected_num_elements,
+              Traits::GetSize(input) != validate_params->expected_num_elements,
           internal::VALIDATION_ERROR_UNEXPECTED_ARRAY_HEADER,
           internal::MakeMessageWithExpectedArraySize(
-              "fixed-size array has wrong number of elements", input.size(),
-              validate_params->expected_num_elements));
-      Strategy::template Serialize<F>(std::move(input), buf, output,
-                                      validate_params, context);
+              "fixed-size array has wrong number of elements",
+              Traits::GetSize(input), validate_params->expected_num_elements));
+      Strategy::Serialize(std::move(input), buf, output, validate_params,
+                          context);
     } else {
       *output = nullptr;
     }
   }
 
-  template <typename F>
-  static bool Deserialize(internal::Array_Data<F>* input,
-                          ArrayType* output,
+  static bool Deserialize(typename MojomType::Data_* input,
+                          UserType* output,
                           internal::SerializationContext* context) {
     if (input)
-      return Strategy::template Deserialize<F>(input, output, context);
-    *output = nullptr;
+      return Strategy::Deserialize(input, output, context);
+    Traits::SetToNull(*output);
     return true;
   }
 };
diff --git a/mojo/public/cpp/bindings/lib/array_traits_standard.h b/mojo/public/cpp/bindings/lib/array_traits_standard.h
new file mode 100644
index 0000000..a17a3f9
--- /dev/null
+++ b/mojo/public/cpp/bindings/lib/array_traits_standard.h
@@ -0,0 +1,41 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_ARRAY_TRAITS_STANDARD_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_LIB_ARRAY_TRAITS_STANDARD_H_
+
+#include "mojo/public/cpp/bindings/array.h"
+#include "mojo/public/cpp/bindings/array_traits.h"
+
+namespace mojo {
+
+template <typename T>
+struct ArrayTraits<Array<T>> {
+  using Element = T;
+
+  static bool IsNull(const Array<T>& input) { return input.is_null(); }
+
+  static size_t GetSize(const Array<T>& input) { return input.size(); }
+
+  static T* GetData(Array<T>& input) { return &input.front(); }
+
+  static const T* GetData(const Array<T>& input) { return &input.front(); }
+
+  static typename Array<T>::RefType GetAt(Array<T>& input, size_t index) {
+    return input[index];
+  }
+
+  static typename Array<T>::ConstRefType& GetAt(const Array<T>& input,
+                                                size_t index) {
+    return input[index];
+  }
+
+  static void Resize(Array<T>& input, size_t size) { input.resize(size); }
+
+  static void SetToNull(Array<T>& input) { input = nullptr; }
+};
+
+}  // namespace mojo
+
+#endif  // MOJO_PUBLIC_CPP_BINDINGS_LIB_ARRAY_TRAITS_STANDARD_H_
diff --git a/mojo/public/cpp/bindings/lib/array_traits_wtf.h b/mojo/public/cpp/bindings/lib/array_traits_wtf.h
new file mode 100644
index 0000000..5c15635
--- /dev/null
+++ b/mojo/public/cpp/bindings/lib/array_traits_wtf.h
@@ -0,0 +1,38 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_ARRAY_TRAITS_WTF_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_LIB_ARRAY_TRAITS_WTF_H_
+
+#include "mojo/public/cpp/bindings/array_traits.h"
+#include "mojo/public/cpp/bindings/wtf_array.h"
+
+namespace mojo {
+
+template <typename U>
+struct ArrayTraits<WTFArray<U>> {
+  using Element = U;
+
+  static bool IsNull(const WTFArray<U>& input) { return input.is_null(); }
+
+  static size_t GetSize(const WTFArray<U>& input) { return input.size(); }
+
+  static U* GetData(WTFArray<U>& input) { return &input.front(); }
+
+  static const U* GetData(const WTFArray<U>& input) { return &input.front(); }
+
+  static U& GetAt(WTFArray<U>& input, size_t index) { return input[index]; }
+
+  static const U& GetAt(const WTFArray<U>& input, size_t index) {
+    return input[index];
+  }
+
+  static void Resize(WTFArray<U>& input, size_t size) { input.resize(size); }
+
+  static void SetToNull(WTFArray<U>& input) { input = nullptr; }
+};
+
+}  // namespace mojo
+
+#endif  // MOJO_PUBLIC_CPP_BINDINGS_LIB_ARRAY_TRAITS_WTF_H_
diff --git a/mojo/public/cpp/bindings/lib/bindings_internal.h b/mojo/public/cpp/bindings/lib/bindings_internal.h
index 839f5be4..52a7755 100644
--- a/mojo/public/cpp/bindings/lib/bindings_internal.h
+++ b/mojo/public/cpp/bindings/lib/bindings_internal.h
@@ -120,38 +120,48 @@
       sizeof(Test<T>(0)) == sizeof(YesType) && !IsConst<T>::value;
 };
 
-template <typename T, bool move_only = IsMoveOnlyType<T>::value>
-struct WrapperTraits;
+template <typename MojomType, bool move_only = IsMoveOnlyType<MojomType>::value>
+struct GetDataTypeAsArrayElement;
 
 template <typename T>
-struct WrapperTraits<T, false> {
-  typedef T DataType;
+struct GetDataTypeAsArrayElement<T, false> {
+  using Data =
+      typename std::conditional<std::is_enum<T>::value, int32_t, T>::type;
 };
 template <typename H>
-struct WrapperTraits<ScopedHandleBase<H>, true> {
-  typedef H DataType;
+struct GetDataTypeAsArrayElement<ScopedHandleBase<H>, true> {
+  using Data = H;
 };
 template <typename S>
-struct WrapperTraits<StructPtr<S>, true> {
-  typedef typename S::Data_* DataType;
+struct GetDataTypeAsArrayElement<StructPtr<S>, true> {
+  using Data =
+      typename std::conditional<IsUnionDataType<typename S::Data_>::value,
+                                typename S::Data_,
+                                typename S::Data_*>::type;
 };
 template <typename S>
-struct WrapperTraits<InlinedStructPtr<S>, true> {
-  typedef typename S::Data_* DataType;
+struct GetDataTypeAsArrayElement<InlinedStructPtr<S>, true> {
+  using Data =
+      typename std::conditional<IsUnionDataType<typename S::Data_>::value,
+                                typename S::Data_,
+                                typename S::Data_*>::type;
 };
 template <typename S>
-struct WrapperTraits<S, true> {
-  typedef typename S::Data_* DataType;
+struct GetDataTypeAsArrayElement<S, true> {
+  using Data =
+      typename std::conditional<IsUnionDataType<typename S::Data_>::value,
+                                typename S::Data_,
+                                typename S::Data_*>::type;
 };
 
 template <>
-struct WrapperTraits<String, false> {
-  typedef String_Data* DataType;
+struct GetDataTypeAsArrayElement<String, false> {
+  using Data = String_Data*;
 };
 
 template <>
-struct WrapperTraits<WTF::String, false> {
-  typedef String_Data* DataType;
+struct GetDataTypeAsArrayElement<WTF::String, false> {
+  using Data = String_Data*;
 };
 
 }  // namespace internal
diff --git a/mojo/public/cpp/bindings/lib/map_serialization.h b/mojo/public/cpp/bindings/lib/map_serialization.h
index bca2379..86b195b 100644
--- a/mojo/public/cpp/bindings/lib/map_serialization.h
+++ b/mojo/public/cpp/bindings/lib/map_serialization.h
@@ -57,16 +57,19 @@
 };
 
 // This template must only apply to pointer mojo entity (structs and arrays).
-// This is done by ensuring that WrapperTraits<S>::DataType is a pointer.
+// This is done by ensuring that GetDataTypeAsArrayElement<S>::Data is a
+// pointer.
 template <typename S>
 struct MapSerializer<
     S,
-    typename EnableIf<IsPointer<typename WrapperTraits<S>::DataType>::value,
-                      typename WrapperTraits<S>::DataType>::type,
+    typename EnableIf<
+        IsPointer<typename GetDataTypeAsArrayElement<S>::Data>::value,
+        typename GetDataTypeAsArrayElement<S>::Data>::type,
     true,
     false> {
   typedef
-      typename RemovePointer<typename WrapperTraits<S>::DataType>::type S_Data;
+      typename RemovePointer<typename GetDataTypeAsArrayElement<S>::Data>::type
+          S_Data;
   static size_t GetBaseArraySize(size_t count) {
     return count * sizeof(StructPointer<S_Data>);
   }
@@ -76,7 +79,7 @@
 };
 
 template <typename U, typename U_Data>
-struct MapSerializer<U, U_Data*, true, true> {
+struct MapSerializer<U, U_Data, true, true> {
   static size_t GetBaseArraySize(size_t count) {
     return count * sizeof(U_Data);
   }
@@ -104,8 +107,9 @@
                                  internal::SerializationContext* context) {
   if (!input)
     return 0;
-  typedef typename internal::WrapperTraits<MapKey>::DataType DataKey;
-  typedef typename internal::WrapperTraits<MapValue>::DataType DataValue;
+  typedef typename internal::GetDataTypeAsArrayElement<MapKey>::Data DataKey;
+  typedef
+      typename internal::GetDataTypeAsArrayElement<MapValue>::Data DataValue;
 
   size_t count = input.size();
   size_t struct_overhead = sizeof(mojo::internal::Map_Data<DataKey, DataValue>);
diff --git a/mojo/public/cpp/bindings/lib/native_struct.cc b/mojo/public/cpp/bindings/lib/native_struct.cc
new file mode 100644
index 0000000..837b75a
--- /dev/null
+++ b/mojo/public/cpp/bindings/lib/native_struct.cc
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mojo/public/cpp/bindings/native_struct.h"
+
+namespace mojo {
+
+// static
+NativeStructPtr NativeStruct::New() {
+  NativeStructPtr rv;
+  internal::StructHelper<NativeStruct>::Initialize(&rv);
+  return rv;
+}
+
+NativeStruct::NativeStruct() : data(nullptr) {}
+
+NativeStruct::~NativeStruct() {}
+
+NativeStructPtr NativeStruct::Clone() const {
+  NativeStructPtr rv(New());
+  rv->data = data.Clone();
+  return rv;
+}
+
+bool NativeStruct::Equals(const NativeStruct& other) const {
+  return data.Equals(other.data);
+}
+
+}  // namespace mojo
diff --git a/mojo/public/cpp/bindings/lib/native_struct_data.cc b/mojo/public/cpp/bindings/lib/native_struct_data.cc
new file mode 100644
index 0000000..1d6bf6f8
--- /dev/null
+++ b/mojo/public/cpp/bindings/lib/native_struct_data.cc
@@ -0,0 +1,22 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mojo/public/cpp/bindings/lib/native_struct_data.h"
+
+#include "mojo/public/cpp/bindings/lib/bounds_checker.h"
+#include "mojo/public/cpp/bindings/lib/buffer.h"
+
+namespace mojo {
+namespace internal {
+
+// static
+bool NativeStruct_Data::Validate(const void* data,
+                                 BoundsChecker* bounds_checker) {
+  const ArrayValidateParams data_validate_params(0, false, nullptr);
+  return Array_Data<uint8_t>::Validate(data, bounds_checker,
+                                       &data_validate_params);
+}
+
+}  // namespace internal
+}  // namespace mojo
diff --git a/mojo/public/cpp/bindings/lib/native_struct_data.h b/mojo/public/cpp/bindings/lib/native_struct_data.h
new file mode 100644
index 0000000..c35ec98
--- /dev/null
+++ b/mojo/public/cpp/bindings/lib/native_struct_data.h
@@ -0,0 +1,41 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_STRUCT_DATA_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_STRUCT_DATA_H_
+
+#include <vector>
+
+#include "mojo/public/cpp/bindings/lib/array_internal.h"
+#include "mojo/public/cpp/system/handle.h"
+
+namespace mojo {
+namespace internal {
+
+class BoundsChecker;
+class Buffer;
+
+class NativeStruct_Data {
+ public:
+  static bool Validate(const void* data, BoundsChecker* bounds_checker);
+
+  void EncodePointersAndHandles(std::vector<Handle>* handles) {}
+  void DecodePointersAndHandles(std::vector<Handle>* handles) {}
+
+  // Unlike normal structs, the memory layout is exactly the same as an array
+  // of uint8_t.
+  Array_Data<uint8_t> data;
+
+ private:
+  NativeStruct_Data() = delete;
+  ~NativeStruct_Data() = delete;
+};
+
+static_assert(sizeof(Array_Data<uint8_t>) == sizeof(NativeStruct_Data),
+              "Mismatched NativeStruct_Data and Array_Data<uint8_t> size");
+
+}  // namespace internal
+}  // namespace mojo
+
+#endif  // MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_STRUCT_DATA_H_
diff --git a/mojo/public/cpp/bindings/lib/native_struct_serialization.cc b/mojo/public/cpp/bindings/lib/native_struct_serialization.cc
new file mode 100644
index 0000000..8f8b88d5
--- /dev/null
+++ b/mojo/public/cpp/bindings/lib/native_struct_serialization.cc
@@ -0,0 +1,51 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mojo/public/cpp/bindings/lib/native_struct_serialization.h"
+
+#include "mojo/public/cpp/bindings/lib/serialization.h"
+
+namespace mojo {
+
+size_t GetSerializedSize_(const NativeStructPtr& input,
+                          internal::SerializationContext* context) {
+  if (!input)
+    return 0;
+  return GetSerializedSize_(input->data, context);
+}
+
+void Serialize_(NativeStructPtr input,
+                internal::Buffer* buffer,
+                internal::NativeStruct_Data** output,
+                internal::SerializationContext* context) {
+  if (!input) {
+    *output = nullptr;
+    return;
+  }
+
+  internal::Array_Data<uint8_t>* data = nullptr;
+  const internal::ArrayValidateParams params(0, false, nullptr);
+  SerializeArray_(std::move(input->data), buffer, &data, &params, context);
+  *output = reinterpret_cast<internal::NativeStruct_Data*>(data);
+}
+
+bool Deserialize_(internal::NativeStruct_Data* input,
+                  NativeStructPtr* output,
+                  internal::SerializationContext* context) {
+  internal::Array_Data<uint8_t>* data =
+      reinterpret_cast<internal::Array_Data<uint8_t>*>(input);
+
+  NativeStructPtr result(NativeStruct::New());
+  if (!Deserialize_(data, &result->data, context)) {
+    output = nullptr;
+    return false;
+  }
+  if (!result->data)
+    *output = nullptr;
+  else
+    result.Swap(output);
+  return true;
+}
+
+}  // namespace mojo
diff --git a/mojo/public/cpp/bindings/lib/native_serialization.h b/mojo/public/cpp/bindings/lib/native_struct_serialization.h
similarity index 88%
rename from mojo/public/cpp/bindings/lib/native_serialization.h
rename to mojo/public/cpp/bindings/lib/native_struct_serialization.h
index 835e072..964bbdb1 100644
--- a/mojo/public/cpp/bindings/lib/native_serialization.h
+++ b/mojo/public/cpp/bindings/lib/native_struct_serialization.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_SERIALIZATION_H_
-#define MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_SERIALIZATION_H_
+#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_STRUCT_SERIALIZATION_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_STRUCT_SERIALIZATION_H_
 
 #include <stddef.h>
 #include <stdint.h>
@@ -16,7 +16,9 @@
 #include "mojo/public/cpp/bindings/lib/array_internal.h"
 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h"
+#include "mojo/public/cpp/bindings/lib/native_struct_data.h"
 #include "mojo/public/cpp/bindings/lib/pickle_buffer.h"
+#include "mojo/public/cpp/bindings/lib/serialization_forward.h"
 
 namespace mojo {
 namespace internal {
@@ -25,7 +27,9 @@
 // It can be used as a signal (by e.g. the Array serializer) for when to use
 // SerializeNative_ with a type.
 template <typename E>
-struct ShouldUseNativeSerializer { static const bool value = false; };
+struct ShouldUseNativeSerializer {
+  static const bool value = false;
+};
 
 template <typename T>
 size_t GetSerializedSizeNative_(const T& value, SerializationContext* context) {
@@ -37,7 +41,7 @@
 template <typename T>
 void SerializeNative_(const T& value,
                       Buffer* buffer,
-                      Array_Data<uint8_t>** out,
+                      NativeStruct_Data** out,
                       SerializationContext* context) {
   PickleBuffer* pickler = buffer->AsPickleBuffer();
   DCHECK(pickler) << "Native types can only be used with PickleBuffers.";
@@ -75,11 +79,11 @@
   header->num_bytes = static_cast<uint32_t>(total_size);
   header->num_elements = static_cast<uint32_t>(pickled_size);
 
-  *out = reinterpret_cast<Array_Data<uint8_t>*>(header);
+  *out = reinterpret_cast<NativeStruct_Data*>(header);
 }
 
 template <typename T>
-bool DeserializeNative_(Array_Data<uint8_t>* data,
+bool DeserializeNative_(NativeStruct_Data* data,
                         T* out,
                         SerializationContext* context) {
   if (!data)
@@ -121,4 +125,4 @@
 }  // namespace internal
 }  // namespace mojo
 
-#endif  // MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_SERIALIZATION_H_
+#endif  // MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_STRUCT_SERIALIZATION_H_
diff --git a/mojo/public/cpp/bindings/lib/serialization.h b/mojo/public/cpp/bindings/lib/serialization.h
index c3af9ffd..cb29def8 100644
--- a/mojo/public/cpp/bindings/lib/serialization.h
+++ b/mojo/public/cpp/bindings/lib/serialization.h
@@ -6,8 +6,9 @@
 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_SERIALIZATION_H_
 
 #include "mojo/public/cpp/bindings/lib/array_serialization.h"
+#include "mojo/public/cpp/bindings/lib/array_traits_standard.h"
 #include "mojo/public/cpp/bindings/lib/map_serialization.h"
-#include "mojo/public/cpp/bindings/lib/native_serialization.h"
+#include "mojo/public/cpp/bindings/lib/native_struct_serialization.h"
 #include "mojo/public/cpp/bindings/lib/string_serialization.h"
 
 #endif  // MOJO_PUBLIC_CPP_BINDINGS_LIB_SERIALIZATION_H_
diff --git a/mojo/public/cpp/bindings/lib/serialization_forward.h b/mojo/public/cpp/bindings/lib/serialization_forward.h
index b605049..2c6d239b 100644
--- a/mojo/public/cpp/bindings/lib/serialization_forward.h
+++ b/mojo/public/cpp/bindings/lib/serialization_forward.h
@@ -7,8 +7,12 @@
 
 #include <stddef.h>
 
+#include "mojo/public/cpp/bindings/array.h"
+#include "mojo/public/cpp/bindings/array_traits.h"
 #include "mojo/public/cpp/bindings/lib/string_serialization.h"
 #include "mojo/public/cpp/bindings/lib/wtf_string_serialization.h"
+#include "mojo/public/cpp/bindings/map.h"
+#include "mojo/public/cpp/bindings/native_struct.h"
 
 // This file is included by serialization implementation files to avoid circular
 // includes.
@@ -18,12 +22,6 @@
 namespace mojo {
 
 template <typename T>
-class Array;
-
-template <typename K, typename V>
-class Map;
-
-template <typename T>
 class WTFArray;
 
 namespace internal {
@@ -38,6 +36,8 @@
 template <typename K, typename V>
 class Map_Data;
 
+class NativeStruct_Data;
+
 struct SerializationContext;
 
 template <typename T>
@@ -62,6 +62,18 @@
 
 }  // namespace internal
 
+size_t GetSerializedSize_(const NativeStructPtr& input,
+                          internal::SerializationContext* context);
+
+void Serialize_(NativeStructPtr input,
+                internal::Buffer* buffer,
+                internal::NativeStruct_Data** output,
+                internal::SerializationContext* context);
+
+bool Deserialize_(internal::NativeStruct_Data* input,
+                  NativeStructPtr* output,
+                  internal::SerializationContext* context);
+
 // -----------------------------------------------------------------------------
 // Forward declaration for Array.
 
@@ -69,16 +81,16 @@
 inline size_t GetSerializedSize_(const Array<E>& input,
                                  internal::SerializationContext* context);
 
-template <typename E, typename F>
+template <typename E>
 inline void SerializeArray_(
     Array<E> input,
     internal::Buffer* buf,
-    internal::Array_Data<F>** output,
+    typename Array<E>::Data_** output,
     const internal::ArrayValidateParams* validate_params,
     internal::SerializationContext* context);
 
-template <typename E, typename F>
-inline bool Deserialize_(internal::Array_Data<F>* input,
+template <typename E>
+inline bool Deserialize_(typename Array<E>::Data_* input,
                          Array<E>* output,
                          internal::SerializationContext* context);
 
@@ -89,16 +101,16 @@
 inline size_t GetSerializedSize_(const WTFArray<E>& input,
                                  internal::SerializationContext* context);
 
-template <typename E, typename F>
+template <typename E>
 inline void SerializeArray_(
     WTFArray<E> input,
     internal::Buffer* buf,
-    internal::Array_Data<F>** output,
+    typename WTFArray<E>::Data_** output,
     const internal::ArrayValidateParams* validate_params,
     internal::SerializationContext* context);
 
-template <typename E, typename F>
-inline bool Deserialize_(internal::Array_Data<F>* input,
+template <typename E>
+inline bool Deserialize_(typename WTFArray<E>::Data_* input,
                          WTFArray<E>* output,
                          internal::SerializationContext* context);
 
diff --git a/mojo/public/cpp/bindings/lib/wtf_array_serialization.h b/mojo/public/cpp/bindings/lib/wtf_array_serialization.h
index 70edbf1..12949b14 100644
--- a/mojo/public/cpp/bindings/lib/wtf_array_serialization.h
+++ b/mojo/public/cpp/bindings/lib/wtf_array_serialization.h
@@ -15,27 +15,29 @@
 template <typename E>
 inline size_t GetSerializedSize_(const WTFArray<E>& input,
                                  internal::SerializationContext* context) {
-  return internal::ArraySerializationImpl<WTFArray<E>>::GetSerializedSize(
-      input, context);
+  return internal::ArraySerializationImpl<
+      WTFArray<E>, WTFArray<E>>::GetSerializedSize(input, context);
 }
 
-template <typename E, typename F>
+template <typename E>
 inline void SerializeArray_(
     WTFArray<E> input,
     internal::Buffer* buf,
-    internal::Array_Data<F>** output,
+    typename WTFArray<E>::Data_** output,
     const internal::ArrayValidateParams* validate_params,
     internal::SerializationContext* context) {
-  return internal::ArraySerializationImpl<WTFArray<E>>::template Serialize<F>(
+  return internal::ArraySerializationImpl<WTFArray<E>, WTFArray<E>>::Serialize(
       std::move(input), buf, output, validate_params, context);
 }
 
-template <typename E, typename F>
-inline bool Deserialize_(internal::Array_Data<F>* input,
+template <typename E>
+inline bool Deserialize_(typename WTFArray<E>::Data_* input,
                          WTFArray<E>* output,
                          internal::SerializationContext* context) {
-  return internal::ArraySerializationImpl<WTFArray<E>>::template Deserialize<F>(
-      input, output, context);
+  return internal::ArraySerializationImpl<WTFArray<E>,
+                                          WTFArray<E>>::Deserialize(input,
+                                                                    output,
+                                                                    context);
 }
 
 }  // namespace mojo
diff --git a/mojo/public/cpp/bindings/lib/wtf_serialization.h b/mojo/public/cpp/bindings/lib/wtf_serialization.h
index 318d152..c7e0cb7 100644
--- a/mojo/public/cpp/bindings/lib/wtf_serialization.h
+++ b/mojo/public/cpp/bindings/lib/wtf_serialization.h
@@ -5,6 +5,7 @@
 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_WTF_SERIALIZATION_H_
 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_WTF_SERIALIZATION_H_
 
+#include "mojo/public/cpp/bindings/lib/array_traits_wtf.h"
 #include "mojo/public/cpp/bindings/lib/wtf_array_serialization.h"
 #include "mojo/public/cpp/bindings/lib/wtf_string_serialization.h"
 
diff --git a/mojo/public/cpp/bindings/map.h b/mojo/public/cpp/bindings/map.h
index 6d0d57d..c0735bad 100644
--- a/mojo/public/cpp/bindings/map.h
+++ b/mojo/public/cpp/bindings/map.h
@@ -35,9 +35,9 @@
 
   using ConstIterator = typename std::map<Key, Value>::const_iterator;
 
-  using Data_ =
-      internal::Map_Data<typename internal::WrapperTraits<Key>::DataType,
-                         typename internal::WrapperTraits<Value>::DataType>;
+  using Data_ = internal::Map_Data<
+      typename internal::GetDataTypeAsArrayElement<Key>::Data,
+      typename internal::GetDataTypeAsArrayElement<Value>::Data>;
 
   // Constructs an empty map.
   Map() : is_null_(false) {}
diff --git a/mojo/public/cpp/bindings/native_struct.h b/mojo/public/cpp/bindings/native_struct.h
new file mode 100644
index 0000000..882c970
--- /dev/null
+++ b/mojo/public/cpp/bindings/native_struct.h
@@ -0,0 +1,47 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_PUBLIC_CPP_BINDINGS_NATIVE_STRUCT_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_NATIVE_STRUCT_H_
+
+#include "mojo/public/cpp/bindings/array.h"
+#include "mojo/public/cpp/bindings/lib/native_struct_data.h"
+#include "mojo/public/cpp/bindings/struct_ptr.h"
+#include "mojo/public/cpp/bindings/type_converter.h"
+
+namespace mojo {
+
+class NativeStruct;
+using NativeStructPtr = StructPtr<NativeStruct>;
+
+// Native-only structs correspond to "[Native] struct Foo;" definitions in
+// mojom.
+class NativeStruct {
+ public:
+  using Data_ = internal::NativeStruct_Data;
+
+  static NativeStructPtr New();
+
+  template <typename U>
+  static NativeStructPtr From(const U& u) {
+    return TypeConverter<NativeStructPtr, U>::Convert(u);
+  }
+
+  template <typename U>
+  U To() const {
+    return TypeConverter<U, NativeStruct>::Convert(*this);
+  }
+
+  NativeStruct();
+  ~NativeStruct();
+
+  NativeStructPtr Clone() const;
+  bool Equals(const NativeStruct& other) const;
+
+  Array<uint8_t> data;
+};
+
+}  // namespace mojo
+
+#endif  // MOJO_PUBLIC_CPP_BINDINGS_NATIVE_STRUCT_H_
diff --git a/mojo/public/cpp/bindings/tests/pickled_struct_blink.h b/mojo/public/cpp/bindings/tests/pickled_struct_blink.h
index ce5b3644..c763c6e9 100644
--- a/mojo/public/cpp/bindings/tests/pickled_struct_blink.h
+++ b/mojo/public/cpp/bindings/tests/pickled_struct_blink.h
@@ -32,8 +32,11 @@
  public:
   PickledStructBlink();
   PickledStructBlink(int foo, int bar);
+  PickledStructBlink(PickledStructBlink&& other) = default;
   ~PickledStructBlink();
 
+  PickledStructBlink& operator=(PickledStructBlink&& other) = default;
+
   int foo() const { return foo_; }
   void set_foo(int foo) {
     DCHECK_GE(foo, 0);
diff --git a/mojo/public/cpp/bindings/tests/pickled_struct_chromium.h b/mojo/public/cpp/bindings/tests/pickled_struct_chromium.h
index ec34572..b80f612 100644
--- a/mojo/public/cpp/bindings/tests/pickled_struct_chromium.h
+++ b/mojo/public/cpp/bindings/tests/pickled_struct_chromium.h
@@ -27,8 +27,11 @@
  public:
   PickledStructChromium();
   PickledStructChromium(int foo, int bar);
+  PickledStructChromium(PickledStructChromium&& other) = default;
   ~PickledStructChromium();
 
+  PickledStructChromium& operator=(PickledStructChromium&& other) = default;
+
   int foo() const { return foo_; }
   void set_foo(int foo) { foo_ = foo; }
 
diff --git a/mojo/public/cpp/bindings/tests/struct_unittest.cc b/mojo/public/cpp/bindings/tests/struct_unittest.cc
index e0e32283..aca0526e 100644
--- a/mojo/public/cpp/bindings/tests/struct_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/struct_unittest.cc
@@ -50,8 +50,10 @@
 
 template <typename U, typename T>
 U SerializeAndDeserialize(T input) {
-  typedef typename mojo::internal::WrapperTraits<T>::DataType InputDataType;
-  typedef typename mojo::internal::WrapperTraits<U>::DataType OutputDataType;
+  using InputDataType = typename std::remove_pointer<decltype(
+      std::declval<T>().get())>::type::Data_*;
+  using OutputDataType = typename std::remove_pointer<decltype(
+      std::declval<U>().get())>::type::Data_*;
 
   size_t size = GetSerializedSize_(input, nullptr);
   mojo::internal::FixedBufferForTesting buf(size + 32);
@@ -414,5 +416,75 @@
     EXPECT_TRUE(output->Equals(*expected_output));
   }
 }
+
+// Serialization test for native struct.
+TEST_F(StructTest, Serialization_NativeStruct) {
+  using Data = mojo::internal::NativeStruct_Data;
+  {
+    // Serialization of a null native struct.
+    NativeStructPtr native;
+    size_t size = GetSerializedSize_(native, nullptr);
+    EXPECT_EQ(0u, size);
+    mojo::internal::FixedBufferForTesting buf(size);
+
+    Data* data = nullptr;
+    Serialize_(std::move(native), &buf, &data, nullptr);
+
+    EXPECT_EQ(nullptr, data);
+
+    NativeStructPtr output_native;
+    Deserialize_(data, &output_native, nullptr);
+    EXPECT_TRUE(output_native.is_null());
+  }
+
+  {
+    // Serialization of a native struct with null data.
+    NativeStructPtr native(NativeStruct::New());
+    size_t size = GetSerializedSize_(native, nullptr);
+    EXPECT_EQ(0u, size);
+    mojo::internal::FixedBufferForTesting buf(size);
+
+    Data* data = nullptr;
+    Serialize_(std::move(native), &buf, &data, nullptr);
+
+    EXPECT_EQ(nullptr, data);
+
+    NativeStructPtr output_native;
+    Deserialize_(data, &output_native, nullptr);
+    EXPECT_TRUE(output_native.is_null());
+  }
+
+  {
+    NativeStructPtr native(NativeStruct::New());
+    native->data = Array<uint8_t>(2);
+    native->data[0] = 'X';
+    native->data[1] = 'Y';
+
+    size_t size = GetSerializedSize_(native, nullptr);
+    EXPECT_EQ(16u, size);
+    mojo::internal::FixedBufferForTesting buf(size);
+
+    Data* data = nullptr;
+    Serialize_(std::move(native), &buf, &data, nullptr);
+
+    EXPECT_NE(nullptr, data);
+
+    std::vector<Handle> handles;
+    data->EncodePointersAndHandles(&handles);
+
+    EXPECT_TRUE(handles.empty());
+
+    data->DecodePointersAndHandles(&handles);
+
+    NativeStructPtr output_native;
+    Deserialize_(data, &output_native, nullptr);
+    EXPECT_FALSE(output_native.is_null());
+    EXPECT_FALSE(output_native->data.is_null());
+    EXPECT_EQ(2u, output_native->data.size());
+    EXPECT_EQ('X', output_native->data[0]);
+    EXPECT_EQ('Y', output_native->data[1]);
+  }
+}
+
 }  // namespace test
 }  // namespace mojo
diff --git a/mojo/public/cpp/bindings/wtf_array.h b/mojo/public/cpp/bindings/wtf_array.h
index b5d1a30..06c910d5 100644
--- a/mojo/public/cpp/bindings/wtf_array.h
+++ b/mojo/public/cpp/bindings/wtf_array.h
@@ -29,9 +29,9 @@
   MOVE_ONLY_TYPE_FOR_CPP_03(WTFArray);
 
  public:
-  using Data_ =
-      internal::Array_Data<typename internal::WrapperTraits<T>::DataType>;
-  using ElementType = T;
+  using Data_ = internal::Array_Data<
+      typename internal::GetDataTypeAsArrayElement<T>::Data>;
+  using Element = T;
 
   // Constructs an empty array.
   WTFArray() : is_null_(false) {}
diff --git a/mojo/public/interfaces/bindings/tests/test_structs.mojom b/mojo/public/interfaces/bindings/tests/test_structs.mojom
index 49b4fe8..f16bd66 100644
--- a/mojo/public/interfaces/bindings/tests/test_structs.mojom
+++ b/mojo/public/interfaces/bindings/tests/test_structs.mojom
@@ -20,6 +20,9 @@
 struct EmptyStruct {
 };
 
+[Native]
+struct UnmappedNativeStruct;
+
 // Used to verify that struct fields which don't specify a default are
 // initialized to: false for bool, 0 for numbers, and null for strings,
 // handles, and structs. The "?" nullable suffix shouldn't have any
@@ -363,7 +366,7 @@
   SomeInterface some_interface;
 };
 
-// Regression: Verify that a field can be called |other|.
+// Verify that a field can be called |other|.
 
 struct ContainsOther {
   int32 other;
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl
index 84a0a8b..c112a75 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl
@@ -45,7 +45,11 @@
 
 {#--- Wrapper forward declarations #}
 {%  for struct in structs %}
+{%-   if struct|is_native_only_kind %}
+using {{struct.name}} = mojo::NativeStruct;
+{%-   else %}
 class {{struct.name}};
+{%-   endif %}
 {%- endfor %}
 
 {#--- Wrapper forward declarations for unions #}
@@ -57,7 +61,11 @@
 
 {#--- Internal forward declarations #}
 {%  for struct in structs %}
+{%-   if struct|is_native_only_kind %}
+using {{struct.name}}_Data = mojo::internal::NativeStruct_Data;
+{%-   else %}
 class {{struct.name}}_Data;
+{%-   endif %}
 {%- endfor %}
 
 {%  for union in unions %}
@@ -80,7 +88,9 @@
 
 {#--- Struct class declarations #}
 {%  for struct in structs %}
-{%    include "struct_declaration.tmpl" %}
+{%-   if not struct|is_native_only_kind %}
+{%      include "struct_declaration.tmpl" %}
+{%-   endif %}
 {%- endfor %}
 
 {#--- Interface class declarations. They are needed only when they contain
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
index 75b9154..3a75bcf 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
@@ -84,7 +84,9 @@
 
 {#--- Struct definitions #}
 {%  for struct in structs %}
-{%-   include "struct_definition.tmpl" %}
+{%-   if not struct|is_native_only_kind %}
+{%-     include "struct_definition.tmpl" %}
+{%-   endif %}
 {%- endfor %}
 
 {#--- Union definitions #}
@@ -107,7 +109,9 @@
 
 {#--- Struct builder definitions #}
 {%- for struct in structs %}
-{%-   include "wrapper_class_definition.tmpl" %}
+{%-   if not struct|is_native_only_kind %}
+{%-     include "wrapper_class_definition.tmpl" %}
+{%-   endif %}
 {%- endfor %}
 
 {#--- Union builder definitions #}
@@ -122,7 +126,9 @@
 
 {#--- Struct Serialization Helpers #}
 {%- for struct in structs %}
-{%-   include "struct_serialization_definition.tmpl" %}
+{%-   if not struct|is_native_only_kind %}
+{%-     include "struct_serialization_definition.tmpl" %}
+{%-   endif %}
 {%- endfor %}
 
 {#--- Union Serialization Helpers #}
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
index 3d0ce78..26c275e 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
@@ -30,6 +30,7 @@
 #include "mojo/public/cpp/bindings/lib/serialization.h"
 #include "mojo/public/cpp/bindings/map.h"
 #include "mojo/public/cpp/bindings/message_filter.h"
+#include "mojo/public/cpp/bindings/native_struct.h"
 #include "mojo/public/cpp/bindings/no_interface.h"
 #include "mojo/public/cpp/bindings/struct_ptr.h"
 #include "mojo/public/cpp/bindings/struct_traits.h"
@@ -97,13 +98,18 @@
 
 {#--- Struct Forward Declarations -#}
 {%  for struct in structs %}
+{%-   if struct|is_native_only_kind %}
+using {{struct.name}} = mojo::NativeStruct;
+using {{struct.name}}Ptr = mojo::NativeStructPtr;
+{%-   else %}
 class {{struct.name}};
 class {{struct.name}}_Reader;
-{%    if struct|should_inline %}
+{%-     if struct|should_inline %}
 using {{struct.name}}Ptr = mojo::InlinedStructPtr<{{struct.name}}>;
-{%    else %}
+{%-     else %}
 using {{struct.name}}Ptr = mojo::StructPtr<{{struct.name}}>;
-{%    endif %}
+{%-     endif %}
+{%-   endif %}
 {%  endfor %}
 
 {#--- Union Forward Declarations -#}
@@ -152,24 +158,59 @@
 
 {#--- Inlined structs #}
 {%  for struct in structs %}
-{%    if struct|should_inline %}
+{%    if struct|should_inline and not struct|is_native_only_kind %}
 {%      include "wrapper_class_declaration.tmpl" %}
 {%    endif %}
 {%- endfor %}
 
 {#--- Non-inlined structs #}
 {%  for struct in structs %}
-{%    if not struct|should_inline %}
+{%    if not struct|should_inline and not struct|is_native_only_kind %}
 {%      include "wrapper_class_declaration.tmpl" %}
 {%    endif %}
 {%- endfor %}
 
 {#--- Struct Serialization Helpers -#}
-{%  if structs %}
-{%    for struct in structs %}
-{%      include "struct_serialization_declaration.tmpl" %}
-{%-   endfor %}
-{%- endif %}
+{%  for struct in structs %}
+{%-   if not struct|is_native_only_kind %}
+{%    include "struct_serialization_declaration.tmpl" %}
+{%-   elif struct|is_typemapped_kind %}
+{# This helps the array serializer understand how to serialize arrays of this
+   native-only type.
+   TODO(yzshen): Remove these specializations once the array serializtion code
+   is refactored to be specialized with Mojom stanadard type and user type. #}
+
+{%-     if variant %}
+}  // namespace {{variant}}
+{%-     endif %}
+{%-     for namespace in namespaces_as_array|reverse %}
+}  // namespace {{namespace}}
+{%-     endfor %}
+
+namespace mojo {
+namespace internal {
+
+template <>
+struct ShouldUseNativeSerializer<{{struct|cpp_wrapper_type}}> {
+  static const bool value = true;
+};
+
+template <>
+struct GetDataTypeAsArrayElement<{{struct|cpp_wrapper_type}}> {
+  using Data = NativeStruct_Data*;
+};
+
+}  // namespace internal
+}  // namespace mojo
+
+{%-     for namespace in namespaces_as_array %}
+namespace {{namespace}} {
+{%-     endfor %}
+{%-     if variant %}
+namespace {{variant}} {
+{%-     endif %}
+{%-   endif %}
+{%- endfor %}
 
 {#--- Union Serialization Helpers -#}
 {%  if unions %}
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl
index ffe9fd3..a6921756 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl
@@ -19,8 +19,7 @@
   }
 {%-     endif %}
 {%-   endif %}
-{%-   if kind|is_array_kind or kind|is_string_kind or
-         kind|is_native_only_kind %}
+{%-   if kind|is_array_kind or kind|is_string_kind %}
   const mojo::internal::ArrayValidateParams {{name}}_validate_params(
       {{kind|get_array_validate_params_ctor_args|indent(6)}});
   if (!mojo::internal::ValidateArray(object->{{name}}, bounds_checker,
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl
index 93c8e44..97650892 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl
@@ -56,8 +56,7 @@
 {%-   set name = pf.field.name %}
 {%-   set kind = pf.field.kind %}
 {%-   if kind|is_object_kind %}
-{%-     if kind|is_array_kind or
-            (kind|is_native_only_kind and not kind|is_typemapped_kind) %}
+{%-     if kind|is_array_kind %}
   const mojo::internal::ArrayValidateParams {{name}}_validate_params(
       {{kind|get_array_validate_params_ctor_args|indent(10)}});
   mojo::SerializeArray_(std::move({{input_field}}), {{buffer}},
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl
index 800996d..9a62cd4 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl
@@ -7,44 +7,6 @@
                   {{struct.name}}Ptr* output,
                   mojo::internal::SerializationContext* context);
 
-{%- if struct|is_native_only_kind and struct|is_typemapped_kind %}
-{# This helps the array serializer understand how to serialize arrays of this
-   native-only type. #}
-
-{%-   for namespace in namespaces_as_array|reverse %}
-}  // namespace {{namespace}}
-{%-   endfor %}
-{%-   if variant %}
-}  // namespace {{variant}}
-{%-   endif %}
-
-namespace mojo {
-namespace internal {
-
-template <>
-struct ShouldUseNativeSerializer<{{struct|cpp_wrapper_type}}> {
-  static const bool value = true;
-};
-
-template <>
-struct WrapperTraits<{{struct|cpp_wrapper_type}}> {
-  using DataType = Array_Data<uint8_t>*;
-};
-
-}  // namespace internal
-}  // namespace mojo
-
-{%-   for namespace in namespaces_as_array %}
-namespace {{namespace}} {
-{%-   endfor %}
-{%-   if variant %}
-namespace {{variant}} {
-{%-   endif %}
-
-{%- endif %}
-
-{%- if not struct|is_native_only_kind %}
-
 {# NOTE: Generated Reader instances are intentionally cheap to copy and devoid
    of heap allocations. They should stay this way. #}
 class {{struct.name}}_Reader {
@@ -154,5 +116,3 @@
         {{struct.name}}_Reader(input, context), output);
   }
 };
-
-{%- endif %}  {# not variant #}
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl
index 97c6521..df76bb8d 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl
@@ -32,8 +32,6 @@
   return success;
 }
 
-{%- if not struct|is_native_only_kind %}
-
 {{struct.name}}_Reader::{{struct.name}}_Reader(
     internal::{{struct.name}}_Data*  data,
     mojo::internal::SerializationContext* context)
@@ -75,5 +73,3 @@
 }
 {%-   endif %}
 {%- endfor %}
-
-{%- endif %}
diff --git a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
index ca329b9..0e7ba28 100644
--- a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
@@ -82,8 +82,6 @@
   def _MapKindName(self, token, internal):
     if not internal:
       return token.name
-    if mojom.IsStructKind(token) and token.native_only:
-      return "mojo::Array_Data<uint8_t>"
     if (mojom.IsStructKind(token) or mojom.IsUnionKind(token) or
         mojom.IsInterfaceKind(token) or mojom.IsEnumKind(token)):
       return token.name + "_Data"
@@ -159,8 +157,6 @@
 def DoesKindSupportEquality(kind):
   if IsTypemappedKind(kind):
     return False
-  if mojom.IsStructKind(kind) and kind.native_only:
-    return False
   if mojom.IsArrayKind(kind):
     return DoesKindSupportEquality(kind.kind)
   if mojom.IsMapKind(kind):
@@ -168,9 +164,6 @@
   return True
 
 def GetCppType(kind):
-  if mojom.IsStructKind(kind) and kind.native_only:
-    # A native-only type is just a blob of bytes.
-    return "mojo::internal::Array_Data<uint8_t>*"
   if mojom.IsArrayKind(kind):
     return "mojo::internal::Array_Data<%s>*" % GetCppType(kind.kind)
   if mojom.IsMapKind(kind):
@@ -200,16 +193,12 @@
   return _kind_to_cpp_type[kind]
 
 def GetCppArrayArgWrapperType(kind):
-  if mojom.IsStructKind(kind) and kind.native_only:
-    if IsTypemappedKind(kind):
+  if IsTypemappedKind(kind):
+    if mojom.IsStructKind(kind) and kind.native_only:
       return GetNativeTypeName(kind)
     else:
-      # Without a relevant typemap to apply, a native-only struct can only be
-      # exposed as a blob of bytes.
-      return "mojo::Array<uint8_t>"
-  if IsTypemappedKind(kind):
-    raise Exception(
-        "Cannot serialize containers of non-native typemapped structs yet!")
+      raise Exception(
+          "Cannot serialize containers of non-native typemapped structs yet!")
   if mojom.IsEnumKind(kind):
     return GetNameForKind(kind)
   if mojom.IsStructKind(kind) or mojom.IsUnionKind(kind):
@@ -246,8 +235,6 @@
 def GetCppResultWrapperType(kind):
   if IsTypemappedKind(kind):
     return "const %s&" % GetNativeTypeName(kind)
-  if mojom.IsStructKind(kind) and kind.native_only:
-    return "mojo::Array<uint8_t>"
   if mojom.IsEnumKind(kind):
     return GetNameForKind(kind)
   if mojom.IsStructKind(kind) or mojom.IsUnionKind(kind):
@@ -289,8 +276,6 @@
 def GetCppWrapperType(kind):
   if IsTypemappedKind(kind):
     return GetNativeTypeName(kind)
-  if mojom.IsStructKind(kind) and kind.native_only:
-    return "mojo::Array<uint8_t>"
   if mojom.IsEnumKind(kind):
     return GetNameForKind(kind)
   if mojom.IsStructKind(kind) or mojom.IsUnionKind(kind):
@@ -326,8 +311,6 @@
 def GetCppConstWrapperType(kind):
   if IsTypemappedKind(kind):
     return "const %s&" % GetNativeTypeName(kind)
-  if mojom.IsStructKind(kind) and kind.native_only:
-    return "mojo::Array<uint8_t>"
   if mojom.IsStructKind(kind) or mojom.IsUnionKind(kind):
     return "%sPtr" % GetNameForKind(kind)
   if mojom.IsArrayKind(kind):
@@ -363,8 +346,6 @@
   return _kind_to_cpp_type[kind]
 
 def GetCppFieldType(kind):
-  if mojom.IsStructKind(kind) and kind.native_only:
-    return "mojo::internal::ArrayPointer<uint8_t>"
   if mojom.IsStructKind(kind):
     return ("mojo::internal::StructPointer<%s>" %
         GetNameForKind(kind, internal=True))
@@ -458,8 +439,7 @@
   return not any(mojom.IsMoveOnlyKind(field.kind) for field in union.fields)
 
 def GetArrayValidateParamsCtorArgs(kind):
-  if mojom.IsStringKind(kind) or (mojom.IsStructKind(kind) and
-                                  kind.native_only):
+  if mojom.IsStringKind(kind):
     expected_num_elements = 0
     element_is_nullable = False
     element_validate_params = "nullptr"
@@ -488,8 +468,7 @@
 
 def GetNewArrayValidateParams(kind):
   if (not mojom.IsArrayKind(kind) and not mojom.IsMapKind(kind) and
-      not mojom.IsStringKind(kind) and
-      not (mojom.IsStructKind(kind) and kind.native_only)):
+      not mojom.IsStringKind(kind)):
     return "nullptr"
 
   return "new mojo::internal::ArrayValidateParams(%s)" % (
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/module.py b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
index a673d8e..5a80a05 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/module.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
@@ -47,9 +47,6 @@
     if self == SHAREDBUFFER:
       return NULLABLE_SHAREDBUFFER
 
-    if IsStructKind(self) and self.native_only:
-      raise Exception('Native-only structs cannot be nullable.')
-
     nullable_kind = type(self)()
     nullable_kind.shared_definition = self.shared_definition
     if self.spec is not None:
@@ -618,7 +615,7 @@
     if IsArrayKind(kind):
       return _IsCloneable(kind.kind, visited_kinds)
     if IsStructKind(kind) or IsUnionKind(kind):
-      if IsStructKind(kind) and (kind.native_only or filter(kind)):
+      if IsStructKind(kind) and filter(kind):
         return False
       for field in kind.fields:
         if not _IsCloneable(field.kind, visited_kinds):
diff --git a/native_client_sdk/src/tests/nacl_io_test/http_fs_test.cc b/native_client_sdk/src/tests/nacl_io_test/http_fs_test.cc
index 6d75298..1ab079341 100644
--- a/native_client_sdk/src/tests/nacl_io_test/http_fs_test.cc
+++ b/native_client_sdk/src/tests/nacl_io_test/http_fs_test.cc
@@ -374,7 +374,7 @@
 }
 
 TEST(HttpFsBlobUrlTest, Basic) {
-  const char* kUrl = "blob:http%3A//example.com/6b87a5a6-713e";
+  const char* kUrl = "blob:http://example.com/6b87a5a6-713e";
   const char* kContent = "hello";
   FakePepperInterfaceURLLoader ppapi;
   ASSERT_TRUE(ppapi.server_template()->SetBlobEntity(kUrl, kContent, NULL));
diff --git a/net/BUILD.gn b/net/BUILD.gn
index b982b12..48cbb81d 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -1737,7 +1737,8 @@
     if (is_win) {
       data += [ "$root_out_dir/net_unittests.exe.pdb" ]
     } else if (is_mac) {
-      data += [ "$root_out_dir/net_unittests.dSYM/" ]
+      # TODO(crbug.com/330301): make this conditional on mac_strip_release.
+      # data += [ "$root_out_dir/net_unittests.dSYM/" ]
     }
   }
 }
@@ -1972,6 +1973,18 @@
   dict = "http/http_chunked_decoder_fuzzer.dict"
 }
 
+fuzzer_test("net_http_proxy_client_socket_fuzzer") {
+  sources = [
+    "http/http_proxy_client_socket_fuzzer.cc",
+  ]
+  deps = [
+    ":net_fuzzer_test_support",
+    ":test_support",
+    "//base",
+    "//net",
+  ]
+}
+
 fuzzer_test("net_quic_crypto_framer_parse_message_fuzzer") {
   sources = [
     "quic/quic_crypto_framer_parse_message_fuzzer.cc",
diff --git a/net/cert/cert_database.h b/net/cert/cert_database.h
index 8b9b82e..873a7c7 100644
--- a/net/cert/cert_database.h
+++ b/net/cert/cert_database.h
@@ -5,9 +5,10 @@
 #ifndef NET_CERT_CERT_DATABASE_H_
 #define NET_CERT_CERT_DATABASE_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/cert/x509_certificate.h"
 
@@ -115,7 +116,7 @@
 #if defined(OS_MACOSX) && !defined(OS_IOS)
   class Notifier;
   friend class Notifier;
-  scoped_ptr<Notifier> notifier_;
+  std::unique_ptr<Notifier> notifier_;
 #endif
 
   DISALLOW_COPY_AND_ASSIGN(CertDatabase);
diff --git a/net/cert/cert_net_fetcher.h b/net/cert/cert_net_fetcher.h
index afe878e..f834470 100644
--- a/net/cert/cert_net_fetcher.h
+++ b/net/cert/cert_net_fetcher.h
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/callback.h"
@@ -82,19 +83,19 @@
   //     pass DEFAULT.
   //   * callback -- The callback that will be invoked on completion of the job.
 
-  virtual WARN_UNUSED_RESULT scoped_ptr<Request> FetchCaIssuers(
+  virtual WARN_UNUSED_RESULT std::unique_ptr<Request> FetchCaIssuers(
       const GURL& url,
       int timeout_milliseconds,
       int max_response_bytes,
       const FetchCallback& callback) = 0;
 
-  virtual WARN_UNUSED_RESULT scoped_ptr<Request> FetchCrl(
+  virtual WARN_UNUSED_RESULT std::unique_ptr<Request> FetchCrl(
       const GURL& url,
       int timeout_milliseconds,
       int max_response_bytes,
       const FetchCallback& callback) = 0;
 
-  virtual WARN_UNUSED_RESULT scoped_ptr<Request> FetchOcsp(
+  virtual WARN_UNUSED_RESULT std::unique_ptr<Request> FetchOcsp(
       const GURL& url,
       int timeout_milliseconds,
       int max_response_bytes,
diff --git a/net/cert/cert_verifier.cc b/net/cert/cert_verifier.cc
index 79bd0ef..054edb5 100644
--- a/net/cert/cert_verifier.cc
+++ b/net/cert/cert_verifier.cc
@@ -4,6 +4,9 @@
 
 #include "net/cert/cert_verifier.h"
 
+#include <memory>
+
+#include "base/memory/ptr_util.h"
 #include "build/build_config.h"
 #include "net/cert/cert_verify_proc.h"
 
@@ -19,12 +22,12 @@
   return false;
 }
 
-scoped_ptr<CertVerifier> CertVerifier::CreateDefault() {
+std::unique_ptr<CertVerifier> CertVerifier::CreateDefault() {
 #if defined(OS_NACL)
   NOTIMPLEMENTED();
-  return scoped_ptr<CertVerifier>();
+  return std::unique_ptr<CertVerifier>();
 #else
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new MultiThreadedCertVerifier(CertVerifyProc::CreateDefault()));
 #endif
 }
diff --git a/net/cert/cert_verifier.h b/net/cert/cert_verifier.h
index 64f4a86..26ee98835 100644
--- a/net/cert/cert_verifier.h
+++ b/net/cert/cert_verifier.h
@@ -5,10 +5,10 @@
 #ifndef NET_CERT_CERT_VERIFIER_H_
 #define NET_CERT_CERT_VERIFIER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
 
@@ -121,7 +121,7 @@
                      CRLSet* crl_set,
                      CertVerifyResult* verify_result,
                      const CompletionCallback& callback,
-                     scoped_ptr<Request>* out_req,
+                     std::unique_ptr<Request>* out_req,
                      const BoundNetLog& net_log) = 0;
 
   // Returns true if this CertVerifier supports stapled OCSP responses.
@@ -129,7 +129,7 @@
 
   // Creates a CertVerifier implementation that verifies certificates using
   // the preferred underlying cryptographic libraries.
-  static scoped_ptr<CertVerifier> CreateDefault();
+  static std::unique_ptr<CertVerifier> CreateDefault();
 };
 
 }  // namespace net
diff --git a/net/cert/cert_verify_proc_nss.cc b/net/cert/cert_verify_proc_nss.cc
index cad20b9..aad69ce7 100644
--- a/net/cert/cert_verify_proc_nss.cc
+++ b/net/cert/cert_verify_proc_nss.cc
@@ -4,9 +4,6 @@
 
 #include "net/cert/cert_verify_proc_nss.h"
 
-#include <string>
-#include <vector>
-
 #include <cert.h>
 #include <nss.h>
 #include <prerror.h>
@@ -14,6 +11,10 @@
 #include <sechash.h>
 #include <sslerr.h>
 
+#include <memory>
+#include <string>
+#include <vector>
+
 #include "base/logging.h"
 #include "base/macros.h"
 #include "build/build_config.h"
@@ -45,15 +46,15 @@
 
 namespace {
 
-typedef scoped_ptr<
+typedef std::unique_ptr<
     CERTCertificatePolicies,
     crypto::NSSDestroyer<CERTCertificatePolicies,
-                         CERT_DestroyCertificatePoliciesExtension> >
+                         CERT_DestroyCertificatePoliciesExtension>>
     ScopedCERTCertificatePolicies;
 
-typedef scoped_ptr<
+typedef std::unique_ptr<
     CERTCertList,
-    crypto::NSSDestroyer<CERTCertList, CERT_DestroyCertList> >
+    crypto::NSSDestroyer<CERTCertList, CERT_DestroyCertList>>
     ScopedCERTCertList;
 
 // ScopedCERTValOutParam manages destruction of values in the CERTValOutParam
diff --git a/net/cert/cert_verify_proc_win.cc b/net/cert/cert_verify_proc_win.cc
index e485e3d2..bb1b481 100644
--- a/net/cert/cert_verify_proc_win.cc
+++ b/net/cert/cert_verify_proc_win.cc
@@ -4,11 +4,11 @@
 
 #include "net/cert/cert_verify_proc_win.h"
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/memory/free_deleter.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/sha1.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
@@ -61,10 +61,10 @@
 typedef crypto::ScopedCAPIHandle<HCERTCHAINENGINE, FreeChainEngineFunctor>
     ScopedHCERTCHAINENGINE;
 
-typedef scoped_ptr<const CERT_CHAIN_CONTEXT, FreeCertChainContextFunctor>
+typedef std::unique_ptr<const CERT_CHAIN_CONTEXT, FreeCertChainContextFunctor>
     ScopedPCCERT_CHAIN_CONTEXT;
 
-typedef scoped_ptr<const CERT_CONTEXT, FreeCertContextFunctor>
+typedef std::unique_ptr<const CERT_CONTEXT, FreeCertContextFunctor>
     ScopedPCCERT_CONTEXT;
 
 //-----------------------------------------------------------------------------
@@ -199,7 +199,8 @@
                            &name_info,
                            &name_info_size);
   if (rv) {
-    scoped_ptr<CERT_NAME_INFO, base::FreeDeleter> scoped_name_info(name_info);
+    std::unique_ptr<CERT_NAME_INFO, base::FreeDeleter> scoped_name_info(
+        name_info);
 
     // The Subject field may have multiple common names.  According to the
     // "PKI Layer Cake" paper, CryptoAPI uses every common name in the
@@ -359,7 +360,7 @@
 // structure and stores it in *output.
 void GetCertPoliciesInfo(
     PCCERT_CONTEXT cert,
-    scoped_ptr<CERT_POLICIES_INFO, base::FreeDeleter>* output) {
+    std::unique_ptr<CERT_POLICIES_INFO, base::FreeDeleter>* output) {
   PCERT_EXTENSION extension = CertFindExtension(szOID_CERT_POLICIES,
                                                 cert->pCertInfo->cExtension,
                                                 cert->pCertInfo->rgExtension);
@@ -470,7 +471,7 @@
   // Compute the subject's serial.
   const CRYPT_INTEGER_BLOB* serial_blob =
       &subject_cert->pCertInfo->SerialNumber;
-  scoped_ptr<uint8_t[]> serial_bytes(new uint8_t[serial_blob->cbData]);
+  std::unique_ptr<uint8_t[]> serial_bytes(new uint8_t[serial_blob->cbData]);
   // The bytes of the serial number are stored little-endian.
   // Note: While MSDN implies that bytes are stripped from this serial,
   // they are not - only CertCompareIntegerBlob actually removes bytes.
@@ -908,7 +909,7 @@
       const_cast<LPSTR*>(usage);
 
   // Get the certificatePolicies extension of the certificate.
-  scoped_ptr<CERT_POLICIES_INFO, base::FreeDeleter> policies_info;
+  std::unique_ptr<CERT_POLICIES_INFO, base::FreeDeleter> policies_info;
   LPSTR ev_policy_oid = NULL;
   if (flags & CertVerifier::VERIFY_EV_CERT) {
     GetCertPoliciesInfo(cert_handle, &policies_info);
diff --git a/net/cert/client_cert_verifier.h b/net/cert/client_cert_verifier.h
index 8060a028..7aeffbc 100644
--- a/net/cert/client_cert_verifier.h
+++ b/net/cert/client_cert_verifier.h
@@ -5,8 +5,9 @@
 #ifndef NET_CERT_CLIENT_CERT_VERIFIER_H_
 #define NET_CERT_CLIENT_CERT_VERIFIER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
 
@@ -34,7 +35,7 @@
   // Returns OK if successful or an error code upon failure.
   virtual int Verify(X509Certificate* cert,
                      const CompletionCallback& callback,
-                     scoped_ptr<Request>* out_req) = 0;
+                     std::unique_ptr<Request>* out_req) = 0;
 };
 
 }  // namespace net
diff --git a/net/cert/crl_set_storage.cc b/net/cert/crl_set_storage.cc
index fe3e70ab..a4e3fd1 100644
--- a/net/cert/crl_set_storage.cc
+++ b/net/cert/crl_set_storage.cc
@@ -4,10 +4,11 @@
 
 #include "net/cert/crl_set_storage.h"
 
+#include <memory>
+
 #include "base/base64.h"
 #include "base/format_macros.h"
 #include "base/json/json_reader.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event.h"
@@ -126,7 +127,7 @@
   const base::StringPiece header_bytes(data->data(), header_len);
   data->remove_prefix(header_len);
 
-  scoped_ptr<base::Value> header =
+  std::unique_ptr<base::Value> header =
       base::JSONReader::Read(header_bytes, base::JSON_ALLOW_TRAILING_COMMAS);
   if (header.get() == NULL)
     return NULL;
@@ -304,7 +305,7 @@
   #error assumes little endian
 #endif
 
-  scoped_ptr<base::DictionaryValue> header_dict(ReadHeader(&data));
+  std::unique_ptr<base::DictionaryValue> header_dict(ReadHeader(&data));
   if (!header_dict.get())
     return false;
 
@@ -366,7 +367,7 @@
                                const base::StringPiece& delta_bytes,
                                scoped_refptr<CRLSet>* out_crl_set) {
   base::StringPiece data(delta_bytes);
-  scoped_ptr<base::DictionaryValue> header_dict(ReadHeader(&data));
+  std::unique_ptr<base::DictionaryValue> header_dict(ReadHeader(&data));
   if (!header_dict.get())
     return false;
 
@@ -461,7 +462,7 @@
 bool CRLSetStorage::GetIsDeltaUpdate(const base::StringPiece& bytes,
                                      bool* is_delta) {
   base::StringPiece data(bytes);
-  scoped_ptr<base::DictionaryValue> header_dict(ReadHeader(&data));
+  std::unique_ptr<base::DictionaryValue> header_dict(ReadHeader(&data));
   if (!header_dict.get())
     return false;
 
diff --git a/net/cert/ct_log_response_parser_unittest.cc b/net/cert/ct_log_response_parser_unittest.cc
index 8084a283..110a432 100644
--- a/net/cert/ct_log_response_parser_unittest.cc
+++ b/net/cert/ct_log_response_parser_unittest.cc
@@ -4,11 +4,11 @@
 
 #include "net/cert/ct_log_response_parser.h"
 
+#include <memory>
 #include <string>
 
 #include "base/base64.h"
 #include "base/json/json_reader.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/stringprintf.h"
 #include "base/time/time.h"
 #include "base/values.h"
@@ -22,14 +22,15 @@
 namespace ct {
 
 namespace {
-scoped_ptr<base::Value> ParseJson(const std::string& json) {
+std::unique_ptr<base::Value> ParseJson(const std::string& json) {
   base::JSONReader json_reader;
   return json_reader.Read(json);
 }
 }
 
 TEST(CTLogResponseParserTest, ParsesValidJsonSTH) {
-  scoped_ptr<base::Value> sample_sth_json = ParseJson(GetSampleSTHAsJson());
+  std::unique_ptr<base::Value> sample_sth_json =
+      ParseJson(GetSampleSTHAsJson());
   SignedTreeHead tree_head;
   EXPECT_TRUE(FillSignedTreeHead(*sample_sth_json.get(), &tree_head));
 
@@ -59,14 +60,14 @@
 }
 
 TEST(CTLogResponseParserTest, FailsToParseMissingFields) {
-  scoped_ptr<base::Value> missing_signature_sth = ParseJson(
+  std::unique_ptr<base::Value> missing_signature_sth = ParseJson(
       CreateSignedTreeHeadJsonString(1 /* tree_size */, 123456u /* timestamp */,
                                      GetSampleSTHSHA256RootHash(), ""));
 
   SignedTreeHead tree_head;
   ASSERT_FALSE(FillSignedTreeHead(*missing_signature_sth.get(), &tree_head));
 
-  scoped_ptr<base::Value> missing_root_hash_sth = ParseJson(
+  std::unique_ptr<base::Value> missing_root_hash_sth = ParseJson(
       CreateSignedTreeHeadJsonString(1 /* tree_size */, 123456u /* timestamp */,
                                      "", GetSampleSTHTreeHeadSignature()));
   ASSERT_FALSE(FillSignedTreeHead(*missing_root_hash_sth.get(), &tree_head));
@@ -79,7 +80,7 @@
   base::Base64Decode(
       base::StringPiece("/WHFMgXtI/umKKuACJIN0Bb73TcILm9WkeU6qszvoArK\n"),
       &too_long_hash);
-  scoped_ptr<base::Value> too_long_hash_json =
+  std::unique_ptr<base::Value> too_long_hash_json =
       ParseJson(CreateSignedTreeHeadJsonString(
           1 /* tree_size */, 123456u /* timestamp */,
           GetSampleSTHSHA256RootHash(), too_long_hash));
@@ -89,7 +90,7 @@
   base::Base64Decode(
       base::StringPiece("/WHFMgXtI/umKKuACJIN0Bb73TcILm9WkeU6qszvoA==\n"),
       &too_short_hash);
-  scoped_ptr<base::Value> too_short_hash_json =
+  std::unique_ptr<base::Value> too_short_hash_json =
       ParseJson(CreateSignedTreeHeadJsonString(
           1 /* tree_size */, 123456u /* timestamp */,
           GetSampleSTHSHA256RootHash(), too_short_hash));
@@ -99,7 +100,7 @@
 TEST(CTLogResponseParserTest, ParsesJsonSTHWithLargeTimestamp) {
   SignedTreeHead tree_head;
 
-  scoped_ptr<base::Value> large_timestamp_json =
+  std::unique_ptr<base::Value> large_timestamp_json =
       ParseJson(CreateSignedTreeHeadJsonString(
           100, INT64_C(1) << 34, GetSampleSTHSHA256RootHash(),
           GetSampleSTHTreeHeadSignature()));
@@ -122,7 +123,7 @@
   raw_nodes.push_back(first);
   raw_nodes.push_back(second);
   raw_nodes.push_back(third);
-  scoped_ptr<base::Value> sample_consistency_proof =
+  std::unique_ptr<base::Value> sample_consistency_proof =
       ParseJson(CreateConsistencyProofJsonString(raw_nodes));
 
   std::vector<std::string> output;
@@ -137,25 +138,26 @@
 TEST(CTLogResponseParserTest, FailsOnInvalidProofJson) {
   std::vector<std::string> output;
 
-  scoped_ptr<base::Value> badly_encoded =
+  std::unique_ptr<base::Value> badly_encoded =
       ParseJson(std::string("{\"consistency\": [\"notbase64\"]}"));
   EXPECT_FALSE(FillConsistencyProof(*badly_encoded.get(), &output));
 
-  scoped_ptr<base::Value> not_a_string =
+  std::unique_ptr<base::Value> not_a_string =
       ParseJson(std::string("{\"consistency\": [42, 16]}"));
   EXPECT_FALSE(FillConsistencyProof(*badly_encoded.get(), &output));
 
-  scoped_ptr<base::Value> missing_consistency = ParseJson(std::string("{}"));
+  std::unique_ptr<base::Value> missing_consistency =
+      ParseJson(std::string("{}"));
   EXPECT_FALSE(FillConsistencyProof(*missing_consistency.get(), &output));
 
-  scoped_ptr<base::Value> not_a_dict = ParseJson(std::string("[]"));
+  std::unique_ptr<base::Value> not_a_dict = ParseJson(std::string("[]"));
   EXPECT_FALSE(FillConsistencyProof(*not_a_dict.get(), &output));
 }
 
 TEST(CTLogResponseParserTest, ParsesProofJsonWithExtraFields) {
   std::vector<std::string> output;
 
-  scoped_ptr<base::Value> badly_encoded =
+  std::unique_ptr<base::Value> badly_encoded =
       ParseJson(std::string("{\"consistency\": [], \"somethingelse\": 3}"));
   EXPECT_TRUE(FillConsistencyProof(*badly_encoded.get(), &output));
 }
diff --git a/net/cert/ct_log_verifier_util.cc b/net/cert/ct_log_verifier_util.cc
index 9e8097f..402fd0c5 100644
--- a/net/cert/ct_log_verifier_util.cc
+++ b/net/cert/ct_log_verifier_util.cc
@@ -4,7 +4,8 @@
 
 #include "net/cert/ct_log_verifier_util.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/strings/string_util.h"
 #include "crypto/secure_hash.h"
 #include "crypto/sha2.h"
@@ -16,7 +17,7 @@
 namespace internal {
 
 std::string HashNodes(const std::string& lh, const std::string& rh) {
-  scoped_ptr<crypto::SecureHash> hash(
+  std::unique_ptr<crypto::SecureHash> hash(
       crypto::SecureHash::Create(crypto::SecureHash::SHA256));
 
   hash->Update("\01", 1);
diff --git a/net/cert/ct_policy_enforcer.cc b/net/cert/ct_policy_enforcer.cc
index e036087c..48ebbc2 100644
--- a/net/cert/ct_policy_enforcer.cc
+++ b/net/cert/ct_policy_enforcer.cc
@@ -5,6 +5,7 @@
 #include "net/cert/ct_policy_enforcer.h"
 
 #include <algorithm>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
@@ -206,11 +207,11 @@
   base::Version whitelist_version;
 };
 
-scoped_ptr<base::Value> NetLogEVComplianceCheckResultCallback(
+std::unique_ptr<base::Value> NetLogEVComplianceCheckResultCallback(
     X509Certificate* cert,
     EVComplianceDetails* details,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->Set("certificate", NetLogX509CertificateCallback(cert, capture_mode));
   dict->SetBoolean("policy_enforcement_required", true);
   dict->SetBoolean("build_timely", details->build_timely);
@@ -224,12 +225,12 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogCertComplianceCheckResultCallback(
+std::unique_ptr<base::Value> NetLogCertComplianceCheckResultCallback(
     X509Certificate* cert,
     bool build_timely,
     ct::CertPolicyCompliance compliance,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->Set("certificate", NetLogX509CertificateCallback(cert, capture_mode));
   dict->SetBoolean("build_timely", build_timely);
   dict->SetString("ct_compliance_status",
diff --git a/net/cert/ct_policy_enforcer_unittest.cc b/net/cert/ct_policy_enforcer_unittest.cc
index a2cfb048..2d642f8 100644
--- a/net/cert/ct_policy_enforcer_unittest.cc
+++ b/net/cert/ct_policy_enforcer_unittest.cc
@@ -4,9 +4,9 @@
 
 #include "net/cert/ct_policy_enforcer.h"
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "base/version.h"
 #include "crypto/sha2.h"
@@ -150,7 +150,7 @@
   }
 
  protected:
-  scoped_ptr<CTPolicyEnforcer> policy_enforcer_;
+  std::unique_ptr<CTPolicyEnforcer> policy_enforcer_;
   scoped_refptr<X509Certificate> chain_;
   std::string google_log_id_;
   std::string non_google_log_id_;
diff --git a/net/cert/ct_signed_certificate_timestamp_log_param.cc b/net/cert/ct_signed_certificate_timestamp_log_param.cc
index 042f59f..6d5b864 100644
--- a/net/cert/ct_signed_certificate_timestamp_log_param.cc
+++ b/net/cert/ct_signed_certificate_timestamp_log_param.cc
@@ -5,6 +5,7 @@
 #include "net/cert/ct_signed_certificate_timestamp_log_param.h"
 
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <utility>
 
@@ -90,9 +91,9 @@
 // Returns a dictionary where each key is a field of the SCT and its value
 // is this field's value in the SCT. This dictionary is meant to be used for
 // outputting a de-serialized SCT to the NetLog.
-scoped_ptr<base::DictionaryValue> SCTToDictionary(
+std::unique_ptr<base::DictionaryValue> SCTToDictionary(
     const ct::SignedCertificateTimestamp& sct) {
-  scoped_ptr<base::DictionaryValue> out(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> out(new base::DictionaryValue());
 
   out->SetString("origin", OriginToString(sct.origin));
   out->SetInteger("version", sct.version);
@@ -115,9 +116,9 @@
 
 // Given a list of SCTs, return a ListValue instance where each item in the
 // list is a dictionary created by SCTToDictionary.
-scoped_ptr<base::ListValue> SCTListToPrintableValues(
+std::unique_ptr<base::ListValue> SCTListToPrintableValues(
     const ct::SCTList& sct_list) {
-  scoped_ptr<base::ListValue> output_scts(new base::ListValue());
+  std::unique_ptr<base::ListValue> output_scts(new base::ListValue());
   for (const auto& sct : sct_list)
     output_scts->Append(SCTToDictionary(*(sct.get())));
 
@@ -126,10 +127,10 @@
 
 }  // namespace
 
-scoped_ptr<base::Value> NetLogSignedCertificateTimestampCallback(
+std::unique_ptr<base::Value> NetLogSignedCertificateTimestampCallback(
     const ct::CTVerifyResult* ct_result,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->Set("verified_scts",
             SCTListToPrintableValues(ct_result->verified_scts));
@@ -143,12 +144,12 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogRawSignedCertificateTimestampCallback(
+std::unique_ptr<base::Value> NetLogRawSignedCertificateTimestampCallback(
     const std::string* embedded_scts,
     const std::string* sct_list_from_ocsp,
     const std::string* sct_list_from_tls_extension,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   SetBinaryData("embedded_scts", *embedded_scts, dict.get());
   SetBinaryData("scts_from_ocsp_response", *sct_list_from_ocsp, dict.get());
diff --git a/net/cert/ct_signed_certificate_timestamp_log_param.h b/net/cert/ct_signed_certificate_timestamp_log_param.h
index 4b1ccb31..7d24669 100644
--- a/net/cert/ct_signed_certificate_timestamp_log_param.h
+++ b/net/cert/ct_signed_certificate_timestamp_log_param.h
@@ -5,6 +5,8 @@
 #ifndef NET_CERT_CT_SIGNED_CERTIFICATE_TIMESTAMP_LOG_PARAM_H_
 #define NET_CERT_CT_SIGNED_CERTIFICATE_TIMESTAMP_LOG_PARAM_H_
 
+#include <memory>
+
 #include "net/log/net_log.h"
 
 namespace net {
@@ -17,7 +19,7 @@
 // logged in the NetLog.
 // See the documentation for SIGNED_CERTIFICATE_TIMESTAMPS_CHECKED
 // in net/log/net_log_event_type_list.h
-scoped_ptr<base::Value> NetLogSignedCertificateTimestampCallback(
+std::unique_ptr<base::Value> NetLogSignedCertificateTimestampCallback(
     const ct::CTVerifyResult* ct_result,
     NetLogCaptureMode capture_mode);
 
@@ -25,7 +27,7 @@
 // in the NetLog.
 // See the documentation for SIGNED_CERTIFICATE_TIMESTAMPS_RECEIVED
 // in net/log/net_log_event_type_list.h
-scoped_ptr<base::Value> NetLogRawSignedCertificateTimestampCallback(
+std::unique_ptr<base::Value> NetLogRawSignedCertificateTimestampCallback(
     const std::string* embedded_scts,
     const std::string* sct_list_from_ocsp,
     const std::string* sct_list_from_tls_extension,
diff --git a/net/cert/internal/name_constraints.cc b/net/cert/internal/name_constraints.cc
index 9141a02dd..a515789 100644
--- a/net/cert/internal/name_constraints.cc
+++ b/net/cert/internal/name_constraints.cc
@@ -6,6 +6,8 @@
 
 #include <limits.h>
 
+#include <memory>
+
 #include "base/strings/string_util.h"
 #include "net/cert/internal/verify_name_match.h"
 #include "net/der/input.h"
@@ -298,11 +300,11 @@
 GeneralNames::~GeneralNames() {}
 
 // static
-scoped_ptr<GeneralNames> GeneralNames::CreateFromDer(
+std::unique_ptr<GeneralNames> GeneralNames::CreateFromDer(
     const der::Input& general_names_tlv) {
   // RFC 5280 section 4.2.1.6:
   // GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
-  scoped_ptr<GeneralNames> general_names(new GeneralNames());
+  std::unique_ptr<GeneralNames> general_names(new GeneralNames());
   der::Parser parser(general_names_tlv);
   der::Parser sequence_parser;
   if (!parser.ReadSequence(&sequence_parser))
@@ -330,10 +332,10 @@
 NameConstraints::~NameConstraints() {}
 
 // static
-scoped_ptr<NameConstraints> NameConstraints::CreateFromDer(
+std::unique_ptr<NameConstraints> NameConstraints::CreateFromDer(
     const der::Input& extension_value,
     bool is_critical) {
-  scoped_ptr<NameConstraints> name_constraints(new NameConstraints());
+  std::unique_ptr<NameConstraints> name_constraints(new NameConstraints());
   if (!name_constraints->Parse(extension_value, is_critical))
     return nullptr;
   return name_constraints;
diff --git a/net/cert/internal/name_constraints.h b/net/cert/internal/name_constraints.h
index 35ff913..ccf4ac1 100644
--- a/net/cert/internal/name_constraints.h
+++ b/net/cert/internal/name_constraints.h
@@ -7,10 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/ip_address.h"
 
 namespace net {
@@ -48,7 +48,7 @@
 
   // Create a GeneralNames object representing the DER-encoded
   // |general_names_tlv|.
-  static scoped_ptr<GeneralNames> CreateFromDer(
+  static std::unique_ptr<GeneralNames> CreateFromDer(
       const der::Input& general_names_tlv);
 
   // ASCII hostnames.
@@ -84,7 +84,7 @@
   // the OCTET STRING tag). |is_critical| should be true if the extension was
   // marked critical. Returns nullptr if parsing the the extension failed.
   // The object lifetime is not bound to the lifetime of |extension_value| data.
-  static scoped_ptr<NameConstraints> CreateFromDer(
+  static std::unique_ptr<NameConstraints> CreateFromDer(
       const der::Input& extension_value,
       bool is_critical);
 
diff --git a/net/cert/internal/name_constraints_unittest.cc b/net/cert/internal/name_constraints_unittest.cc
index 693597da..f61e1da 100644
--- a/net/cert/internal/name_constraints_unittest.cc
+++ b/net/cert/internal/name_constraints_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "net/cert/internal/name_constraints.h"
 
+#include <memory>
+
 #include "net/base/ip_address.h"
 #include "net/cert/internal/test_helpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -41,7 +43,7 @@
 
 ::testing::AssertionResult LoadTestSubjectAltName(
     const std::string& basename,
-    scoped_ptr<GeneralNames>* result) {
+    std::unique_ptr<GeneralNames>* result) {
   std::string san_der;
   ::testing::AssertionResult load_result =
       LoadTestSubjectAltNameData(basename, &san_der);
@@ -71,7 +73,7 @@
   std::string a;
   ASSERT_TRUE(LoadTestNameConstraint("dnsname.pem", &a));
 
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -136,7 +138,7 @@
 
   EXPECT_EQ(GENERAL_NAME_DNS_NAME, name_constraints->ConstrainedNameTypes());
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-permitted.pem", &san));
   EXPECT_TRUE(name_constraints->IsPermittedCert(der::Input(), san.get()));
 
@@ -154,7 +156,7 @@
        DNSNamesWithMultipleLevelsBetweenExcludedAndPermitted) {
   std::string a;
   ASSERT_TRUE(LoadTestNameConstraint("dnsname2.pem", &a));
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -184,7 +186,7 @@
   std::string a;
   ASSERT_TRUE(
       LoadTestNameConstraint("dnsname-permitted_with_leading_dot.pem", &a));
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -201,7 +203,7 @@
   std::string a;
   ASSERT_TRUE(LoadTestNameConstraint("dnsname-excluded.pem", &a));
 
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -220,7 +222,7 @@
   std::string a;
   ASSERT_TRUE(LoadTestNameConstraint("dnsname-excludeall.pem", &a));
 
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -237,7 +239,7 @@
   std::string a;
   ASSERT_TRUE(LoadTestNameConstraint("dnsname-exclude_dot.pem", &a));
 
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -281,8 +283,9 @@
   std::string name_ca;
   ASSERT_TRUE(LoadTestName("name-ca.pem", &name_ca));
 
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   // Not in any permitted subtree.
@@ -325,7 +328,7 @@
   EXPECT_FALSE(name_constraints->IsPermittedCert(
       SequenceValueFromString(&name_us_ca), nullptr /* subject_alt_names */));
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-permitted.pem", &san));
   EXPECT_TRUE(name_constraints->IsPermittedCert(der::Input(), san.get()));
 
@@ -343,8 +346,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("directoryname-excluded.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   std::string name_empty;
@@ -373,8 +377,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("directoryname-excludeall.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   std::string name_empty;
@@ -405,7 +410,7 @@
   std::string a;
   ASSERT_TRUE(LoadTestNameConstraint("ipaddress.pem", &a));
 
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -502,7 +507,7 @@
 
   EXPECT_EQ(GENERAL_NAME_IP_ADDRESS, name_constraints->ConstrainedNameTypes());
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-permitted.pem", &san));
   EXPECT_TRUE(name_constraints->IsPermittedCert(der::Input(), san.get()));
 
@@ -520,7 +525,7 @@
   std::string a;
   ASSERT_TRUE(LoadTestNameConstraint("ipaddress-excluded.pem", &a));
 
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -536,7 +541,7 @@
   std::string a;
   ASSERT_TRUE(LoadTestNameConstraint("ipaddress-excludeall.pem", &a));
 
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -555,7 +560,7 @@
   std::string a;
   ASSERT_TRUE(LoadTestNameConstraint("ipaddress-permit_singlehost.pem", &a));
 
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -571,7 +576,7 @@
   std::string a;
   ASSERT_TRUE(LoadTestNameConstraint("ipaddress-permit_prefix31.pem", &a));
 
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -588,7 +593,7 @@
   std::string a;
   ASSERT_TRUE(LoadTestNameConstraint("ipaddress-permit_prefix1.pem", &a));
 
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -604,7 +609,7 @@
   std::string a;
   ASSERT_TRUE(LoadTestNameConstraint("ipaddress-permit_all.pem", &a));
 
-  scoped_ptr<NameConstraints> name_constraints(
+  std::unique_ptr<NameConstraints> name_constraints(
       NameConstraints::CreateFromDer(der::Input(&a), is_critical()));
   ASSERT_TRUE(name_constraints);
 
@@ -643,8 +648,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("othername-permitted.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   if (is_critical()) {
@@ -654,7 +660,7 @@
     EXPECT_EQ(0, name_constraints->ConstrainedNameTypes());
   }
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-othername.pem", &san));
   EXPECT_EQ(!is_critical(),
             name_constraints->IsPermittedCert(der::Input(), san.get()));
@@ -664,8 +670,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("othername-excluded.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   if (is_critical()) {
@@ -675,7 +682,7 @@
     EXPECT_EQ(0, name_constraints->ConstrainedNameTypes());
   }
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-othername.pem", &san));
   EXPECT_EQ(!is_critical(),
             name_constraints->IsPermittedCert(der::Input(), san.get()));
@@ -685,8 +692,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("rfc822name-permitted.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   if (is_critical()) {
@@ -696,7 +704,7 @@
     EXPECT_EQ(0, name_constraints->ConstrainedNameTypes());
   }
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-rfc822name.pem", &san));
   EXPECT_EQ(!is_critical(),
             name_constraints->IsPermittedCert(der::Input(), san.get()));
@@ -706,8 +714,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("rfc822name-excluded.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   if (is_critical()) {
@@ -717,7 +726,7 @@
     EXPECT_EQ(0, name_constraints->ConstrainedNameTypes());
   }
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-rfc822name.pem", &san));
   EXPECT_EQ(!is_critical(),
             name_constraints->IsPermittedCert(der::Input(), san.get()));
@@ -727,8 +736,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("x400address-permitted.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   if (is_critical()) {
@@ -738,7 +748,7 @@
     EXPECT_EQ(0, name_constraints->ConstrainedNameTypes());
   }
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-x400address.pem", &san));
   EXPECT_EQ(!is_critical(),
             name_constraints->IsPermittedCert(der::Input(), san.get()));
@@ -748,8 +758,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("x400address-excluded.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   if (is_critical()) {
@@ -759,7 +770,7 @@
     EXPECT_EQ(0, name_constraints->ConstrainedNameTypes());
   }
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-x400address.pem", &san));
   EXPECT_EQ(!is_critical(),
             name_constraints->IsPermittedCert(der::Input(), san.get()));
@@ -769,8 +780,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("edipartyname-permitted.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   if (is_critical()) {
@@ -780,7 +792,7 @@
     EXPECT_EQ(0, name_constraints->ConstrainedNameTypes());
   }
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-edipartyname.pem", &san));
   EXPECT_EQ(!is_critical(),
             name_constraints->IsPermittedCert(der::Input(), san.get()));
@@ -790,8 +802,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("edipartyname-excluded.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   if (is_critical()) {
@@ -801,7 +814,7 @@
     EXPECT_EQ(0, name_constraints->ConstrainedNameTypes());
   }
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-edipartyname.pem", &san));
   EXPECT_EQ(!is_critical(),
             name_constraints->IsPermittedCert(der::Input(), san.get()));
@@ -810,8 +823,9 @@
 TEST_P(ParseNameConstraints, URIsInPermitted) {
   std::string constraints_der;
   ASSERT_TRUE(LoadTestNameConstraint("uri-permitted.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   if (is_critical()) {
@@ -821,7 +835,7 @@
     EXPECT_EQ(0, name_constraints->ConstrainedNameTypes());
   }
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-uri.pem", &san));
   EXPECT_EQ(!is_critical(),
             name_constraints->IsPermittedCert(der::Input(), san.get()));
@@ -830,8 +844,9 @@
 TEST_P(ParseNameConstraints, URIsInExcluded) {
   std::string constraints_der;
   ASSERT_TRUE(LoadTestNameConstraint("uri-excluded.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   if (is_critical()) {
@@ -841,7 +856,7 @@
     EXPECT_EQ(0, name_constraints->ConstrainedNameTypes());
   }
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-uri.pem", &san));
   EXPECT_EQ(!is_critical(),
             name_constraints->IsPermittedCert(der::Input(), san.get()));
@@ -851,8 +866,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("registeredid-permitted.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   if (is_critical()) {
@@ -862,7 +878,7 @@
     EXPECT_EQ(0, name_constraints->ConstrainedNameTypes());
   }
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-registeredid.pem", &san));
   EXPECT_EQ(!is_critical(),
             name_constraints->IsPermittedCert(der::Input(), san.get()));
@@ -872,8 +888,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("registeredid-excluded.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   if (is_critical()) {
@@ -883,7 +900,7 @@
     EXPECT_EQ(0, name_constraints->ConstrainedNameTypes());
   }
 
-  scoped_ptr<GeneralNames> san;
+  std::unique_ptr<GeneralNames> san;
   ASSERT_TRUE(LoadTestSubjectAltName("san-registeredid.pem", &san));
   EXPECT_EQ(!is_critical(),
             name_constraints->IsPermittedCert(der::Input(), san.get()));
@@ -966,8 +983,9 @@
 TEST_P(ParseNameConstraints, IsPermittedCertSubjectEmailAddressIsOk) {
   std::string constraints_der;
   ASSERT_TRUE(LoadTestNameConstraint("directoryname.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   std::string name_us_arizona_email;
@@ -985,8 +1003,9 @@
   std::string constraints_der;
   ASSERT_TRUE(
       LoadTestNameConstraint("rfc822name-permitted.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   std::string name_us_arizona_email;
@@ -1007,8 +1026,9 @@
   std::string constraints_der;
   ASSERT_TRUE(LoadTestNameConstraint("directoryname_and_dnsname.pem",
                                      &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   std::string name_us_az_foocom;
@@ -1048,8 +1068,9 @@
   std::string constraints_der;
   ASSERT_TRUE(LoadTestNameConstraint(
       "directoryname_and_dnsname_and_ipaddress.pem", &constraints_der));
-  scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-      der::Input(&constraints_der), is_critical()));
+  std::unique_ptr<NameConstraints> name_constraints(
+      NameConstraints::CreateFromDer(der::Input(&constraints_der),
+                                     is_critical()));
   ASSERT_TRUE(name_constraints);
 
   std::string name_us_az_1_1_1_1;
diff --git a/net/cert/internal/parse_ocsp.h b/net/cert/internal/parse_ocsp.h
index 63ee3e8e..07c155d0 100644
--- a/net/cert/internal/parse_ocsp.h
+++ b/net/cert/internal/parse_ocsp.h
@@ -5,10 +5,10 @@
 #ifndef NET_CERT_INTERNAL_PARSE_OCSP_H_
 #define NET_CERT_INTERNAL_PARSE_OCSP_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "net/base/hash_value.h"
 #include "net/cert/internal/parse_certificate.h"
 #include "net/cert/internal/signature_algorithm.h"
@@ -212,7 +212,7 @@
 
   ResponseStatus status;
   der::Input data;
-  scoped_ptr<SignatureAlgorithm> signature_algorithm;
+  std::unique_ptr<SignatureAlgorithm> signature_algorithm;
   der::BitString signature;
   bool has_certs;
   std::vector<der::Input> certs;
diff --git a/net/cert/internal/signature_algorithm.cc b/net/cert/internal/signature_algorithm.cc
index 315243f..a2f99dd 100644
--- a/net/cert/internal/signature_algorithm.cc
+++ b/net/cert/internal/signature_algorithm.cc
@@ -4,8 +4,10 @@
 
 #include "net/cert/internal/signature_algorithm.h"
 
+#include <memory>
 #include <utility>
 
+#include "base/memory/ptr_util.h"
 #include "base/numerics/safe_math.h"
 #include "net/der/input.h"
 #include "net/der/parse_values.h"
@@ -260,8 +262,8 @@
 //         PUBLIC-KEYS { pk-rsa }
 //         SMIME-CAPS { IDENTIFIED BY sha512WithRSAEncryption }
 //     }
-scoped_ptr<SignatureAlgorithm> ParseRsaPkcs1(DigestAlgorithm digest,
-                                             const der::Input& params) {
+std::unique_ptr<SignatureAlgorithm> ParseRsaPkcs1(DigestAlgorithm digest,
+                                                  const der::Input& params) {
   // TODO(svaldez): Add warning about non-strict parsing.
   if (!IsNull(params) && !IsEmpty(params))
     return nullptr;
@@ -313,8 +315,8 @@
 //      PUBLIC-KEYS { pk-ec }
 //      SMIME-CAPS { IDENTIFIED BY ecdsa-with-SHA512 }
 //     }
-scoped_ptr<SignatureAlgorithm> ParseEcdsa(DigestAlgorithm digest,
-                                          const der::Input& params) {
+std::unique_ptr<SignatureAlgorithm> ParseEcdsa(DigestAlgorithm digest,
+                                               const der::Input& params) {
   if (!IsEmpty(params))
     return nullptr;
 
@@ -420,7 +422,7 @@
 //
 // Which is to say the parameters MUST be present, and of type
 // RSASSA-PSS-params.
-scoped_ptr<SignatureAlgorithm> ParseRsaPss(const der::Input& params) {
+std::unique_ptr<SignatureAlgorithm> ParseRsaPss(const der::Input& params) {
   der::Parser parser(params);
   der::Parser params_parser;
   if (!parser.ReadSequence(&params_parser))
@@ -535,7 +537,7 @@
 SignatureAlgorithm::~SignatureAlgorithm() {
 }
 
-scoped_ptr<SignatureAlgorithm> SignatureAlgorithm::CreateFromDer(
+std::unique_ptr<SignatureAlgorithm> SignatureAlgorithm::CreateFromDer(
     const der::Input& algorithm_identifier) {
   der::Input oid;
   der::Input params;
@@ -578,25 +580,25 @@
   return nullptr;  // Unsupported OID.
 }
 
-scoped_ptr<SignatureAlgorithm> SignatureAlgorithm::CreateRsaPkcs1(
+std::unique_ptr<SignatureAlgorithm> SignatureAlgorithm::CreateRsaPkcs1(
     DigestAlgorithm digest) {
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new SignatureAlgorithm(SignatureAlgorithmId::RsaPkcs1, digest, nullptr));
 }
 
-scoped_ptr<SignatureAlgorithm> SignatureAlgorithm::CreateEcdsa(
+std::unique_ptr<SignatureAlgorithm> SignatureAlgorithm::CreateEcdsa(
     DigestAlgorithm digest) {
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new SignatureAlgorithm(SignatureAlgorithmId::Ecdsa, digest, nullptr));
 }
 
-scoped_ptr<SignatureAlgorithm> SignatureAlgorithm::CreateRsaPss(
+std::unique_ptr<SignatureAlgorithm> SignatureAlgorithm::CreateRsaPss(
     DigestAlgorithm digest,
     DigestAlgorithm mgf1_hash,
     uint32_t salt_length) {
-  return make_scoped_ptr(new SignatureAlgorithm(
+  return base::WrapUnique(new SignatureAlgorithm(
       SignatureAlgorithmId::RsaPss, digest,
-      make_scoped_ptr(new RsaPssParameters(mgf1_hash, salt_length))));
+      base::WrapUnique(new RsaPssParameters(mgf1_hash, salt_length))));
 }
 
 const RsaPssParameters* SignatureAlgorithm::ParamsForRsaPss() const {
@@ -608,7 +610,7 @@
 SignatureAlgorithm::SignatureAlgorithm(
     SignatureAlgorithmId algorithm,
     DigestAlgorithm digest,
-    scoped_ptr<SignatureAlgorithmParameters> params)
+    std::unique_ptr<SignatureAlgorithmParameters> params)
     : algorithm_(algorithm), digest_(digest), params_(std::move(params)) {}
 
 }  // namespace net
diff --git a/net/cert/internal/signature_algorithm.h b/net/cert/internal/signature_algorithm.h
index d1400be..0942cce 100644
--- a/net/cert/internal/signature_algorithm.h
+++ b/net/cert/internal/signature_algorithm.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
@@ -87,15 +88,18 @@
 
   // Creates a SignatureAlgorithm by parsing a DER-encoded "AlgorithmIdentifier"
   // (RFC 5280). Returns nullptr on failure.
-  static scoped_ptr<SignatureAlgorithm> CreateFromDer(
+  static std::unique_ptr<SignatureAlgorithm> CreateFromDer(
       const der::Input& algorithm_identifier);
 
   // Creates a new SignatureAlgorithm with the given type and parameters.
-  static scoped_ptr<SignatureAlgorithm> CreateRsaPkcs1(DigestAlgorithm digest);
-  static scoped_ptr<SignatureAlgorithm> CreateEcdsa(DigestAlgorithm digest);
-  static scoped_ptr<SignatureAlgorithm> CreateRsaPss(DigestAlgorithm digest,
-                                                     DigestAlgorithm mgf1_hash,
-                                                     uint32_t salt_length);
+  static std::unique_ptr<SignatureAlgorithm> CreateRsaPkcs1(
+      DigestAlgorithm digest);
+  static std::unique_ptr<SignatureAlgorithm> CreateEcdsa(
+      DigestAlgorithm digest);
+  static std::unique_ptr<SignatureAlgorithm> CreateRsaPss(
+      DigestAlgorithm digest,
+      DigestAlgorithm mgf1_hash,
+      uint32_t salt_length);
 
   // The following methods retrieve the parameters for the signature algorithm.
   //
@@ -109,11 +113,11 @@
  private:
   SignatureAlgorithm(SignatureAlgorithmId algorithm,
                      DigestAlgorithm digest,
-                     scoped_ptr<SignatureAlgorithmParameters> params);
+                     std::unique_ptr<SignatureAlgorithmParameters> params);
 
   const SignatureAlgorithmId algorithm_;
   const DigestAlgorithm digest_;
-  const scoped_ptr<SignatureAlgorithmParameters> params_;
+  const std::unique_ptr<SignatureAlgorithmParameters> params_;
 
   DISALLOW_COPY_AND_ASSIGN(SignatureAlgorithm);
 };
diff --git a/net/cert/internal/signature_algorithm_unittest.cc b/net/cert/internal/signature_algorithm_unittest.cc
index fe5dc2f..717c935a 100644
--- a/net/cert/internal/signature_algorithm_unittest.cc
+++ b/net/cert/internal/signature_algorithm_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "net/cert/internal/signature_algorithm.h"
 
+#include <memory>
+
 #include "base/files/file_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "net/base/test_data_directory.h"
@@ -19,14 +21,15 @@
 // Creates a SignatureAlgorithm given the DER as a byte array. Returns true on
 // success and fills |*out| with a non-null pointer.
 template <size_t N>
-bool ParseDer(const uint8_t(&data)[N], scoped_ptr<SignatureAlgorithm>* out) {
+bool ParseDer(const uint8_t (&data)[N],
+              std::unique_ptr<SignatureAlgorithm>* out) {
   *out = SignatureAlgorithm::CreateFromDer(der::Input(data, N));
   return !!*out;
 }
 
 // Parses a SignatureAlgorithm given an empty DER input.
 TEST(SignatureAlgorithmTest, ParseDerEmpty) {
-  scoped_ptr<SignatureAlgorithm> algorithm =
+  std::unique_ptr<SignatureAlgorithm> algorithm =
       SignatureAlgorithm::CreateFromDer(der::Input());
   ASSERT_FALSE(algorithm);
 }
@@ -34,7 +37,7 @@
 // Parses a SignatureAlgorithm given invalid DER input.
 TEST(SignatureAlgorithmTest, ParseDerBogus) {
   const uint8_t kData[] = {0x00};
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -52,7 +55,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::RsaPkcs1, algorithm->algorithm());
@@ -71,7 +74,7 @@
       0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::RsaPkcs1, algorithm->algorithm());
@@ -93,7 +96,7 @@
       0x02, 0x01, 0x00,  // INTEGER (1 byte)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -111,7 +114,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::RsaPkcs1, algorithm->algorithm());
@@ -130,7 +133,7 @@
       0x2b, 0x0e, 0x03, 0x02, 0x1d,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::RsaPkcs1, algorithm->algorithm());
@@ -153,7 +156,7 @@
       0x02, 0x01, 0x00,  // INTEGER (1 byte)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -173,7 +176,7 @@
       0x05, 0x01, 0x09,  // NULL (1 byte)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -195,7 +198,7 @@
       0x02, 0x01, 0x00,  // INTEGER (1 byte)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -208,7 +211,7 @@
       0x02, 0x01, 0x00,  // INTEGER (1 byte)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -226,7 +229,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::RsaPkcs1, algorithm->algorithm());
@@ -245,7 +248,7 @@
       0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::RsaPkcs1, algorithm->algorithm());
@@ -266,7 +269,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::RsaPkcs1, algorithm->algorithm());
@@ -285,7 +288,7 @@
       0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0c,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::RsaPkcs1, algorithm->algorithm());
@@ -306,7 +309,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::RsaPkcs1, algorithm->algorithm());
@@ -325,7 +328,7 @@
       0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0d,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::RsaPkcs1, algorithm->algorithm());
@@ -348,7 +351,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -364,7 +367,7 @@
       0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x01,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::Ecdsa, algorithm->algorithm());
@@ -385,7 +388,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -401,7 +404,7 @@
       0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::Ecdsa, algorithm->algorithm());
@@ -422,7 +425,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -438,7 +441,7 @@
       0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x03,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::Ecdsa, algorithm->algorithm());
@@ -459,7 +462,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -475,7 +478,7 @@
       0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x04,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   EXPECT_EQ(SignatureAlgorithmId::Ecdsa, algorithm->algorithm());
@@ -496,14 +499,14 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
 // Tests that the parmeters returned for an ECDSA algorithm are null for
 // non-ECDSA algorithms.
 TEST(SignatureAlgorithmTest, ParamsAreNullForWrongTypeEcdsa) {
-  scoped_ptr<SignatureAlgorithm> alg1 =
+  std::unique_ptr<SignatureAlgorithm> alg1 =
       SignatureAlgorithm::CreateEcdsa(DigestAlgorithm::Sha1);
 
   EXPECT_FALSE(alg1->ParamsForRsaPss());
@@ -512,7 +515,7 @@
 // Tests that the parmeters returned for an RSA PKCS#1 v1.5 algorithm are null
 // for non-RSA PKCS#1 v1.5 algorithms.
 TEST(SignatureAlgorithmTest, ParamsAreNullForWrongTypeRsaPkcs1) {
-  scoped_ptr<SignatureAlgorithm> alg1 =
+  std::unique_ptr<SignatureAlgorithm> alg1 =
       SignatureAlgorithm::CreateRsaPkcs1(DigestAlgorithm::Sha1);
 
   EXPECT_FALSE(alg1->ParamsForRsaPss());
@@ -565,7 +568,7 @@
       0x01,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   ASSERT_EQ(SignatureAlgorithmId::RsaPss, algorithm->algorithm());
@@ -593,7 +596,7 @@
       0x30, 0x00,  // SEQUENCE (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   ASSERT_EQ(SignatureAlgorithmId::RsaPss, algorithm->algorithm());
@@ -620,7 +623,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -636,7 +639,7 @@
       0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0A,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -656,7 +659,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -680,7 +683,7 @@
       0x17,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   ASSERT_EQ(SignatureAlgorithmId::RsaPss, algorithm->algorithm());
@@ -715,7 +718,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -739,7 +742,7 @@
       0x02,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -765,7 +768,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -793,7 +796,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   ASSERT_EQ(SignatureAlgorithmId::RsaPss, algorithm->algorithm());
@@ -829,7 +832,7 @@
       0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   ASSERT_EQ(SignatureAlgorithmId::RsaPss, algorithm->algorithm());
@@ -864,7 +867,7 @@
       0x60, 0x86, 0x48, 0x02, 0x67, 0x13, 0x04, 0x02, 0x02,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -897,7 +900,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   ASSERT_EQ(SignatureAlgorithmId::RsaPss, algorithm->algorithm());
@@ -939,7 +942,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_FALSE(ParseDer(kData, &algorithm));
 }
 
@@ -981,7 +984,7 @@
       0x05, 0x00,  // NULL (0 bytes)
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   ASSERT_EQ(SignatureAlgorithmId::RsaPss, algorithm->algorithm());
@@ -1037,7 +1040,7 @@
       0x0A,
   };
   // clang-format on
-  scoped_ptr<SignatureAlgorithm> algorithm;
+  std::unique_ptr<SignatureAlgorithm> algorithm;
   ASSERT_TRUE(ParseDer(kData, &algorithm));
 
   ASSERT_EQ(SignatureAlgorithmId::RsaPss, algorithm->algorithm());
diff --git a/net/cert/internal/verify_certificate_chain.cc b/net/cert/internal/verify_certificate_chain.cc
index 20fafc5..a6e0f4a8 100644
--- a/net/cert/internal/verify_certificate_chain.cc
+++ b/net/cert/internal/verify_certificate_chain.cc
@@ -4,6 +4,8 @@
 
 #include "net/cert/internal/verify_certificate_chain.h"
 
+#include <memory>
+
 #include "base/logging.h"
 #include "net/cert/internal/name_constraints.h"
 #include "net/cert/internal/parse_certificate.h"
@@ -27,7 +29,7 @@
   ParsedCertificate cert;
   ParsedTbsCertificate tbs;
 
-  scoped_ptr<SignatureAlgorithm> signature_algorithm;
+  std::unique_ptr<SignatureAlgorithm> signature_algorithm;
 
   // Standard extensions that were parsed.
   bool has_basic_constraints = false;
@@ -36,7 +38,7 @@
   bool has_key_usage = false;
   der::BitString key_usage;
 
-  scoped_ptr<GeneralNames> subject_alt_names;
+  std::unique_ptr<GeneralNames> subject_alt_names;
 
   bool has_name_constraints = false;
   ParsedExtension name_constraints_extension;
@@ -231,7 +233,7 @@
 // RSA with SHA1.
 WARN_UNUSED_RESULT bool IsRsaWithSha1SignatureAlgorithm(
     const der::Input& signature_algorithm_tlv) {
-  scoped_ptr<SignatureAlgorithm> algorithm =
+  std::unique_ptr<SignatureAlgorithm> algorithm =
       SignatureAlgorithm::CreateFromDer(signature_algorithm_tlv);
 
   return algorithm &&
@@ -278,7 +280,8 @@
     const der::GeneralizedTime& time,
     const der::Input& working_spki,
     const der::Input& working_issuer_name,
-    const std::vector<scoped_ptr<NameConstraints>>& name_constraints_list) {
+    const std::vector<std::unique_ptr<NameConstraints>>&
+        name_constraints_list) {
   // Check that the signature algorithms in Certificate vs TBSCertificate
   // match. This isn't part of RFC 5280 section 6.1.3, but is mandated by
   // sections 4.1.1.2 and 4.1.2.3.
@@ -333,7 +336,7 @@
     size_t* max_path_length_ptr,
     der::Input* working_spki,
     der::Input* working_issuer_name,
-    std::vector<scoped_ptr<NameConstraints>>* name_constraints_list) {
+    std::vector<std::unique_ptr<NameConstraints>>* name_constraints_list) {
   // TODO(eroman): Steps a-b are omitted, as policy constraints are not yet
   // implemented.
 
@@ -353,9 +356,10 @@
 
   // From RFC 5280 section 6.1.4 step g:
   if (cert.has_name_constraints) {
-    scoped_ptr<NameConstraints> name_constraints(NameConstraints::CreateFromDer(
-        cert.name_constraints_extension.value,
-        cert.name_constraints_extension.critical));
+    std::unique_ptr<NameConstraints> name_constraints(
+        NameConstraints::CreateFromDer(
+            cert.name_constraints_extension.value,
+            cert.name_constraints_extension.critical));
     if (!name_constraints)
       return false;
     name_constraints_list->push_back(std::move(name_constraints));
@@ -517,7 +521,7 @@
   // Will contain a NameConstraints for each previous cert in the chain which
   // had nameConstraints. This corresponds to the permitted_subtrees and
   // excluded_subtrees state variables from RFC 5280.
-  std::vector<scoped_ptr<NameConstraints>> name_constraints_list;
+  std::vector<std::unique_ptr<NameConstraints>> name_constraints_list;
 
   // |working_spki| is an amalgamation of 3 separate variables from RFC 5280:
   //    * working_public_key
diff --git a/net/cert/internal/verify_certificate_chain.h b/net/cert/internal/verify_certificate_chain.h
index 35a3ebae..0ef8cba 100644
--- a/net/cert/internal/verify_certificate_chain.h
+++ b/net/cert/internal/verify_certificate_chain.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
diff --git a/net/cert/internal/verify_signed_data_unittest.cc b/net/cert/internal/verify_signed_data_unittest.cc
index 43a4856b..50586a1 100644
--- a/net/cert/internal/verify_signed_data_unittest.cc
+++ b/net/cert/internal/verify_signed_data_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "net/cert/internal/verify_signed_data.h"
 
+#include <memory>
 #include <set>
 
 #include "net/cert/internal/signature_algorithm.h"
@@ -60,7 +61,7 @@
 
   ASSERT_TRUE(ReadTestDataFromPemFile(path, mappings));
 
-  scoped_ptr<SignatureAlgorithm> signature_algorithm =
+  std::unique_ptr<SignatureAlgorithm> signature_algorithm =
       SignatureAlgorithm::CreateFromDer(der::Input(&algorithm));
   ASSERT_TRUE(signature_algorithm);
 
diff --git a/net/cert/jwk_serializer_nss.cc b/net/cert/jwk_serializer_nss.cc
index 426a207..6059453 100644
--- a/net/cert/jwk_serializer_nss.cc
+++ b/net/cert/jwk_serializer_nss.cc
@@ -2,17 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "net/cert/jwk_serializer.h"
-
 #include <cert.h>
 #include <keyhi.h>
 #include <nss.h>
 
+#include <memory>
+
 #include "base/base64url.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "crypto/nss_util.h"
 #include "crypto/scoped_nss_types.h"
+#include "net/cert/jwk_serializer.h"
 
 namespace net {
 
@@ -70,10 +70,10 @@
   return false;
 }
 
-typedef scoped_ptr<
+typedef std::unique_ptr<
     CERTSubjectPublicKeyInfo,
     crypto::NSSDestroyer<CERTSubjectPublicKeyInfo,
-                         SECKEY_DestroySubjectPublicKeyInfo> >
+                         SECKEY_DestroySubjectPublicKeyInfo>>
     ScopedCERTSubjectPublicKeyInfo;
 
 }  // namespace
diff --git a/net/cert/mock_cert_verifier.cc b/net/cert/mock_cert_verifier.cc
index 6ee23d6..6d98cc3 100644
--- a/net/cert/mock_cert_verifier.cc
+++ b/net/cert/mock_cert_verifier.cc
@@ -4,6 +4,8 @@
 
 #include "net/cert/mock_cert_verifier.h"
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
 #include "base/strings/pattern.h"
 #include "base/strings/string_util.h"
@@ -44,7 +46,7 @@
                              CRLSet* crl_set,
                              CertVerifyResult* verify_result,
                              const CompletionCallback& callback,
-                             scoped_ptr<Request>* out_req,
+                             std::unique_ptr<Request>* out_req,
                              const BoundNetLog& net_log) {
   RuleList::const_iterator it;
   for (it = rules_.begin(); it != rules_.end(); ++it) {
diff --git a/net/cert/mock_cert_verifier.h b/net/cert/mock_cert_verifier.h
index 6486d2c..b68429c 100644
--- a/net/cert/mock_cert_verifier.h
+++ b/net/cert/mock_cert_verifier.h
@@ -6,6 +6,7 @@
 #define NET_CERT_MOCK_CERT_VERIFIER_H_
 
 #include <list>
+#include <memory>
 
 #include "net/cert/cert_verifier.h"
 #include "net/cert/cert_verify_result.h"
@@ -32,7 +33,7 @@
              CRLSet* crl_set,
              CertVerifyResult* verify_result,
              const CompletionCallback& callback,
-             scoped_ptr<Request>* out_req,
+             std::unique_ptr<Request>* out_req,
              const BoundNetLog& net_log) override;
 
   // Sets the default return value for Verify() for certificates/hosts that do
diff --git a/net/cert/mock_client_cert_verifier.cc b/net/cert/mock_client_cert_verifier.cc
index 96e3a0a..1196e2c7 100644
--- a/net/cert/mock_client_cert_verifier.cc
+++ b/net/cert/mock_client_cert_verifier.cc
@@ -4,6 +4,8 @@
 
 #include "net/cert/mock_client_cert_verifier.h"
 
+#include <memory>
+
 #include "net/base/net_errors.h"
 #include "net/cert/x509_certificate.h"
 
@@ -23,7 +25,7 @@
 
 int MockClientCertVerifier::Verify(X509Certificate* cert,
                                    const CompletionCallback& callback,
-                                   scoped_ptr<Request>* out_req) {
+                                   std::unique_ptr<Request>* out_req) {
   for (const Rule& rule : rules_) {
     // Check just the server cert. Intermediates will be ignored.
     if (rule.cert->Equals(cert))
diff --git a/net/cert/mock_client_cert_verifier.h b/net/cert/mock_client_cert_verifier.h
index 455df12..d341338 100644
--- a/net/cert/mock_client_cert_verifier.h
+++ b/net/cert/mock_client_cert_verifier.h
@@ -6,6 +6,7 @@
 #define NET_CERT_MOCK_CLIENT_CERT_VERIFIER_H_
 
 #include <list>
+#include <memory>
 
 #include "net/cert/client_cert_verifier.h"
 
@@ -26,7 +27,7 @@
   // ClientCertVerifier implementation
   int Verify(X509Certificate* cert,
              const CompletionCallback& callback,
-             scoped_ptr<Request>* out_req) override;
+             std::unique_ptr<Request>* out_req) override;
 
   // Sets the default return value for Verify() for certificates/hosts that do
   // not have explicit results added via the AddResult*() methods.
diff --git a/net/cert/multi_log_ct_verifier_unittest.cc b/net/cert/multi_log_ct_verifier_unittest.cc
index e9505d7..47114d63 100644
--- a/net/cert/multi_log_ct_verifier_unittest.cc
+++ b/net/cert/multi_log_ct_verifier_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "net/cert/multi_log_ct_verifier.h"
 
+#include <memory>
 #include <string>
 
 #include "base/files/file_path.h"
@@ -158,7 +159,8 @@
     if (histogram == NULL)
       return 0;
 
-    scoped_ptr<base::HistogramSamples> samples = histogram->SnapshotSamples();
+    std::unique_ptr<base::HistogramSamples> samples =
+        histogram->SnapshotSamples();
     return samples->GetCount(sample_index);
   }
 
@@ -177,7 +179,7 @@
   }
 
  protected:
-  scoped_ptr<MultiLogCTVerifier> verifier_;
+  std::unique_ptr<MultiLogCTVerifier> verifier_;
   scoped_refptr<X509Certificate> chain_;
   scoped_refptr<X509Certificate> embedded_sct_chain_;
   std::vector<scoped_refptr<const CTLogVerifier>> log_verifiers_;
diff --git a/net/cert/multi_threaded_cert_verifier.cc b/net/cert/multi_threaded_cert_verifier.cc
index 35afe37..d39c705 100644
--- a/net/cert/multi_threaded_cert_verifier.cc
+++ b/net/cert/multi_threaded_cert_verifier.cc
@@ -5,6 +5,7 @@
 #include "net/cert/multi_threaded_cert_verifier.h"
 
 #include <algorithm>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
@@ -12,6 +13,7 @@
 #include "base/callback_helpers.h"
 #include "base/compiler_specific.h"
 #include "base/containers/linked_list.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/profiler/scoped_tracker.h"
@@ -83,10 +85,10 @@
 // The number of seconds to cache entries.
 const unsigned kTTLSecs = 1800;  // 30 minutes.
 
-scoped_ptr<base::Value> CertVerifyResultCallback(
+std::unique_ptr<base::Value> CertVerifyResultCallback(
     const CertVerifyResult& verify_result,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> results(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> results(new base::DictionaryValue());
   results->SetBoolean("has_md5", verify_result.has_md5);
   results->SetBoolean("has_md2", verify_result.has_md2);
   results->SetBoolean("has_md4", verify_result.has_md4);
@@ -101,7 +103,7 @@
                NetLogX509CertificateCallback(verify_result.verified_cert.get(),
                                              capture_mode));
 
-  scoped_ptr<base::ListValue> hashes(new base::ListValue());
+  std::unique_ptr<base::ListValue> hashes(new base::ListValue());
   for (std::vector<HashValue>::const_iterator it =
            verify_result.public_key_hashes.begin();
        it != verify_result.public_key_hashes.end();
@@ -286,7 +288,7 @@
              const scoped_refptr<CRLSet>& crl_set,
              const CertificateList& additional_trust_anchors) {
     // Owned by the bound reply callback.
-    scoped_ptr<MultiThreadedCertVerifier::CachedResult> owned_result(
+    std::unique_ptr<MultiThreadedCertVerifier::CachedResult> owned_result(
         new MultiThreadedCertVerifier::CachedResult());
 
     // Parameter evaluation order is undefined in C++. Ensure the pointer value
@@ -320,11 +322,11 @@
   }
 
   // Creates and attaches a request to the Job.
-  scoped_ptr<CertVerifierRequest> CreateRequest(
+  std::unique_ptr<CertVerifierRequest> CreateRequest(
       const CompletionCallback& callback,
       CertVerifyResult* verify_result,
       const BoundNetLog& net_log) {
-    scoped_ptr<CertVerifierRequest> request(
+    std::unique_ptr<CertVerifierRequest> request(
         new CertVerifierRequest(this, callback, verify_result, net_log));
 
     request->net_log().AddEvent(
@@ -360,9 +362,10 @@
   }
 
   void OnJobCompleted(
-      scoped_ptr<MultiThreadedCertVerifier::CachedResult> verify_result) {
+      std::unique_ptr<MultiThreadedCertVerifier::CachedResult> verify_result) {
     TRACE_EVENT0("net", "CertVerifierJob::OnJobCompleted");
-    scoped_ptr<CertVerifierJob> keep_alive = cert_verifier_->RemoveJob(this);
+    std::unique_ptr<CertVerifierJob> keep_alive =
+        cert_verifier_->RemoveJob(this);
 
     LogMetrics(*verify_result);
     cert_verifier_->SaveResultToCache(key_, *verify_result);
@@ -419,7 +422,7 @@
                                       CRLSet* crl_set,
                                       CertVerifyResult* verify_result,
                                       const CompletionCallback& callback,
-                                      scoped_ptr<Request>* out_req,
+                                      std::unique_ptr<Request>* out_req,
                                       const BoundNetLog& net_log) {
   out_req->reset();
 
@@ -453,7 +456,7 @@
     inflight_joins_++;
   } else {
     // Need to make a new job.
-    scoped_ptr<CertVerifierJob> new_job(
+    std::unique_ptr<CertVerifierJob> new_job(
         new CertVerifierJob(key, net_log.net_log(), cert, this));
 
     if (!new_job->Start(verify_proc_, cert, hostname, ocsp_response, flags,
@@ -470,7 +473,7 @@
       job->set_is_first_job(true);
   }
 
-  scoped_ptr<CertVerifierRequest> request =
+  std::unique_ptr<CertVerifierRequest> request =
       job->CreateRequest(callback, verify_result, net_log);
   *out_req = std::move(request);
   return ERR_IO_PENDING;
@@ -559,12 +562,12 @@
                           start_time + base::TimeDelta::FromSeconds(kTTLSecs)));
 }
 
-scoped_ptr<CertVerifierJob> MultiThreadedCertVerifier::RemoveJob(
+std::unique_ptr<CertVerifierJob> MultiThreadedCertVerifier::RemoveJob(
     CertVerifierJob* job) {
   DCHECK(CalledOnValidThread());
   bool erased_job = inflight_.erase(job) == 1;
   DCHECK(erased_job);
-  return make_scoped_ptr(job);
+  return base::WrapUnique(job);
 }
 
 void MultiThreadedCertVerifier::OnCACertChanged(
diff --git a/net/cert/multi_threaded_cert_verifier.h b/net/cert/multi_threaded_cert_verifier.h
index 83d00dd..62d68075 100644
--- a/net/cert/multi_threaded_cert_verifier.h
+++ b/net/cert/multi_threaded_cert_verifier.h
@@ -8,6 +8,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
@@ -64,7 +65,7 @@
              CRLSet* crl_set,
              CertVerifyResult* verify_result,
              const CompletionCallback& callback,
-             scoped_ptr<Request>* out_req,
+             std::unique_ptr<Request>* out_req,
              const BoundNetLog& net_log) override;
 
   bool SupportsOCSPStapling() override;
@@ -159,7 +160,7 @@
 
   // Removes |job| from the inflight set, and passes ownership back to the
   // caller. |job| must already be |inflight_|.
-  scoped_ptr<CertVerifierJob> RemoveJob(CertVerifierJob* job);
+  std::unique_ptr<CertVerifierJob> RemoveJob(CertVerifierJob* job);
 
   // For unit testing.
   void ClearCache() { cache_.Clear(); }
diff --git a/net/cert/multi_threaded_cert_verifier_unittest.cc b/net/cert/multi_threaded_cert_verifier_unittest.cc
index aa01511..0704a13c 100644
--- a/net/cert/multi_threaded_cert_verifier_unittest.cc
+++ b/net/cert/multi_threaded_cert_verifier_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "net/cert/multi_threaded_cert_verifier.h"
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/debug/leak_annotations.h"
 #include "base/files/file_path.h"
@@ -85,7 +87,7 @@
   int error;
   CertVerifyResult verify_result;
   TestCompletionCallback callback;
-  scoped_ptr<CertVerifier::Request> request;
+  std::unique_ptr<CertVerifier::Request> request;
 
   error = verifier_.Verify(test_cert.get(), "www.example.com", std::string(), 0,
                            NULL, &verify_result, callback.callback(), &request,
@@ -145,7 +147,7 @@
   int error;
   CertVerifyResult verify_result;
   TestCompletionCallback callback;
-  scoped_ptr<CertVerifier::Request> request;
+  std::unique_ptr<CertVerifier::Request> request;
 
   error = verifier_.Verify(cert_chain1.get(), "www.example.com", std::string(),
                            0, NULL, &verify_result, callback.callback(),
@@ -182,10 +184,10 @@
   int error;
   CertVerifyResult verify_result;
   TestCompletionCallback callback;
-  scoped_ptr<CertVerifier::Request> request;
+  std::unique_ptr<CertVerifier::Request> request;
   CertVerifyResult verify_result2;
   TestCompletionCallback callback2;
-  scoped_ptr<CertVerifier::Request> request2;
+  std::unique_ptr<CertVerifier::Request> request2;
 
   error = verifier_.Verify(test_cert.get(), "www.example.com", std::string(), 0,
                            NULL, &verify_result, callback.callback(), &request,
@@ -215,7 +217,7 @@
 
   int error;
   CertVerifyResult verify_result;
-  scoped_ptr<CertVerifier::Request> request;
+  std::unique_ptr<CertVerifier::Request> request;
 
   error = verifier_.Verify(test_cert.get(), "www.example.com", std::string(), 0,
                            NULL, &verify_result, base::Bind(&FailTest),
@@ -249,7 +251,7 @@
   int error;
   CertVerifyResult verify_result;
   TestCompletionCallback callback;
-  scoped_ptr<CertVerifier::Request> request;
+  std::unique_ptr<CertVerifier::Request> request;
 
   {
     // Because shutdown intentionally doesn't join worker threads, memory may
@@ -396,7 +398,7 @@
   int error;
   CertVerifyResult verify_result;
   TestCompletionCallback callback;
-  scoped_ptr<CertVerifier::Request> request;
+  std::unique_ptr<CertVerifier::Request> request;
   EXPECT_CALL(trust_provider, GetAdditionalTrustAnchors())
       .WillOnce(ReturnRef(empty_cert_list));
   error = verifier_.Verify(test_cert.get(), "www.example.com", std::string(), 0,
@@ -449,19 +451,19 @@
   int error;
   CertVerifyResult verify_result1;
   TestCompletionCallback callback1;
-  scoped_ptr<CertVerifier::Request> request1;
+  std::unique_ptr<CertVerifier::Request> request1;
   CertVerifyResult verify_result2;
   TestCompletionCallback callback2;
-  scoped_ptr<CertVerifier::Request> request2;
+  std::unique_ptr<CertVerifier::Request> request2;
   CertVerifyResult verify_result3;
   TestCompletionCallback callback3;
-  scoped_ptr<CertVerifier::Request> request3;
+  std::unique_ptr<CertVerifier::Request> request3;
   CertVerifyResult verify_result4;
   TestCompletionCallback callback4;
-  scoped_ptr<CertVerifier::Request> request4;
+  std::unique_ptr<CertVerifier::Request> request4;
   CertVerifyResult verify_result5;
   TestCompletionCallback callback5;
-  scoped_ptr<CertVerifier::Request> request5;
+  std::unique_ptr<CertVerifier::Request> request5;
 
   const char domain1[] = "www.example1.com";
   const char domain2[] = "www.exampleB.com";
diff --git a/net/cert/nss_cert_database.cc b/net/cert/nss_cert_database.cc
index 896d1d3..8d143a7 100644
--- a/net/cert/nss_cert_database.cc
+++ b/net/cert/nss_cert_database.cc
@@ -9,13 +9,14 @@
 #include <keyhi.h>
 #include <pk11pub.h>
 #include <secmod.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list_threadsafe.h"
 #include "base/task_runner.h"
 #include "base/task_runner_util.h"
@@ -106,8 +107,9 @@
 }
 
 void NSSCertDatabase::ListCerts(
-    const base::Callback<void(scoped_ptr<CertificateList> certs)>& callback) {
-  scoped_ptr<CertificateList> certs(new CertificateList());
+    const base::Callback<void(std::unique_ptr<CertificateList> certs)>&
+        callback) {
+  std::unique_ptr<CertificateList> certs(new CertificateList());
 
   // base::Passed will NULL out |certs|, so cache the underlying pointer here.
   CertificateList* raw_certs = certs.get();
@@ -122,7 +124,7 @@
 void NSSCertDatabase::ListCertsInSlot(const ListCertsCallback& callback,
                                       PK11SlotInfo* slot) {
   DCHECK(slot);
-  scoped_ptr<CertificateList> certs(new CertificateList());
+  std::unique_ptr<CertificateList> certs(new CertificateList());
 
   // base::Passed will NULL out |certs|, so cache the underlying pointer here.
   CertificateList* raw_certs = certs.get();
diff --git a/net/cert/nss_cert_database.h b/net/cert/nss_cert_database.h
index fe267f9..00e72f3 100644
--- a/net/cert/nss_cert_database.h
+++ b/net/cert/nss_cert_database.h
@@ -7,13 +7,13 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback_forward.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
 #include "crypto/scoped_nss_types.h"
@@ -100,7 +100,7 @@
     DISTRUSTED_OBJ_SIGN   = 1 << 5,
   };
 
-  typedef base::Callback<void(scoped_ptr<CertificateList> certs)>
+  typedef base::Callback<void(std::unique_ptr<CertificateList> certs)>
       ListCertsCallback;
 
   typedef base::Callback<void(bool)> DeleteCertCallback;
@@ -306,7 +306,7 @@
   crypto::ScopedPK11Slot private_slot_;
 
   // A helper observer that forwards events from this database to CertDatabase.
-  scoped_ptr<Observer> cert_notification_forwarder_;
+  std::unique_ptr<Observer> cert_notification_forwarder_;
 
   // Task runner that should be used in tests if set.
   scoped_refptr<base::TaskRunner> slow_task_runner_for_test_;
diff --git a/net/cert/nss_cert_database_chromeos.cc b/net/cert/nss_cert_database_chromeos.cc
index fda5307f..b6eabcf 100644
--- a/net/cert/nss_cert_database_chromeos.cc
+++ b/net/cert/nss_cert_database_chromeos.cc
@@ -6,7 +6,9 @@
 
 #include <cert.h>
 #include <pk11pub.h>
+
 #include <algorithm>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
@@ -43,7 +45,7 @@
 
 void NSSCertDatabaseChromeOS::ListCerts(
     const NSSCertDatabase::ListCertsCallback& callback) {
-  scoped_ptr<CertificateList> certs(new CertificateList());
+  std::unique_ptr<CertificateList> certs(new CertificateList());
 
   // base::Pased will NULL out |certs|, so cache the underlying pointer here.
   CertificateList* raw_certs = certs.get();
diff --git a/net/cert/nss_cert_database_chromeos_unittest.cc b/net/cert/nss_cert_database_chromeos_unittest.cc
index 5dab020..f913249 100644
--- a/net/cert/nss_cert_database_chromeos_unittest.cc
+++ b/net/cert/nss_cert_database_chromeos_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "net/cert/nss_cert_database_chromeos.h"
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/run_loop.h"
@@ -33,7 +35,7 @@
 }
 
 void SwapCertLists(CertificateList* destination,
-                   scoped_ptr<CertificateList> source) {
+                   std::unique_ptr<CertificateList> source) {
   ASSERT_TRUE(destination);
   ASSERT_TRUE(source);
 
@@ -102,8 +104,8 @@
   crypto::ScopedTestNSSChromeOSUser user_1_;
   crypto::ScopedTestNSSChromeOSUser user_2_;
   crypto::ScopedTestNSSDB system_db_;
-  scoped_ptr<NSSCertDatabaseChromeOS> db_1_;
-  scoped_ptr<NSSCertDatabaseChromeOS> db_2_;
+  std::unique_ptr<NSSCertDatabaseChromeOS> db_1_;
+  std::unique_ptr<NSSCertDatabaseChromeOS> db_2_;
 };
 
 // Test that ListModules() on each user includes that user's NSS software slot,
diff --git a/net/cert/nss_cert_database_unittest.cc b/net/cert/nss_cert_database_unittest.cc
index cdb9be0a..000258a 100644
--- a/net/cert/nss_cert_database_unittest.cc
+++ b/net/cert/nss_cert_database_unittest.cc
@@ -2,11 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "net/cert/nss_cert_database.h"
+
 #include <cert.h>
 #include <certdb.h>
 #include <pk11pub.h>
 
 #include <algorithm>
+#include <memory>
 
 #include "base/bind.h"
 #include "base/files/file_path.h"
@@ -26,7 +29,6 @@
 #include "net/cert/cert_status_flags.h"
 #include "net/cert/cert_verify_proc_nss.h"
 #include "net/cert/cert_verify_result.h"
-#include "net/cert/nss_cert_database.h"
 #include "net/cert/x509_certificate.h"
 #include "net/test/cert_test_util.h"
 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h"
@@ -45,7 +47,7 @@
 namespace {
 
 void SwapCertList(CertificateList* destination,
-                  scoped_ptr<CertificateList> source) {
+                  std::unique_ptr<CertificateList> source) {
   ASSERT_TRUE(destination);
   destination->swap(*source);
 }
@@ -111,7 +113,7 @@
     return result;
   }
 
-  scoped_ptr<NSSCertDatabase> cert_db_;
+  std::unique_ptr<NSSCertDatabase> cert_db_;
   const CertificateList empty_cert_list_;
   crypto::ScopedTestNSSDB test_nssdb_;
   scoped_refptr<CryptoModule> public_module_;
diff --git a/net/cert/nss_profile_filter_chromeos.cc b/net/cert/nss_profile_filter_chromeos.cc
index 3523931..adb5def 100644
--- a/net/cert/nss_profile_filter_chromeos.cc
+++ b/net/cert/nss_profile_filter_chromeos.cc
@@ -4,6 +4,7 @@
 
 #include "net/cert/nss_profile_filter_chromeos.h"
 
+#include <memory>
 #include <utility>
 
 #include "base/strings/string_piece.h"
@@ -68,7 +69,7 @@
                                     crypto::ScopedPK11Slot private_slot,
                                     crypto::ScopedPK11Slot system_slot) {
   // crypto::ScopedPK11Slot actually holds a reference counted object.
-  // Because scoped_ptr<T> assignment is a no-op if it already points to
+  // Because std::unique_ptr<T> assignment is a no-op if it already points to
   // the same pointer, a reference would be leaked because std::move() does
   // not release its reference, and the receiving object won't free
   // its copy.
diff --git a/net/cert/nss_profile_filter_chromeos.h b/net/cert/nss_profile_filter_chromeos.h
index 36c42d0..149f081 100644
--- a/net/cert/nss_profile_filter_chromeos.h
+++ b/net/cert/nss_profile_filter_chromeos.h
@@ -5,7 +5,8 @@
 #ifndef NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_
 #define NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "crypto/scoped_nss_types.h"
 #include "net/base/crypto_module.h"
 #include "net/base/net_export.h"
diff --git a/net/cert/scoped_nss_types.h b/net/cert/scoped_nss_types.h
index 0eb8d844..07020a4b 100644
--- a/net/cert/scoped_nss_types.h
+++ b/net/cert/scoped_nss_types.h
@@ -7,7 +7,7 @@
 
 #include <cert.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
 
 namespace net {
 
@@ -17,7 +17,8 @@
   }
 };
 
-typedef scoped_ptr<CERTCertificate, FreeCERTCertificate> ScopedCERTCertificate;
+typedef std::unique_ptr<CERTCertificate, FreeCERTCertificate>
+    ScopedCERTCertificate;
 
 }  // namespace net
 
diff --git a/net/cert/x509_cert_types_win.cc b/net/cert/x509_cert_types_win.cc
index 032c248..9857716 100644
--- a/net/cert/x509_cert_types_win.cc
+++ b/net/cert/x509_cert_types_win.cc
@@ -6,9 +6,10 @@
 
 #include <windows.h>
 
+#include <memory>
+
 #include "base/logging.h"
 #include "base/memory/free_deleter.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "crypto/capi_util.h"
@@ -104,7 +105,8 @@
                            &name_info, &name_info_size);
   if (!rv)
     return false;
-  scoped_ptr<CERT_NAME_INFO, base::FreeDeleter> scoped_name_info(name_info);
+  std::unique_ptr<CERT_NAME_INFO, base::FreeDeleter> scoped_name_info(
+      name_info);
 
   std::vector<std::string> common_names, locality_names, state_names,
       country_names;
diff --git a/net/cert/x509_certificate.cc b/net/cert/x509_certificate.cc
index 797793f..adfe9e55 100644
--- a/net/cert/x509_certificate.cc
+++ b/net/cert/x509_certificate.cc
@@ -9,6 +9,7 @@
 
 #include <algorithm>
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -16,7 +17,6 @@
 #include "base/lazy_instance.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/singleton.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/pickle.h"
@@ -715,7 +715,7 @@
   SHA256HashValue sha256;
   memset(sha256.data, 0, sizeof(sha256.data));
 
-  scoped_ptr<crypto::SecureHash> hash(
+  std::unique_ptr<crypto::SecureHash> hash(
       crypto::SecureHash::Create(crypto::SecureHash::SHA256));
 
   for (size_t i = 0; i < intermediates.size(); ++i) {
diff --git a/net/cert/x509_certificate_ios.cc b/net/cert/x509_certificate_ios.cc
index d458589..a69792a9 100644
--- a/net/cert/x509_certificate_ios.cc
+++ b/net/cert/x509_certificate_ios.cc
@@ -6,7 +6,6 @@
 
 #include <CommonCrypto/CommonDigest.h>
 #include <Security/Security.h>
-
 #include <cert.h>
 #include <cryptohi.h>
 #include <keyhi.h>
@@ -19,11 +18,11 @@
 #include <secerr.h>
 #include <sslerr.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/logging.h"
 #include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/pickle.h"
 #include "base/time/time.h"
diff --git a/net/cert/x509_certificate_net_log_param.cc b/net/cert/x509_certificate_net_log_param.cc
index 0a1bc8ed..801712a 100644
--- a/net/cert/x509_certificate_net_log_param.cc
+++ b/net/cert/x509_certificate_net_log_param.cc
@@ -4,6 +4,7 @@
 
 #include "net/cert/x509_certificate_net_log_param.h"
 
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
@@ -13,11 +14,11 @@
 
 namespace net {
 
-scoped_ptr<base::Value> NetLogX509CertificateCallback(
+std::unique_ptr<base::Value> NetLogX509CertificateCallback(
     const X509Certificate* certificate,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
-  scoped_ptr<base::ListValue> certs(new base::ListValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::ListValue> certs(new base::ListValue());
   std::vector<std::string> encoded_chain;
   certificate->GetPEMEncodedChain(&encoded_chain);
   for (size_t i = 0; i < encoded_chain.size(); ++i)
diff --git a/net/cert/x509_certificate_net_log_param.h b/net/cert/x509_certificate_net_log_param.h
index 0aa2de3a..8f073b98 100644
--- a/net/cert/x509_certificate_net_log_param.h
+++ b/net/cert/x509_certificate_net_log_param.h
@@ -5,6 +5,8 @@
 #ifndef NET_BASE_X509_CERT_NET_LOG_PARAM_H_
 #define NET_BASE_X509_CERT_NET_LOG_PARAM_H_
 
+#include <memory>
+
 #include "net/log/net_log.h"
 
 namespace net {
@@ -12,7 +14,7 @@
 class X509Certificate;
 
 // Creates NetLog parameter to describe an X509Certificate.
-scoped_ptr<base::Value> NetLogX509CertificateCallback(
+std::unique_ptr<base::Value> NetLogX509CertificateCallback(
     const X509Certificate* certificate,
     NetLogCaptureMode capture_mode);
 
diff --git a/net/cert/x509_certificate_nss.cc b/net/cert/x509_certificate_nss.cc
index 14c8889..4e63806 100644
--- a/net/cert/x509_certificate_nss.cc
+++ b/net/cert/x509_certificate_nss.cc
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "net/cert/x509_certificate.h"
-
 #include <cert.h>
 #include <cryptohi.h>
 #include <keyhi.h>
@@ -14,14 +12,16 @@
 #include <secder.h>
 #include <sechash.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/pickle.h"
 #include "base/strings/stringprintf.h"
 #include "base/time/time.h"
 #include "crypto/nss_util.h"
 #include "crypto/scoped_nss_types.h"
+#include "net/cert/x509_certificate.h"
 #include "net/cert/x509_util_nss.h"
 
 namespace net {
diff --git a/net/cert/x509_certificate_unittest.cc b/net/cert/x509_certificate_unittest.cc
index 0c543078e..fcec17e 100644
--- a/net/cert/x509_certificate_unittest.cc
+++ b/net/cert/x509_certificate_unittest.cc
@@ -6,8 +6,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/files/file_path.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/pickle.h"
 #include "base/sha1.h"
 #include "base/strings/string_number_conversions.h"
diff --git a/net/cert/x509_certificate_win.cc b/net/cert/x509_certificate_win.cc
index 4c4adda..6d1fbe8 100644
--- a/net/cert/x509_certificate_win.cc
+++ b/net/cert/x509_certificate_win.cc
@@ -4,9 +4,10 @@
 
 #include "net/cert/x509_certificate.h"
 
+#include <memory>
+
 #include "base/logging.h"
 #include "base/memory/free_deleter.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/pickle.h"
 #include "base/sha1.h"
@@ -41,7 +42,7 @@
 // structure and stores it in *output.
 void GetCertSubjectAltName(
     PCCERT_CONTEXT cert,
-    scoped_ptr<CERT_ALT_NAME_INFO, base::FreeDeleter>* output) {
+    std::unique_ptr<CERT_ALT_NAME_INFO, base::FreeDeleter>* output) {
   PCERT_EXTENSION extension = CertFindExtension(szOID_SUBJECT_ALT_NAME2,
                                                 cert->pCertInfo->cExtension,
                                                 cert->pCertInfo->rgExtension);
@@ -152,7 +153,7 @@
   ca_fingerprint_ = CalculateCAFingerprint(intermediate_ca_certs_);
 
   const CRYPT_INTEGER_BLOB* serial = &cert_handle_->pCertInfo->SerialNumber;
-  scoped_ptr<uint8_t[]> serial_bytes(new uint8_t[serial->cbData]);
+  std::unique_ptr<uint8_t[]> serial_bytes(new uint8_t[serial->cbData]);
   for (unsigned i = 0; i < serial->cbData; i++)
     serial_bytes[i] = serial->pbData[serial->cbData - i - 1];
   serial_number_ = std::string(
@@ -170,7 +171,7 @@
   if (!cert_handle_)
     return;
 
-  scoped_ptr<CERT_ALT_NAME_INFO, base::FreeDeleter> alt_name_info;
+  std::unique_ptr<CERT_ALT_NAME_INFO, base::FreeDeleter> alt_name_info;
   GetCertSubjectAltName(cert_handle_, &alt_name_info);
   CERT_ALT_NAME_INFO* alt_name = alt_name_info.get();
   if (alt_name) {
diff --git a/net/cert/x509_util.cc b/net/cert/x509_util.cc
index b0e343ac..51e7b6a 100644
--- a/net/cert/x509_util.cc
+++ b/net/cert/x509_util.cc
@@ -4,7 +4,8 @@
 
 #include "net/cert/x509_util.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/time/time.h"
 #include "crypto/ec_private_key.h"
 #include "crypto/rsa_private_key.h"
@@ -61,9 +62,9 @@
                                 uint32_t serial_number,
                                 base::Time not_valid_before,
                                 base::Time not_valid_after,
-                                scoped_ptr<crypto::RSAPrivateKey>* key,
+                                std::unique_ptr<crypto::RSAPrivateKey>* key,
                                 std::string* der_cert) {
-  scoped_ptr<crypto::RSAPrivateKey> new_key(
+  std::unique_ptr<crypto::RSAPrivateKey> new_key(
       crypto::RSAPrivateKey::Create(kRSAKeyLength));
   if (!new_key.get())
     return false;
diff --git a/net/cert/x509_util.h b/net/cert/x509_util.h
index bd254563..3ae9a14 100644
--- a/net/cert/x509_util.h
+++ b/net/cert/x509_util.h
@@ -7,10 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/net_export.h"
 
@@ -59,7 +59,7 @@
     uint32_t serial_number,
     base::Time not_valid_before,
     base::Time not_valid_after,
-    scoped_ptr<crypto::RSAPrivateKey>* key,
+    std::unique_ptr<crypto::RSAPrivateKey>* key,
     std::string* der_cert);
 
 // Creates a self-signed certificate from a provided key, using the specified
diff --git a/net/cert/x509_util_nss.cc b/net/cert/x509_util_nss.cc
index db6a97ae..d059eb3 100644
--- a/net/cert/x509_util_nss.cc
+++ b/net/cert/x509_util_nss.cc
@@ -2,7 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "net/cert/x509_util.h"
 #include "net/cert/x509_util_nss.h"
 
 #include <cert.h>  // Must be included before certdb.h
@@ -15,9 +14,10 @@
 #include <secmod.h>
 #include <secport.h>
 
+#include <memory>
+
 #include "base/debug/leak_annotations.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/singleton.h"
 #include "base/pickle.h"
 #include "base/strings/stringprintf.h"
@@ -28,6 +28,7 @@
 #include "crypto/scoped_nss_types.h"
 #include "crypto/third_party/nss/chromium-nss.h"
 #include "net/cert/x509_certificate.h"
+#include "net/cert/x509_util.h"
 
 namespace net {
 
diff --git a/net/cert/x509_util_nss_certs.cc b/net/cert/x509_util_nss_certs.cc
index b0058895..a94a5d47 100644
--- a/net/cert/x509_util_nss_certs.cc
+++ b/net/cert/x509_util_nss_certs.cc
@@ -12,9 +12,10 @@
 #include <secmod.h>
 #include <secport.h>
 
+#include <memory>
+
 #include "base/debug/leak_annotations.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/singleton.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/pickle.h"
@@ -55,7 +56,8 @@
   return SECSuccess;
 }
 
-typedef scoped_ptr<CERTName, crypto::NSSDestroyer<CERTName, CERT_DestroyName>>
+typedef std::unique_ptr<CERTName,
+                        crypto::NSSDestroyer<CERTName, CERT_DestroyName>>
     ScopedCERTName;
 
 // Create a new CERTName object from its encoded representation.
diff --git a/net/cert/x509_util_openssl.cc b/net/cert/x509_util_openssl.cc
index 2e8ef2e..9274799f 100644
--- a/net/cert/x509_util_openssl.cc
+++ b/net/cert/x509_util_openssl.cc
@@ -10,6 +10,7 @@
 #include <openssl/mem.h>
 
 #include <algorithm>
+#include <memory>
 
 #include "base/lazy_instance.h"
 #include "base/logging.h"
@@ -297,7 +298,7 @@
   DERCache* internal_cache = static_cast<DERCache*>(
       X509_get_ex_data(x509, x509_der_cache_index));
   if (!internal_cache) {
-    scoped_ptr<DERCache> new_cache(new DERCache);
+    std::unique_ptr<DERCache> new_cache(new DERCache);
     if (!DerEncodeCert(x509, &new_cache->data))
       return false;
     internal_cache = new_cache.get();
@@ -321,7 +322,7 @@
                         &parsed_certificate))
     return false;
 
-  scoped_ptr<SignatureAlgorithm> signature_algorithm =
+  std::unique_ptr<SignatureAlgorithm> signature_algorithm =
       SignatureAlgorithm::CreateFromDer(
           parsed_certificate.signature_algorithm_tlv);
   if (!signature_algorithm)
diff --git a/net/cert/x509_util_unittest.cc b/net/cert/x509_util_unittest.cc
index 6fabe00..665fe15 100644
--- a/net/cert/x509_util_unittest.cc
+++ b/net/cert/x509_util_unittest.cc
@@ -5,9 +5,9 @@
 #include "net/cert/x509_util.h"
 
 #include <algorithm>
+#include <memory>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "crypto/rsa_private_key.h"
 #include "net/cert/x509_certificate.h"
@@ -55,7 +55,7 @@
 // This test creates a self-signed cert and a private key and then verifies the
 // content of the certificate.
 TEST(X509UtilTest, CreateKeyAndSelfSigned) {
-  scoped_ptr<crypto::RSAPrivateKey> private_key;
+  std::unique_ptr<crypto::RSAPrivateKey> private_key;
 
   std::string der_cert;
   ASSERT_TRUE(x509_util::CreateKeyAndSelfSignedCert(
@@ -166,7 +166,7 @@
   input.resize(sizeof(private_key_info));
   memcpy(&input.front(), private_key_info, sizeof(private_key_info));
 
-  scoped_ptr<crypto::RSAPrivateKey> private_key(
+  std::unique_ptr<crypto::RSAPrivateKey> private_key(
       crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(input));
   ASSERT_TRUE(private_key.get());
 
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index 0c57a5b..d77e716 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -50,21 +50,21 @@
 
 const char kExistingEntryKey[] = "existing entry key";
 
-scoped_ptr<disk_cache::BackendImpl> CreateExistingEntryCache(
+std::unique_ptr<disk_cache::BackendImpl> CreateExistingEntryCache(
     const base::Thread& cache_thread,
     base::FilePath& cache_path) {
   net::TestCompletionCallback cb;
 
-  scoped_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
+  std::unique_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
       cache_path, cache_thread.task_runner(), NULL));
   int rv = cache->Init(cb.callback());
   if (cb.GetResult(rv) != net::OK)
-    return scoped_ptr<disk_cache::BackendImpl>();
+    return std::unique_ptr<disk_cache::BackendImpl>();
 
   disk_cache::Entry* entry = NULL;
   rv = cache->CreateEntry(kExistingEntryKey, &entry, cb.callback());
   if (cb.GetResult(rv) != net::OK)
-    return scoped_ptr<disk_cache::BackendImpl>();
+    return std::unique_ptr<disk_cache::BackendImpl>();
   entry->Close();
 
   return cache;
@@ -448,7 +448,7 @@
         base::Thread::Options(base::MessageLoop::TYPE_IO, 0)));
 
     // Test the private factory method(s).
-    scoped_ptr<disk_cache::Backend> cache;
+    std::unique_ptr<disk_cache::Backend> cache;
     cache = disk_cache::MemBackendImpl::CreateBackend(0, NULL);
     ASSERT_TRUE(cache.get());
     cache.reset();
@@ -491,7 +491,7 @@
   net::TestCompletionCallback cb;
 
   bool prev = base::ThreadRestrictions::SetIOAllowed(false);
-  scoped_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
+  std::unique_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
       cache_path_, cache_thread.task_runner(), NULL));
   int rv = cache->Init(cb.callback());
   EXPECT_EQ(net::ERR_FAILED, cb.GetResult(rv));
@@ -584,7 +584,7 @@
   ASSERT_TRUE(store.CreateUniqueTempDir());
 
   net::TestCompletionCallback cb;
-  scoped_ptr<disk_cache::Backend> extra_cache;
+  std::unique_ptr<disk_cache::Backend> extra_cache;
   int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE,
                                           net::CACHE_BACKEND_DEFAULT,
                                           store.path(),
@@ -747,7 +747,7 @@
       base::Thread::Options(base::MessageLoop::TYPE_IO, 0)));
   net::TestCompletionCallback cb;
 
-  scoped_ptr<disk_cache::Backend> backend;
+  std::unique_ptr<disk_cache::Backend> backend;
   int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE,
                                           net::CACHE_BACKEND_BLOCKFILE,
                                           cache_path_,
@@ -1300,7 +1300,7 @@
   Time final = Time::Now();
 
   disk_cache::Entry* entry;
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   int count = 0;
   Time last_modified[kNumEntries];
   Time last_used[kNumEntries];
@@ -1372,7 +1372,7 @@
   // Make sure that the timestamp is not the same.
   AddDelay();
   ASSERT_EQ(net::OK, OpenEntry(second, &entry1));
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry2));
   EXPECT_EQ(entry2->GetKey(), second);
 
@@ -1453,7 +1453,7 @@
   EXPECT_EQ(kSize, ReadData(entry1, 0, 0, buffer1.get(), kSize));
   entry1->Close();
 
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry2));
   EXPECT_EQ(entry2->GetKey(), second);
   entry2->Close();
@@ -1485,7 +1485,7 @@
 
   SimulateCrash();
 
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   int count = 0;
   while (iter->OpenNextEntry(&entry) == net::OK) {
     ASSERT_TRUE(NULL != entry);
@@ -1527,7 +1527,8 @@
   EXPECT_EQ(kNumEntries, cache_->GetEntryCount());
 
   disk_cache::Entry *entry1, *entry2;
-  scoped_ptr<TestIterator> iter1 = CreateIterator(), iter2 = CreateIterator();
+  std::unique_ptr<TestIterator> iter1 = CreateIterator(),
+                                iter2 = CreateIterator();
   ASSERT_EQ(net::OK, iter1->OpenNextEntry(&entry1));
   ASSERT_TRUE(NULL != entry1);
   entry1->Close();
@@ -1970,7 +1971,7 @@
       base::Thread::Options(base::MessageLoop::TYPE_IO, 0)));
   net::TestCompletionCallback cb;
 
-  scoped_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
+  std::unique_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
       cache_path_, cache_thread.task_runner(), NULL));
   int rv = cache->Init(cb.callback());
   ASSERT_EQ(net::ERR_FAILED, cb.GetResult(rv));
@@ -1986,7 +1987,7 @@
   ASSERT_TRUE(cache_thread.StartWithOptions(
                   base::Thread::Options(base::MessageLoop::TYPE_IO, 0)));
 
-  scoped_ptr<disk_cache::BackendImpl> cache =
+  std::unique_ptr<disk_cache::BackendImpl> cache =
       CreateExistingEntryCache(cache_thread, cache_path_);
   ASSERT_TRUE(cache.get());
   cache.reset();
@@ -1997,7 +1998,7 @@
   base::FieldTrialList::CreateFieldTrial("SimpleCacheTrial",
                                          "ExperimentControl");
   net::TestCompletionCallback cb;
-  scoped_ptr<disk_cache::Backend> base_cache;
+  std::unique_ptr<disk_cache::Backend> base_cache;
   int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE,
                                           net::CACHE_BACKEND_BLOCKFILE,
                                           cache_path_,
@@ -2025,7 +2026,7 @@
   ASSERT_TRUE(cache_thread.StartWithOptions(
                   base::Thread::Options(base::MessageLoop::TYPE_IO, 0)));
 
-  scoped_ptr<disk_cache::BackendImpl> cache =
+  std::unique_ptr<disk_cache::BackendImpl> cache =
       CreateExistingEntryCache(cache_thread, cache_path_);
   ASSERT_TRUE(cache.get());
 
@@ -2061,7 +2062,7 @@
     base::FieldTrialList::CreateFieldTrial("SimpleCacheTrial",
                                            "ExperimentControl");
 
-    scoped_ptr<disk_cache::BackendImpl> cache =
+    std::unique_ptr<disk_cache::BackendImpl> cache =
         CreateExistingEntryCache(cache_thread, cache_path_);
     ASSERT_TRUE(cache.get());
   }
@@ -2074,7 +2075,7 @@
 
   const int kRestartCount = 5;
   for (int i = 0; i < kRestartCount; ++i) {
-    scoped_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
+    std::unique_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
         cache_path_, cache_thread.task_runner(), NULL));
     int rv = cache->Init(cb.callback());
     ASSERT_EQ(net::OK, cb.GetResult(rv));
@@ -2151,7 +2152,7 @@
   InitCache();
 
   disk_cache::Entry* entry;
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   while (iter->OpenNextEntry(&entry) == net::OK) {
     entry->Close();
   }
@@ -2296,7 +2297,7 @@
   EXPECT_EQ(1, cache_->GetEntryCount());
 
   // We should delete the cache. The list still has a corrupt node.
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   EXPECT_NE(net::OK, iter->OpenNextEntry(&entry));
   FlushQueueForTest();
   EXPECT_EQ(0, cache_->GetEntryCount());
@@ -2340,7 +2341,7 @@
   EXPECT_EQ(1, cache_->GetEntryCount());
 
   // We should not delete the cache.
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry));
   entry->Close();
   EXPECT_NE(net::OK, iter->OpenNextEntry(&entry));
@@ -2390,7 +2391,7 @@
   } else {
     // We should detect the problem through the list, but we should not delete
     // the entry, just fail the iteration.
-    scoped_ptr<TestIterator> iter = CreateIterator();
+    std::unique_ptr<TestIterator> iter = CreateIterator();
     EXPECT_NE(net::OK, iter->OpenNextEntry(&entry));
 
     // Now a full iteration will work, and return one entry.
@@ -2467,7 +2468,7 @@
     // Detection order: third -> second -> first.
     // We should detect the problem through the list, but we should not delete
     // the entry.
-    scoped_ptr<TestIterator> iter = CreateIterator();
+    std::unique_ptr<TestIterator> iter = CreateIterator();
     ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry));
     entry->Close();
     ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry));
@@ -2534,7 +2535,7 @@
     // Detection order: third -> second.
     // We should detect the problem through the list, but we should not delete
     // the entry, just fail the iteration.
-    scoped_ptr<TestIterator> iter = CreateIterator();
+    std::unique_ptr<TestIterator> iter = CreateIterator();
     ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry));
     entry->Close();
     EXPECT_NE(net::OK, iter->OpenNextEntry(&entry));
@@ -2622,7 +2623,7 @@
 // If the LRU is corrupt, we delete the cache.
 void DiskCacheBackendTest::BackendInvalidRankings() {
   disk_cache::Entry* entry;
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry));
   entry->Close();
   EXPECT_EQ(2, cache_->GetEntryCount());
@@ -2667,7 +2668,7 @@
 // If the LRU is corrupt and we have open entries, we disable the cache.
 void DiskCacheBackendTest::BackendDisable() {
   disk_cache::Entry *entry1, *entry2;
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry1));
 
   EXPECT_NE(net::OK, iter->OpenNextEntry(&entry2));
@@ -2718,7 +2719,7 @@
   EXPECT_EQ(8, cache_->GetEntryCount());
 
   disk_cache::Entry* entry;
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   int count = 0;
   while (iter->OpenNextEntry(&entry) == net::OK) {
     ASSERT_TRUE(NULL != entry);
@@ -2766,7 +2767,7 @@
 // If the index size changes when we disable the cache, we should not crash.
 void DiskCacheBackendTest::BackendDisable3() {
   disk_cache::Entry *entry1, *entry2;
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   EXPECT_EQ(2, cache_->GetEntryCount());
   ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry1));
   entry1->Close();
@@ -2800,7 +2801,7 @@
 // If we disable the cache, already open entries should work as far as possible.
 void DiskCacheBackendTest::BackendDisable4() {
   disk_cache::Entry *entry1, *entry2, *entry3, *entry4;
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry1));
 
   char key2[2000];
@@ -2866,7 +2867,7 @@
   cache_impl_->SetUnitTestMode();  // Simulate failure restarting the cache.
 
   disk_cache::Entry* entry1, *entry2;
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   EXPECT_EQ(2, cache_->GetEntryCount());
   ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry1));
   entry1->Close();
@@ -2991,7 +2992,7 @@
   MessageLoopHelper helper;
 
   ASSERT_TRUE(CleanupCacheDir());
-  scoped_ptr<disk_cache::BackendImpl> cache;
+  std::unique_ptr<disk_cache::BackendImpl> cache;
   cache.reset(new disk_cache::BackendImpl(
       cache_path_, base::ThreadTaskRunnerHandle::Get(), NULL));
   ASSERT_TRUE(NULL != cache.get());
@@ -3006,7 +3007,7 @@
 TEST_F(DiskCacheBackendTest, TimerNotCreated) {
   ASSERT_TRUE(CopyTestCache("wrong_version"));
 
-  scoped_ptr<disk_cache::BackendImpl> cache;
+  std::unique_ptr<disk_cache::BackendImpl> cache;
   cache.reset(new disk_cache::BackendImpl(
       cache_path_, base::ThreadTaskRunnerHandle::Get(), NULL));
   ASSERT_TRUE(NULL != cache.get());
@@ -3158,7 +3159,7 @@
   net::TestCompletionCallback cb;
 
   const int kNumberOfCaches = 2;
-  scoped_ptr<disk_cache::Backend> cache[kNumberOfCaches];
+  std::unique_ptr<disk_cache::Backend> cache[kNumberOfCaches];
 
   int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE,
                                           net::CACHE_BACKEND_DEFAULT,
@@ -3625,7 +3626,7 @@
 
   // Check that enumeration returns all entries.
   std::set<std::string> keys_to_match(key_pool);
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   size_t count = 0;
   ASSERT_TRUE(EnumerateAndMatchKeys(-1, iter.get(), &keys_to_match, &count));
   iter.reset();
@@ -3665,7 +3666,7 @@
 
   // Check that enumeration returns all entries but the doomed one.
   std::set<std::string> keys_to_match(key_pool);
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   size_t count = 0;
   ASSERT_TRUE(EnumerateAndMatchKeys(key_pool.size()/2,
                                     iter.get(),
@@ -3712,7 +3713,7 @@
 
   // Check that enumeration returns all entries but the corrupt one.
   std::set<std::string> keys_to_match(key_pool);
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   size_t count = 0;
   ASSERT_TRUE(EnumerateAndMatchKeys(-1, iter.get(), &keys_to_match, &count));
   iter.reset();
@@ -3729,7 +3730,7 @@
   std::set<std::string> key_pool;
   ASSERT_TRUE(CreateSetOfRandomEntries(&key_pool));
 
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   disk_cache::Entry* entry = NULL;
   ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry));
   EXPECT_TRUE(entry);
diff --git a/net/disk_cache/blockfile/backend_impl.cc b/net/disk_cache/blockfile/backend_impl.cc
index 980ddc73..7484339 100644
--- a/net/disk_cache/blockfile/backend_impl.cc
+++ b/net/disk_cache/blockfile/backend_impl.cc
@@ -387,7 +387,7 @@
     return net::ERR_FAILED;
 
   EntryImpl* node;
-  scoped_ptr<Rankings::Iterator> iterator(new Rankings::Iterator());
+  std::unique_ptr<Rankings::Iterator> iterator(new Rankings::Iterator());
   EntryImpl* next = OpenNextEntryImpl(iterator.get());
   if (!next)
     return net::OK;
@@ -429,7 +429,7 @@
 
   stats_.OnEvent(Stats::DOOM_RECENT);
   for (;;) {
-    scoped_ptr<Rankings::Iterator> iterator(new Rankings::Iterator());
+    std::unique_ptr<Rankings::Iterator> iterator(new Rankings::Iterator());
     EntryImpl* entry = OpenNextEntryImpl(iterator.get());
     if (!entry)
       return net::OK;
@@ -453,7 +453,8 @@
   return (*next_entry) ? net::OK : net::ERR_FAILED;
 }
 
-void BackendImpl::SyncEndEnumeration(scoped_ptr<Rankings::Iterator> iterator) {
+void BackendImpl::SyncEndEnumeration(
+    std::unique_ptr<Rankings::Iterator> iterator) {
   iterator->Reset();
 }
 
@@ -1296,11 +1297,12 @@
 
  private:
   const base::WeakPtr<InFlightBackendIO> background_queue_;
-  scoped_ptr<Rankings::Iterator> iterator_;
+  std::unique_ptr<Rankings::Iterator> iterator_;
 };
 
-scoped_ptr<Backend::Iterator> BackendImpl::CreateIterator() {
-  return scoped_ptr<Backend::Iterator>(new IteratorImpl(GetBackgroundQueue()));
+std::unique_ptr<Backend::Iterator> BackendImpl::CreateIterator() {
+  return std::unique_ptr<Backend::Iterator>(
+      new IteratorImpl(GetBackgroundQueue()));
 }
 
 void BackendImpl::GetStats(StatsItems* stats) {
@@ -1456,7 +1458,7 @@
   if (!file)
     return false;
 
-  scoped_ptr<char[]> data(new char[size]);
+  std::unique_ptr<char[]> data(new char[size]);
   size_t offset = address.start_block() * address.BlockSize() +
                   kBlockHeaderSize;
   if (!file->Read(data.get(), size, offset))
@@ -1471,7 +1473,7 @@
 
 void BackendImpl::StoreStats() {
   int size = stats_.StorageSize();
-  scoped_ptr<char[]> data(new char[size]);
+  std::unique_ptr<char[]> data(new char[size]);
   Addr address;
   size = stats_.SerializeStats(data.get(), size, &address);
   DCHECK(size);
diff --git a/net/disk_cache/blockfile/backend_impl.h b/net/disk_cache/blockfile/backend_impl.h
index 89edef2e..cbc854b 100644
--- a/net/disk_cache/blockfile/backend_impl.h
+++ b/net/disk_cache/blockfile/backend_impl.h
@@ -79,7 +79,7 @@
   int SyncCalculateSizeOfAllEntries();
   int SyncDoomEntriesSince(base::Time initial_time);
   int SyncOpenNextEntry(Rankings::Iterator* iterator, Entry** next_entry);
-  void SyncEndEnumeration(scoped_ptr<Rankings::Iterator> iterator);
+  void SyncEndEnumeration(std::unique_ptr<Rankings::Iterator> iterator);
   void SyncOnExternalCacheHit(const std::string& key);
 
   // Open or create an entry for the given |key| or |iter|.
@@ -288,7 +288,7 @@
   // the iterator (for example, deleting the entry) will invalidate the
   // iterator. Performing operations on an entry that modify the entry may
   // result in loops in the iteration, skipped entries or similar.
-  scoped_ptr<Iterator> CreateIterator() override;
+  std::unique_ptr<Iterator> CreateIterator() override;
   void GetStats(StatsItems* stats) override;
   void OnExternalCacheHit(const std::string& key) override;
 
@@ -403,7 +403,7 @@
   net::NetLog* net_log_;
 
   Stats stats_;  // Usage statistics.
-  scoped_ptr<base::RepeatingTimer> timer_;  // Usage timer.
+  std::unique_ptr<base::RepeatingTimer> timer_;  // Usage timer.
   base::WaitableEvent done_;  // Signals the end of background work.
   scoped_refptr<TraceObject> trace_object_;  // Initializes internal tracing.
   base::WeakPtrFactory<BackendImpl> ptr_factory_;
diff --git a/net/disk_cache/blockfile/backend_impl_v3.cc b/net/disk_cache/blockfile/backend_impl_v3.cc
index ae90bd96..e326e8a 100644
--- a/net/disk_cache/blockfile/backend_impl_v3.cc
+++ b/net/disk_cache/blockfile/backend_impl_v3.cc
@@ -685,8 +685,9 @@
   void* data_;
 };
 
-scoped_ptr<Backend::Iterator> BackendImplV3::CreateIterator() {
-  return scoped_ptr<Backend::Iterator>(new IteratorImpl(GetBackgroundQueue()));
+std::unique_ptr<Backend::Iterator> BackendImplV3::CreateIterator() {
+  return std::unique_ptr<Backend::Iterator>(
+      new IteratorImpl(GetBackgroundQueue()));
 }
 
 void BackendImplV3::GetStats(StatsItems* stats) {
@@ -795,7 +796,7 @@
   if (!file)
     return false;
 
-  scoped_ptr<char[]> data(new char[size]);
+  std::unique_ptr<char[]> data(new char[size]);
   size_t offset = address.start_block() * address.BlockSize() +
                   kBlockHeaderSize;
   if (!file->Read(data.get(), size, offset))
@@ -810,7 +811,7 @@
 
 void BackendImplV3::StoreStats() {
   int size = stats_.StorageSize();
-  scoped_ptr<char[]> data(new char[size]);
+  std::unique_ptr<char[]> data(new char[size]);
   Addr address;
   size = stats_.SerializeStats(data.get(), size, &address);
   DCHECK(size);
@@ -1389,7 +1390,7 @@
     mask_ = data_->header.table_len - 1;
 
   // Load the table into memory with a single read.
-  scoped_ptr<char[]> buf(new char[current_size]);
+  std::unique_ptr<char[]> buf(new char[current_size]);
   return index_->Read(buf.get(), current_size, 0);
 }
 
@@ -1526,8 +1527,8 @@
   }
 };
 
-scoped_ptr<Backend::Iterator> BackendImplV3::CreateIterator() {
-  return scoped_ptr<Iterator>(new NotImplementedIterator());
+std::unique_ptr<Backend::Iterator> BackendImplV3::CreateIterator() {
+  return std::unique_ptr<Iterator>(new NotImplementedIterator());
 }
 
 void BackendImplV3::GetStats(StatsItems* stats) {
diff --git a/net/disk_cache/blockfile/backend_impl_v3.h b/net/disk_cache/blockfile/backend_impl_v3.h
index df51c21..727c3a6b 100644
--- a/net/disk_cache/blockfile/backend_impl_v3.h
+++ b/net/disk_cache/blockfile/backend_impl_v3.h
@@ -192,7 +192,7 @@
   int DoomEntriesSince(base::Time initial_time,
                        const CompletionCallback& callback) override;
   int CalculateSizeOfAllEntries(const CompletionCallback& callback) override;
-  scoped_ptr<Iterator> CreateIterator() override;
+  std::unique_ptr<Iterator> CreateIterator() override;
   void GetStats(StatsItems* stats) override;
   void OnExternalCacheHit(const std::string& key) override;
 
@@ -275,7 +275,7 @@
   net::NetLog* net_log_;
 
   Stats stats_;  // Usage statistics.
-  scoped_ptr<base::RepeatingTimer> timer_;   // Usage timer.
+  std::unique_ptr<base::RepeatingTimer> timer_;  // Usage timer.
   scoped_refptr<TraceObject> trace_object_;  // Initializes internal tracing.
   base::WeakPtrFactory<BackendImplV3> ptr_factory_;
 
diff --git a/net/disk_cache/blockfile/backend_worker_v3.cc b/net/disk_cache/blockfile/backend_worker_v3.cc
index 897ee3c..db74fba 100644
--- a/net/disk_cache/blockfile/backend_worker_v3.cc
+++ b/net/disk_cache/blockfile/backend_worker_v3.cc
@@ -417,7 +417,7 @@
     mask_ = data_->header.table_len - 1;
 
   // Load the table into memory with a single read.
-  scoped_ptr<char[]> buf(new char[current_size]);
+  std::unique_ptr<char[]> buf(new char[current_size]);
   return index_->Read(buf.get(), current_size, 0);
 }
 
@@ -446,7 +446,7 @@
   if (!file)
     return false;
 
-  scoped_ptr<char[]> data(new char[size]);
+  std::unique_ptr<char[]> data(new char[size]);
   size_t offset = address.start_block() * address.BlockSize() +
                   kBlockHeaderSize;
   if (!file->Read(data.get(), size, offset))
diff --git a/net/disk_cache/blockfile/block_files.cc b/net/disk_cache/blockfile/block_files.cc
index f7cc381..10798da 100644
--- a/net/disk_cache/blockfile/block_files.cc
+++ b/net/disk_cache/blockfile/block_files.cc
@@ -432,7 +432,7 @@
 
   static bool read_contents = false;
   if (read_contents) {
-    scoped_ptr<char[]> buffer;
+    std::unique_ptr<char[]> buffer;
     buffer.reset(new char[Addr::BlockSizeForFileType(BLOCK_4K) * 4]);
     size_t size = address.BlockSize() * address.num_blocks();
     size_t offset = address.start_block() * address.BlockSize() +
diff --git a/net/disk_cache/blockfile/block_files.h b/net/disk_cache/blockfile/block_files.h
index 1de3bed..54ccc3d 100644
--- a/net/disk_cache/blockfile/block_files.h
+++ b/net/disk_cache/blockfile/block_files.h
@@ -9,12 +9,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/files/file_path.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/disk_cache/blockfile/addr.h"
 #include "net/disk_cache/blockfile/disk_format_base.h"
@@ -157,7 +157,7 @@
   char* zero_buffer_;  // Buffer to speed-up cleaning deleted entries.
   base::FilePath path_;  // Path to the backing folder.
   std::vector<MappedFile*> block_files_;  // The actual files.
-  scoped_ptr<base::ThreadChecker> thread_checker_;
+  std::unique_ptr<base::ThreadChecker> thread_checker_;
 
   FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_ZeroSizeFile);
   FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_TruncatedFile);
diff --git a/net/disk_cache/blockfile/disk_cache_perftest.cc b/net/disk_cache/blockfile/disk_cache_perftest.cc
index 80806532..857d05ee 100644
--- a/net/disk_cache/blockfile/disk_cache_perftest.cc
+++ b/net/disk_cache/blockfile/disk_cache_perftest.cc
@@ -163,7 +163,7 @@
 
   ASSERT_TRUE(CleanupCacheDir());
   net::TestCompletionCallback cb;
-  scoped_ptr<disk_cache::Backend> cache;
+  std::unique_ptr<disk_cache::Backend> cache;
   int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE,
                                           net::CACHE_BACKEND_BLOCKFILE,
                                           cache_path_,
diff --git a/net/disk_cache/blockfile/entry_impl.cc b/net/disk_cache/blockfile/entry_impl.cc
index 6020464..ad94742 100644
--- a/net/disk_cache/blockfile/entry_impl.cc
+++ b/net/disk_cache/blockfile/entry_impl.cc
@@ -902,7 +902,7 @@
   if (sparse_.get())
     return true;
 
-  scoped_ptr<SparseControl> sparse;
+  std::unique_ptr<SparseControl> sparse;
   sparse.reset(new SparseControl(const_cast<EntryImpl*>(this)));
   return sparse->CouldBeSparse();
 }
@@ -1505,7 +1505,7 @@
     return net::OK;
 
   // Use a local variable so that sparse_ never goes from 'valid' to NULL.
-  scoped_ptr<SparseControl> sparse(new SparseControl(this));
+  std::unique_ptr<SparseControl> sparse(new SparseControl(this));
   int result = sparse->Init();
   if (net::OK == result)
     sparse_.swap(sparse);
diff --git a/net/disk_cache/blockfile/entry_impl.h b/net/disk_cache/blockfile/entry_impl.h
index 336ccc9..55f68e7 100644
--- a/net/disk_cache/blockfile/entry_impl.h
+++ b/net/disk_cache/blockfile/entry_impl.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/disk_cache/blockfile/disk_format.h"
 #include "net/disk_cache/blockfile/storage_block-inl.h"
 #include "net/disk_cache/blockfile/storage_block.h"
@@ -277,7 +278,7 @@
   CacheRankingsBlock node_;   // Rankings related information for this entry.
   base::WeakPtr<BackendImpl> backend_;  // Back pointer to the cache.
   base::WeakPtr<InFlightBackendIO> background_queue_;  // In-progress queue.
-  scoped_ptr<UserBuffer> user_buffers_[kNumStreams];  // Stores user data.
+  std::unique_ptr<UserBuffer> user_buffers_[kNumStreams];  // Stores user data.
   // Files to store external user data and key.
   scoped_refptr<File> files_[kNumStreams + 1];
   mutable std::string key_;           // Copy of the key.
@@ -285,7 +286,7 @@
   bool doomed_;               // True if this entry was removed from the cache.
   bool read_only_;            // True if not yet writing.
   bool dirty_;                // True if we detected that this is a dirty entry.
-  scoped_ptr<SparseControl> sparse_;  // Support for sparse entries.
+  std::unique_ptr<SparseControl> sparse_;  // Support for sparse entries.
 
   net::BoundNetLog net_log_;
 
diff --git a/net/disk_cache/blockfile/entry_impl_v3.cc b/net/disk_cache/blockfile/entry_impl_v3.cc
index 883a6f2..bb70210 100644
--- a/net/disk_cache/blockfile/entry_impl_v3.cc
+++ b/net/disk_cache/blockfile/entry_impl_v3.cc
@@ -689,7 +689,7 @@
   if (sparse_.get())
     return true;
 
-  scoped_ptr<SparseControl> sparse;
+  std::unique_ptr<SparseControl> sparse;
   sparse.reset(new SparseControl(const_cast<EntryImpl*>(this)));
   return sparse->CouldBeSparse();
 }
@@ -1326,7 +1326,7 @@
     return net::OK;
 
   // Use a local variable so that sparse_ never goes from 'valid' to NULL.
-  scoped_ptr<SparseControl> sparse(new SparseControl(this));
+  std::unique_ptr<SparseControl> sparse(new SparseControl(this));
   int result = sparse->Init();
   if (net::OK == result)
     sparse_.swap(sparse);
diff --git a/net/disk_cache/blockfile/entry_impl_v3.h b/net/disk_cache/blockfile/entry_impl_v3.h
index a9a5df5..59d2787 100644
--- a/net/disk_cache/blockfile/entry_impl_v3.h
+++ b/net/disk_cache/blockfile/entry_impl_v3.h
@@ -7,10 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/disk_cache/blockfile/disk_format_v3.h"
 #include "net/disk_cache/blockfile/storage_block.h"
 #include "net/disk_cache/disk_cache.h"
@@ -200,10 +200,10 @@
   // Logs this entry to the internal trace buffer.
   void Log(const char* msg);
 
-  scoped_ptr<EntryRecord> entry_;  // Basic record for this entry.
-  scoped_ptr<ShortEntryRecord> short_entry_;  // Valid for evicted entries.
+  std::unique_ptr<EntryRecord> entry_;  // Basic record for this entry.
+  std::unique_ptr<ShortEntryRecord> short_entry_;  // Valid for evicted entries.
   base::WeakPtr<BackendImplV3> backend_;  // Back pointer to the cache.
-  scoped_ptr<UserBuffer> user_buffers_[kNumStreams];  // Stores user data.
+  std::unique_ptr<UserBuffer> user_buffers_[kNumStreams];  // Stores user data.
   mutable std::string key_;           // Copy of the key.
   Addr address_;
   int unreported_size_[kNumStreams];  // Bytes not reported yet to the backend.
@@ -211,7 +211,7 @@
   bool read_only_;
   bool dirty_;                // True if there is something to write.
   bool modified_;
-  // scoped_ptr<SparseControlV3> sparse_;  // Support for sparse entries.
+  // std::unique_ptr<SparseControlV3> sparse_;  // Support for sparse entries.
 
   net::BoundNetLog net_log_;
 
diff --git a/net/disk_cache/blockfile/in_flight_backend_io.cc b/net/disk_cache/blockfile/in_flight_backend_io.cc
index 307f7d2..7cd3a05 100644
--- a/net/disk_cache/blockfile/in_flight_backend_io.cc
+++ b/net/disk_cache/blockfile/in_flight_backend_io.cc
@@ -128,7 +128,7 @@
   entry_ptr_ = next_entry;
 }
 
-void BackendIO::EndEnumeration(scoped_ptr<Rankings::Iterator> iterator) {
+void BackendIO::EndEnumeration(std::unique_ptr<Rankings::Iterator> iterator) {
   operation_ = OP_END_ENUMERATION;
   scoped_iterator_ = std::move(iterator);
 }
@@ -413,7 +413,7 @@
 }
 
 void InFlightBackendIO::EndEnumeration(
-    scoped_ptr<Rankings::Iterator> iterator) {
+    std::unique_ptr<Rankings::Iterator> iterator) {
   scoped_refptr<BackendIO> operation(
       new BackendIO(this, backend_, net::CompletionCallback()));
   operation->EndEnumeration(std::move(iterator));
diff --git a/net/disk_cache/blockfile/in_flight_backend_io.h b/net/disk_cache/blockfile/in_flight_backend_io.h
index 5ac0bf4..e1456cea 100644
--- a/net/disk_cache/blockfile/in_flight_backend_io.h
+++ b/net/disk_cache/blockfile/in_flight_backend_io.h
@@ -61,7 +61,7 @@
   void DoomEntriesSince(const base::Time initial_time);
   void CalculateSizeOfAllEntries();
   void OpenNextEntry(Rankings::Iterator* iterator, Entry** next_entry);
-  void EndEnumeration(scoped_ptr<Rankings::Iterator> iterator);
+  void EndEnumeration(std::unique_ptr<Rankings::Iterator> iterator);
   void OnExternalCacheHit(const std::string& key);
   void CloseEntryImpl(EntryImpl* entry);
   void DoomEntryImpl(EntryImpl* entry);
@@ -140,7 +140,7 @@
   base::Time initial_time_;
   base::Time end_time_;
   Rankings::Iterator* iterator_;
-  scoped_ptr<Rankings::Iterator> scoped_iterator_;
+  std::unique_ptr<Rankings::Iterator> scoped_iterator_;
   EntryImpl* entry_;
   int index_;
   int offset_;
@@ -180,7 +180,7 @@
   void CalculateSizeOfAllEntries(const net::CompletionCallback& callback);
   void OpenNextEntry(Rankings::Iterator* iterator, Entry** next_entry,
                      const net::CompletionCallback& callback);
-  void EndEnumeration(scoped_ptr<Rankings::Iterator> iterator);
+  void EndEnumeration(std::unique_ptr<Rankings::Iterator> iterator);
   void OnExternalCacheHit(const std::string& key);
   void CloseEntryImpl(EntryImpl* entry);
   void DoomEntryImpl(EntryImpl* entry);
diff --git a/net/disk_cache/blockfile/index_table_v3.cc b/net/disk_cache/blockfile/index_table_v3.cc
index 9dca3de..9c53915 100644
--- a/net/disk_cache/blockfile/index_table_v3.cc
+++ b/net/disk_cache/blockfile/index_table_v3.cc
@@ -458,7 +458,7 @@
 // table.
 void IndexTable::Init(IndexTableInitData* params) {
   bool growing = header_ != NULL;
-  scoped_ptr<IndexBucket[]> old_extra_table;
+  std::unique_ptr<IndexBucket[]> old_extra_table;
   header_ = &params->index_bitmap->header;
 
   if (params->main_table) {
@@ -528,7 +528,7 @@
   if (growing) {
     int old_num_words = (backup_header_.get()->table_len + 31) / 32;
     DCHECK_GE(num_words, old_num_words);
-    scoped_ptr<uint32_t[]> storage(new uint32_t[num_words]);
+    std::unique_ptr<uint32_t[]> storage(new uint32_t[num_words]);
     memcpy(storage.get(), backup_bitmap_storage_.get(),
            old_num_words * sizeof(int32_t));
     memset(storage.get() + old_num_words, 0,
@@ -962,7 +962,7 @@
   // in other words 'multiplier' >> 1.
   uint32_t new_bit = (1 << extra_bits_) >> 1;
 
-  scoped_ptr<IndexBucket[]> old_main_table;
+  std::unique_ptr<IndexBucket[]> old_main_table;
   IndexBucket* source_table = main_table_;
   bool upgrade_format = !extra_bits_;
   if (upgrade_format) {
diff --git a/net/disk_cache/blockfile/index_table_v3.h b/net/disk_cache/blockfile/index_table_v3.h
index 001b438..1977339b 100644
--- a/net/disk_cache/blockfile/index_table_v3.h
+++ b/net/disk_cache/blockfile/index_table_v3.h
@@ -21,11 +21,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/net_export.h"
 #include "net/disk_cache/blockfile/addr.h"
@@ -166,8 +166,8 @@
   IndexBitmap* index_bitmap;
   IndexBucket* main_table;
   IndexBucket* extra_table;
-  scoped_ptr<IndexHeaderV3> backup_header;
-  scoped_ptr<uint32_t[]> backup_bitmap;
+  std::unique_ptr<IndexHeaderV3> backup_header;
+  std::unique_ptr<uint32_t[]> backup_bitmap;
 };
 
 // See the description at the top of this file.
@@ -267,10 +267,10 @@
 
   IndexTableBackend* backend_;
   IndexHeaderV3* header_;
-  scoped_ptr<Bitmap> bitmap_;
-  scoped_ptr<Bitmap> backup_bitmap_;
-  scoped_ptr<uint32_t[]> backup_bitmap_storage_;
-  scoped_ptr<IndexHeaderV3> backup_header_;
+  std::unique_ptr<Bitmap> bitmap_;
+  std::unique_ptr<Bitmap> backup_bitmap_;
+  std::unique_ptr<uint32_t[]> backup_bitmap_storage_;
+  std::unique_ptr<IndexHeaderV3> backup_header_;
   IndexBucket* main_table_;
   IndexBucket* extra_table_;
   uint32_t mask_;   // Binary mask to map a hash to the hash table.
diff --git a/net/disk_cache/blockfile/index_table_v3_unittest.cc b/net/disk_cache/blockfile/index_table_v3_unittest.cc
index e2fca106..52251f5 100644
--- a/net/disk_cache/blockfile/index_table_v3_unittest.cc
+++ b/net/disk_cache/blockfile/index_table_v3_unittest.cc
@@ -63,9 +63,9 @@
   base::Time start_time() const { return start_time_; }
 
  private:
-  scoped_ptr<uint64_t[]> main_bitmap_;
-  scoped_ptr<disk_cache::IndexBucket[]> main_table_;
-  scoped_ptr<disk_cache::IndexBucket[]> extra_table_;
+  std::unique_ptr<uint64_t[]> main_bitmap_;
+  std::unique_ptr<disk_cache::IndexBucket[]> main_table_;
+  std::unique_ptr<disk_cache::IndexBucket[]> extra_table_;
   base::Time start_time_;
   int num_bitmap_bytes_;
 
@@ -580,13 +580,13 @@
 TEST(DiskCacheIndexTable, Doubling) {
   IndexTable index(NULL);
   int size = 1024;
-  scoped_ptr<TestCacheTables> cache(new TestCacheTables(size));
+  std::unique_ptr<TestCacheTables> cache(new TestCacheTables(size));
   int entry_id = 0;
   disk_cache::CellList entries;
 
   // Go from 1024 to 256k cells.
   for (int resizes = 0; resizes <= 8; resizes++) {
-    scoped_ptr<TestCacheTables> old_cache(std::move(cache));
+    std::unique_ptr<TestCacheTables> old_cache(std::move(cache));
     cache.reset(new TestCacheTables(size));
     cache.get()->CopyFrom(*old_cache.get());
 
@@ -621,7 +621,7 @@
 TEST(DiskCacheIndexTable, BucketChains) {
   IndexTable index(NULL);
   int size = 1024;
-  scoped_ptr<TestCacheTables> cache(new TestCacheTables(size));
+  std::unique_ptr<TestCacheTables> cache(new TestCacheTables(size));
   disk_cache::CellList entries;
 
   IndexTableInitData init_data;
@@ -641,7 +641,7 @@
   }
 
   // Double the size.
-  scoped_ptr<TestCacheTables> old_cache(std::move(cache));
+  std::unique_ptr<TestCacheTables> old_cache(std::move(cache));
   cache.reset(new TestCacheTables(size * 2));
   cache.get()->CopyFrom(*old_cache.get());
 
diff --git a/net/disk_cache/blockfile/mapped_file.cc b/net/disk_cache/blockfile/mapped_file.cc
index d26cead..571f21fe 100644
--- a/net/disk_cache/blockfile/mapped_file.cc
+++ b/net/disk_cache/blockfile/mapped_file.cc
@@ -5,8 +5,7 @@
 #include "net/disk_cache/blockfile/mapped_file.h"
 
 #include <algorithm>
-
-#include "base/memory/scoped_ptr.h"
+#include <memory>
 
 namespace disk_cache {
 
@@ -38,7 +37,7 @@
 
 bool MappedFile::Preload() {
   size_t file_len = GetLength();
-  scoped_ptr<char[]> buf(new char[file_len]);
+  std::unique_ptr<char[]> buf(new char[file_len]);
   if (!Read(buf.get(), file_len, 0))
     return false;
   return true;
diff --git a/net/disk_cache/blockfile/mapped_file_posix.cc b/net/disk_cache/blockfile/mapped_file_posix.cc
index 5ff2824..99cf49c1 100644
--- a/net/disk_cache/blockfile/mapped_file_posix.cc
+++ b/net/disk_cache/blockfile/mapped_file_posix.cc
@@ -31,7 +31,7 @@
     buffer_ = 0;
 
   // Make sure we detect hardware failures reading the headers.
-  scoped_ptr<char[]> temp(new char[temp_len]);
+  std::unique_ptr<char[]> temp(new char[temp_len]);
   if (!Read(temp.get(), temp_len, 0))
     return NULL;
 
diff --git a/net/disk_cache/blockfile/mapped_file_win.cc b/net/disk_cache/blockfile/mapped_file_win.cc
index d725238..9a128a3 100644
--- a/net/disk_cache/blockfile/mapped_file_win.cc
+++ b/net/disk_cache/blockfile/mapped_file_win.cc
@@ -4,9 +4,10 @@
 
 #include "net/disk_cache/blockfile/mapped_file.h"
 
+#include <memory>
+
 #include "base/files/file_path.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/disk_cache/disk_cache.h"
 
 namespace disk_cache {
@@ -29,7 +30,7 @@
 
   // Make sure we detect hardware failures reading the headers.
   size_t temp_len = size ? size : 4096;
-  scoped_ptr<char[]> temp(new char[temp_len]);
+  std::unique_ptr<char[]> temp(new char[temp_len]);
   if (!Read(temp.get(), temp_len, 0))
     return NULL;
 
diff --git a/net/disk_cache/blockfile/rankings.cc b/net/disk_cache/blockfile/rankings.cc
index 387950f..79234f4 100644
--- a/net/disk_cache/blockfile/rankings.cc
+++ b/net/disk_cache/blockfile/rankings.cc
@@ -202,9 +202,9 @@
 Rankings::ScopedRankingsBlock::ScopedRankingsBlock(Rankings* rankings)
     : rankings_(rankings) {}
 
-Rankings::ScopedRankingsBlock::ScopedRankingsBlock(
-    Rankings* rankings, CacheRankingsBlock* node)
-    : scoped_ptr<CacheRankingsBlock>(node), rankings_(rankings) {}
+Rankings::ScopedRankingsBlock::ScopedRankingsBlock(Rankings* rankings,
+                                                   CacheRankingsBlock* node)
+    : std::unique_ptr<CacheRankingsBlock>(node), rankings_(rankings) {}
 
 Rankings::Iterator::Iterator() {
   memset(this, 0, sizeof(Iterator));
@@ -827,7 +827,7 @@
   if (!current.SanityCheckForRankings())
     return ERR_INVALID_HEAD;
 
-  scoped_ptr<CacheRankingsBlock> node;
+  std::unique_ptr<CacheRankingsBlock> node;
   Addr prev_addr(current);
   do {
     node.reset(new CacheRankingsBlock(backend_->File(current), current));
diff --git a/net/disk_cache/blockfile/rankings.h b/net/disk_cache/blockfile/rankings.h
index 637f6a5..66ba7b8 100644
--- a/net/disk_cache/blockfile/rankings.h
+++ b/net/disk_cache/blockfile/rankings.h
@@ -8,9 +8,9 @@
 #define NET_DISK_CACHE_BLOCKFILE_RANKINGS_H_
 
 #include <list>
+#include <memory>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/disk_cache/blockfile/addr.h"
 #include "net/disk_cache/blockfile/mapped_file.h"
 #include "net/disk_cache/blockfile/storage_block.h"
@@ -66,7 +66,7 @@
   // This class provides a specialized version of scoped_ptr, that calls
   // Rankings whenever a CacheRankingsBlock is deleted, to keep track of cache
   // iterators that may go stale.
-  class ScopedRankingsBlock : public scoped_ptr<CacheRankingsBlock> {
+  class ScopedRankingsBlock : public std::unique_ptr<CacheRankingsBlock> {
    public:
     ScopedRankingsBlock();
     explicit ScopedRankingsBlock(Rankings* rankings);
@@ -84,7 +84,7 @@
     void reset(CacheRankingsBlock* p = NULL) {
       if (p != get())
         rankings_->FreeRankingsBlock(get());
-      scoped_ptr<CacheRankingsBlock>::reset(p);
+      std::unique_ptr<CacheRankingsBlock>::reset(p);
     }
 
    private:
diff --git a/net/disk_cache/blockfile/sparse_control.cc b/net/disk_cache/blockfile/sparse_control.cc
index 1de0d60..9a178b5 100644
--- a/net/disk_cache/blockfile/sparse_control.cc
+++ b/net/disk_cache/blockfile/sparse_control.cc
@@ -79,7 +79,7 @@
   std::string name_;
   disk_cache::Bitmap children_map_;
   int64_t signature_;
-  scoped_ptr<char[]> buffer_;
+  std::unique_ptr<char[]> buffer_;
   DISALLOW_COPY_AND_ASSIGN(ChildrenDeleter);
 };
 
diff --git a/net/disk_cache/blockfile/sparse_control_v3.cc b/net/disk_cache/blockfile/sparse_control_v3.cc
index 82a322122..5e95e44 100644
--- a/net/disk_cache/blockfile/sparse_control_v3.cc
+++ b/net/disk_cache/blockfile/sparse_control_v3.cc
@@ -75,7 +75,7 @@
   std::string name_;
   disk_cache::Bitmap children_map_;
   int64_t signature_;
-  scoped_ptr<char[]> buffer_;
+  std::unique_ptr<char[]> buffer_;
   DISALLOW_COPY_AND_ASSIGN(ChildrenDeleter);
 };
 
diff --git a/net/disk_cache/blockfile/stats_unittest.cc b/net/disk_cache/blockfile/stats_unittest.cc
index fe47bdd..22ef462 100644
--- a/net/disk_cache/blockfile/stats_unittest.cc
+++ b/net/disk_cache/blockfile/stats_unittest.cc
@@ -4,7 +4,8 @@
 
 #include "net/disk_cache/blockfile/stats.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "testing/gtest/include/gtest/gtest.h"
 
 TEST(DiskCacheStatsTest, Init) {
@@ -16,7 +17,7 @@
 TEST(DiskCacheStatsTest, InitWithEmptyBuffer) {
   disk_cache::Stats stats;
   int required_len = stats.StorageSize();
-  scoped_ptr<char[]> storage(new char[required_len]);
+  std::unique_ptr<char[]> storage(new char[required_len]);
   memset(storage.get(), 0, required_len);
 
   ASSERT_TRUE(stats.Init(storage.get(), required_len, disk_cache::Addr()));
@@ -26,7 +27,7 @@
 TEST(DiskCacheStatsTest, FailsInit) {
   disk_cache::Stats stats;
   int required_len = stats.StorageSize();
-  scoped_ptr<char[]> storage(new char[required_len]);
+  std::unique_ptr<char[]> storage(new char[required_len]);
   memset(storage.get(), 0, required_len);
 
   // Try a small buffer.
@@ -40,7 +41,7 @@
 }
 
 TEST(DiskCacheStatsTest, SaveRestore) {
-  scoped_ptr<disk_cache::Stats> stats(new disk_cache::Stats);
+  std::unique_ptr<disk_cache::Stats> stats(new disk_cache::Stats);
 
   disk_cache::Addr addr(5);
   ASSERT_TRUE(stats->Init(nullptr, 0, addr));
@@ -51,7 +52,7 @@
   stats->OnEvent(disk_cache::Stats::DOOM_RECENT);
 
   int required_len = stats->StorageSize();
-  scoped_ptr<char[]> storage(new char[required_len]);
+  std::unique_ptr<char[]> storage(new char[required_len]);
   disk_cache::Addr out_addr;
   int real_len = stats->SerializeStats(storage.get(), required_len, &out_addr);
   EXPECT_GE(required_len, real_len);
diff --git a/net/disk_cache/cache_creator.cc b/net/disk_cache/cache_creator.cc
index 54338c1f..5245fe8 100644
--- a/net/disk_cache/cache_creator.cc
+++ b/net/disk_cache/cache_creator.cc
@@ -32,7 +32,7 @@
                uint32_t flags,
                const scoped_refptr<base::SingleThreadTaskRunner>& thread,
                net::NetLog* net_log,
-               scoped_ptr<disk_cache::Backend>* backend,
+               std::unique_ptr<disk_cache::Backend>* backend,
                const net::CompletionCallback& callback);
 
   // Creates the backend.
@@ -53,9 +53,9 @@
   net::BackendType backend_type_;
   uint32_t flags_;
   scoped_refptr<base::SingleThreadTaskRunner> thread_;
-  scoped_ptr<disk_cache::Backend>* backend_;
+  std::unique_ptr<disk_cache::Backend>* backend_;
   net::CompletionCallback callback_;
-  scoped_ptr<disk_cache::Backend> created_cache_;
+  std::unique_ptr<disk_cache::Backend> created_cache_;
   net::NetLog* net_log_;
 
   DISALLOW_COPY_AND_ASSIGN(CacheCreator);
@@ -70,7 +70,7 @@
     uint32_t flags,
     const scoped_refptr<base::SingleThreadTaskRunner>& thread,
     net::NetLog* net_log,
-    scoped_ptr<disk_cache::Backend>* backend,
+    std::unique_ptr<disk_cache::Backend>* backend,
     const net::CompletionCallback& callback)
     : path_(path),
       force_(force),
@@ -164,7 +164,7 @@
     bool force,
     const scoped_refptr<base::SingleThreadTaskRunner>& thread,
     net::NetLog* net_log,
-    scoped_ptr<Backend>* backend,
+    std::unique_ptr<Backend>* backend,
     const net::CompletionCallback& callback) {
   DCHECK(!callback.is_null());
   if (type == net::MEMORY_CACHE) {
diff --git a/net/disk_cache/disk_cache.h b/net/disk_cache/disk_cache.h
index 5f99c32..f71bc819 100644
--- a/net/disk_cache/disk_cache.h
+++ b/net/disk_cache/disk_cache.h
@@ -10,11 +10,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_split.h"
 #include "base/time/time.h"
 #include "net/base/cache_type.h"
@@ -59,7 +59,7 @@
     bool force,
     const scoped_refptr<base::SingleThreadTaskRunner>& thread,
     net::NetLog* net_log,
-    scoped_ptr<Backend>* backend,
+    std::unique_ptr<Backend>* backend,
     const net::CompletionCallback& callback);
 
 // The root interface for a disk cache instance.
@@ -154,7 +154,7 @@
 
   // Returns an iterator which will enumerate all entries of the cache in an
   // undefined order.
-  virtual scoped_ptr<Iterator> CreateIterator() = 0;
+  virtual std::unique_ptr<Iterator> CreateIterator() = 0;
 
   // Return a list of cache statistics.
   virtual void GetStats(base::StringPairs* stats) = 0;
@@ -333,7 +333,7 @@
 };
 
 // Automatically closes an entry when it goes out of scope.
-typedef scoped_ptr<Entry, EntryDeleter> ScopedEntryPtr;
+typedef std::unique_ptr<Entry, EntryDeleter> ScopedEntryPtr;
 
 }  // namespace disk_cache
 
diff --git a/net/disk_cache/disk_cache_test_base.cc b/net/disk_cache/disk_cache_test_base.cc
index d3a21257..6c7c012 100644
--- a/net/disk_cache/disk_cache_test_base.cc
+++ b/net/disk_cache/disk_cache_test_base.cc
@@ -55,7 +55,7 @@
 }
 
 DiskCacheTestWithCache::TestIterator::TestIterator(
-    scoped_ptr<disk_cache::Backend::Iterator> iterator)
+    std::unique_ptr<disk_cache::Backend::Iterator> iterator)
     : iterator_(std::move(iterator)) {}
 
 DiskCacheTestWithCache::TestIterator::~TestIterator() {}
@@ -174,9 +174,10 @@
   return cb.GetResult(rv);
 }
 
-scoped_ptr<DiskCacheTestWithCache::TestIterator>
-    DiskCacheTestWithCache::CreateIterator() {
-  return scoped_ptr<TestIterator>(new TestIterator(cache_->CreateIterator()));
+std::unique_ptr<DiskCacheTestWithCache::TestIterator>
+DiskCacheTestWithCache::CreateIterator() {
+  return std::unique_ptr<TestIterator>(
+      new TestIterator(cache_->CreateIterator()));
 }
 
 void DiskCacheTestWithCache::FlushQueueForTest() {
@@ -312,9 +313,9 @@
 
   if (simple_cache_mode_) {
     net::TestCompletionCallback cb;
-    scoped_ptr<disk_cache::SimpleBackendImpl> simple_backend(
-        new disk_cache::SimpleBackendImpl(
-            cache_path_, size_, type_, runner, NULL));
+    std::unique_ptr<disk_cache::SimpleBackendImpl> simple_backend(
+        new disk_cache::SimpleBackendImpl(cache_path_, size_, type_, runner,
+                                          NULL));
     int rv = simple_backend->Init(cb.callback());
     ASSERT_EQ(net::OK, cb.GetResult(rv));
     simple_cache_impl_ = simple_backend.get();
diff --git a/net/disk_cache/disk_cache_test_base.h b/net/disk_cache/disk_cache_test_base.h
index 713bba0e..c94f5ac8 100644
--- a/net/disk_cache/disk_cache_test_base.h
+++ b/net/disk_cache/disk_cache_test_base.h
@@ -7,10 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/files/file_path.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread.h"
 #include "net/base/cache_type.h"
 #include "net/disk_cache/disk_cache.h"
@@ -54,7 +55,7 @@
 
  private:
   base::ScopedTempDir temp_dir_;
-  scoped_ptr<base::MessageLoop> message_loop_;
+  std::unique_ptr<base::MessageLoop> message_loop_;
 };
 
 // Provides basic support for cache related tests.
@@ -62,13 +63,14 @@
  protected:
   class TestIterator {
    public:
-    explicit TestIterator(scoped_ptr<disk_cache::Backend::Iterator> iterator);
+    explicit TestIterator(
+        std::unique_ptr<disk_cache::Backend::Iterator> iterator);
     ~TestIterator();
 
     int OpenNextEntry(disk_cache::Entry** next_entry);
 
    private:
-    scoped_ptr<disk_cache::Backend::Iterator> iterator_;
+    std::unique_ptr<disk_cache::Backend::Iterator> iterator_;
   };
 
   DiskCacheTestWithCache();
@@ -130,7 +132,7 @@
                          const base::Time end_time);
   int CalculateSizeOfAllEntries();
   int DoomEntriesSince(const base::Time initial_time);
-  scoped_ptr<TestIterator> CreateIterator();
+  std::unique_ptr<TestIterator> CreateIterator();
   void FlushQueueForTest();
   void RunTaskForTest(const base::Closure& closure);
   int ReadData(disk_cache::Entry* entry, int index, int offset,
@@ -163,7 +165,7 @@
 
   // cache_ will always have a valid object, regardless of how the cache was
   // initialized. The implementation pointers can be NULL.
-  scoped_ptr<disk_cache::Backend> cache_;
+  std::unique_ptr<disk_cache::Backend> cache_;
   disk_cache::BackendImpl* cache_impl_;
   disk_cache::SimpleBackendImpl* simple_cache_impl_;
   disk_cache::MemBackendImpl* mem_cache_;
diff --git a/net/disk_cache/disk_cache_test_util.cc b/net/disk_cache/disk_cache_test_util.cc
index 0a2a27e..7e96448 100644
--- a/net/disk_cache/disk_cache_test_util.cc
+++ b/net/disk_cache/disk_cache_test_util.cc
@@ -61,7 +61,7 @@
 bool CheckCacheIntegrity(const base::FilePath& path,
                          bool new_eviction,
                          uint32_t mask) {
-  scoped_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
+  std::unique_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
       path, mask, base::ThreadTaskRunnerHandle::Get(), NULL));
   if (!cache.get())
     return false;
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index 22f793bb..3612fab 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -1625,7 +1625,7 @@
   parent_entry->Close();
 
   // Perform the enumerations.
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   disk_cache::Entry* entry = NULL;
   int count = 0;
   while (iter->OpenNextEntry(&entry) == net::OK) {
@@ -2185,7 +2185,8 @@
 // way to simulate a race is to execute what we want on the callback.
 class SparseTestCompletionCallback: public net::TestCompletionCallback {
  public:
-  explicit SparseTestCompletionCallback(scoped_ptr<disk_cache::Backend> cache)
+  explicit SparseTestCompletionCallback(
+      std::unique_ptr<disk_cache::Backend> cache)
       : cache_(std::move(cache)) {}
 
  private:
@@ -2194,7 +2195,7 @@
     TestCompletionCallback::SetResult(result);
   }
 
-  scoped_ptr<disk_cache::Backend> cache_;
+  std::unique_ptr<disk_cache::Backend> cache_;
   DISALLOW_COPY_AND_ASSIGN(SparseTestCompletionCallback);
 };
 
@@ -2351,7 +2352,7 @@
   entry->Close();
   EXPECT_EQ(4, cache_->GetEntryCount());
 
-  scoped_ptr<TestIterator> iter = CreateIterator();
+  std::unique_ptr<TestIterator> iter = CreateIterator();
   int count = 0;
   std::string child_key[2];
   while (iter->OpenNextEntry(&entry) == net::OK) {
diff --git a/net/disk_cache/memory/mem_backend_impl.cc b/net/disk_cache/memory/mem_backend_impl.cc
index 028c022..0ba2d3f 100644
--- a/net/disk_cache/memory/mem_backend_impl.cc
+++ b/net/disk_cache/memory/mem_backend_impl.cc
@@ -49,9 +49,9 @@
 }
 
 // static
-scoped_ptr<Backend> MemBackendImpl::CreateBackend(int max_bytes,
-                                                  net::NetLog* net_log) {
-  scoped_ptr<MemBackendImpl> cache(new MemBackendImpl(net_log));
+std::unique_ptr<Backend> MemBackendImpl::CreateBackend(int max_bytes,
+                                                       net::NetLog* net_log) {
+  std::unique_ptr<MemBackendImpl> cache(new MemBackendImpl(net_log));
   cache->SetMaxSize(max_bytes);
   if (cache->Init())
     return std::move(cache);
@@ -242,8 +242,8 @@
   base::LinkNode<MemEntryImpl>* current_;
 };
 
-scoped_ptr<Backend::Iterator> MemBackendImpl::CreateIterator() {
-  return scoped_ptr<Backend::Iterator>(
+std::unique_ptr<Backend::Iterator> MemBackendImpl::CreateIterator() {
+  return std::unique_ptr<Backend::Iterator>(
       new MemIterator(weak_factory_.GetWeakPtr()));
 }
 
diff --git a/net/disk_cache/memory/mem_backend_impl.h b/net/disk_cache/memory/mem_backend_impl.h
index 8abcca5..0119e8f 100644
--- a/net/disk_cache/memory/mem_backend_impl.h
+++ b/net/disk_cache/memory/mem_backend_impl.h
@@ -39,7 +39,8 @@
   // size the cache can grow to. If zero is passed in as max_bytes, the cache
   // will determine the value to use based on the available memory. The returned
   // pointer can be NULL if a fatal error is found.
-  static scoped_ptr<Backend> CreateBackend(int max_bytes, net::NetLog* net_log);
+  static std::unique_ptr<Backend> CreateBackend(int max_bytes,
+                                                net::NetLog* net_log);
 
   // Performs general initialization for this current instance of the cache.
   bool Init();
@@ -89,7 +90,7 @@
   int DoomEntriesSince(base::Time initial_time,
                        const CompletionCallback& callback) override;
   int CalculateSizeOfAllEntries(const CompletionCallback& callback) override;
-  scoped_ptr<Iterator> CreateIterator() override;
+  std::unique_ptr<Iterator> CreateIterator() override;
   void GetStats(base::StringPairs* stats) override {}
   void OnExternalCacheHit(const std::string& key) override;
 
diff --git a/net/disk_cache/memory/mem_entry_impl.cc b/net/disk_cache/memory/mem_entry_impl.cc
index bcbebb3c..f1efa334 100644
--- a/net/disk_cache/memory/mem_entry_impl.cc
+++ b/net/disk_cache/memory/mem_entry_impl.cc
@@ -50,10 +50,10 @@
 
 // Returns NetLog parameters for the creation of a MemEntryImpl. A separate
 // function is needed because child entries don't store their key().
-scoped_ptr<base::Value> NetLogEntryCreationCallback(
+std::unique_ptr<base::Value> NetLogEntryCreationCallback(
     const MemEntryImpl* entry,
     net::NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   std::string key;
   switch (entry->type()) {
     case MemEntryImpl::PARENT_ENTRY:
diff --git a/net/disk_cache/memory/mem_entry_impl.h b/net/disk_cache/memory/mem_entry_impl.h
index 11634e6a..a0f432d 100644
--- a/net/disk_cache/memory/mem_entry_impl.h
+++ b/net/disk_cache/memory/mem_entry_impl.h
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -14,7 +15,6 @@
 #include "base/containers/linked_list.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/disk_cache/disk_cache.h"
 #include "net/log/net_log.h"
@@ -172,7 +172,7 @@
                               // entry.
   // Pointer to the parent entry, or nullptr if this entry is a parent entry.
   MemEntryImpl* parent_;
-  scoped_ptr<EntryMap> children_;
+  std::unique_ptr<EntryMap> children_;
 
   base::Time last_modified_;
   base::Time last_used_;
diff --git a/net/disk_cache/net_log_parameters.cc b/net/disk_cache/net_log_parameters.cc
index 842ce25..9ab448ff9 100644
--- a/net/disk_cache/net_log_parameters.cc
+++ b/net/disk_cache/net_log_parameters.cc
@@ -15,23 +15,23 @@
 
 namespace {
 
-scoped_ptr<base::Value> NetLogEntryCreationCallback(
+std::unique_ptr<base::Value> NetLogEntryCreationCallback(
     const disk_cache::Entry* entry,
     bool created,
     net::NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("key", entry->GetKey());
   dict->SetBoolean("created", created);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogReadWriteDataCallback(
+std::unique_ptr<base::Value> NetLogReadWriteDataCallback(
     int index,
     int offset,
     int buf_len,
     bool truncate,
     net::NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("index", index);
   dict->SetInteger("offset", offset);
   dict->SetInteger("buf_len", buf_len);
@@ -40,11 +40,11 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogReadWriteCompleteCallback(
+std::unique_ptr<base::Value> NetLogReadWriteCompleteCallback(
     int bytes_copied,
     net::NetLogCaptureMode /* capture_mode */) {
   DCHECK_NE(bytes_copied, net::ERR_IO_PENDING);
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   if (bytes_copied < 0) {
     dict->SetInteger("net_error", bytes_copied);
   } else {
@@ -53,11 +53,11 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSparseOperationCallback(
+std::unique_ptr<base::Value> NetLogSparseOperationCallback(
     int64_t offset,
     int buf_len,
     net::NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   // Values can only be created with at most 32-bit integers.  Using a string
   // instead circumvents that restriction.
   dict->SetString("offset", base::Int64ToString(offset));
@@ -65,21 +65,21 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSparseReadWriteCallback(
+std::unique_ptr<base::Value> NetLogSparseReadWriteCallback(
     const net::NetLog::Source& source,
     int child_len,
     net::NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   source.AddToEventParameters(dict.get());
   dict->SetInteger("child_len", child_len);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogGetAvailableRangeResultCallback(
+std::unique_ptr<base::Value> NetLogGetAvailableRangeResultCallback(
     int64_t start,
     int result,
     net::NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   if (result > 0) {
     dict->SetInteger("length", result);
     dict->SetString("start",  base::Int64ToString(start));
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc
index 00f6d15..5c0445ae 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -8,6 +8,8 @@
 #include <cstdlib>
 #include <functional>
 
+#include "base/memory/ptr_util.h"
+
 #if defined(OS_POSIX)
 #include <sys/resource.h>
 #endif
@@ -209,11 +211,11 @@
     }
   }
 
-  static scoped_ptr<SimpleEntryImpl::ActiveEntryProxy> Create(
+  static std::unique_ptr<SimpleEntryImpl::ActiveEntryProxy> Create(
       int64_t entry_hash,
       SimpleBackendImpl* backend) {
-    scoped_ptr<SimpleEntryImpl::ActiveEntryProxy>
-        proxy(new ActiveEntryProxy(entry_hash, backend));
+    std::unique_ptr<SimpleEntryImpl::ActiveEntryProxy> proxy(
+        new ActiveEntryProxy(entry_hash, backend));
     return proxy;
   }
 
@@ -250,11 +252,9 @@
   worker_pool_ = g_sequenced_worker_pool.Get().GetTaskRunner();
 
   index_.reset(new SimpleIndex(
-      base::ThreadTaskRunnerHandle::Get(),
-      this,
-      cache_type_,
-      make_scoped_ptr(new SimpleIndexFile(
-          cache_thread_, worker_pool_.get(), cache_type_, path_))));
+      base::ThreadTaskRunnerHandle::Get(), this, cache_type_,
+      base::WrapUnique(new SimpleIndexFile(cache_thread_, worker_pool_.get(),
+                                           cache_type_, path_))));
   index_->ExecuteWhenReady(
       base::Bind(&RecordIndexLoad, cache_type_, base::TimeTicks::Now()));
 
@@ -301,7 +301,7 @@
 
 void SimpleBackendImpl::DoomEntries(std::vector<uint64_t>* entry_hashes,
                                     const net::CompletionCallback& callback) {
-  scoped_ptr<std::vector<uint64_t>> mass_doom_entry_hashes(
+  std::unique_ptr<std::vector<uint64_t>> mass_doom_entry_hashes(
       new std::vector<uint64_t>());
   mass_doom_entry_hashes->swap(*entry_hashes);
 
@@ -530,12 +530,12 @@
 
  private:
   base::WeakPtr<SimpleBackendImpl> backend_;
-  scoped_ptr<std::vector<uint64_t>> hashes_to_enumerate_;
+  std::unique_ptr<std::vector<uint64_t>> hashes_to_enumerate_;
   base::WeakPtrFactory<SimpleIterator> weak_factory_;
 };
 
-scoped_ptr<Backend::Iterator> SimpleBackendImpl::CreateIterator() {
-  return scoped_ptr<Iterator>(new SimpleIterator(AsWeakPtr()));
+std::unique_ptr<Backend::Iterator> SimpleBackendImpl::CreateIterator() {
+  return std::unique_ptr<Iterator>(new SimpleIterator(AsWeakPtr()));
 }
 
 void SimpleBackendImpl::GetStats(base::StringPairs* stats) {
@@ -566,7 +566,7 @@
     callback.Run(result);
     return;
   }
-  scoped_ptr<std::vector<uint64_t>> removed_key_hashes(
+  std::unique_ptr<std::vector<uint64_t>> removed_key_hashes(
       index_->GetEntriesBetween(initial_time, end_time).release());
   DoomEntries(removed_key_hashes.get(), callback);
 }
@@ -658,7 +658,7 @@
 int SimpleBackendImpl::DoomEntryFromHash(uint64_t entry_hash,
                                          const CompletionCallback& callback) {
   Entry** entry = new Entry*();
-  scoped_ptr<Entry*> scoped_entry(entry);
+  std::unique_ptr<Entry*> scoped_entry(entry);
 
   base::hash_map<uint64_t, std::vector<Closure>>::iterator pending_it =
       entries_pending_doom_.find(entry_hash);
@@ -737,7 +737,7 @@
 }
 
 void SimpleBackendImpl::DoomEntriesComplete(
-    scoped_ptr<std::vector<uint64_t>> entry_hashes,
+    std::unique_ptr<std::vector<uint64_t>> entry_hashes,
     const net::CompletionCallback& callback,
     int result) {
   for (const uint64_t& entry_hash : *entry_hashes)
diff --git a/net/disk_cache/simple/simple_backend_impl.h b/net/disk_cache/simple/simple_backend_impl.h
index 6db40163..10d6ec9 100644
--- a/net/disk_cache/simple/simple_backend_impl.h
+++ b/net/disk_cache/simple/simple_backend_impl.h
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
@@ -16,7 +17,6 @@
 #include "base/containers/hash_tables.h"
 #include "base/files/file_path.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string_split.h"
 #include "base/task_runner.h"
@@ -108,7 +108,7 @@
   int DoomEntriesSince(base::Time initial_time,
                        const CompletionCallback& callback) override;
   int CalculateSizeOfAllEntries(const CompletionCallback& callback) override;
-  scoped_ptr<Iterator> CreateIterator() override;
+  std::unique_ptr<Iterator> CreateIterator() override;
   void GetStats(base::StringPairs* stats) override;
   void OnExternalCacheHit(const std::string& key) override;
 
@@ -191,13 +191,13 @@
 
   // A callback thunk used by DoomEntries to clear the |entries_pending_doom_|
   // after a mass doom.
-  void DoomEntriesComplete(scoped_ptr<std::vector<uint64_t>> entry_hashes,
+  void DoomEntriesComplete(std::unique_ptr<std::vector<uint64_t>> entry_hashes,
                            const CompletionCallback& callback,
                            int result);
 
   const base::FilePath path_;
   const net::CacheType cache_type_;
-  scoped_ptr<SimpleIndex> index_;
+  std::unique_ptr<SimpleIndex> index_;
   const scoped_refptr<base::SingleThreadTaskRunner> cache_thread_;
   scoped_refptr<base::TaskRunner> worker_pool_;
 
diff --git a/net/disk_cache/simple/simple_entry_impl.cc b/net/disk_cache/simple/simple_entry_impl.cc
index 68f1b9e..3d9bd0f 100644
--- a/net/disk_cache/simple/simple_entry_impl.cc
+++ b/net/disk_cache/simple/simple_entry_impl.cc
@@ -200,7 +200,7 @@
 }
 
 void SimpleEntryImpl::SetActiveEntryProxy(
-    scoped_ptr<ActiveEntryProxy> active_entry_proxy) {
+    std::unique_ptr<ActiveEntryProxy> active_entry_proxy) {
   DCHECK(!active_entry_proxy_);
   active_entry_proxy_.reset(active_entry_proxy.release());
 }
@@ -600,7 +600,7 @@
                    "EntryOperationsPending", cache_type_,
                    pending_operations_.size(), 0, 100, 20);
   if (!pending_operations_.empty() && state_ != STATE_IO_PENDING) {
-    scoped_ptr<SimpleEntryOperation> operation(
+    std::unique_ptr<SimpleEntryOperation> operation(
         new SimpleEntryOperation(pending_operations_.front()));
     pending_operations_.pop();
     switch (operation->type()) {
@@ -693,10 +693,9 @@
   DCHECK(!synchronous_entry_);
   state_ = STATE_IO_PENDING;
   const base::TimeTicks start_time = base::TimeTicks::Now();
-  scoped_ptr<SimpleEntryCreationResults> results(
-      new SimpleEntryCreationResults(
-          SimpleEntryStat(last_used_, last_modified_, data_size_,
-                          sparse_data_size_)));
+  std::unique_ptr<SimpleEntryCreationResults> results(
+      new SimpleEntryCreationResults(SimpleEntryStat(
+          last_used_, last_modified_, data_size_, sparse_data_size_)));
   Closure task = base::Bind(&SimpleSynchronousEntry::OpenEntry,
                             cache_type_,
                             path_,
@@ -742,10 +741,9 @@
     have_written_[i] = true;
 
   const base::TimeTicks start_time = base::TimeTicks::Now();
-  scoped_ptr<SimpleEntryCreationResults> results(
-      new SimpleEntryCreationResults(
-          SimpleEntryStat(last_used_, last_modified_, data_size_,
-                          sparse_data_size_)));
+  std::unique_ptr<SimpleEntryCreationResults> results(
+      new SimpleEntryCreationResults(SimpleEntryStat(
+          last_used_, last_modified_, data_size_, sparse_data_size_)));
   Closure task = base::Bind(&SimpleSynchronousEntry::CreateEntry,
                             cache_type_,
                             path_,
@@ -766,8 +764,8 @@
 void SimpleEntryImpl::CloseInternal() {
   DCHECK(io_thread_checker_.CalledOnValidThread());
   typedef SimpleSynchronousEntry::CRCRecord CRCRecord;
-  scoped_ptr<std::vector<CRCRecord> >
-      crc32s_to_write(new std::vector<CRCRecord>());
+  std::unique_ptr<std::vector<CRCRecord>> crc32s_to_write(
+      new std::vector<CRCRecord>());
 
   net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_CLOSE_BEGIN);
 
@@ -868,11 +866,10 @@
   if (!doomed_ && backend_.get())
     backend_->index()->UseIfExists(entry_hash_);
 
-  scoped_ptr<uint32_t> read_crc32(new uint32_t());
-  scoped_ptr<int> result(new int());
-  scoped_ptr<SimpleEntryStat> entry_stat(
-      new SimpleEntryStat(last_used_, last_modified_, data_size_,
-                          sparse_data_size_));
+  std::unique_ptr<uint32_t> read_crc32(new uint32_t());
+  std::unique_ptr<int> result(new int());
+  std::unique_ptr<SimpleEntryStat> entry_stat(new SimpleEntryStat(
+      last_used_, last_modified_, data_size_, sparse_data_size_));
   Closure task = base::Bind(
       &SimpleSynchronousEntry::ReadData, base::Unretained(synchronous_entry_),
       SimpleSynchronousEntry::EntryOperationData(stream_index, offset, buf_len),
@@ -950,9 +947,8 @@
   AdvanceCrc(buf, offset, buf_len, stream_index);
 
   // |entry_stat| needs to be initialized before modifying |data_size_|.
-  scoped_ptr<SimpleEntryStat> entry_stat(
-      new SimpleEntryStat(last_used_, last_modified_, data_size_,
-                          sparse_data_size_));
+  std::unique_ptr<SimpleEntryStat> entry_stat(new SimpleEntryStat(
+      last_used_, last_modified_, data_size_, sparse_data_size_));
   if (truncate) {
     data_size_[stream_index] = offset + buf_len;
   } else {
@@ -970,7 +966,7 @@
   if (stream_index == 1)
     have_written_[0] = true;
 
-  scoped_ptr<int> result(new int());
+  std::unique_ptr<int> result(new int());
   Closure task = base::Bind(
       &SimpleSynchronousEntry::WriteData, base::Unretained(synchronous_entry_),
       SimpleSynchronousEntry::EntryOperationData(stream_index, offset, buf_len,
@@ -1002,8 +998,8 @@
   DCHECK_EQ(STATE_READY, state_);
   state_ = STATE_IO_PENDING;
 
-  scoped_ptr<int> result(new int());
-  scoped_ptr<base::Time> last_used(new base::Time());
+  std::unique_ptr<int> result(new int());
+  std::unique_ptr<base::Time> last_used(new base::Time());
   Closure task = base::Bind(
       &SimpleSynchronousEntry::ReadSparseData,
       base::Unretained(synchronous_entry_),
@@ -1040,13 +1036,12 @@
     max_sparse_data_size = max_cache_size / kMaxSparseDataSizeDivisor;
   }
 
-  scoped_ptr<SimpleEntryStat> entry_stat(
-      new SimpleEntryStat(last_used_, last_modified_, data_size_,
-                          sparse_data_size_));
+  std::unique_ptr<SimpleEntryStat> entry_stat(new SimpleEntryStat(
+      last_used_, last_modified_, data_size_, sparse_data_size_));
 
   last_used_ = last_modified_ = base::Time::Now();
 
-  scoped_ptr<int> result(new int());
+  std::unique_ptr<int> result(new int());
   Closure task = base::Bind(
       &SimpleSynchronousEntry::WriteSparseData,
       base::Unretained(synchronous_entry_),
@@ -1072,7 +1067,7 @@
   DCHECK_EQ(STATE_READY, state_);
   state_ = STATE_IO_PENDING;
 
-  scoped_ptr<int> result(new int());
+  std::unique_ptr<int> result(new int());
   Closure task = base::Bind(&SimpleSynchronousEntry::GetAvailableRange,
                             base::Unretained(synchronous_entry_),
                             SimpleSynchronousEntry::EntryOperationData(
@@ -1119,7 +1114,7 @@
 void SimpleEntryImpl::CreationOperationComplete(
     const CompletionCallback& completion_callback,
     const base::TimeTicks& start_time,
-    scoped_ptr<SimpleEntryCreationResults> in_results,
+    std::unique_ptr<SimpleEntryCreationResults> in_results,
     Entry** out_entry,
     net::NetLog::EventType end_event_type) {
   DCHECK(io_thread_checker_.CalledOnValidThread());
@@ -1172,7 +1167,7 @@
 void SimpleEntryImpl::EntryOperationComplete(
     const CompletionCallback& completion_callback,
     const SimpleEntryStat& entry_stat,
-    scoped_ptr<int> result) {
+    std::unique_ptr<int> result) {
   DCHECK(io_thread_checker_.CalledOnValidThread());
   DCHECK(synchronous_entry_);
   DCHECK_EQ(STATE_IO_PENDING, state_);
@@ -1196,9 +1191,9 @@
     int stream_index,
     int offset,
     const CompletionCallback& completion_callback,
-    scoped_ptr<uint32_t> read_crc32,
-    scoped_ptr<SimpleEntryStat> entry_stat,
-    scoped_ptr<int> result) {
+    std::unique_ptr<uint32_t> read_crc32,
+    std::unique_ptr<SimpleEntryStat> entry_stat,
+    std::unique_ptr<int> result) {
   DCHECK(io_thread_checker_.CalledOnValidThread());
   DCHECK(synchronous_entry_);
   DCHECK_EQ(STATE_IO_PENDING, state_);
@@ -1224,7 +1219,7 @@
 
       net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_CHECKSUM_BEGIN);
 
-      scoped_ptr<int> new_result(new int());
+      std::unique_ptr<int> new_result(new int());
       Closure task = base::Bind(&SimpleSynchronousEntry::CheckEOFRecord,
                                 base::Unretained(synchronous_entry_),
                                 stream_index,
@@ -1266,8 +1261,8 @@
 void SimpleEntryImpl::WriteOperationComplete(
     int stream_index,
     const CompletionCallback& completion_callback,
-    scoped_ptr<SimpleEntryStat> entry_stat,
-    scoped_ptr<int> result) {
+    std::unique_ptr<SimpleEntryStat> entry_stat,
+    std::unique_ptr<int> result) {
   if (*result >= 0)
     RecordWriteResult(cache_type_, WRITE_RESULT_SUCCESS);
   else
@@ -1286,8 +1281,8 @@
 
 void SimpleEntryImpl::ReadSparseOperationComplete(
     const CompletionCallback& completion_callback,
-    scoped_ptr<base::Time> last_used,
-    scoped_ptr<int> result) {
+    std::unique_ptr<base::Time> last_used,
+    std::unique_ptr<int> result) {
   DCHECK(io_thread_checker_.CalledOnValidThread());
   DCHECK(synchronous_entry_);
   DCHECK(result);
@@ -1304,8 +1299,8 @@
 
 void SimpleEntryImpl::WriteSparseOperationComplete(
     const CompletionCallback& completion_callback,
-    scoped_ptr<SimpleEntryStat> entry_stat,
-    scoped_ptr<int> result) {
+    std::unique_ptr<SimpleEntryStat> entry_stat,
+    std::unique_ptr<int> result) {
   DCHECK(io_thread_checker_.CalledOnValidThread());
   DCHECK(synchronous_entry_);
   DCHECK(result);
@@ -1320,7 +1315,7 @@
 
 void SimpleEntryImpl::GetAvailableRangeOperationComplete(
     const CompletionCallback& completion_callback,
-    scoped_ptr<int> result) {
+    std::unique_ptr<int> result) {
   DCHECK(io_thread_checker_.CalledOnValidThread());
   DCHECK(synchronous_entry_);
   DCHECK(result);
@@ -1346,7 +1341,7 @@
     int orig_result,
     int stream_index,
     const CompletionCallback& completion_callback,
-    scoped_ptr<int> result) {
+    std::unique_ptr<int> result) {
   DCHECK(io_thread_checker_.CalledOnValidThread());
   DCHECK(synchronous_entry_);
   DCHECK_EQ(STATE_IO_PENDING, state_);
diff --git a/net/disk_cache/simple/simple_entry_impl.h b/net/disk_cache/simple/simple_entry_impl.h
index 4d41edc..f528bea5 100644
--- a/net/disk_cache/simple/simple_entry_impl.h
+++ b/net/disk_cache/simple/simple_entry_impl.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <queue>
 #include <string>
 
 #include "base/files/file_path.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "net/base/cache_type.h"
 #include "net/base/net_export.h"
@@ -65,7 +65,7 @@
                   net::NetLog* net_log);
 
   void SetActiveEntryProxy(
-      scoped_ptr<ActiveEntryProxy> active_entry_proxy);
+      std::unique_ptr<ActiveEntryProxy> active_entry_proxy);
 
   // Adds another reader/writer to this entry, if possible, returning |this| to
   // |entry|.
@@ -219,7 +219,7 @@
   void CreationOperationComplete(
       const CompletionCallback& completion_callback,
       const base::TimeTicks& start_time,
-      scoped_ptr<SimpleEntryCreationResults> in_results,
+      std::unique_ptr<SimpleEntryCreationResults> in_results,
       Entry** out_entry,
       net::NetLog::EventType end_event_type);
 
@@ -232,35 +232,35 @@
   // |completion_callback| after updating state and dooming on errors.
   void EntryOperationComplete(const CompletionCallback& completion_callback,
                               const SimpleEntryStat& entry_stat,
-                              scoped_ptr<int> result);
+                              std::unique_ptr<int> result);
 
   // Called after an asynchronous read. Updates |crc32s_| if possible.
   void ReadOperationComplete(int stream_index,
                              int offset,
                              const CompletionCallback& completion_callback,
-                             scoped_ptr<uint32_t> read_crc32,
-                             scoped_ptr<SimpleEntryStat> entry_stat,
-                             scoped_ptr<int> result);
+                             std::unique_ptr<uint32_t> read_crc32,
+                             std::unique_ptr<SimpleEntryStat> entry_stat,
+                             std::unique_ptr<int> result);
 
   // Called after an asynchronous write completes.
   void WriteOperationComplete(int stream_index,
                               const CompletionCallback& completion_callback,
-                              scoped_ptr<SimpleEntryStat> entry_stat,
-                              scoped_ptr<int> result);
+                              std::unique_ptr<SimpleEntryStat> entry_stat,
+                              std::unique_ptr<int> result);
 
   void ReadSparseOperationComplete(
       const CompletionCallback& completion_callback,
-      scoped_ptr<base::Time> last_used,
-      scoped_ptr<int> result);
+      std::unique_ptr<base::Time> last_used,
+      std::unique_ptr<int> result);
 
   void WriteSparseOperationComplete(
       const CompletionCallback& completion_callback,
-      scoped_ptr<SimpleEntryStat> entry_stat,
-      scoped_ptr<int> result);
+      std::unique_ptr<SimpleEntryStat> entry_stat,
+      std::unique_ptr<int> result);
 
   void GetAvailableRangeOperationComplete(
       const CompletionCallback& completion_callback,
-      scoped_ptr<int> result);
+      std::unique_ptr<int> result);
 
   // Called after an asynchronous doom completes.
   void DoomOperationComplete(const CompletionCallback& callback,
@@ -270,11 +270,10 @@
   // Called after validating the checksums on an entry. Passes through the
   // original result if successful, propagates the error if the checksum does
   // not validate.
-  void ChecksumOperationComplete(
-      int stream_index,
-      int orig_result,
-      const CompletionCallback& completion_callback,
-      scoped_ptr<int> result);
+  void ChecksumOperationComplete(int stream_index,
+                                 int orig_result,
+                                 const CompletionCallback& completion_callback,
+                                 std::unique_ptr<int> result);
 
   // Called after completion of asynchronous IO and receiving file metadata for
   // the entry in |entry_stat|. Updates the metadata in the entry and in the
@@ -304,7 +303,7 @@
                   int length,
                   int stream_index);
 
-  scoped_ptr<ActiveEntryProxy> active_entry_proxy_;
+  std::unique_ptr<ActiveEntryProxy> active_entry_proxy_;
 
   // All nonstatic SimpleEntryImpl methods should always be called on the IO
   // thread, in all cases. |io_thread_checker_| documents and enforces this.
@@ -366,7 +365,7 @@
 
   net::BoundNetLog net_log_;
 
-  scoped_ptr<SimpleEntryOperation> executing_operation_;
+  std::unique_ptr<SimpleEntryOperation> executing_operation_;
 
   // Unlike other streams, stream 0 data is read from the disk when the entry is
   // opened, and then kept in memory. All read/write operations on stream 0
diff --git a/net/disk_cache/simple/simple_index.cc b/net/disk_cache/simple/simple_index.cc
index f6ccd3e..75c0af36 100644
--- a/net/disk_cache/simple/simple_index.cc
+++ b/net/disk_cache/simple/simple_index.cc
@@ -144,7 +144,7 @@
     const scoped_refptr<base::SingleThreadTaskRunner>& io_thread,
     SimpleIndexDelegate* delegate,
     net::CacheType cache_type,
-    scoped_ptr<SimpleIndexFile> index_file)
+    std::unique_ptr<SimpleIndexFile> index_file)
     : delegate_(delegate),
       cache_type_(cache_type),
       cache_size_(0),
@@ -182,7 +182,7 @@
 #endif
 
   SimpleIndexLoadResult* load_result = new SimpleIndexLoadResult();
-  scoped_ptr<SimpleIndexLoadResult> load_result_scoped(load_result);
+  std::unique_ptr<SimpleIndexLoadResult> load_result_scoped(load_result);
   base::Closure reply = base::Bind(
       &SimpleIndex::MergeInitializingSet,
       AsWeakPtr(),
@@ -208,8 +208,9 @@
   return net::ERR_IO_PENDING;
 }
 
-scoped_ptr<SimpleIndex::HashList> SimpleIndex::GetEntriesBetween(
-    base::Time initial_time, base::Time end_time) {
+std::unique_ptr<SimpleIndex::HashList> SimpleIndex::GetEntriesBetween(
+    base::Time initial_time,
+    base::Time end_time) {
   DCHECK_EQ(true, initialized_);
 
   if (!initial_time.is_null())
@@ -221,7 +222,7 @@
   const base::Time extended_end_time =
       end_time.is_null() ? base::Time::Max() : end_time;
   DCHECK(extended_end_time >= initial_time);
-  scoped_ptr<HashList> ret_hashes(new HashList());
+  std::unique_ptr<HashList> ret_hashes(new HashList());
   for (EntrySet::iterator it = entries_set_.begin(), end = entries_set_.end();
        it != end; ++it) {
     EntryMetadata& metadata = it->second;
@@ -232,7 +233,7 @@
   return ret_hashes;
 }
 
-scoped_ptr<SimpleIndex::HashList> SimpleIndex::GetAllHashes() {
+std::unique_ptr<SimpleIndex::HashList> SimpleIndex::GetAllHashes() {
   return GetEntriesBetween(base::Time(), base::Time());
 }
 
@@ -395,7 +396,7 @@
 }
 
 void SimpleIndex::MergeInitializingSet(
-    scoped_ptr<SimpleIndexLoadResult> load_result) {
+    std::unique_ptr<SimpleIndexLoadResult> load_result) {
   DCHECK(io_thread_checker_.CalledOnValidThread());
   DCHECK(load_result->did_load);
 
diff --git a/net/disk_cache/simple/simple_index.h b/net/disk_cache/simple/simple_index.h
index ed37bd07..1b8d51f6 100644
--- a/net/disk_cache/simple/simple_index.h
+++ b/net/disk_cache/simple/simple_index.h
@@ -8,6 +8,7 @@
 #include <stdint.h>
 
 #include <list>
+#include <memory>
 #include <vector>
 
 #include "base/callback.h"
@@ -15,7 +16,6 @@
 #include "base/files/file_path.h"
 #include "base/gtest_prod_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread_checker.h"
@@ -91,7 +91,7 @@
   SimpleIndex(const scoped_refptr<base::SingleThreadTaskRunner>& io_thread,
               SimpleIndexDelegate* delegate,
               net::CacheType cache_type,
-              scoped_ptr<SimpleIndexFile> simple_index_file);
+              std::unique_ptr<SimpleIndexFile> simple_index_file);
 
   virtual ~SimpleIndex();
 
@@ -130,11 +130,11 @@
   // range between |initial_time| and |end_time| where open intervals are
   // possible according to the definition given in |DoomEntriesBetween()| in the
   // disk cache backend interface.
-  scoped_ptr<HashList> GetEntriesBetween(const base::Time initial_time,
-                                         const base::Time end_time);
+  std::unique_ptr<HashList> GetEntriesBetween(const base::Time initial_time,
+                                              const base::Time end_time);
 
   // Returns the list of all entries key hash.
-  scoped_ptr<HashList> GetAllHashes();
+  std::unique_ptr<HashList> GetAllHashes();
 
   // Returns number of indexed entries.
   int32_t GetEntryCount() const;
@@ -163,12 +163,13 @@
   void UpdateEntryIteratorSize(EntrySet::iterator* it, int64_t entry_size);
 
   // Must run on IO Thread.
-  void MergeInitializingSet(scoped_ptr<SimpleIndexLoadResult> load_result);
+  void MergeInitializingSet(std::unique_ptr<SimpleIndexLoadResult> load_result);
 
 #if defined(OS_ANDROID)
   void OnApplicationStateChange(base::android::ApplicationState state);
 
-  scoped_ptr<base::android::ApplicationStatusListener> app_status_listener_;
+  std::unique_ptr<base::android::ApplicationStatusListener>
+      app_status_listener_;
 #endif
 
   // The owner of |this| must ensure the |delegate_| outlives |this|.
@@ -190,7 +191,7 @@
   bool initialized_;
   IndexInitMethod init_method_;
 
-  scoped_ptr<SimpleIndexFile> index_file_;
+  std::unique_ptr<SimpleIndexFile> index_file_;
 
   scoped_refptr<base::SingleThreadTaskRunner> io_thread_;
 
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index c23d64e6..ad3fe60 100644
--- a/net/disk_cache/simple/simple_index_file.cc
+++ b/net/disk_cache/simple/simple_index_file.cc
@@ -189,7 +189,7 @@
                                       const base::FilePath& cache_directory,
                                       const base::FilePath& index_filename,
                                       const base::FilePath& temp_index_filename,
-                                      scoped_ptr<base::Pickle> pickle,
+                                      std::unique_ptr<base::Pickle> pickle,
                                       const base::TimeTicks& start_time,
                                       bool app_on_background) {
   DCHECK_EQ(index_filename.DirName().value(),
@@ -274,7 +274,7 @@
                                   bool app_on_background,
                                   const base::Closure& callback) {
   IndexMetadata index_metadata(entry_set.size(), cache_size);
-  scoped_ptr<base::Pickle> pickle = Serialize(index_metadata, entry_set);
+  std::unique_ptr<base::Pickle> pickle = Serialize(index_metadata, entry_set);
   base::Closure task =
       base::Bind(&SimpleIndexFile::SyncWriteToDisk,
                  cache_type_, cache_directory_, index_file_, temp_index_file_,
@@ -365,10 +365,10 @@
 }
 
 // static
-scoped_ptr<base::Pickle> SimpleIndexFile::Serialize(
+std::unique_ptr<base::Pickle> SimpleIndexFile::Serialize(
     const SimpleIndexFile::IndexMetadata& index_metadata,
     const SimpleIndex::EntrySet& entries) {
-  scoped_ptr<base::Pickle> pickle(
+  std::unique_ptr<base::Pickle> pickle(
       new base::Pickle(sizeof(SimpleIndexFile::PickleHeader)));
 
   index_metadata.Serialize(pickle.get());
diff --git a/net/disk_cache/simple/simple_index_file.h b/net/disk_cache/simple/simple_index_file.h
index a5db59af..cd980d5 100644
--- a/net/disk_cache/simple/simple_index_file.h
+++ b/net/disk_cache/simple/simple_index_file.h
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -15,7 +16,6 @@
 #include "base/gtest_prod_util.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/pickle.h"
 #include "net/base/cache_type.h"
 #include "net/base/net_export.h"
@@ -122,7 +122,7 @@
   // data to be written to a file. Note: the pickle is not in a consistent state
   // immediately after calling this menthod, one needs to call
   // SerializeFinalData to make it ready to write to a file.
-  static scoped_ptr<base::Pickle> Serialize(
+  static std::unique_ptr<base::Pickle> Serialize(
       const SimpleIndexFile::IndexMetadata& index_metadata,
       const SimpleIndex::EntrySet& entries);
 
@@ -153,7 +153,7 @@
                               const base::FilePath& cache_directory,
                               const base::FilePath& index_filename,
                               const base::FilePath& temp_index_filename,
-                              scoped_ptr<base::Pickle> pickle,
+                              std::unique_ptr<base::Pickle> pickle,
                               const base::TimeTicks& start_time,
                               bool app_on_background);
 
diff --git a/net/disk_cache/simple/simple_index_file_posix.cc b/net/disk_cache/simple/simple_index_file_posix.cc
index 586699d2..e0dd3dd1 100644
--- a/net/disk_cache/simple/simple_index_file_posix.cc
+++ b/net/disk_cache/simple/simple_index_file_posix.cc
@@ -9,10 +9,10 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#include <memory>
 #include <string>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 
 namespace disk_cache {
 namespace {
@@ -21,7 +21,7 @@
   void operator()(DIR* dir) { closedir(dir); }
 };
 
-typedef scoped_ptr<DIR, DirCloser> ScopedDir;
+typedef std::unique_ptr<DIR, DirCloser> ScopedDir;
 
 }  // namespace
 
diff --git a/net/disk_cache/simple/simple_index_file_unittest.cc b/net/disk_cache/simple/simple_index_file_unittest.cc
index 3f1bca5..8e96bb40 100644
--- a/net/disk_cache/simple/simple_index_file_unittest.cc
+++ b/net/disk_cache/simple/simple_index_file_unittest.cc
@@ -2,13 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "net/disk_cache/simple/simple_index_file.h"
+
+#include <memory>
+
 #include "base/files/file.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/hash.h"
 #include "base/location.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/pickle.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
@@ -23,7 +26,6 @@
 #include "net/disk_cache/simple/simple_backend_version.h"
 #include "net/disk_cache/simple/simple_entry_format.h"
 #include "net/disk_cache/simple/simple_index.h"
-#include "net/disk_cache/simple/simple_index_file.h"
 #include "net/disk_cache/simple/simple_util.h"
 #include "net/disk_cache/simple/simple_version_upgrade.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -120,7 +122,7 @@
     SimpleIndex::InsertInEntrySet(hash, metadata_entries[i], &entries);
   }
 
-  scoped_ptr<base::Pickle> pickle =
+  std::unique_ptr<base::Pickle> pickle =
       WrappedSimpleIndexFile::Serialize(index_metadata, entries);
   EXPECT_TRUE(pickle.get() != NULL);
   base::Time now = base::Time::Now();
diff --git a/net/disk_cache/simple/simple_index_unittest.cc b/net/disk_cache/simple/simple_index_unittest.cc
index 649d48f..3776c27e 100644
--- a/net/disk_cache/simple/simple_index_unittest.cc
+++ b/net/disk_cache/simple/simple_index_unittest.cc
@@ -6,12 +6,12 @@
 
 #include <algorithm>
 #include <functional>
+#include <memory>
 #include <utility>
 
 #include "base/files/scoped_temp_dir.h"
 #include "base/hash.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/pickle.h"
 #include "base/sha1.h"
 #include "base/strings/stringprintf.h"
@@ -105,7 +105,7 @@
   }
 
   void SetUp() override {
-    scoped_ptr<MockSimpleIndexFile> index_file(new MockSimpleIndexFile());
+    std::unique_ptr<MockSimpleIndexFile> index_file(new MockSimpleIndexFile());
     index_file_ = index_file->AsWeakPtr();
     index_.reset(
         new SimpleIndex(NULL, this, net::DISK_CACHE, std::move(index_file)));
@@ -161,7 +161,7 @@
   int doom_entries_calls() const { return doom_entries_calls_; }
 
   const simple_util::ImmutableArray<uint64_t, 16> hashes_;
-  scoped_ptr<SimpleIndex> index_;
+  std::unique_ptr<SimpleIndex> index_;
   base::WeakPtr<MockSimpleIndexFile> index_file_;
 
   std::vector<uint64_t> last_doom_entry_hashes_;
@@ -207,13 +207,13 @@
   index()->UpdateEntrySize(hashes_.at<4>(), 4);
   EXPECT_EQ(9U, index()->cache_size_);
   {
-    scoped_ptr<SimpleIndexLoadResult> result(new SimpleIndexLoadResult());
+    std::unique_ptr<SimpleIndexLoadResult> result(new SimpleIndexLoadResult());
     result->did_load = true;
     index()->MergeInitializingSet(std::move(result));
   }
   EXPECT_EQ(9U, index()->cache_size_);
   {
-    scoped_ptr<SimpleIndexLoadResult> result(new SimpleIndexLoadResult());
+    std::unique_ptr<SimpleIndexLoadResult> result(new SimpleIndexLoadResult());
     result->did_load = true;
     const uint64_t new_hash_key = hashes_.at<11>();
     result->entries.insert(
diff --git a/net/disk_cache/simple/simple_net_log_parameters.cc b/net/disk_cache/simple/simple_net_log_parameters.cc
index 46c678c..fe565ef9 100644
--- a/net/disk_cache/simple/simple_net_log_parameters.cc
+++ b/net/disk_cache/simple/simple_net_log_parameters.cc
@@ -17,20 +17,20 @@
 
 namespace {
 
-scoped_ptr<base::Value> NetLogSimpleEntryConstructionCallback(
+std::unique_ptr<base::Value> NetLogSimpleEntryConstructionCallback(
     const disk_cache::SimpleEntryImpl* entry,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("entry_hash",
                   base::StringPrintf("%#016" PRIx64, entry->entry_hash()));
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSimpleEntryCreationCallback(
+std::unique_ptr<base::Value> NetLogSimpleEntryCreationCallback(
     const disk_cache::SimpleEntryImpl* entry,
     int net_error,
     net::NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("net_error", net_error);
   if (net_error == net::OK)
     dict->SetString("key", entry->key());
diff --git a/net/disk_cache/simple/simple_synchronous_entry.cc b/net/disk_cache/simple/simple_synchronous_entry.cc
index 220f6a8..d68e426 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.cc
+++ b/net/disk_cache/simple/simple_synchronous_entry.cc
@@ -640,7 +640,7 @@
 
 void SimpleSynchronousEntry::Close(
     const SimpleEntryStat& entry_stat,
-    scoped_ptr<std::vector<CRCRecord> > crc32s_to_write,
+    std::unique_ptr<std::vector<CRCRecord>> crc32s_to_write,
     net::GrowableIOBuffer* stream_0_data) {
   DCHECK(stream_0_data);
   // Write stream 0 data.
@@ -955,7 +955,7 @@
       return net::ERR_FAILED;
     }
 
-    scoped_ptr<char[]> key(new char[header.key_length]);
+    std::unique_ptr<char[]> key(new char[header.key_length]);
     int key_read_result = files_[i].Read(sizeof(header), key.get(),
                                          header.key_length);
     if (key_read_result != base::checked_cast<int>(header.key_length)) {
diff --git a/net/disk_cache/simple/simple_synchronous_entry.h b/net/disk_cache/simple/simple_synchronous_entry.h
index 963f665b..629be76 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.h
+++ b/net/disk_cache/simple/simple_synchronous_entry.h
@@ -9,6 +9,7 @@
 
 #include <algorithm>
 #include <map>
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
@@ -16,7 +17,6 @@
 #include "base/files/file.h"
 #include "base/files/file_path.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/cache_type.h"
 #include "net/base/net_export.h"
@@ -176,7 +176,7 @@
   // Close all streams, and add write EOF records to streams indicated by the
   // CRCRecord entries in |crc32s_to_write|.
   void Close(const SimpleEntryStat& entry_stat,
-             scoped_ptr<std::vector<CRCRecord> > crc32s_to_write,
+             std::unique_ptr<std::vector<CRCRecord>> crc32s_to_write,
              net::GrowableIOBuffer* stream_0_data);
 
   const base::FilePath& path() const { return path_; }
diff --git a/net/dns/address_sorter.h b/net/dns/address_sorter.h
index 31115a6..14a7d23 100644
--- a/net/dns/address_sorter.h
+++ b/net/dns/address_sorter.h
@@ -5,9 +5,10 @@
 #ifndef NET_DNS_ADDRESS_SORTER_H_
 #define NET_DNS_ADDRESS_SORTER_H_
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
@@ -32,7 +33,7 @@
                     const CallbackType& callback) const = 0;
 
   // Creates platform-dependent AddressSorter.
-  static scoped_ptr<AddressSorter> CreateAddressSorter();
+  static std::unique_ptr<AddressSorter> CreateAddressSorter();
 
  protected:
   AddressSorter() {}
diff --git a/net/dns/address_sorter_posix.cc b/net/dns/address_sorter_posix.cc
index 479748a..38a7d74d 100644
--- a/net/dns/address_sorter_posix.cc
+++ b/net/dns/address_sorter_posix.cc
@@ -5,6 +5,8 @@
 #include "net/dns/address_sorter_posix.h"
 
 #include <netinet/in.h>
+
+#include <memory>
 #include <utility>
 
 #if defined(OS_MACOSX) || defined(OS_BSD)
@@ -20,7 +22,6 @@
 #include <vector>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_errors.h"
 #include "net/socket/client_socket_factory.h"
 #include "net/udp/datagram_client_socket.h"
@@ -184,8 +185,8 @@
 
 // Returns true iff |dst_a| should precede |dst_b| in the address list.
 // RFC 3484, section 6.
-bool CompareDestinations(const scoped_ptr<DestinationInfo>& dst_a,
-                         const scoped_ptr<DestinationInfo>& dst_b) {
+bool CompareDestinations(const std::unique_ptr<DestinationInfo>& dst_a,
+                         const std::unique_ptr<DestinationInfo>& dst_b) {
   // Rule 1: Avoid unusable destinations.
   // Unusable destinations are already filtered out.
   DCHECK(dst_a->src);
@@ -255,21 +256,19 @@
 void AddressSorterPosix::Sort(const AddressList& list,
                               const CallbackType& callback) const {
   DCHECK(CalledOnValidThread());
-  std::vector<scoped_ptr<DestinationInfo>> sort_list;
+  std::vector<std::unique_ptr<DestinationInfo>> sort_list;
 
   for (size_t i = 0; i < list.size(); ++i) {
-    scoped_ptr<DestinationInfo> info(new DestinationInfo());
+    std::unique_ptr<DestinationInfo> info(new DestinationInfo());
     info->address = list[i].address();
     info->scope = GetScope(ipv4_scope_table_, info->address);
     info->precedence = GetPolicyValue(precedence_table_, info->address);
     info->label = GetPolicyValue(label_table_, info->address);
 
     // Each socket can only be bound once.
-    scoped_ptr<DatagramClientSocket> socket(
+    std::unique_ptr<DatagramClientSocket> socket(
         socket_factory_->CreateDatagramClientSocket(
-            DatagramSocket::DEFAULT_BIND,
-            RandIntCallback(),
-            NULL /* NetLog */,
+            DatagramSocket::DEFAULT_BIND, RandIntCallback(), NULL /* NetLog */,
             NetLog::Source()));
 
     // Even though no packets are sent, cannot use port 0 in Connect.
@@ -391,8 +390,8 @@
 }
 
 // static
-scoped_ptr<AddressSorter> AddressSorter::CreateAddressSorter() {
-  return scoped_ptr<AddressSorter>(
+std::unique_ptr<AddressSorter> AddressSorter::CreateAddressSorter() {
+  return std::unique_ptr<AddressSorter>(
       new AddressSorterPosix(ClientSocketFactory::GetDefaultFactory()));
 }
 
diff --git a/net/dns/address_sorter_posix_unittest.cc b/net/dns/address_sorter_posix_unittest.cc
index b3728291..1f3df9ff 100644
--- a/net/dns/address_sorter_posix_unittest.cc
+++ b/net/dns/address_sorter_posix_unittest.cc
@@ -100,28 +100,29 @@
   TestSocketFactory() {}
   ~TestSocketFactory() override {}
 
-  scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+  std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket(
       DatagramSocket::BindType,
       const RandIntCallback&,
       NetLog*,
       const NetLog::Source&) override {
-    return scoped_ptr<DatagramClientSocket>(new TestUDPClientSocket(&mapping_));
+    return std::unique_ptr<DatagramClientSocket>(
+        new TestUDPClientSocket(&mapping_));
   }
-  scoped_ptr<StreamSocket> CreateTransportClientSocket(
+  std::unique_ptr<StreamSocket> CreateTransportClientSocket(
       const AddressList&,
-      scoped_ptr<SocketPerformanceWatcher>,
+      std::unique_ptr<SocketPerformanceWatcher>,
       NetLog*,
       const NetLog::Source&) override {
     NOTIMPLEMENTED();
-    return scoped_ptr<StreamSocket>();
+    return std::unique_ptr<StreamSocket>();
   }
-  scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
-      scoped_ptr<ClientSocketHandle>,
+  std::unique_ptr<SSLClientSocket> CreateSSLClientSocket(
+      std::unique_ptr<ClientSocketHandle>,
       const HostPortPair&,
       const SSLConfig&,
       const SSLClientSocketContext&) override {
     NOTIMPLEMENTED();
-    return scoped_ptr<SSLClientSocket>();
+    return std::unique_ptr<SSLClientSocket>();
   }
   void ClearSSLSessionCache() override { NOTIMPLEMENTED(); }
 
diff --git a/net/dns/address_sorter_unittest.cc b/net/dns/address_sorter_unittest.cc
index ec27a2f9..6c02399 100644
--- a/net/dns/address_sorter_unittest.cc
+++ b/net/dns/address_sorter_unittest.cc
@@ -48,7 +48,7 @@
     closesocket(sock);
   }
 #endif
-  scoped_ptr<AddressSorter> sorter(AddressSorter::CreateAddressSorter());
+  std::unique_ptr<AddressSorter> sorter(AddressSorter::CreateAddressSorter());
   AddressList list;
   list.push_back(MakeEndPoint("10.0.0.1"));
   list.push_back(MakeEndPoint("8.8.8.8"));
diff --git a/net/dns/address_sorter_win.cc b/net/dns/address_sorter_win.cc
index 2323698..53645b4 100644
--- a/net/dns/address_sorter_win.cc
+++ b/net/dns/address_sorter_win.cc
@@ -129,8 +129,8 @@
 
     const CallbackType callback_;
     const size_t buffer_size_;
-    scoped_ptr<SOCKET_ADDRESS_LIST, base::FreeDeleter> input_buffer_;
-    scoped_ptr<SOCKET_ADDRESS_LIST, base::FreeDeleter> output_buffer_;
+    std::unique_ptr<SOCKET_ADDRESS_LIST, base::FreeDeleter> input_buffer_;
+    std::unique_ptr<SOCKET_ADDRESS_LIST, base::FreeDeleter> output_buffer_;
     bool success_;
 
     DISALLOW_COPY_AND_ASSIGN(Job);
@@ -193,10 +193,10 @@
 }  // namespace
 
 // static
-scoped_ptr<AddressSorter> AddressSorter::CreateAddressSorter() {
+std::unique_ptr<AddressSorter> AddressSorter::CreateAddressSorter() {
   if (base::win::GetVersion() < base::win::VERSION_VISTA)
-    return scoped_ptr<AddressSorter>(new AddressSorterWinXP());
-  return scoped_ptr<AddressSorter>(new AddressSorterWin());
+    return std::unique_ptr<AddressSorter>(new AddressSorterWinXP());
+  return std::unique_ptr<AddressSorter>(new AddressSorterWin());
 }
 
 }  // namespace net
diff --git a/net/dns/dns_client.cc b/net/dns/dns_client.cc
index a9531523..5cf0c45 100644
--- a/net/dns/dns_client.cc
+++ b/net/dns/dns_client.cc
@@ -31,7 +31,7 @@
     session_ = NULL;
     if (config.IsValid() && !config.unhandled_options) {
       ClientSocketFactory* factory = ClientSocketFactory::GetDefaultFactory();
-      scoped_ptr<DnsSocketPool> socket_pool(
+      std::unique_ptr<DnsSocketPool> socket_pool(
           config.randomize_ports ? DnsSocketPool::CreateDefault(factory)
                                  : DnsSocketPool::CreateNull(factory));
       session_ = new DnsSession(config, std::move(socket_pool),
@@ -52,8 +52,8 @@
 
  private:
   scoped_refptr<DnsSession> session_;
-  scoped_ptr<DnsTransactionFactory> factory_;
-  scoped_ptr<AddressSorter> address_sorter_;
+  std::unique_ptr<DnsTransactionFactory> factory_;
+  std::unique_ptr<AddressSorter> address_sorter_;
 
   NetLog* net_log_;
 };
@@ -61,8 +61,8 @@
 }  // namespace
 
 // static
-scoped_ptr<DnsClient> DnsClient::CreateClient(NetLog* net_log) {
-  return scoped_ptr<DnsClient>(new DnsClientImpl(net_log));
+std::unique_ptr<DnsClient> DnsClient::CreateClient(NetLog* net_log) {
+  return std::unique_ptr<DnsClient>(new DnsClientImpl(net_log));
 }
 
 }  // namespace net
diff --git a/net/dns/dns_client.h b/net/dns/dns_client.h
index 0484d44..01d024b 100644
--- a/net/dns/dns_client.h
+++ b/net/dns/dns_client.h
@@ -5,7 +5,8 @@
 #ifndef NET_DNS_DNS_CLIENT_H_
 #define NET_DNS_DNS_CLIENT_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/base/net_export.h"
 
 namespace net {
@@ -36,7 +37,7 @@
   virtual AddressSorter* GetAddressSorter() = 0;
 
   // Creates default client.
-  static scoped_ptr<DnsClient> CreateClient(NetLog* net_log);
+  static std::unique_ptr<DnsClient> CreateClient(NetLog* net_log);
 };
 
 }  // namespace net
diff --git a/net/dns/dns_config_service.cc b/net/dns/dns_config_service.cc
index e30ed7a..9661850 100644
--- a/net/dns/dns_config_service.cc
+++ b/net/dns/dns_config_service.cc
@@ -59,8 +59,8 @@
   use_local_ipv6 = d.use_local_ipv6;
 }
 
-scoped_ptr<base::Value> DnsConfig::ToValue() const {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+std::unique_ptr<base::Value> DnsConfig::ToValue() const {
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   base::ListValue* list = new base::ListValue();
   for (size_t i = 0; i < nameservers.size(); ++i)
diff --git a/net/dns/dns_config_service.h b/net/dns/dns_config_service.h
index e62a5af..5c37226 100644
--- a/net/dns/dns_config_service.h
+++ b/net/dns/dns_config_service.h
@@ -6,11 +6,11 @@
 #define NET_DNS_DNS_CONFIG_SERVICE_H_
 
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/threading/non_thread_safe.h"
 #include "base/time/time.h"
@@ -47,7 +47,7 @@
 
   // Returns a Value representation of |this|. For performance reasons, the
   // Value only contains the number of hosts rather than the full list.
-  scoped_ptr<base::Value> ToValue() const;
+  std::unique_ptr<base::Value> ToValue() const;
 
   bool IsValid() const {
     return !nameservers.empty();
@@ -102,7 +102,7 @@
   typedef base::Callback<void(const DnsConfig& config)> CallbackType;
 
   // Creates the platform-specific DnsConfigService.
-  static scoped_ptr<DnsConfigService> CreateSystemService();
+  static std::unique_ptr<DnsConfigService> CreateSystemService();
 
   DnsConfigService();
   virtual ~DnsConfigService();
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
index b12b019..efb2712 100644
--- a/net/dns/dns_config_service_posix.cc
+++ b/net/dns/dns_config_service_posix.cc
@@ -4,6 +4,7 @@
 
 #include "net/dns/dns_config_service_posix.h"
 
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
@@ -13,7 +14,6 @@
 #include "base/lazy_instance.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
@@ -315,7 +315,7 @@
   // on worker thread.
   DnsConfigServicePosix* const service_;
   // Dns config value to always return for testing.
-  scoped_ptr<const DnsConfig> dns_config_for_testing_;
+  std::unique_ptr<const DnsConfig> dns_config_for_testing_;
   // Written in DoWork, read in OnWorkFinished, no locking necessary.
   DnsConfig dns_config_;
   bool success_;
@@ -585,8 +585,9 @@
 }  // namespace internal
 
 // static
-scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() {
-  return scoped_ptr<DnsConfigService>(new internal::DnsConfigServicePosix());
+std::unique_ptr<DnsConfigService> DnsConfigService::CreateSystemService() {
+  return std::unique_ptr<DnsConfigService>(
+      new internal::DnsConfigServicePosix());
 }
 
 }  // namespace net
diff --git a/net/dns/dns_config_service_posix.h b/net/dns/dns_config_service_posix.h
index 18cb5a0..69e00e9c 100644
--- a/net/dns/dns_config_service_posix.h
+++ b/net/dns/dns_config_service_posix.h
@@ -64,7 +64,7 @@
   void OnConfigChanged(bool succeeded);
   void OnHostsChanged(bool succeeded);
 
-  scoped_ptr<Watcher> watcher_;
+  std::unique_ptr<Watcher> watcher_;
   // Allow a mock hosts file for testing purposes.
   const base::FilePath::CharType* file_path_hosts_;
   // Allow a mock DNS server for testing purposes.
diff --git a/net/dns/dns_config_service_posix_unittest.cc b/net/dns/dns_config_service_posix_unittest.cc
index 38c5cb6..749d2b1 100644
--- a/net/dns/dns_config_service_posix_unittest.cc
+++ b/net/dns/dns_config_service_posix_unittest.cc
@@ -179,7 +179,7 @@
 TEST(DnsConfigServicePosixTest, DestroyWhileJobsWorking) {
   // Regression test to verify crash does not occur if DnsConfigServicePosix
   // instance is destroyed while SerialWorker jobs have posted to worker pool.
-  scoped_ptr<internal::DnsConfigServicePosix> service(
+  std::unique_ptr<internal::DnsConfigServicePosix> service(
       new internal::DnsConfigServicePosix());
   service->ReadConfig(base::Bind(&DummyConfigCallback));
   service.reset();
@@ -270,7 +270,7 @@
   bool seen_config_;
   base::Time creation_time_;
   base::FilePath temp_file_;
-  scoped_ptr<DnsConfigServicePosix> service_;
+  std::unique_ptr<DnsConfigServicePosix> service_;
   DnsConfig test_config_;
 };
 
diff --git a/net/dns/dns_config_service_unittest.cc b/net/dns/dns_config_service_unittest.cc
index ae8e5f6..5436aa9 100644
--- a/net/dns/dns_config_service_unittest.cc
+++ b/net/dns/dns_config_service_unittest.cc
@@ -4,10 +4,11 @@
 
 #include "net/dns/dns_config_service.h"
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/cancelable_callback.h"
 #include "base/location.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_split.h"
@@ -98,7 +99,7 @@
   bool quit_on_config_;
 
   // Service under test.
-  scoped_ptr<TestDnsConfigService> service_;
+  std::unique_ptr<TestDnsConfigService> service_;
 };
 
 }  // namespace
diff --git a/net/dns/dns_config_service_win.cc b/net/dns/dns_config_service_win.cc
index 546c78f..a8fd56b 100644
--- a/net/dns/dns_config_service_win.cc
+++ b/net/dns/dns_config_service_win.cc
@@ -5,6 +5,7 @@
 #include "net/dns/dns_config_service_win.h"
 
 #include <algorithm>
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
@@ -15,7 +16,6 @@
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/free_deleter.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
@@ -113,10 +113,11 @@
 };
 
 // Wrapper for GetAdaptersAddresses. Returns NULL if failed.
-scoped_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> ReadIpHelper(ULONG flags) {
+std::unique_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> ReadIpHelper(
+    ULONG flags) {
   base::ThreadRestrictions::AssertIOAllowed();
 
-  scoped_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> out;
+  std::unique_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> out;
   ULONG len = 15000;  // As recommended by MSDN for GetAdaptersAddresses.
   UINT rv = ERROR_BUFFER_OVERFLOW;
   // Try up to three times.
@@ -246,11 +247,9 @@
   if (have_ipv4 && have_ipv6)
     return HOSTS_PARSE_WIN_OK;
 
-  scoped_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> addresses =
-      ReadIpHelper(GAA_FLAG_SKIP_ANYCAST |
-                   GAA_FLAG_SKIP_DNS_SERVER |
-                   GAA_FLAG_SKIP_MULTICAST |
-                   GAA_FLAG_SKIP_FRIENDLY_NAME);
+  std::unique_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> addresses =
+      ReadIpHelper(GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_DNS_SERVER |
+                   GAA_FLAG_SKIP_MULTICAST | GAA_FLAG_SKIP_FRIENDLY_NAME);
   if (!addresses.get())
     return HOSTS_PARSE_WIN_IPHELPER_FAILED;
 
@@ -771,8 +770,8 @@
 }  // namespace internal
 
 // static
-scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() {
-  return scoped_ptr<DnsConfigService>(new internal::DnsConfigServiceWin());
+std::unique_ptr<DnsConfigService> DnsConfigService::CreateSystemService() {
+  return std::unique_ptr<DnsConfigService>(new internal::DnsConfigServiceWin());
 }
 
 }  // namespace net
diff --git a/net/dns/dns_config_service_win.h b/net/dns/dns_config_service_win.h
index 0485afd..47a1c05 100644
--- a/net/dns/dns_config_service_win.h
+++ b/net/dns/dns_config_service_win.h
@@ -10,13 +10,13 @@
 #include <winsock2.h>
 #include <iphlpapi.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/free_deleter.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "net/base/net_export.h"
 #include "net/dns/dns_config_service.h"
@@ -70,7 +70,7 @@
 
   // Filled in by GetAdapterAddresses. Note that the alternative
   // GetNetworkParams does not include IPv6 addresses.
-  scoped_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> addresses;
+  std::unique_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> addresses;
 
   // SOFTWARE\Policies\Microsoft\Windows NT\DNSClient\SearchList
   RegString policy_search_list;
@@ -136,7 +136,7 @@
   void OnConfigChanged(bool succeeded);
   void OnHostsChanged(bool succeeded);
 
-  scoped_ptr<Watcher> watcher_;
+  std::unique_ptr<Watcher> watcher_;
   scoped_refptr<ConfigReader> config_reader_;
   scoped_refptr<HostsReader> hosts_reader_;
 
diff --git a/net/dns/dns_config_service_win_unittest.cc b/net/dns/dns_config_service_win_unittest.cc
index 30bd418..00d27db 100644
--- a/net/dns/dns_config_service_win_unittest.cc
+++ b/net/dns/dns_config_service_win_unittest.cc
@@ -56,7 +56,7 @@
   uint16_t ports[4];
 };
 
-scoped_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> CreateAdapterAddresses(
+std::unique_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> CreateAdapterAddresses(
     const AdapterInfo* infos) {
   size_t num_adapters = 0;
   size_t num_addresses = 0;
@@ -70,7 +70,7 @@
   size_t heap_size = num_adapters * sizeof(IP_ADAPTER_ADDRESSES) +
                      num_addresses * (sizeof(IP_ADAPTER_DNS_SERVER_ADDRESS) +
                                       sizeof(struct sockaddr_storage));
-  scoped_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> heap(
+  std::unique_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> heap(
       static_cast<IP_ADAPTER_ADDRESSES*>(malloc(heap_size)));
   CHECK(heap.get());
   memset(heap.get(), 0, heap_size);
diff --git a/net/dns/dns_config_watcher_mac.cc b/net/dns/dns_config_watcher_mac.cc
index 0139472c..64d833ac 100644
--- a/net/dns/dns_config_watcher_mac.cc
+++ b/net/dns/dns_config_watcher_mac.cc
@@ -81,7 +81,7 @@
 ConfigParsePosixResult DnsConfigWatcher::CheckDnsConfig() {
   if (!GetDnsInfoApi().dns_configuration_copy)
     return CONFIG_PARSE_POSIX_NO_DNSINFO;
-  scoped_ptr<dns_config_t, DnsConfigTDeleter> dns_config(
+  std::unique_ptr<dns_config_t, DnsConfigTDeleter> dns_config(
       GetDnsInfoApi().dns_configuration_copy());
   if (!dns_config)
     return CONFIG_PARSE_POSIX_NO_DNSINFO;
diff --git a/net/dns/dns_query.cc b/net/dns/dns_query.cc
index b5ebd46..aa9bc70 100644
--- a/net/dns/dns_query.cc
+++ b/net/dns/dns_query.cc
@@ -5,6 +5,7 @@
 #include "net/dns/dns_query.h"
 
 #include "base/big_endian.h"
+#include "base/memory/ptr_util.h"
 #include "base/sys_byteorder.h"
 #include "net/base/io_buffer.h"
 #include "net/dns/dns_protocol.h"
@@ -38,8 +39,8 @@
 DnsQuery::~DnsQuery() {
 }
 
-scoped_ptr<DnsQuery> DnsQuery::CloneWithNewId(uint16_t id) const {
-  return make_scoped_ptr(new DnsQuery(*this, id));
+std::unique_ptr<DnsQuery> DnsQuery::CloneWithNewId(uint16_t id) const {
+  return base::WrapUnique(new DnsQuery(*this, id));
 }
 
 uint16_t DnsQuery::id() const {
diff --git a/net/dns/dns_query.h b/net/dns/dns_query.h
index 8547570a..8266a72 100644
--- a/net/dns/dns_query.h
+++ b/net/dns/dns_query.h
@@ -8,9 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/net_export.h"
 
@@ -32,7 +33,7 @@
   ~DnsQuery();
 
   // Clones |this| verbatim, with ID field of the header set to |id|.
-  scoped_ptr<DnsQuery> CloneWithNewId(uint16_t id) const;
+  std::unique_ptr<DnsQuery> CloneWithNewId(uint16_t id) const;
 
   // DnsQuery field accessors.
   uint16_t id() const;
diff --git a/net/dns/dns_query_unittest.cc b/net/dns/dns_query_unittest.cc
index 2a4648e2..775fb6c7 100644
--- a/net/dns/dns_query_unittest.cc
+++ b/net/dns/dns_query_unittest.cc
@@ -50,7 +50,7 @@
 
   DnsQuery q1(0, qname, dns_protocol::kTypeA);
   EXPECT_EQ(0, q1.id());
-  scoped_ptr<DnsQuery> q2 = q1.CloneWithNewId(42);
+  std::unique_ptr<DnsQuery> q2 = q1.CloneWithNewId(42);
   EXPECT_EQ(42, q2->id());
   EXPECT_EQ(q1.io_buffer()->size(), q2->io_buffer()->size());
   EXPECT_EQ(q1.qtype(), q2->qtype());
diff --git a/net/dns/dns_response_unittest.cc b/net/dns/dns_response_unittest.cc
index 46f50ed..5b0635c 100644
--- a/net/dns/dns_response_unittest.cc
+++ b/net/dns/dns_response_unittest.cc
@@ -151,7 +151,8 @@
   const char qname_data[] = "\x0A""codereview""\x08""chromium""\x03""org";
   const base::StringPiece qname(qname_data, sizeof(qname_data));
   // Compilers want to copy when binding temporary to const &, so must use heap.
-  scoped_ptr<DnsQuery> query(new DnsQuery(0xcafe, qname, dns_protocol::kTypeA));
+  std::unique_ptr<DnsQuery> query(
+      new DnsQuery(0xcafe, qname, dns_protocol::kTypeA));
 
   const uint8_t response_data[] = {
       // Header
@@ -197,12 +198,12 @@
   EXPECT_FALSE(resp.IsValid());
 
   // Reject wrong id.
-  scoped_ptr<DnsQuery> other_query = query->CloneWithNewId(0xbeef);
+  std::unique_ptr<DnsQuery> other_query = query->CloneWithNewId(0xbeef);
   EXPECT_FALSE(resp.InitParse(sizeof(response_data), *other_query));
   EXPECT_FALSE(resp.IsValid());
 
   // Reject wrong question.
-  scoped_ptr<DnsQuery> wrong_query(
+  std::unique_ptr<DnsQuery> wrong_query(
       new DnsQuery(0xcafe, qname, dns_protocol::kTypeCNAME));
   EXPECT_FALSE(resp.InitParse(sizeof(response_data), *wrong_query));
   EXPECT_FALSE(resp.IsValid());
diff --git a/net/dns/dns_session.cc b/net/dns/dns_session.cc
index 6a43eb0..82b947e1 100644
--- a/net/dns/dns_session.cc
+++ b/net/dns/dns_session.cc
@@ -5,12 +5,14 @@
 #include "net/dns/dns_session.h"
 
 #include <stdint.h>
+
 #include <limits>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/lazy_instance.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/sample_vector.h"
@@ -70,7 +72,7 @@
   base::TimeDelta rtt_deviation;
 
   // A histogram of observed RTT .
-  scoped_ptr<base::SampleVector> rtt_histogram;
+  std::unique_ptr<base::SampleVector> rtt_histogram;
 
   DISALLOW_COPY_AND_ASSIGN(ServerStats);
 };
@@ -83,9 +85,10 @@
   base::Histogram::InitializeBucketRanges(1, kRTTMaxMs, this);
 }
 
-DnsSession::SocketLease::SocketLease(scoped_refptr<DnsSession> session,
-                                     unsigned server_index,
-                                     scoped_ptr<DatagramClientSocket> socket)
+DnsSession::SocketLease::SocketLease(
+    scoped_refptr<DnsSession> session,
+    unsigned server_index,
+    std::unique_ptr<DatagramClientSocket> socket)
     : session_(session),
       server_index_(server_index),
       socket_(std::move(socket)) {}
@@ -95,7 +98,7 @@
 }
 
 DnsSession::DnsSession(const DnsConfig& config,
-                       scoped_ptr<DnsSocketPool> socket_pool,
+                       std::unique_ptr<DnsSocketPool> socket_pool,
                        const RandIntCallback& rand_int_callback,
                        NetLog* net_log)
     : config_(config),
@@ -129,7 +132,7 @@
 void DnsSession::InitializeServerStats() {
   server_stats_.clear();
   for (size_t i = 0; i < config_.nameservers.size(); ++i) {
-    server_stats_.push_back(make_scoped_ptr(
+    server_stats_.push_back(base::WrapUnique(
         new ServerStats(initial_timeout_, rtt_buckets_.Pointer())));
   }
 }
@@ -264,29 +267,31 @@
 }
 
 // Allocate a socket, already connected to the server address.
-scoped_ptr<DnsSession::SocketLease> DnsSession::AllocateSocket(
-    unsigned server_index, const NetLog::Source& source) {
-  scoped_ptr<DatagramClientSocket> socket;
+std::unique_ptr<DnsSession::SocketLease> DnsSession::AllocateSocket(
+    unsigned server_index,
+    const NetLog::Source& source) {
+  std::unique_ptr<DatagramClientSocket> socket;
 
   socket = socket_pool_->AllocateSocket(server_index);
   if (!socket.get())
-    return scoped_ptr<SocketLease>();
+    return std::unique_ptr<SocketLease>();
 
   socket->NetLog().BeginEvent(NetLog::TYPE_SOCKET_IN_USE,
                               source.ToEventParametersCallback());
 
   SocketLease* lease = new SocketLease(this, server_index, std::move(socket));
-  return scoped_ptr<SocketLease>(lease);
+  return std::unique_ptr<SocketLease>(lease);
 }
 
-scoped_ptr<StreamSocket> DnsSession::CreateTCPSocket(
-    unsigned server_index, const NetLog::Source& source) {
+std::unique_ptr<StreamSocket> DnsSession::CreateTCPSocket(
+    unsigned server_index,
+    const NetLog::Source& source) {
   return socket_pool_->CreateTCPSocket(server_index, source);
 }
 
 // Release a socket.
 void DnsSession::FreeSocket(unsigned server_index,
-                            scoped_ptr<DatagramClientSocket> socket) {
+                            std::unique_ptr<DatagramClientSocket> socket) {
   DCHECK(socket.get());
 
   socket->NetLog().EndEvent(NetLog::TYPE_SOCKET_IN_USE);
diff --git a/net/dns/dns_session.h b/net/dns/dns_session.h
index b401a64..43228e4 100644
--- a/net/dns/dns_session.h
+++ b/net/dns/dns_session.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/lazy_instance.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/metrics/bucket_ranges.h"
 #include "base/time/time.h"
 #include "net/base/net_export.h"
@@ -46,7 +46,7 @@
    public:
     SocketLease(scoped_refptr<DnsSession> session,
                 unsigned server_index,
-                scoped_ptr<DatagramClientSocket> socket);
+                std::unique_ptr<DatagramClientSocket> socket);
     ~SocketLease();
 
     unsigned server_index() const { return server_index_; }
@@ -56,13 +56,13 @@
    private:
     scoped_refptr<DnsSession> session_;
     unsigned server_index_;
-    scoped_ptr<DatagramClientSocket> socket_;
+    std::unique_ptr<DatagramClientSocket> socket_;
 
     DISALLOW_COPY_AND_ASSIGN(SocketLease);
   };
 
   DnsSession(const DnsConfig& config,
-             scoped_ptr<DnsSocketPool> socket_pool,
+             std::unique_ptr<DnsSocketPool> socket_pool,
              const RandIntCallback& rand_int_callback,
              NetLog* net_log);
 
@@ -102,13 +102,13 @@
 
   // Allocate a socket, already connected to the server address.
   // When the SocketLease is destroyed, the socket will be freed.
-  scoped_ptr<SocketLease> AllocateSocket(unsigned server_index,
-                                         const NetLog::Source& source);
+  std::unique_ptr<SocketLease> AllocateSocket(unsigned server_index,
+                                              const NetLog::Source& source);
 
   // Creates a StreamSocket from the factory for a transaction over TCP. These
   // sockets are not pooled.
-  scoped_ptr<StreamSocket> CreateTCPSocket(unsigned server_index,
-                                           const NetLog::Source& source);
+  std::unique_ptr<StreamSocket> CreateTCPSocket(unsigned server_index,
+                                                const NetLog::Source& source);
 
  private:
   friend class base::RefCounted<DnsSession>;
@@ -119,7 +119,7 @@
 
   // Release a socket.
   void FreeSocket(unsigned server_index,
-                  scoped_ptr<DatagramClientSocket> socket);
+                  std::unique_ptr<DatagramClientSocket> socket);
 
   // Return the timeout using the TCP timeout method.
   base::TimeDelta NextTimeoutFromJacobson(unsigned server_index, int attempt);
@@ -132,7 +132,7 @@
       NetworkChangeNotifier::ConnectionType type) override;
 
   const DnsConfig config_;
-  scoped_ptr<DnsSocketPool> socket_pool_;
+  std::unique_ptr<DnsSocketPool> socket_pool_;
   RandCallback rand_callback_;
   NetLog* net_log_;
 
@@ -145,7 +145,7 @@
   struct ServerStats;
 
   // Track runtime statistics of each DNS server.
-  std::vector<scoped_ptr<ServerStats>> server_stats_;
+  std::vector<std::unique_ptr<ServerStats>> server_stats_;
 
   // Buckets shared for all |ServerStats::rtt_histogram|.
   struct RttBuckets : public base::BucketRanges {
diff --git a/net/dns/dns_session_unittest.cc b/net/dns/dns_session_unittest.cc
index 5d9006c..6eabefb 100644
--- a/net/dns/dns_session_unittest.cc
+++ b/net/dns/dns_session_unittest.cc
@@ -5,10 +5,10 @@
 #include "net/dns/dns_session.h"
 
 #include <list>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/rand_util.h"
 #include "base/stl_util.h"
 #include "net/base/ip_address.h"
@@ -29,28 +29,28 @@
  public:
   ~TestClientSocketFactory() override;
 
-  scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+  std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket(
       DatagramSocket::BindType bind_type,
       const RandIntCallback& rand_int_cb,
       NetLog* net_log,
       const NetLog::Source& source) override;
 
-  scoped_ptr<StreamSocket> CreateTransportClientSocket(
+  std::unique_ptr<StreamSocket> CreateTransportClientSocket(
       const AddressList& addresses,
-      scoped_ptr<SocketPerformanceWatcher>,
+      std::unique_ptr<SocketPerformanceWatcher>,
       NetLog*,
       const NetLog::Source&) override {
     NOTIMPLEMENTED();
-    return scoped_ptr<StreamSocket>();
+    return std::unique_ptr<StreamSocket>();
   }
 
-  scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
-      scoped_ptr<ClientSocketHandle> transport_socket,
+  std::unique_ptr<SSLClientSocket> CreateSSLClientSocket(
+      std::unique_ptr<ClientSocketHandle> transport_socket,
       const HostPortPair& host_and_port,
       const SSLConfig& ssl_config,
       const SSLClientSocketContext& context) override {
     NOTIMPLEMENTED();
-    return scoped_ptr<SSLClientSocket>();
+    return std::unique_ptr<SSLClientSocket>();
   }
 
   void ClearSSLSessionCache() override { NOTIMPLEMENTED(); }
@@ -71,13 +71,13 @@
 
  protected:
   void Initialize(unsigned num_servers);
-  scoped_ptr<DnsSession::SocketLease> Allocate(unsigned server_index);
+  std::unique_ptr<DnsSession::SocketLease> Allocate(unsigned server_index);
   bool DidAllocate(unsigned server_index);
   bool DidFree(unsigned server_index);
   bool NoMoreEvents();
 
   DnsConfig config_;
-  scoped_ptr<TestClientSocketFactory> test_client_socket_factory_;
+  std::unique_ptr<TestClientSocketFactory> test_client_socket_factory_;
   scoped_refptr<DnsSession> session_;
   NetLog::Source source_;
 
@@ -98,14 +98,14 @@
     InitializeInternal(nameservers, net_log);
   }
 
-  scoped_ptr<DatagramClientSocket> AllocateSocket(
+  std::unique_ptr<DatagramClientSocket> AllocateSocket(
       unsigned server_index) override {
     test_->OnSocketAllocated(server_index);
     return CreateConnectedSocket(server_index);
   }
 
   void FreeSocket(unsigned server_index,
-                  scoped_ptr<DatagramClientSocket> socket) override {
+                  std::unique_ptr<DatagramClientSocket> socket) override {
     test_->OnSocketFreed(server_index);
   }
 
@@ -127,15 +127,14 @@
   DnsSocketPool* dns_socket_pool =
       new MockDnsSocketPool(test_client_socket_factory_.get(), this);
 
-  session_ = new DnsSession(config_,
-                            scoped_ptr<DnsSocketPool>(dns_socket_pool),
-                            base::Bind(&base::RandInt),
-                            NULL /* NetLog */);
+  session_ =
+      new DnsSession(config_, std::unique_ptr<DnsSocketPool>(dns_socket_pool),
+                     base::Bind(&base::RandInt), NULL /* NetLog */);
 
   events_.clear();
 }
 
-scoped_ptr<DnsSession::SocketLease> DnsSessionTest::Allocate(
+std::unique_ptr<DnsSession::SocketLease> DnsSessionTest::Allocate(
     unsigned server_index) {
   return session_->AllocateSocket(server_index, source_);
 }
@@ -179,7 +178,7 @@
   return true;
 }
 
-scoped_ptr<DatagramClientSocket>
+std::unique_ptr<DatagramClientSocket>
 TestClientSocketFactory::CreateDatagramClientSocket(
     DatagramSocket::BindType bind_type,
     const RandIntCallback& rand_int_cb,
@@ -189,7 +188,7 @@
   // simplest SocketDataProvider with no data supplied.
   SocketDataProvider* data_provider = new StaticSocketDataProvider();
   data_providers_.push_back(data_provider);
-  scoped_ptr<MockUDPClientSocket> socket(
+  std::unique_ptr<MockUDPClientSocket> socket(
       new MockUDPClientSocket(data_provider, net_log));
   return std::move(socket);
 }
@@ -199,7 +198,7 @@
 }
 
 TEST_F(DnsSessionTest, AllocateFree) {
-  scoped_ptr<DnsSession::SocketLease> lease1, lease2;
+  std::unique_ptr<DnsSession::SocketLease> lease1, lease2;
 
   Initialize(2);
   EXPECT_TRUE(NoMoreEvents());
diff --git a/net/dns/dns_socket_pool.cc b/net/dns/dns_socket_pool.cc
index cfa55e2..d1f32a2 100644
--- a/net/dns/dns_socket_pool.cc
+++ b/net/dns/dns_socket_pool.cc
@@ -57,20 +57,21 @@
   initialized_ = true;
 }
 
-scoped_ptr<StreamSocket> DnsSocketPool::CreateTCPSocket(
+std::unique_ptr<StreamSocket> DnsSocketPool::CreateTCPSocket(
     unsigned server_index,
     const NetLog::Source& source) {
   DCHECK_LT(server_index, nameservers_->size());
 
-  return scoped_ptr<StreamSocket>(socket_factory_->CreateTransportClientSocket(
-      AddressList((*nameservers_)[server_index]), NULL, net_log_, source));
+  return std::unique_ptr<StreamSocket>(
+      socket_factory_->CreateTransportClientSocket(
+          AddressList((*nameservers_)[server_index]), NULL, net_log_, source));
 }
 
-scoped_ptr<DatagramClientSocket> DnsSocketPool::CreateConnectedSocket(
+std::unique_ptr<DatagramClientSocket> DnsSocketPool::CreateConnectedSocket(
     unsigned server_index) {
   DCHECK_LT(server_index, nameservers_->size());
 
-  scoped_ptr<DatagramClientSocket> socket;
+  std::unique_ptr<DatagramClientSocket> socket;
 
   NetLog::Source no_source;
   socket = socket_factory_->CreateDatagramClientSocket(
@@ -100,22 +101,22 @@
     InitializeInternal(nameservers, net_log);
   }
 
-  scoped_ptr<DatagramClientSocket> AllocateSocket(
+  std::unique_ptr<DatagramClientSocket> AllocateSocket(
       unsigned server_index) override {
     return CreateConnectedSocket(server_index);
   }
 
   void FreeSocket(unsigned server_index,
-                  scoped_ptr<DatagramClientSocket> socket) override {}
+                  std::unique_ptr<DatagramClientSocket> socket) override {}
 
  private:
   DISALLOW_COPY_AND_ASSIGN(NullDnsSocketPool);
 };
 
 // static
-scoped_ptr<DnsSocketPool> DnsSocketPool::CreateNull(
+std::unique_ptr<DnsSocketPool> DnsSocketPool::CreateNull(
     ClientSocketFactory* factory) {
-  return scoped_ptr<DnsSocketPool>(new NullDnsSocketPool(factory));
+  return std::unique_ptr<DnsSocketPool>(new NullDnsSocketPool(factory));
 }
 
 class DefaultDnsSocketPool : public DnsSocketPool {
@@ -129,11 +130,11 @@
   void Initialize(const std::vector<IPEndPoint>* nameservers,
                   NetLog* net_log) override;
 
-  scoped_ptr<DatagramClientSocket> AllocateSocket(
+  std::unique_ptr<DatagramClientSocket> AllocateSocket(
       unsigned server_index) override;
 
   void FreeSocket(unsigned server_index,
-                  scoped_ptr<DatagramClientSocket> socket) override;
+                  std::unique_ptr<DatagramClientSocket> socket) override;
 
  private:
   void FillPool(unsigned server_index, unsigned size);
@@ -146,9 +147,9 @@
 };
 
 // static
-scoped_ptr<DnsSocketPool> DnsSocketPool::CreateDefault(
+std::unique_ptr<DnsSocketPool> DnsSocketPool::CreateDefault(
     ClientSocketFactory* factory) {
-  return scoped_ptr<DnsSocketPool>(new DefaultDnsSocketPool(factory));
+  return std::unique_ptr<DnsSocketPool>(new DefaultDnsSocketPool(factory));
 }
 
 void DefaultDnsSocketPool::Initialize(
@@ -171,7 +172,7 @@
   }
 }
 
-scoped_ptr<DatagramClientSocket> DefaultDnsSocketPool::AllocateSocket(
+std::unique_ptr<DatagramClientSocket> DefaultDnsSocketPool::AllocateSocket(
     unsigned server_index) {
   DCHECK_LT(server_index, pools_.size());
   SocketVector& pool = pools_[server_index];
@@ -179,7 +180,7 @@
   FillPool(server_index, kAllocateMinSize);
   if (pool.size() == 0) {
     LOG(WARNING) << "No DNS sockets available in pool " << server_index << "!";
-    return scoped_ptr<DatagramClientSocket>();
+    return std::unique_ptr<DatagramClientSocket>();
   }
 
   if (pool.size() < kAllocateMinSize) {
@@ -193,12 +194,12 @@
   pool[socket_index] = pool.back();
   pool.pop_back();
 
-  return scoped_ptr<DatagramClientSocket>(socket);
+  return std::unique_ptr<DatagramClientSocket>(socket);
 }
 
 void DefaultDnsSocketPool::FreeSocket(
     unsigned server_index,
-    scoped_ptr<DatagramClientSocket> socket) {
+    std::unique_ptr<DatagramClientSocket> socket) {
   DCHECK_LT(server_index, pools_.size());
 }
 
diff --git a/net/dns/dns_socket_pool.h b/net/dns/dns_socket_pool.h
index 19539386..1e88a87691 100644
--- a/net/dns/dns_socket_pool.h
+++ b/net/dns/dns_socket_pool.h
@@ -5,10 +5,10 @@
 #ifndef NET_DNS_DNS_SOCKET_POOL_H_
 #define NET_DNS_DNS_SOCKET_POOL_H_
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/log/net_log.h"
 
@@ -30,13 +30,13 @@
   // Creates a DnsSocketPool that implements the default strategy for managing
   // sockets.  (This varies by platform; see DnsSocketPoolImpl in
   // dns_socket_pool.cc for details.)
-  static scoped_ptr<DnsSocketPool> CreateDefault(
+  static std::unique_ptr<DnsSocketPool> CreateDefault(
       ClientSocketFactory* factory);
 
   // Creates a DnsSocketPool that implements a "null" strategy -- no sockets are
   // preallocated, allocation requests are satisfied by calling the factory
   // directly, and returned sockets are deleted immediately.
-  static scoped_ptr<DnsSocketPool> CreateNull(
+  static std::unique_ptr<DnsSocketPool> CreateNull(
       ClientSocketFactory* factory);
 
   // Initializes the DnsSocketPool.  |nameservers| is the list of nameservers
@@ -53,20 +53,18 @@
   // by |server_index|.  May return a scoped_ptr to NULL if no sockets are
   // available to reuse and the factory fails to produce a socket (or produces
   // one on which Connect fails).
-  virtual scoped_ptr<DatagramClientSocket> AllocateSocket(
+  virtual std::unique_ptr<DatagramClientSocket> AllocateSocket(
       unsigned server_index) = 0;
 
   // Frees a socket allocated by AllocateSocket.  |server_index| must be the
   // same index passed to AllocateSocket.
-  virtual void FreeSocket(
-      unsigned server_index,
-      scoped_ptr<DatagramClientSocket> socket) = 0;
+  virtual void FreeSocket(unsigned server_index,
+                          std::unique_ptr<DatagramClientSocket> socket) = 0;
 
   // Creates a StreamSocket from the factory for a transaction over TCP. These
   // sockets are not pooled.
-  scoped_ptr<StreamSocket> CreateTCPSocket(
-      unsigned server_index,
-      const NetLog::Source& source);
+  std::unique_ptr<StreamSocket> CreateTCPSocket(unsigned server_index,
+                                                const NetLog::Source& source);
 
  protected:
   DnsSocketPool(ClientSocketFactory* socket_factory);
@@ -75,7 +73,7 @@
       const std::vector<IPEndPoint>* nameservers,
       NetLog* net_log);
 
-  scoped_ptr<DatagramClientSocket> CreateConnectedSocket(
+  std::unique_ptr<DatagramClientSocket> CreateConnectedSocket(
       unsigned server_index);
 
  private:
diff --git a/net/dns/dns_test_util.cc b/net/dns/dns_test_util.cc
index de91048..1237be1 100644
--- a/net/dns/dns_test_util.cc
+++ b/net/dns/dns_test_util.cc
@@ -166,7 +166,7 @@
 
   ~MockTransactionFactory() override {}
 
-  scoped_ptr<DnsTransaction> CreateTransaction(
+  std::unique_ptr<DnsTransaction> CreateTransaction(
       const std::string& hostname,
       uint16_t qtype,
       const DnsTransactionFactory::CallbackType& callback,
@@ -175,7 +175,7 @@
         new MockTransaction(rules_, hostname, qtype, callback);
     if (transaction->delayed())
       delayed_transactions_.push_back(transaction->AsWeakPtr());
-    return scoped_ptr<DnsTransaction>(transaction);
+    return std::unique_ptr<DnsTransaction>(transaction);
   }
 
   void CompleteDelayedTransactions() {
diff --git a/net/dns/dns_test_util.h b/net/dns/dns_test_util.h
index fc32500..d28c9e4 100644
--- a/net/dns/dns_test_util.h
+++ b/net/dns/dns_test_util.h
@@ -8,10 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "net/dns/dns_client.h"
 #include "net/dns/dns_config_service.h"
 #include "net/dns/dns_protocol.h"
@@ -201,8 +201,8 @@
 
  private:
   DnsConfig config_;
-  scoped_ptr<MockTransactionFactory> factory_;
-  scoped_ptr<AddressSorter> address_sorter_;
+  std::unique_ptr<MockTransactionFactory> factory_;
+  std::unique_ptr<AddressSorter> address_sorter_;
 };
 
 }  // namespace net
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
index f726bd2..f25688d4 100644
--- a/net/dns/dns_transaction.cc
+++ b/net/dns/dns_transaction.cc
@@ -5,6 +5,7 @@
 #include "net/dns/dns_transaction.h"
 
 #include <deque>
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
@@ -13,8 +14,8 @@
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/metrics/histogram.h"
 #include "base/profiler/scoped_tracker.h"
@@ -62,11 +63,11 @@
   return ip.AssignFromIPLiteral(hostname);
 }
 
-scoped_ptr<base::Value> NetLogStartCallback(
+std::unique_ptr<base::Value> NetLogStartCallback(
     const std::string* hostname,
     uint16_t qtype,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("hostname", *hostname);
   dict->SetInteger("query_type", qtype);
   return std::move(dict);
@@ -103,11 +104,11 @@
   // Returns a Value representing the received response, along with a reference
   // to the NetLog source source of the UDP socket used.  The request must have
   // completed before this is called.
-  scoped_ptr<base::Value> NetLogResponseCallback(
+  std::unique_ptr<base::Value> NetLogResponseCallback(
       NetLogCaptureMode capture_mode) const {
     DCHECK(GetResponse()->IsValid());
 
-    scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
     dict->SetInteger("rcode", GetResponse()->rcode());
     dict->SetInteger("answer_count", GetResponse()->answer_count());
     GetSocketNetLog().source().AddToEventParameters(dict.get());
@@ -139,8 +140,8 @@
 class DnsUDPAttempt : public DnsAttempt {
  public:
   DnsUDPAttempt(unsigned server_index,
-                scoped_ptr<DnsSession::SocketLease> socket_lease,
-                scoped_ptr<DnsQuery> query)
+                std::unique_ptr<DnsSession::SocketLease> socket_lease,
+                std::unique_ptr<DnsQuery> query)
       : DnsAttempt(server_index),
         next_state_(STATE_NONE),
         received_malformed_response_(false),
@@ -288,10 +289,10 @@
   bool received_malformed_response_;
   base::TimeTicks start_time_;
 
-  scoped_ptr<DnsSession::SocketLease> socket_lease_;
-  scoped_ptr<DnsQuery> query_;
+  std::unique_ptr<DnsSession::SocketLease> socket_lease_;
+  std::unique_ptr<DnsQuery> query_;
 
-  scoped_ptr<DnsResponse> response_;
+  std::unique_ptr<DnsResponse> response_;
 
   CompletionCallback callback_;
 
@@ -301,8 +302,8 @@
 class DnsTCPAttempt : public DnsAttempt {
  public:
   DnsTCPAttempt(unsigned server_index,
-                scoped_ptr<StreamSocket> socket,
-                scoped_ptr<DnsQuery> query)
+                std::unique_ptr<StreamSocket> socket,
+                std::unique_ptr<DnsQuery> query)
       : DnsAttempt(server_index),
         next_state_(STATE_NONE),
         socket_(std::move(socket)),
@@ -532,13 +533,13 @@
   State next_state_;
   base::TimeTicks start_time_;
 
-  scoped_ptr<StreamSocket> socket_;
-  scoped_ptr<DnsQuery> query_;
+  std::unique_ptr<StreamSocket> socket_;
+  std::unique_ptr<DnsQuery> query_;
   scoped_refptr<IOBufferWithSize> length_buffer_;
   scoped_refptr<DrainableIOBuffer> buffer_;
 
   uint16_t response_length_;
-  scoped_ptr<DnsResponse> response_;
+  std::unique_ptr<DnsResponse> response_;
 
   CompletionCallback callback_;
 
@@ -706,7 +707,7 @@
     unsigned attempt_number = attempts_.size();
 
     uint16_t id = session_->NextQueryId();
-    scoped_ptr<DnsQuery> query;
+    std::unique_ptr<DnsQuery> query;
     if (attempts_.empty()) {
       query.reset(new DnsQuery(id, qnames_.front(), qtype_));
     } else {
@@ -720,7 +721,7 @@
     // Skip over known failed servers.
     server_index = session_->NextGoodServerIndex(server_index);
 
-    scoped_ptr<DnsSession::SocketLease> lease =
+    std::unique_ptr<DnsSession::SocketLease> lease =
         session_->AllocateSocket(server_index, net_log_.source());
 
     bool got_socket = !!lease.get();
@@ -728,7 +729,7 @@
     DnsUDPAttempt* attempt =
         new DnsUDPAttempt(server_index, std::move(lease), std::move(query));
 
-    attempts_.push_back(make_scoped_ptr(attempt));
+    attempts_.push_back(base::WrapUnique(attempt));
     ++attempts_count_;
 
     if (!got_socket)
@@ -756,12 +757,12 @@
 
     unsigned server_index = previous_attempt->server_index();
 
-    scoped_ptr<StreamSocket> socket(
+    std::unique_ptr<StreamSocket> socket(
         session_->CreateTCPSocket(server_index, net_log_.source()));
 
     // TODO(szym): Reuse the same id to help the server?
     uint16_t id = session_->NextQueryId();
-    scoped_ptr<DnsQuery> query =
+    std::unique_ptr<DnsQuery> query =
         previous_attempt->GetQuery()->CloneWithNewId(id);
 
     RecordLostPacketsIfAny();
@@ -773,7 +774,7 @@
     DnsTCPAttempt* attempt =
         new DnsTCPAttempt(server_index, std::move(socket), std::move(query));
 
-    attempts_.push_back(make_scoped_ptr(attempt));
+    attempts_.push_back(base::WrapUnique(attempt));
     ++attempts_count_;
     had_tcp_attempt_ = true;
 
@@ -955,7 +956,7 @@
   size_t qnames_initial_size_;
 
   // List of attempts for the current name.
-  std::vector<scoped_ptr<DnsAttempt>> attempts_;
+  std::vector<std::unique_ptr<DnsAttempt>> attempts_;
   // Count of attempts, not reset when |attempts_| vector is cleared.
   int  attempts_count_;
   bool had_tcp_attempt_;
@@ -978,12 +979,12 @@
     session_ = session;
   }
 
-  scoped_ptr<DnsTransaction> CreateTransaction(
+  std::unique_ptr<DnsTransaction> CreateTransaction(
       const std::string& hostname,
       uint16_t qtype,
       const CallbackType& callback,
       const BoundNetLog& net_log) override {
-    return scoped_ptr<DnsTransaction>(new DnsTransactionImpl(
+    return std::unique_ptr<DnsTransaction>(new DnsTransactionImpl(
         session_.get(), hostname, qtype, callback, net_log));
   }
 
@@ -994,9 +995,9 @@
 }  // namespace
 
 // static
-scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory(
+std::unique_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory(
     DnsSession* session) {
-  return scoped_ptr<DnsTransactionFactory>(
+  return std::unique_ptr<DnsTransactionFactory>(
       new DnsTransactionFactoryImpl(session));
 }
 
diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h
index 198b4b81..fdd0542 100644
--- a/net/dns/dns_transaction.h
+++ b/net/dns/dns_transaction.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/callback_forward.h"
 #include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
@@ -62,7 +62,7 @@
   //
   // The transaction will run |callback| upon asynchronous completion.
   // The |net_log| is used as the parent log.
-  virtual scoped_ptr<DnsTransaction> CreateTransaction(
+  virtual std::unique_ptr<DnsTransaction> CreateTransaction(
       const std::string& hostname,
       uint16_t qtype,
       const CallbackType& callback,
@@ -70,7 +70,7 @@
 
   // Creates a DnsTransactionFactory which creates DnsTransactionImpl using the
   // |session|.
-  static scoped_ptr<DnsTransactionFactory> CreateFactory(
+  static std::unique_ptr<DnsTransactionFactory> CreateFactory(
       DnsSession* session) WARN_UNUSED_RESULT;
 };
 
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc
index 2f8e6755..beb00a1 100644
--- a/net/dns/dns_transaction_unittest.cc
+++ b/net/dns/dns_transaction_unittest.cc
@@ -5,12 +5,14 @@
 #include "net/dns/dns_transaction.h"
 
 #include <stdint.h>
+
 #include <limits>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/rand_util.h"
 #include "base/sys_byteorder.h"
 #include "base/test/test_timeouts.h"
@@ -47,7 +49,7 @@
       : query_(new DnsQuery(id, DomainFromDot(dotted_name), qtype)),
         use_tcp_(use_tcp) {
     if (use_tcp_) {
-      scoped_ptr<uint16_t> length(new uint16_t);
+      std::unique_ptr<uint16_t> length(new uint16_t);
       *length = base::HostToNet16(query_->io_buffer()->size());
       writes_.push_back(MockWrite(mode,
                                   reinterpret_cast<const char*>(length.get()),
@@ -63,12 +65,12 @@
   // All responses must be added before GetProvider.
 
   // Adds pre-built DnsResponse. |tcp_length| will be used in TCP mode only.
-  void AddResponseWithLength(scoped_ptr<DnsResponse> response,
+  void AddResponseWithLength(std::unique_ptr<DnsResponse> response,
                              IoMode mode,
                              uint16_t tcp_length) {
     CHECK(!provider_.get());
     if (use_tcp_) {
-      scoped_ptr<uint16_t> length(new uint16_t);
+      std::unique_ptr<uint16_t> length(new uint16_t);
       *length = base::HostToNet16(tcp_length);
       reads_.push_back(MockRead(mode,
                                 reinterpret_cast<const char*>(length.get()),
@@ -82,7 +84,7 @@
   }
 
   // Adds pre-built DnsResponse.
-  void AddResponse(scoped_ptr<DnsResponse> response, IoMode mode) {
+  void AddResponse(std::unique_ptr<DnsResponse> response, IoMode mode) {
     uint16_t tcp_length = response->io_buffer()->size();
     AddResponseWithLength(std::move(response), mode, tcp_length);
   }
@@ -90,16 +92,15 @@
   // Adds pre-built response from |data| buffer.
   void AddResponseData(const uint8_t* data, size_t length, IoMode mode) {
     CHECK(!provider_.get());
-    AddResponse(make_scoped_ptr(
-        new DnsResponse(reinterpret_cast<const char*>(data), length, 0)), mode);
+    AddResponse(base::WrapUnique(new DnsResponse(
+                    reinterpret_cast<const char*>(data), length, 0)),
+                mode);
   }
 
   // Add no-answer (RCODE only) response matching the query.
   void AddRcode(int rcode, IoMode mode) {
-    scoped_ptr<DnsResponse> response(
-        new DnsResponse(query_->io_buffer()->data(),
-                        query_->io_buffer()->size(),
-                        0));
+    std::unique_ptr<DnsResponse> response(new DnsResponse(
+        query_->io_buffer()->data(), query_->io_buffer()->size(), 0));
     dns_protocol::Header* header =
         reinterpret_cast<dns_protocol::Header*>(response->io_buffer()->data());
     header->flags |= base::HostToNet16(dns_protocol::kFlagResponse | rcode);
@@ -133,13 +134,13 @@
  private:
   size_t num_reads_and_writes() const { return reads_.size() + writes_.size(); }
 
-  scoped_ptr<DnsQuery> query_;
+  std::unique_ptr<DnsQuery> query_;
   bool use_tcp_;
-  std::vector<scoped_ptr<uint16_t>> lengths_;
-  std::vector<scoped_ptr<DnsResponse>> responses_;
+  std::vector<std::unique_ptr<uint16_t>> lengths_;
+  std::vector<std::unique_ptr<DnsResponse>> responses_;
   std::vector<MockWrite> writes_;
   std::vector<MockRead> reads_;
-  scoped_ptr<SequencedSocketData> provider_;
+  std::unique_ptr<SequencedSocketData> provider_;
 
   DISALLOW_COPY_AND_ASSIGN(DnsSocketData);
 };
@@ -185,18 +186,18 @@
   TestSocketFactory() : fail_next_socket_(false) {}
   ~TestSocketFactory() override {}
 
-  scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+  std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket(
       DatagramSocket::BindType bind_type,
       const RandIntCallback& rand_int_cb,
       NetLog* net_log,
       const NetLog::Source& source) override {
     if (fail_next_socket_) {
       fail_next_socket_ = false;
-      return scoped_ptr<DatagramClientSocket>(
+      return std::unique_ptr<DatagramClientSocket>(
           new FailingUDPClientSocket(&empty_data_, net_log));
     }
     SocketDataProvider* data_provider = mock_data().GetNext();
-    scoped_ptr<TestUDPClientSocket> socket(
+    std::unique_ptr<TestUDPClientSocket> socket(
         new TestUDPClientSocket(this, data_provider, net_log));
     return std::move(socket);
   }
@@ -318,7 +319,7 @@
  private:
   std::string hostname_;
   uint16_t qtype_;
-  scoped_ptr<DnsTransaction> transaction_;
+  std::unique_ptr<DnsTransaction> transaction_;
   int expected_answer_count_;
   bool cancel_in_callback_;
   bool quit_in_callback_;
@@ -351,7 +352,7 @@
     transaction_factory_ = DnsTransactionFactory::CreateFactory(session_.get());
   }
 
-  void AddSocketData(scoped_ptr<DnsSocketData> data) {
+  void AddSocketData(std::unique_ptr<DnsSocketData> data) {
     CHECK(socket_factory_.get());
     transaction_ids_.push_back(data->query_id());
     socket_factory_->AddSocketDataProvider(data->GetProvider());
@@ -369,7 +370,7 @@
                            IoMode mode,
                            bool use_tcp) {
     CHECK(socket_factory_.get());
-    scoped_ptr<DnsSocketData> data(
+    std::unique_ptr<DnsSocketData> data(
         new DnsSocketData(id, dotted_name, qtype, mode, use_tcp));
     data->AddResponseData(response_data, response_length, mode);
     AddSocketData(std::move(data));
@@ -396,7 +397,7 @@
   // Add expected query of |dotted_name| and |qtype| and no response.
   void AddQueryAndTimeout(const char* dotted_name, uint16_t qtype) {
     uint16_t id = base::RandInt(0, std::numeric_limits<uint16_t>::max());
-    scoped_ptr<DnsSocketData> data(
+    std::unique_ptr<DnsSocketData> data(
         new DnsSocketData(id, dotted_name, qtype, ASYNC, false));
     AddSocketData(std::move(data));
   }
@@ -410,7 +411,7 @@
                         bool use_tcp) {
     CHECK_NE(dns_protocol::kRcodeNOERROR, rcode);
     uint16_t id = base::RandInt(0, std::numeric_limits<uint16_t>::max());
-    scoped_ptr<DnsSocketData> data(
+    std::unique_ptr<DnsSocketData> data(
         new DnsSocketData(id, dotted_name, qtype, mode, use_tcp));
     data->AddRcode(rcode, mode);
     AddSocketData(std::move(data));
@@ -467,12 +468,12 @@
 
   DnsConfig config_;
 
-  std::vector<scoped_ptr<DnsSocketData>> socket_data_;
+  std::vector<std::unique_ptr<DnsSocketData>> socket_data_;
 
   std::deque<int> transaction_ids_;
-  scoped_ptr<TestSocketFactory> socket_factory_;
+  std::unique_ptr<TestSocketFactory> socket_factory_;
   scoped_refptr<DnsSession> session_;
-  scoped_ptr<DnsTransactionFactory> transaction_factory_;
+  std::unique_ptr<DnsTransactionFactory> transaction_factory_;
 };
 
 TEST_F(DnsTransactionTest, Lookup) {
@@ -551,7 +552,7 @@
   ConfigureFactory();
 
   // Attempt receives mismatched response followed by valid response.
-  scoped_ptr<DnsSocketData> data(
+  std::unique_ptr<DnsSocketData> data(
       new DnsSocketData(0 /* id */, kT0HostName, kT0Qtype, SYNCHRONOUS, false));
   data->AddResponseData(kT1ResponseDatagram,
                         arraysize(kT1ResponseDatagram), SYNCHRONOUS);
@@ -570,7 +571,7 @@
 
   // First attempt receives mismatched response followed by valid response.
   // Second attempt times out.
-  scoped_ptr<DnsSocketData> data(
+  std::unique_ptr<DnsSocketData> data(
       new DnsSocketData(0 /* id */, kT0HostName, kT0Qtype, ASYNC, false));
   data->AddResponseData(kT1ResponseDatagram,
                         arraysize(kT1ResponseDatagram), ASYNC);
@@ -897,14 +898,14 @@
 TEST_F(DnsTransactionTest, TCPMalformed) {
   AddAsyncQueryAndRcode(kT0HostName, kT0Qtype,
                         dns_protocol::kRcodeNOERROR | dns_protocol::kFlagTC);
-  scoped_ptr<DnsSocketData> data(
+  std::unique_ptr<DnsSocketData> data(
       new DnsSocketData(0 /* id */, kT0HostName, kT0Qtype, ASYNC, true));
   // Valid response but length too short.
   // This must be truncated in the question section. The DnsResponse doesn't
   // examine the answer section until asked to parse it, so truncating it in
   // the answer section would result in the DnsTransaction itself succeeding.
   data->AddResponseWithLength(
-      make_scoped_ptr(
+      base::WrapUnique(
           new DnsResponse(reinterpret_cast<const char*>(kT0ResponseDatagram),
                           arraysize(kT0ResponseDatagram), 0)),
       ASYNC, static_cast<uint16_t>(kT0QuerySize - 1));
@@ -919,7 +920,7 @@
   ConfigureFactory();
   AddAsyncQueryAndRcode(kT0HostName, kT0Qtype,
                         dns_protocol::kRcodeNOERROR | dns_protocol::kFlagTC);
-  AddSocketData(make_scoped_ptr(
+  AddSocketData(base::WrapUnique(
       new DnsSocketData(1 /* id */, kT0HostName, kT0Qtype, ASYNC, true)));
 
   TransactionHelper helper0(kT0HostName, kT0Qtype, ERR_DNS_TIMED_OUT);
@@ -929,11 +930,11 @@
 TEST_F(DnsTransactionTest, TCPReadReturnsZeroAsync) {
   AddAsyncQueryAndRcode(kT0HostName, kT0Qtype,
                         dns_protocol::kRcodeNOERROR | dns_protocol::kFlagTC);
-  scoped_ptr<DnsSocketData> data(
+  std::unique_ptr<DnsSocketData> data(
       new DnsSocketData(0 /* id */, kT0HostName, kT0Qtype, ASYNC, true));
   // Return all but the last byte of the response.
   data->AddResponseWithLength(
-      make_scoped_ptr(
+      base::WrapUnique(
           new DnsResponse(reinterpret_cast<const char*>(kT0ResponseDatagram),
                           arraysize(kT0ResponseDatagram) - 1, 0)),
       ASYNC, static_cast<uint16_t>(arraysize(kT0ResponseDatagram)));
@@ -948,11 +949,11 @@
 TEST_F(DnsTransactionTest, TCPReadReturnsZeroSynchronous) {
   AddAsyncQueryAndRcode(kT0HostName, kT0Qtype,
                         dns_protocol::kRcodeNOERROR | dns_protocol::kFlagTC);
-  scoped_ptr<DnsSocketData> data(
+  std::unique_ptr<DnsSocketData> data(
       new DnsSocketData(0 /* id */, kT0HostName, kT0Qtype, ASYNC, true));
   // Return all but the last byte of the response.
   data->AddResponseWithLength(
-      make_scoped_ptr(
+      base::WrapUnique(
           new DnsResponse(reinterpret_cast<const char*>(kT0ResponseDatagram),
                           arraysize(kT0ResponseDatagram) - 1, 0)),
       SYNCHRONOUS, static_cast<uint16_t>(arraysize(kT0ResponseDatagram)));
@@ -967,7 +968,7 @@
 TEST_F(DnsTransactionTest, TCPConnectionClosedAsync) {
   AddAsyncQueryAndRcode(kT0HostName, kT0Qtype,
                         dns_protocol::kRcodeNOERROR | dns_protocol::kFlagTC);
-  scoped_ptr<DnsSocketData> data(
+  std::unique_ptr<DnsSocketData> data(
       new DnsSocketData(0 /* id */, kT0HostName, kT0Qtype, ASYNC, true));
   data->AddReadError(ERR_CONNECTION_CLOSED, ASYNC);
   AddSocketData(std::move(data));
@@ -979,7 +980,7 @@
 TEST_F(DnsTransactionTest, TCPConnectionClosedSynchronous) {
   AddAsyncQueryAndRcode(kT0HostName, kT0Qtype,
                         dns_protocol::kRcodeNOERROR | dns_protocol::kFlagTC);
-  scoped_ptr<DnsSocketData> data(
+  std::unique_ptr<DnsSocketData> data(
       new DnsSocketData(0 /* id */, kT0HostName, kT0Qtype, ASYNC, true));
   data->AddReadError(ERR_CONNECTION_CLOSED, SYNCHRONOUS);
   AddSocketData(std::move(data));
diff --git a/net/dns/host_cache.cc b/net/dns/host_cache.cc
index 4bb2533..639f7912 100644
--- a/net/dns/host_cache.cc
+++ b/net/dns/host_cache.cc
@@ -5,6 +5,7 @@
 #include "net/dns/host_cache.h"
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/strings/string_number_conversions.h"
@@ -84,8 +85,8 @@
 }
 
 // static
-scoped_ptr<HostCache> HostCache::CreateDefaultCache() {
-  // Cache capacity is determined by the field trial.
+std::unique_ptr<HostCache> HostCache::CreateDefaultCache() {
+// Cache capacity is determined by the field trial.
 #if defined(ENABLE_BUILT_IN_DNS)
   const size_t kDefaultMaxEntries = 1000;
 #else
@@ -97,7 +98,7 @@
                       &max_entries);
   if ((max_entries == 0) || (max_entries > kSaneMaxEntries))
     max_entries = kDefaultMaxEntries;
-  return make_scoped_ptr(new HostCache(max_entries));
+  return base::WrapUnique(new HostCache(max_entries));
 }
 
 void HostCache::EvictionHandler::Handle(
diff --git a/net/dns/host_cache.h b/net/dns/host_cache.h
index 70b1893..752ebeb 100644
--- a/net/dns/host_cache.h
+++ b/net/dns/host_cache.h
@@ -8,12 +8,12 @@
 #include <stddef.h>
 
 #include <functional>
+#include <memory>
 #include <string>
 #include <tuple>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "base/time/time.h"
 #include "net/base/address_family.h"
@@ -105,7 +105,7 @@
   const EntryMap& entries() const;
 
   // Creates a default cache.
-  static scoped_ptr<HostCache> CreateDefaultCache();
+  static std::unique_ptr<HostCache> CreateDefaultCache();
 
  private:
   FRIEND_TEST_ALL_PREFIXES(HostCacheTest, NoCache);
diff --git a/net/dns/host_resolver.cc b/net/dns/host_resolver.cc
index a475067..abe8e49 100644
--- a/net/dns/host_resolver.cc
+++ b/net/dns/host_resolver.cc
@@ -107,20 +107,22 @@
   return NULL;
 }
 
-scoped_ptr<base::Value> HostResolver::GetDnsConfigAsValue() const {
+std::unique_ptr<base::Value> HostResolver::GetDnsConfigAsValue() const {
   return nullptr;
 }
 
 // static
-scoped_ptr<HostResolver> HostResolver::CreateSystemResolver(
+std::unique_ptr<HostResolver> HostResolver::CreateSystemResolver(
     const Options& options,
     NetLog* net_log) {
-  return scoped_ptr<HostResolver>(new HostResolverImpl(options, net_log));
+  return std::unique_ptr<HostResolver>(new HostResolverImpl(options, net_log));
 }
 
 // static
-scoped_ptr<HostResolver> HostResolver::CreateDefaultResolver(NetLog* net_log) {
-  return scoped_ptr<HostResolver>(new HostResolverImpl(Options(), net_log));
+std::unique_ptr<HostResolver> HostResolver::CreateDefaultResolver(
+    NetLog* net_log) {
+  return std::unique_ptr<HostResolver>(
+      new HostResolverImpl(Options(), net_log));
 }
 
 HostResolver::HostResolver() {
diff --git a/net/dns/host_resolver.h b/net/dns/host_resolver.h
index 93bc62e..4e19e63 100644
--- a/net/dns/host_resolver.h
+++ b/net/dns/host_resolver.h
@@ -8,10 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/address_family.h"
 #include "net/base/completion_callback.h"
 #include "net/base/host_port_pair.h"
@@ -178,17 +178,17 @@
 
   // Returns the current DNS configuration |this| is using, as a Value, or
   // nullptr if it's configured to always use the system host resolver.
-  virtual scoped_ptr<base::Value> GetDnsConfigAsValue() const;
+  virtual std::unique_ptr<base::Value> GetDnsConfigAsValue() const;
 
   // Creates a HostResolver implementation that queries the underlying system.
   // (Except if a unit-test has changed the global HostResolverProc using
   // ScopedHostResolverProc to intercept requests to the system).
-  static scoped_ptr<HostResolver> CreateSystemResolver(
+  static std::unique_ptr<HostResolver> CreateSystemResolver(
       const Options& options,
       NetLog* net_log);
 
   // As above, but uses default parameters.
-  static scoped_ptr<HostResolver> CreateDefaultResolver(NetLog* net_log);
+  static std::unique_ptr<HostResolver> CreateDefaultResolver(NetLog* net_log);
 
  protected:
   HostResolver();
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index 1a6bd61..a224b8c 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -4,8 +4,11 @@
 
 #include "net/dns/host_resolver_impl.h"
 
+#include <memory>
 #include <utility>
 
+#include "base/memory/ptr_util.h"
+
 #if defined(OS_WIN)
 #include <Winsock2.h>
 #elif defined(OS_POSIX)
@@ -23,7 +26,6 @@
 #include "base/debug/debugger.h"
 #include "base/debug/stack_trace.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/sparse_histogram.h"
@@ -206,11 +208,9 @@
   tracked_objects::ScopedTracker tracking_profile_1(
       FROM_HERE_WITH_EXPLICIT_FUNCTION("455942 IsGloballyReachable"));
 
-  scoped_ptr<DatagramClientSocket> socket(
+  std::unique_ptr<DatagramClientSocket> socket(
       ClientSocketFactory::GetDefaultFactory()->CreateDatagramClientSocket(
-          DatagramSocket::DEFAULT_BIND,
-          RandIntCallback(),
-          net_log.net_log(),
+          DatagramSocket::DEFAULT_BIND, RandIntCallback(), net_log.net_log(),
           net_log.source()));
   int rv = socket->Connect(IPEndPoint(dest, 53));
   if (rv != OK)
@@ -322,12 +322,12 @@
 }
 
 // Creates NetLog parameters when the resolve failed.
-scoped_ptr<base::Value> NetLogProcTaskFailedCallback(
+std::unique_ptr<base::Value> NetLogProcTaskFailedCallback(
     uint32_t attempt_number,
     int net_error,
     int os_error,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   if (attempt_number)
     dict->SetInteger("attempt_number", attempt_number);
 
@@ -356,11 +356,11 @@
 }
 
 // Creates NetLog parameters when the DnsTask failed.
-scoped_ptr<base::Value> NetLogDnsTaskFailedCallback(
+std::unique_ptr<base::Value> NetLogDnsTaskFailedCallback(
     int net_error,
     int dns_error,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("net_error", net_error);
   if (dns_error)
     dict->SetInteger("dns_error", dns_error);
@@ -369,10 +369,10 @@
 
 // Creates NetLog parameters containing the information in a RequestInfo object,
 // along with the associated NetLog::Source.
-scoped_ptr<base::Value> NetLogRequestInfoCallback(
+std::unique_ptr<base::Value> NetLogRequestInfoCallback(
     const HostResolver::RequestInfo* info,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("host", info->host_port_pair().ToString());
   dict->SetInteger("address_family",
@@ -383,39 +383,39 @@
 }
 
 // Creates NetLog parameters for the creation of a HostResolverImpl::Job.
-scoped_ptr<base::Value> NetLogJobCreationCallback(
+std::unique_ptr<base::Value> NetLogJobCreationCallback(
     const NetLog::Source& source,
     const std::string* host,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   source.AddToEventParameters(dict.get());
   dict->SetString("host", *host);
   return std::move(dict);
 }
 
 // Creates NetLog parameters for HOST_RESOLVER_IMPL_JOB_ATTACH/DETACH events.
-scoped_ptr<base::Value> NetLogJobAttachCallback(
+std::unique_ptr<base::Value> NetLogJobAttachCallback(
     const NetLog::Source& source,
     RequestPriority priority,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   source.AddToEventParameters(dict.get());
   dict->SetString("priority", RequestPriorityToString(priority));
   return std::move(dict);
 }
 
 // Creates NetLog parameters for the DNS_CONFIG_CHANGED event.
-scoped_ptr<base::Value> NetLogDnsConfigCallback(
+std::unique_ptr<base::Value> NetLogDnsConfigCallback(
     const DnsConfig* config,
     NetLogCaptureMode /* capture_mode */) {
   return config->ToValue();
 }
 
-scoped_ptr<base::Value> NetLogIPv6AvailableCallback(
+std::unique_ptr<base::Value> NetLogIPv6AvailableCallback(
     bool ipv6_available,
     bool cached,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetBoolean("ipv6_available", ipv6_available);
   dict->SetBoolean("cached", cached);
   return std::move(dict);
@@ -1108,7 +1108,7 @@
     transaction_aaaa_->Start();
   }
 
-  scoped_ptr<DnsTransaction> CreateTransaction(AddressFamily family) {
+  std::unique_ptr<DnsTransaction> CreateTransaction(AddressFamily family) {
     DCHECK_NE(ADDRESS_FAMILY_UNSPECIFIED, family);
     return client_->GetTransactionFactory()->CreateTransaction(
         key_.hostname,
@@ -1244,8 +1244,8 @@
   Delegate* delegate_;
   const BoundNetLog net_log_;
 
-  scoped_ptr<DnsTransaction> transaction_a_;
-  scoped_ptr<DnsTransaction> transaction_aaaa_;
+  std::unique_ptr<DnsTransaction> transaction_a_;
+  std::unique_ptr<DnsTransaction> transaction_aaaa_;
 
   unsigned num_completed_transactions_;
 
@@ -1312,7 +1312,7 @@
     // else CompleteRequests logged EndEvent.
 
     // Log any remaining Requests as cancelled.
-    for (const scoped_ptr<Request>& req : requests_) {
+    for (const std::unique_ptr<Request>& req : requests_) {
       if (req->was_canceled())
         continue;
       DCHECK_EQ(this, req->job());
@@ -1339,7 +1339,7 @@
     }
   }
 
-  void AddRequest(scoped_ptr<Request> req) {
+  void AddRequest(std::unique_ptr<Request> req) {
     DCHECK_EQ(key_.hostname, req->info().hostname());
 
     req->set_job(this);
@@ -1711,7 +1711,7 @@
     // new job with the same key in case one of the OnComplete callbacks decides
     // to spawn one. Consequently, the job deletes itself when CompleteRequests
     // is done.
-    scoped_ptr<Job> self_deleter(this);
+    std::unique_ptr<Job> self_deleter(this);
 
     resolver_->RemoveJob(this);
 
@@ -1755,7 +1755,7 @@
       resolver_->CacheResult(key_, entry, ttl);
 
     // Complete all of the requests that were attached to the job.
-    for (const scoped_ptr<Request>& req : requests_) {
+    for (const std::unique_ptr<Request>& req : requests_) {
       if (req->was_canceled())
         continue;
 
@@ -1826,10 +1826,10 @@
   scoped_refptr<ProcTask> proc_task_;
 
   // Resolves the host using a DnsTransaction.
-  scoped_ptr<DnsTask> dns_task_;
+  std::unique_ptr<DnsTask> dns_task_;
 
   // All Requests waiting for the result of this Job. Some can be canceled.
-  std::vector<scoped_ptr<Request>> requests_;
+  std::vector<std::unique_ptr<Request>> requests_;
 
   // A handle used in |HostResolverImpl::dispatcher_|.
   PrioritizedDispatcher::Handle handle_;
@@ -1983,8 +1983,8 @@
   }
 
   // Can't complete synchronously. Create and attach request.
-  scoped_ptr<Request> req(new Request(
-      source_net_log, info, priority, callback, addresses));
+  std::unique_ptr<Request> req(
+      new Request(source_net_log, info, priority, callback, addresses));
   if (out_req)
     *out_req = reinterpret_cast<RequestHandle>(req.get());
 
@@ -2060,7 +2060,7 @@
   if (enabled && !dns_client_) {
     SetDnsClient(DnsClient::CreateClient(net_log_));
   } else if (!enabled && dns_client_) {
-    SetDnsClient(scoped_ptr<DnsClient>());
+    SetDnsClient(std::unique_ptr<DnsClient>());
   }
 #endif
 }
@@ -2069,7 +2069,7 @@
   return cache_.get();
 }
 
-scoped_ptr<base::Value> HostResolverImpl::GetDnsConfigAsValue() const {
+std::unique_ptr<base::Value> HostResolverImpl::GetDnsConfigAsValue() const {
   // Check if async DNS is disabled.
   if (!dns_client_.get())
     return nullptr;
@@ -2078,7 +2078,7 @@
   // for it.
   const DnsConfig* dns_config = dns_client_->GetConfig();
   if (dns_config == NULL)
-    return make_scoped_ptr(new base::DictionaryValue());
+    return base::WrapUnique(new base::DictionaryValue());
 
   return dns_config->ToValue();
 }
@@ -2274,11 +2274,11 @@
 void HostResolverImpl::AbortAllInProgressJobs() {
   // In Abort, a Request callback could spawn new Jobs with matching keys, so
   // first collect and remove all running jobs from |jobs_|.
-  std::vector<scoped_ptr<Job>> jobs_to_abort;
+  std::vector<std::unique_ptr<Job>> jobs_to_abort;
   for (JobMap::iterator it = jobs_.begin(); it != jobs_.end(); ) {
     Job* job = it->second;
     if (job->is_running()) {
-      jobs_to_abort.push_back(make_scoped_ptr(job));
+      jobs_to_abort.push_back(base::WrapUnique(job));
       jobs_.erase(it++);
     } else {
       DCHECK(job->is_queued());
@@ -2451,7 +2451,7 @@
                               std::abs(net_error));
 }
 
-void HostResolverImpl::SetDnsClient(scoped_ptr<DnsClient> dns_client) {
+void HostResolverImpl::SetDnsClient(std::unique_ptr<DnsClient> dns_client) {
   // DnsClient and config must be updated before aborting DnsTasks, since doing
   // so may start new jobs.
   dns_client_ = std::move(dns_client);
diff --git a/net/dns/host_resolver_impl.h b/net/dns/host_resolver_impl.h
index 5334f7bd..24f17a7d 100644
--- a/net/dns/host_resolver_impl.h
+++ b/net/dns/host_resolver_impl.h
@@ -9,9 +9,9 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string_piece.h"
 #include "base/threading/non_thread_safe.h"
@@ -128,7 +128,7 @@
   // HostResolverProc from ProcTaskParams will be queried. If the DnsClient is
   // not pre-configured with a valid DnsConfig, a new config is fetched from
   // NetworkChangeNotifier.
-  void SetDnsClient(scoped_ptr<DnsClient> dns_client);
+  void SetDnsClient(std::unique_ptr<DnsClient> dns_client);
 
   // HostResolver methods:
   int Resolve(const RequestInfo& info,
@@ -143,7 +143,7 @@
   void CancelRequest(RequestHandle req) override;
   void SetDnsClientEnabled(bool enabled) override;
   HostCache* GetHostCache() override;
-  scoped_ptr<base::Value> GetDnsConfigAsValue() const override;
+  std::unique_ptr<base::Value> GetDnsConfigAsValue() const override;
 
   void set_proc_params_for_test(const ProcTaskParams& proc_params) {
     proc_params_ = proc_params;
@@ -266,13 +266,13 @@
   }
 
   // Cache of host resolution results.
-  scoped_ptr<HostCache> cache_;
+  std::unique_ptr<HostCache> cache_;
 
   // Map from HostCache::Key to a Job.
   JobMap jobs_;
 
   // Starts Jobs according to their priority and the configured limits.
-  scoped_ptr<PrioritizedDispatcher> dispatcher_;
+  std::unique_ptr<PrioritizedDispatcher> dispatcher_;
 
   // Limit on the maximum number of jobs queued in |dispatcher_|.
   size_t max_queued_jobs_;
@@ -283,7 +283,7 @@
   NetLog* net_log_;
 
   // If present, used by DnsTask and ServeFromHosts to resolve requests.
-  scoped_ptr<DnsClient> dns_client_;
+  std::unique_ptr<DnsClient> dns_client_;
 
   // True if received valid config from |dns_config_service_|. Temporary, used
   // to measure performance of DnsConfigService: http://crbug.com/125599
diff --git a/net/dns/host_resolver_impl_unittest.cc b/net/dns/host_resolver_impl_unittest.cc
index 4fc4474..c5c047a6 100644
--- a/net/dns/host_resolver_impl_unittest.cc
+++ b/net/dns/host_resolver_impl_unittest.cc
@@ -5,6 +5,7 @@
 #include "net/dns/host_resolver_impl.h"
 
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <tuple>
 #include <vector>
@@ -13,8 +14,8 @@
 #include "base/bind_helpers.h"
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
@@ -514,7 +515,9 @@
     Request* CreateRequest(const std::string& hostname) {
       return test->CreateRequest(hostname);
     }
-    std::vector<scoped_ptr<Request>>& requests() { return test->requests_; }
+    std::vector<std::unique_ptr<Request>>& requests() {
+      return test->requests_;
+    }
 
     void DeleteResolver() { test->resolver_.reset(); }
 
@@ -543,7 +546,7 @@
   // not start until released by |proc_->SignalXXX|.
   Request* CreateRequest(const HostResolver::RequestInfo& info,
                          RequestPriority priority) {
-    requests_.push_back(make_scoped_ptr(new Request(
+    requests_.push_back(base::WrapUnique(new Request(
         info, priority, requests_.size(), resolver_.get(), handler_.get())));
     return requests_.back().get();
   }
@@ -596,10 +599,10 @@
   }
 
   scoped_refptr<MockHostResolverProc> proc_;
-  scoped_ptr<HostResolverImpl> resolver_;
-  std::vector<scoped_ptr<Request>> requests_;
+  std::unique_ptr<HostResolverImpl> resolver_;
+  std::vector<std::unique_ptr<Request>> requests_;
 
-  scoped_ptr<Handler> handler_;
+  std::unique_ptr<Handler> handler_;
 };
 
 TEST_F(HostResolverImplTest, AsynchronousLookup) {
@@ -1514,7 +1517,7 @@
     resolver_.reset(new TestHostResolverImpl(options, NULL));
     resolver_->set_proc_params_for_test(params);
     dns_client_ = new MockDnsClient(DnsConfig(), dns_rules_);
-    resolver_->SetDnsClient(scoped_ptr<DnsClient>(dns_client_));
+    resolver_->SetDnsClient(std::unique_ptr<DnsClient>(dns_client_));
   }
 
   // Adds a rule to |dns_rules_|. Must be followed by |CreateResolver| to apply.
@@ -1604,7 +1607,7 @@
   // Simulate the case when the preference or policy has disabled the DNS client
   // causing AbortDnsTasks.
   resolver_->SetDnsClient(
-      scoped_ptr<DnsClient>(new MockDnsClient(DnsConfig(), dns_rules_)));
+      std::unique_ptr<DnsClient>(new MockDnsClient(DnsConfig(), dns_rules_)));
   ChangeDnsConfig(CreateValidDnsConfig());
 
   // First request is resolved by MockDnsClient, others should fail due to
@@ -1845,7 +1848,7 @@
   resolver_->set_proc_params_for_test(DefaultParams(proc.get()));
 
   resolver_->SetDnsClient(
-      scoped_ptr<DnsClient>(new MockDnsClient(DnsConfig(), dns_rules_)));
+      std::unique_ptr<DnsClient>(new MockDnsClient(DnsConfig(), dns_rules_)));
 
   // Get the expected output.
   AddressList addrlist;
@@ -2205,7 +2208,7 @@
 
   // Clear DnsClient.  The two in-progress jobs should fall back to a ProcTask,
   // and the next one should be started with a ProcTask.
-  resolver_->SetDnsClient(scoped_ptr<DnsClient>());
+  resolver_->SetDnsClient(std::unique_ptr<DnsClient>());
 
   // All three in-progress requests should now be running a ProcTask.
   EXPECT_EQ(3u, num_running_dispatcher_jobs());
diff --git a/net/dns/host_resolver_mojo.h b/net/dns/host_resolver_mojo.h
index 905d6c94..f0917a7 100644
--- a/net/dns/host_resolver_mojo.h
+++ b/net/dns/host_resolver_mojo.h
@@ -53,7 +53,7 @@
 
   Impl* const impl_;
 
-  scoped_ptr<HostCache> host_cache_;
+  std::unique_ptr<HostCache> host_cache_;
   base::WeakPtrFactory<HostCache> host_cache_weak_factory_;
 
   base::ThreadChecker thread_checker_;
diff --git a/net/dns/host_resolver_mojo_unittest.cc b/net/dns/host_resolver_mojo_unittest.cc
index a210d78..0c791a10 100644
--- a/net/dns/host_resolver_mojo_unittest.cc
+++ b/net/dns/host_resolver_mojo_unittest.cc
@@ -7,6 +7,7 @@
 #include <string>
 #include <utility>
 
+#include "base/memory/ptr_util.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "net/base/address_list.h"
 #include "net/base/ip_address.h"
@@ -54,27 +55,27 @@
     RETAIN,
   };
 
-  static scoped_ptr<HostResolverAction> ReturnError(Error error) {
-    scoped_ptr<HostResolverAction> result(new HostResolverAction);
+  static std::unique_ptr<HostResolverAction> ReturnError(Error error) {
+    std::unique_ptr<HostResolverAction> result(new HostResolverAction);
     result->error = error;
     return result;
   }
 
-  static scoped_ptr<HostResolverAction> ReturnResult(
+  static std::unique_ptr<HostResolverAction> ReturnResult(
       const AddressList& address_list) {
-    scoped_ptr<HostResolverAction> result(new HostResolverAction);
+    std::unique_ptr<HostResolverAction> result(new HostResolverAction);
     result->addresses = interfaces::AddressList::From(address_list);
     return result;
   }
 
-  static scoped_ptr<HostResolverAction> DropRequest() {
-    scoped_ptr<HostResolverAction> result(new HostResolverAction);
+  static std::unique_ptr<HostResolverAction> DropRequest() {
+    std::unique_ptr<HostResolverAction> result(new HostResolverAction);
     result->action = DROP;
     return result;
   }
 
-  static scoped_ptr<HostResolverAction> RetainRequest() {
-    scoped_ptr<HostResolverAction> result(new HostResolverAction);
+  static std::unique_ptr<HostResolverAction> RetainRequest() {
+    std::unique_ptr<HostResolverAction> result(new HostResolverAction);
     result->action = RETAIN;
     return result;
   }
@@ -90,7 +91,7 @@
       const base::Closure& request_connection_error_callback);
   ~MockMojoHostResolver() override;
 
-  void AddAction(scoped_ptr<HostResolverAction> action);
+  void AddAction(std::unique_ptr<HostResolverAction> action);
 
   const mojo::Array<interfaces::HostResolverRequestInfoPtr>& requests() {
     return requests_received_;
@@ -100,11 +101,11 @@
                   interfaces::HostResolverRequestClientPtr client) override;
 
  private:
-  std::vector<scoped_ptr<HostResolverAction>> actions_;
+  std::vector<std::unique_ptr<HostResolverAction>> actions_;
   size_t results_returned_ = 0;
   mojo::Array<interfaces::HostResolverRequestInfoPtr> requests_received_;
   const base::Closure request_connection_error_callback_;
-  std::vector<scoped_ptr<MockMojoHostResolverRequest>> requests_;
+  std::vector<std::unique_ptr<MockMojoHostResolverRequest>> requests_;
 };
 
 MockMojoHostResolver::MockMojoHostResolver(
@@ -116,7 +117,8 @@
   EXPECT_EQ(results_returned_, actions_.size());
 }
 
-void MockMojoHostResolver::AddAction(scoped_ptr<HostResolverAction> action) {
+void MockMojoHostResolver::AddAction(
+    std::unique_ptr<HostResolverAction> action) {
   actions_.push_back(std::move(action));
 }
 
@@ -131,7 +133,7 @@
                            std::move(actions_[results_returned_]->addresses));
       break;
     case HostResolverAction::RETAIN:
-      requests_.push_back(make_scoped_ptr(new MockMojoHostResolverRequest(
+      requests_.push_back(base::WrapUnique(new MockMojoHostResolverRequest(
           std::move(client), request_connection_error_callback_)));
       break;
     case HostResolverAction::DROP:
@@ -166,9 +168,9 @@
         &request_handle, BoundNetLog()));
   }
 
-  scoped_ptr<MockMojoHostResolver> mock_resolver_;
+  std::unique_ptr<MockMojoHostResolver> mock_resolver_;
 
-  scoped_ptr<HostResolverMojo> resolver_;
+  std::unique_ptr<HostResolverMojo> resolver_;
 
   Waiter waiter_;
 };
diff --git a/net/dns/mapped_host_resolver.cc b/net/dns/mapped_host_resolver.cc
index 5474cc3..e102d50 100644
--- a/net/dns/mapped_host_resolver.cc
+++ b/net/dns/mapped_host_resolver.cc
@@ -13,7 +13,7 @@
 
 namespace net {
 
-MappedHostResolver::MappedHostResolver(scoped_ptr<HostResolver> impl)
+MappedHostResolver::MappedHostResolver(std::unique_ptr<HostResolver> impl)
     : impl_(std::move(impl)) {}
 
 MappedHostResolver::~MappedHostResolver() {
@@ -56,7 +56,7 @@
   return impl_->GetHostCache();
 }
 
-scoped_ptr<base::Value> MappedHostResolver::GetDnsConfigAsValue() const {
+std::unique_ptr<base::Value> MappedHostResolver::GetDnsConfigAsValue() const {
   return impl_->GetDnsConfigAsValue();
 }
 
diff --git a/net/dns/mapped_host_resolver.h b/net/dns/mapped_host_resolver.h
index b5b94600..20c249f 100644
--- a/net/dns/mapped_host_resolver.h
+++ b/net/dns/mapped_host_resolver.h
@@ -5,9 +5,9 @@
 #ifndef NET_DNS_MAPPED_HOST_RESOLVER_H_
 #define NET_DNS_MAPPED_HOST_RESOLVER_H_
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "net/base/host_mapping_rules.h"
 #include "net/base/net_export.h"
 #include "net/dns/host_resolver.h"
@@ -22,7 +22,7 @@
  public:
   // Creates a MappedHostResolver that forwards all of its requests through
   // |impl|.
-  explicit MappedHostResolver(scoped_ptr<HostResolver> impl);
+  explicit MappedHostResolver(std::unique_ptr<HostResolver> impl);
   ~MappedHostResolver() override;
 
   // Adds a rule to this mapper. The format of the rule can be one of:
@@ -57,14 +57,14 @@
   void CancelRequest(RequestHandle req) override;
   void SetDnsClientEnabled(bool enabled) override;
   HostCache* GetHostCache() override;
-  scoped_ptr<base::Value> GetDnsConfigAsValue() const override;
+  std::unique_ptr<base::Value> GetDnsConfigAsValue() const override;
 
  private:
   // Modify the request |info| according to |rules_|. Returns either OK or
   // the network error code that the hostname's resolution mapped to.
   int ApplyRules(RequestInfo* info) const;
 
-  scoped_ptr<HostResolver> impl_;
+  std::unique_ptr<HostResolver> impl_;
 
   HostMappingRules rules_;
 };
diff --git a/net/dns/mapped_host_resolver_unittest.cc b/net/dns/mapped_host_resolver_unittest.cc
index dd772ac4..f7840047 100644
--- a/net/dns/mapped_host_resolver_unittest.cc
+++ b/net/dns/mapped_host_resolver_unittest.cc
@@ -25,14 +25,14 @@
 
 TEST(MappedHostResolverTest, Inclusion) {
   // Create a mock host resolver, with specific hostname to IP mappings.
-  scoped_ptr<MockHostResolver> resolver_impl(new MockHostResolver());
+  std::unique_ptr<MockHostResolver> resolver_impl(new MockHostResolver());
   resolver_impl->rules()->AddSimulatedFailure("*google.com");
   resolver_impl->rules()->AddRule("baz.com", "192.168.1.5");
   resolver_impl->rules()->AddRule("foo.com", "192.168.1.8");
   resolver_impl->rules()->AddRule("proxy", "192.168.1.11");
 
   // Create a remapped resolver that uses |resolver_impl|.
-  scoped_ptr<MappedHostResolver> resolver(
+  std::unique_ptr<MappedHostResolver> resolver(
       new MappedHostResolver(std::move(resolver_impl)));
 
   int rv;
@@ -101,12 +101,12 @@
 // Tests that exclusions are respected.
 TEST(MappedHostResolverTest, Exclusion) {
   // Create a mock host resolver, with specific hostname to IP mappings.
-  scoped_ptr<MockHostResolver> resolver_impl(new MockHostResolver());
+  std::unique_ptr<MockHostResolver> resolver_impl(new MockHostResolver());
   resolver_impl->rules()->AddRule("baz", "192.168.1.5");
   resolver_impl->rules()->AddRule("www.google.com", "192.168.1.3");
 
   // Create a remapped resolver that uses |resolver_impl|.
-  scoped_ptr<MappedHostResolver> resolver(
+  std::unique_ptr<MappedHostResolver> resolver(
       new MappedHostResolver(std::move(resolver_impl)));
 
   int rv;
@@ -148,12 +148,12 @@
 
 TEST(MappedHostResolverTest, SetRulesFromString) {
   // Create a mock host resolver, with specific hostname to IP mappings.
-  scoped_ptr<MockHostResolver> resolver_impl(new MockHostResolver());
+  std::unique_ptr<MockHostResolver> resolver_impl(new MockHostResolver());
   resolver_impl->rules()->AddRule("baz", "192.168.1.7");
   resolver_impl->rules()->AddRule("bar", "192.168.1.9");
 
   // Create a remapped resolver that uses |resolver_impl|.
-  scoped_ptr<MappedHostResolver> resolver(
+  std::unique_ptr<MappedHostResolver> resolver(
       new MappedHostResolver(std::move(resolver_impl)));
 
   int rv;
@@ -192,8 +192,8 @@
 
 // Parsing bad rules should silently discard the rule (and never crash).
 TEST(MappedHostResolverTest, ParseInvalidRules) {
-  scoped_ptr<MappedHostResolver> resolver(
-      new MappedHostResolver(scoped_ptr<HostResolver>()));
+  std::unique_ptr<MappedHostResolver> resolver(
+      new MappedHostResolver(std::unique_ptr<HostResolver>()));
 
   EXPECT_FALSE(resolver->AddRuleFromString("xyz"));
   EXPECT_FALSE(resolver->AddRuleFromString(std::string()));
@@ -207,10 +207,10 @@
 
 // Test mapping hostnames to resolving failures.
 TEST(MappedHostResolverTest, MapToError) {
-  scoped_ptr<MockHostResolver> resolver_impl(new MockHostResolver());
+  std::unique_ptr<MockHostResolver> resolver_impl(new MockHostResolver());
   resolver_impl->rules()->AddRule("*", "192.168.1.5");
 
-  scoped_ptr<MappedHostResolver> resolver(
+  std::unique_ptr<MappedHostResolver> resolver(
       new MappedHostResolver(std::move(resolver_impl)));
 
   int rv;
diff --git a/net/dns/mdns_cache.cc b/net/dns/mdns_cache.cc
index 2c57828..308027a 100644
--- a/net/dns/mdns_cache.cc
+++ b/net/dns/mdns_cache.cc
@@ -76,7 +76,7 @@
 }
 
 MDnsCache::UpdateType MDnsCache::UpdateDnsRecord(
-    scoped_ptr<const RecordParsed> record) {
+    std::unique_ptr<const RecordParsed> record) {
   Key cache_key = Key::CreateFor(record.get());
 
   // Ignore "goodbye" packets for records not in cache.
@@ -154,18 +154,18 @@
   }
 }
 
-scoped_ptr<const RecordParsed> MDnsCache::RemoveRecord(
+std::unique_ptr<const RecordParsed> MDnsCache::RemoveRecord(
     const RecordParsed* record) {
   Key key = Key::CreateFor(record);
   RecordMap::iterator found = mdns_cache_.find(key);
 
   if (found != mdns_cache_.end() && found->second.get() == record) {
-    scoped_ptr<const RecordParsed> result = std::move(found->second);
+    std::unique_ptr<const RecordParsed> result = std::move(found->second);
     mdns_cache_.erase(key);
     return result;
   }
 
-  return scoped_ptr<const RecordParsed>();
+  return std::unique_ptr<const RecordParsed>();
 }
 
 // static
diff --git a/net/dns/mdns_cache.h b/net/dns/mdns_cache.h
index 38f121a..a2d3d0f 100644
--- a/net/dns/mdns_cache.h
+++ b/net/dns/mdns_cache.h
@@ -6,12 +6,12 @@
 #define NET_DNS_MDNS_CACHE_H_
 
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/net_export.h"
 
@@ -66,7 +66,7 @@
   // Return value indicates whether the record was added, changed
   // (existed previously with different value) or not changed (existed
   // previously with same value).
-  UpdateType UpdateDnsRecord(scoped_ptr<const RecordParsed> record);
+  UpdateType UpdateDnsRecord(std::unique_ptr<const RecordParsed> record);
 
   // Check cache for record with key |key|. Return the record if it exists, or
   // NULL if it doesn't.
@@ -91,10 +91,10 @@
 
   // Remove a record from the cache.  Returns a scoped version of the pointer
   // passed in if it was removed, scoped null otherwise.
-  scoped_ptr<const RecordParsed> RemoveRecord(const RecordParsed* record);
+  std::unique_ptr<const RecordParsed> RemoveRecord(const RecordParsed* record);
 
  private:
-  typedef std::map<Key, scoped_ptr<const RecordParsed>> RecordMap;
+  typedef std::map<Key, std::unique_ptr<const RecordParsed>> RecordMap;
 
   // Get the effective expiration of a cache entry, based on its creation time
   // and TTL. Does adjustments so entries with a TTL of zero will have a
diff --git a/net/dns/mdns_cache_unittest.cc b/net/dns/mdns_cache_unittest.cc
index 0659e4f9..1d8ceef 100644
--- a/net/dns/mdns_cache_unittest.cc
+++ b/net/dns/mdns_cache_unittest.cc
@@ -122,8 +122,8 @@
                          sizeof(dns_protocol::Header));
   parser.SkipQuestion();
 
-  scoped_ptr<const RecordParsed> record1;
-  scoped_ptr<const RecordParsed> record2;
+  std::unique_ptr<const RecordParsed> record1;
+  std::unique_ptr<const RecordParsed> record2;
   std::vector<const RecordParsed*> results;
 
   record1 = RecordParsed::CreateFrom(&parser, default_time_);
@@ -153,8 +153,8 @@
   DnsRecordParser parser(kT1ResponseDatagram, sizeof(kT1ResponseDatagram),
                          sizeof(dns_protocol::Header));
   parser.SkipQuestion();
-  scoped_ptr<const RecordParsed> record1;
-  scoped_ptr<const RecordParsed> record2;
+  std::unique_ptr<const RecordParsed> record1;
+  std::unique_ptr<const RecordParsed> record2;
 
   std::vector<const RecordParsed*> results;
   const RecordParsed* record_to_be_deleted;
@@ -204,8 +204,8 @@
                          sizeof(kTestResponsesDifferentAnswers),
                          0);
 
-  scoped_ptr<const RecordParsed> record1;
-  scoped_ptr<const RecordParsed> record2;
+  std::unique_ptr<const RecordParsed> record1;
+  std::unique_ptr<const RecordParsed> record2;
   std::vector<const RecordParsed*> results;
 
   record1 = RecordParsed::CreateFrom(&parser, default_time_);
@@ -223,8 +223,8 @@
                          sizeof(kTestResponsesSameAnswers),
                          0);
 
-  scoped_ptr<const RecordParsed> record1;
-  scoped_ptr<const RecordParsed> record2;
+  std::unique_ptr<const RecordParsed> record1;
+  std::unique_ptr<const RecordParsed> record2;
   std::vector<const RecordParsed*> results;
 
   record1 = RecordParsed::CreateFrom(&parser, default_time_);
@@ -242,8 +242,8 @@
                          sizeof(kTestResponsesSameAnswers),
                          0);
 
-  scoped_ptr<const RecordParsed> record1;
-  scoped_ptr<const RecordParsed> record2;
+  std::unique_ptr<const RecordParsed> record1;
+  std::unique_ptr<const RecordParsed> record2;
   std::vector<const RecordParsed*> results;
 
   record1 = RecordParsed::CreateFrom(&parser, default_time_);
@@ -266,9 +266,9 @@
                          sizeof(kTestResponsesGoodbyePacket),
                          0);
 
-  scoped_ptr<const RecordParsed> record_goodbye;
-  scoped_ptr<const RecordParsed> record_hello;
-  scoped_ptr<const RecordParsed> record_goodbye2;
+  std::unique_ptr<const RecordParsed> record_goodbye;
+  std::unique_ptr<const RecordParsed> record_hello;
+  std::unique_ptr<const RecordParsed> record_goodbye2;
   std::vector<const RecordParsed*> results;
 
   record_goodbye = RecordParsed::CreateFrom(&parser, default_time_);
@@ -298,8 +298,8 @@
                          sizeof(kTestResponseTwoRecords),
                          0);
 
-  scoped_ptr<const RecordParsed> record1;
-  scoped_ptr<const RecordParsed> record2;
+  std::unique_ptr<const RecordParsed> record1;
+  std::unique_ptr<const RecordParsed> record2;
   std::vector<const RecordParsed*> results;
 
   record1 = RecordParsed::CreateFrom(&parser, default_time_);
@@ -325,7 +325,7 @@
                          sizeof(dns_protocol::Header));
   parser.SkipQuestion();
 
-  scoped_ptr<const RecordParsed> record1;
+  std::unique_ptr<const RecordParsed> record1;
   std::vector<const RecordParsed*> results;
 
   record1 = RecordParsed::CreateFrom(&parser, default_time_);
@@ -336,7 +336,7 @@
 
   EXPECT_EQ(1u, results.size());
 
-  scoped_ptr<const RecordParsed> record_out =
+  std::unique_ptr<const RecordParsed> record_out =
       cache_.RemoveRecord(results.front());
 
   EXPECT_EQ(record_out.get(), results.front());
diff --git a/net/dns/mdns_client.cc b/net/dns/mdns_client.cc
index f72d9c2..6add12c4 100644
--- a/net/dns/mdns_client.cc
+++ b/net/dns/mdns_client.cc
@@ -44,13 +44,13 @@
 }  // namespace
 
 // static
-scoped_ptr<MDnsSocketFactory> MDnsSocketFactory::CreateDefault() {
-  return scoped_ptr<MDnsSocketFactory>(new MDnsSocketFactoryImpl);
+std::unique_ptr<MDnsSocketFactory> MDnsSocketFactory::CreateDefault() {
+  return std::unique_ptr<MDnsSocketFactory>(new MDnsSocketFactoryImpl);
 }
 
 // static
-scoped_ptr<MDnsClient> MDnsClient::CreateDefault() {
-  return scoped_ptr<MDnsClient>(new MDnsClientImpl());
+std::unique_ptr<MDnsClient> MDnsClient::CreateDefault() {
+  return std::unique_ptr<MDnsClient>(new MDnsClientImpl());
 }
 
 IPEndPoint GetMDnsIPEndPoint(AddressFamily address_family) {
@@ -84,10 +84,10 @@
   return interfaces;
 }
 
-scoped_ptr<DatagramServerSocket> CreateAndBindMDnsSocket(
+std::unique_ptr<DatagramServerSocket> CreateAndBindMDnsSocket(
     AddressFamily address_family,
     uint32_t interface_index) {
-  scoped_ptr<DatagramServerSocket> socket(
+  std::unique_ptr<DatagramServerSocket> socket(
       new UDPServerSocket(NULL, NetLog::Source()));
 
   IPEndPoint multicast_addr = GetMDnsIPEndPoint(address_family);
diff --git a/net/dns/mdns_client.h b/net/dns/mdns_client.h
index 279aa6d8..8d2e659 100644
--- a/net/dns/mdns_client.h
+++ b/net/dns/mdns_client.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/ip_endpoint.h"
 #include "net/dns/dns_query.h"
 #include "net/dns/dns_response.h"
@@ -132,9 +132,9 @@
  public:
   virtual ~MDnsSocketFactory() {}
   virtual void CreateSockets(
-      std::vector<scoped_ptr<DatagramServerSocket>>* sockets) = 0;
+      std::vector<std::unique_ptr<DatagramServerSocket>>* sockets) = 0;
 
-  static scoped_ptr<MDnsSocketFactory> CreateDefault();
+  static std::unique_ptr<MDnsSocketFactory> CreateDefault();
 };
 
 // Listens for Multicast DNS on the local network. You can access information
@@ -147,7 +147,7 @@
   virtual ~MDnsClient() {}
 
   // Create listener object for RRType |rrtype| and name |name|.
-  virtual scoped_ptr<MDnsListener> CreateListener(
+  virtual std::unique_ptr<MDnsListener> CreateListener(
       uint16_t rrtype,
       const std::string& name,
       MDnsListener::Delegate* delegate) = 0;
@@ -155,7 +155,7 @@
   // Create a transaction that can be used to query either the MDns cache, the
   // network, or both for records of type |rrtype| and name |name|. |flags| is
   // defined by MDnsTransactionFlags.
-  virtual scoped_ptr<MDnsTransaction> CreateTransaction(
+  virtual std::unique_ptr<MDnsTransaction> CreateTransaction(
       uint16_t rrtype,
       const std::string& name,
       int flags,
@@ -169,7 +169,7 @@
   virtual bool IsListening() const = 0;
 
   // Create the default MDnsClient
-  static scoped_ptr<MDnsClient> CreateDefault();
+  static std::unique_ptr<MDnsClient> CreateDefault();
 };
 
 NET_EXPORT IPEndPoint GetMDnsIPEndPoint(AddressFamily address_family);
@@ -183,7 +183,7 @@
 // Create sockets, binds socket to MDns endpoint, and sets multicast interface
 // and joins multicast group on for |interface_index|.
 // Returns NULL if failed.
-NET_EXPORT scoped_ptr<DatagramServerSocket> CreateAndBindMDnsSocket(
+NET_EXPORT std::unique_ptr<DatagramServerSocket> CreateAndBindMDnsSocket(
     AddressFamily address_family,
     uint32_t interface_index);
 
diff --git a/net/dns/mdns_client_impl.cc b/net/dns/mdns_client_impl.cc
index cb717fc..4b0709c 100644
--- a/net/dns/mdns_client_impl.cc
+++ b/net/dns/mdns_client_impl.cc
@@ -10,6 +10,7 @@
 
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
 #include "base/thread_task_runner_handle.h"
@@ -45,12 +46,12 @@
 }  // namespace
 
 void MDnsSocketFactoryImpl::CreateSockets(
-    std::vector<scoped_ptr<DatagramServerSocket>>* sockets) {
+    std::vector<std::unique_ptr<DatagramServerSocket>>* sockets) {
   InterfaceIndexFamilyList interfaces(GetMDnsInterfacesToBind());
   for (size_t i = 0; i < interfaces.size(); ++i) {
     DCHECK(interfaces[i].second == ADDRESS_FAMILY_IPV4 ||
            interfaces[i].second == ADDRESS_FAMILY_IPV6);
-    scoped_ptr<DatagramServerSocket> socket(
+    std::unique_ptr<DatagramServerSocket> socket(
         CreateAndBindMDnsSocket(interfaces[i].second, interfaces[i].first));
     if (socket)
       sockets->push_back(std::move(socket));
@@ -58,7 +59,7 @@
 }
 
 MDnsConnection::SocketHandler::SocketHandler(
-    scoped_ptr<DatagramServerSocket> socket,
+    std::unique_ptr<DatagramServerSocket> socket,
     MDnsConnection* connection)
     : socket_(std::move(socket)),
       connection_(connection),
@@ -142,11 +143,11 @@
 }
 
 bool MDnsConnection::Init(MDnsSocketFactory* socket_factory) {
-  std::vector<scoped_ptr<DatagramServerSocket>> sockets;
+  std::vector<std::unique_ptr<DatagramServerSocket>> sockets;
   socket_factory->CreateSockets(&sockets);
 
-  for (scoped_ptr<DatagramServerSocket>& socket : sockets) {
-    socket_handlers_.push_back(make_scoped_ptr(
+  for (std::unique_ptr<DatagramServerSocket>& socket : sockets) {
+    socket_handlers_.push_back(base::WrapUnique(
         new MDnsConnection::SocketHandler(std::move(socket), this)));
   }
 
@@ -168,7 +169,7 @@
 
 void MDnsConnection::Send(const scoped_refptr<IOBuffer>& buffer,
                           unsigned size) {
-  for (scoped_ptr<SocketHandler>& handler : socket_handlers_)
+  for (std::unique_ptr<SocketHandler>& handler : socket_handlers_)
     handler->Send(buffer, size);
 }
 
@@ -250,7 +251,7 @@
 
   for (unsigned i = 0; i < answer_count; i++) {
     offset = parser.GetOffset();
-    scoped_ptr<const RecordParsed> record =
+    std::unique_ptr<const RecordParsed> record =
         RecordParsed::CreateFrom(&parser, clock_->Now());
 
     if (!record) {
@@ -311,7 +312,8 @@
     if ((*i)->type() == dns_protocol::kTypeNSEC)
       continue;
     if (!rdata->GetBit((*i)->type())) {
-      scoped_ptr<const RecordParsed> record_removed = cache_.RemoveRecord((*i));
+      std::unique_ptr<const RecordParsed> record_removed =
+          cache_.RemoveRecord((*i));
       DCHECK(record_removed);
       OnRecordRemoved(record_removed.get());
     }
@@ -432,8 +434,8 @@
       cleanup_timer_(new base::Timer(false, false)) {
 }
 
-MDnsClientImpl::MDnsClientImpl(scoped_ptr<base::Clock> clock,
-                               scoped_ptr<base::Timer> timer)
+MDnsClientImpl::MDnsClientImpl(std::unique_ptr<base::Clock> clock,
+                               std::unique_ptr<base::Timer> timer)
     : clock_(std::move(clock)), cleanup_timer_(std::move(timer)) {}
 
 MDnsClientImpl::~MDnsClientImpl() {
@@ -457,20 +459,20 @@
   return core_.get() != NULL;
 }
 
-scoped_ptr<MDnsListener> MDnsClientImpl::CreateListener(
+std::unique_ptr<MDnsListener> MDnsClientImpl::CreateListener(
     uint16_t rrtype,
     const std::string& name,
     MDnsListener::Delegate* delegate) {
-  return scoped_ptr<MDnsListener>(
+  return std::unique_ptr<MDnsListener>(
       new MDnsListenerImpl(rrtype, name, clock_.get(), delegate, this));
 }
 
-scoped_ptr<MDnsTransaction> MDnsClientImpl::CreateTransaction(
+std::unique_ptr<MDnsTransaction> MDnsClientImpl::CreateTransaction(
     uint16_t rrtype,
     const std::string& name,
     int flags,
     const MDnsTransaction::ResultCallback& callback) {
-  return scoped_ptr<MDnsTransaction>(
+  return std::unique_ptr<MDnsTransaction>(
       new MDnsTransactionImpl(rrtype, name, flags, callback, this));
 }
 
diff --git a/net/dns/mdns_client_impl.h b/net/dns/mdns_client_impl.h
index 16a216e..9db82b0 100644
--- a/net/dns/mdns_client_impl.h
+++ b/net/dns/mdns_client_impl.h
@@ -8,6 +8,7 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <queue>
 #include <string>
 #include <utility>
@@ -16,7 +17,6 @@
 #include "base/cancelable_callback.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "net/base/io_buffer.h"
 #include "net/base/ip_endpoint.h"
@@ -39,7 +39,7 @@
   ~MDnsSocketFactoryImpl() override{};
 
   void CreateSockets(
-      std::vector<scoped_ptr<DatagramServerSocket>>* sockets) override;
+      std::vector<std::unique_ptr<DatagramServerSocket>>* sockets) override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(MDnsSocketFactoryImpl);
@@ -67,7 +67,7 @@
  private:
   class SocketHandler {
    public:
-    SocketHandler(scoped_ptr<DatagramServerSocket> socket,
+    SocketHandler(std::unique_ptr<DatagramServerSocket> socket,
                   MDnsConnection* connection);
     ~SocketHandler();
 
@@ -81,7 +81,7 @@
     // Callback for when sending a query has finished.
     void SendDone(int rv);
 
-    scoped_ptr<DatagramServerSocket> socket_;
+    std::unique_ptr<DatagramServerSocket> socket_;
     MDnsConnection* connection_;
     IPEndPoint recv_addr_;
     DnsResponse response_;
@@ -101,7 +101,7 @@
   void OnError(int rv);
 
   // Only socket handlers which successfully bound and started are kept.
-  std::vector<scoped_ptr<SocketHandler>> socket_handlers_;
+  std::vector<std::unique_ptr<SocketHandler>> socket_handlers_;
 
   Delegate* delegate_;
 
@@ -177,7 +177,7 @@
     base::Timer* cleanup_timer_;
     base::Time scheduled_cleanup_;
 
-    scoped_ptr<MDnsConnection> connection_;
+    std::unique_ptr<MDnsConnection> connection_;
 
     DISALLOW_COPY_AND_ASSIGN(Core);
   };
@@ -186,12 +186,12 @@
   ~MDnsClientImpl() override;
 
   // MDnsClient implementation:
-  scoped_ptr<MDnsListener> CreateListener(
+  std::unique_ptr<MDnsListener> CreateListener(
       uint16_t rrtype,
       const std::string& name,
       MDnsListener::Delegate* delegate) override;
 
-  scoped_ptr<MDnsTransaction> CreateTransaction(
+  std::unique_ptr<MDnsTransaction> CreateTransaction(
       uint16_t rrtype,
       const std::string& name,
       int flags,
@@ -207,12 +207,12 @@
   FRIEND_TEST_ALL_PREFIXES(MDnsTest, CacheCleanupWithShortTTL);
 
   // Test constructor, takes a mock clock and mock timer.
-  MDnsClientImpl(scoped_ptr<base::Clock> clock,
-                 scoped_ptr<base::Timer> cleanup_timer);
+  MDnsClientImpl(std::unique_ptr<base::Clock> clock,
+                 std::unique_ptr<base::Timer> cleanup_timer);
 
-  scoped_ptr<Core> core_;
-  scoped_ptr<base::Clock> clock_;
-  scoped_ptr<base::Timer> cleanup_timer_;
+  std::unique_ptr<Core> core_;
+  std::unique_ptr<base::Clock> clock_;
+  std::unique_ptr<base::Timer> cleanup_timer_;
 
   DISALLOW_COPY_AND_ASSIGN(MDnsClientImpl);
 };
@@ -318,7 +318,7 @@
   std::string name_;
   MDnsTransaction::ResultCallback callback_;
 
-  scoped_ptr<MDnsListener> listener_;
+  std::unique_ptr<MDnsListener> listener_;
   base::CancelableCallback<void()> timeout_;
 
   MDnsClientImpl* client_;
diff --git a/net/dns/mdns_client_unittest.cc b/net/dns/mdns_client_unittest.cc
index b8f38cf..d7b946f4 100644
--- a/net/dns/mdns_client_unittest.cc
+++ b/net/dns/mdns_client_unittest.cc
@@ -2,13 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include <queue>
 #include <vector>
 
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
@@ -415,15 +416,15 @@
   void ExpectPacket(const uint8_t* packet, unsigned size);
   void SimulatePacketReceive(const uint8_t* packet, unsigned size);
 
-  scoped_ptr<MDnsClientImpl> test_client_;
+  std::unique_ptr<MDnsClientImpl> test_client_;
   IPEndPoint mdns_ipv4_endpoint_;
   StrictMock<MockMDnsSocketFactory> socket_factory_;
 
   // Transactions and listeners that can be deleted by class methods for
   // reentrancy tests.
-  scoped_ptr<MDnsTransaction> transaction_;
-  scoped_ptr<MDnsListener> listener1_;
-  scoped_ptr<MDnsListener> listener2_;
+  std::unique_ptr<MDnsTransaction> transaction_;
+  std::unique_ptr<MDnsListener> listener1_;
+  std::unique_ptr<MDnsListener> listener2_;
 };
 
 class MockListenerDelegate : public MDnsListener::Delegate {
@@ -479,9 +480,9 @@
   PtrRecordCopyContainer record_privet;
   PtrRecordCopyContainer record_printer;
 
-  scoped_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
       dns_protocol::kTypePTR, "_privet._tcp.local", &delegate_privet);
-  scoped_ptr<MDnsListener> listener_printer = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_printer = test_client_->CreateListener(
       dns_protocol::kTypePTR, "_printer._tcp.local", &delegate_printer);
 
   ASSERT_TRUE(listener_privet->Start());
@@ -521,7 +522,7 @@
   PtrRecordCopyContainer record_privet;
   PtrRecordCopyContainer record_privet2;
 
-  scoped_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
       dns_protocol::kTypePTR, "_privet._tcp.local", &delegate_privet);
 
   ASSERT_TRUE(listener_privet->Start());
@@ -561,7 +562,7 @@
   MockTimer* timer = new MockTimer;
 
   test_client_.reset(
-      new MDnsClientImpl(make_scoped_ptr(clock), make_scoped_ptr(timer)));
+      new MDnsClientImpl(base::WrapUnique(clock), base::WrapUnique(timer)));
   test_client_->StartListening(&socket_factory_);
 
   EXPECT_CALL(*timer, StartObserver(_, _, _)).Times(1);
@@ -579,9 +580,9 @@
   PtrRecordCopyContainer record_privet;
   PtrRecordCopyContainer record_printer;
 
-  scoped_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
       dns_protocol::kTypePTR, "_privet._tcp.local", &delegate_privet);
-  scoped_ptr<MDnsListener> listener_printer = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_printer = test_client_->CreateListener(
       dns_protocol::kTypePTR, "_printer._tcp.local", &delegate_printer);
 
   ASSERT_TRUE(listener_privet->Start());
@@ -617,7 +618,7 @@
 
   PtrRecordCopyContainer record_printer;
 
-  scoped_ptr<MDnsListener> listener_printer = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_printer = test_client_->CreateListener(
       dns_protocol::kTypePTR, "_printer._tcp.local", &delegate_printer);
 
   ASSERT_TRUE(listener_printer->Start());
@@ -647,7 +648,7 @@
 TEST_F(MDnsTest, TransactionWithEmptyCache) {
   ExpectPacket(kQueryPacketPrivet, sizeof(kQueryPacketPrivet));
 
-  scoped_ptr<MDnsTransaction> transaction_privet =
+  std::unique_ptr<MDnsTransaction> transaction_privet =
       test_client_->CreateTransaction(
           dns_protocol::kTypePTR, "_privet._tcp.local",
           MDnsTransaction::QUERY_NETWORK | MDnsTransaction::QUERY_CACHE |
@@ -671,7 +672,7 @@
 }
 
 TEST_F(MDnsTest, TransactionCacheOnlyNoResult) {
-  scoped_ptr<MDnsTransaction> transaction_privet =
+  std::unique_ptr<MDnsTransaction> transaction_privet =
       test_client_->CreateTransaction(
           dns_protocol::kTypePTR, "_privet._tcp.local",
           MDnsTransaction::QUERY_CACHE | MDnsTransaction::SINGLE_RESULT,
@@ -688,8 +689,10 @@
 TEST_F(MDnsTest, TransactionWithCache) {
   // Listener to force the client to listen
   StrictMock<MockListenerDelegate> delegate_irrelevant;
-  scoped_ptr<MDnsListener> listener_irrelevant = test_client_->CreateListener(
-      dns_protocol::kTypeA, "codereview.chromium.local", &delegate_irrelevant);
+  std::unique_ptr<MDnsListener> listener_irrelevant =
+      test_client_->CreateListener(dns_protocol::kTypeA,
+                                   "codereview.chromium.local",
+                                   &delegate_irrelevant);
 
   ASSERT_TRUE(listener_irrelevant->Start());
 
@@ -702,7 +705,7 @@
       .WillOnce(Invoke(&record_privet,
                        &PtrRecordCopyContainer::SaveWithDummyArg));
 
-  scoped_ptr<MDnsTransaction> transaction_privet =
+  std::unique_ptr<MDnsTransaction> transaction_privet =
       test_client_->CreateTransaction(
           dns_protocol::kTypePTR, "_privet._tcp.local",
           MDnsTransaction::QUERY_NETWORK | MDnsTransaction::QUERY_CACHE |
@@ -721,7 +724,7 @@
 
   PtrRecordCopyContainer record_privet;
 
-  scoped_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
       dns_protocol::kTypePTR, "_privet._tcp.local", &delegate_privet);
 
   ASSERT_TRUE(listener_privet->Start());
@@ -742,7 +745,7 @@
 TEST_F(MDnsTest, TransactionTimeout) {
   ExpectPacket(kQueryPacketPrivet, sizeof(kQueryPacketPrivet));
 
-  scoped_ptr<MDnsTransaction> transaction_privet =
+  std::unique_ptr<MDnsTransaction> transaction_privet =
       test_client_->CreateTransaction(
           dns_protocol::kTypePTR, "_privet._tcp.local",
           MDnsTransaction::QUERY_NETWORK | MDnsTransaction::QUERY_CACHE |
@@ -763,7 +766,7 @@
 TEST_F(MDnsTest, TransactionMultipleRecords) {
   ExpectPacket(kQueryPacketPrivet, sizeof(kQueryPacketPrivet));
 
-  scoped_ptr<MDnsTransaction> transaction_privet =
+  std::unique_ptr<MDnsTransaction> transaction_privet =
       test_client_->CreateTransaction(
           dns_protocol::kTypePTR, "_privet._tcp.local",
           MDnsTransaction::QUERY_NETWORK | MDnsTransaction::QUERY_CACHE,
@@ -821,8 +824,10 @@
 
 TEST_F(MDnsTest, TransactionReentrantDeleteFromCache) {
   StrictMock<MockListenerDelegate> delegate_irrelevant;
-  scoped_ptr<MDnsListener> listener_irrelevant = test_client_->CreateListener(
-      dns_protocol::kTypeA, "codereview.chromium.local", &delegate_irrelevant);
+  std::unique_ptr<MDnsListener> listener_irrelevant =
+      test_client_->CreateListener(dns_protocol::kTypeA,
+                                   "codereview.chromium.local",
+                                   &delegate_irrelevant);
   ASSERT_TRUE(listener_irrelevant->Start());
 
   SimulatePacketReceive(kSamplePacket1, sizeof(kSamplePacket1));
@@ -844,16 +849,20 @@
 TEST_F(MDnsTest, TransactionReentrantCacheLookupStart) {
   ExpectPacket(kQueryPacketPrivet, sizeof(kQueryPacketPrivet));
 
-  scoped_ptr<MDnsTransaction> transaction1 = test_client_->CreateTransaction(
-      dns_protocol::kTypePTR, "_privet._tcp.local",
-      MDnsTransaction::QUERY_NETWORK | MDnsTransaction::QUERY_CACHE |
-          MDnsTransaction::SINGLE_RESULT,
-      base::Bind(&MDnsTest::MockableRecordCallback, base::Unretained(this)));
+  std::unique_ptr<MDnsTransaction> transaction1 =
+      test_client_->CreateTransaction(
+          dns_protocol::kTypePTR, "_privet._tcp.local",
+          MDnsTransaction::QUERY_NETWORK | MDnsTransaction::QUERY_CACHE |
+              MDnsTransaction::SINGLE_RESULT,
+          base::Bind(&MDnsTest::MockableRecordCallback,
+                     base::Unretained(this)));
 
-  scoped_ptr<MDnsTransaction> transaction2 = test_client_->CreateTransaction(
-      dns_protocol::kTypePTR, "_printer._tcp.local",
-      MDnsTransaction::QUERY_CACHE | MDnsTransaction::SINGLE_RESULT,
-      base::Bind(&MDnsTest::MockableRecordCallback2, base::Unretained(this)));
+  std::unique_ptr<MDnsTransaction> transaction2 =
+      test_client_->CreateTransaction(
+          dns_protocol::kTypePTR, "_printer._tcp.local",
+          MDnsTransaction::QUERY_CACHE | MDnsTransaction::SINGLE_RESULT,
+          base::Bind(&MDnsTest::MockableRecordCallback2,
+                     base::Unretained(this)));
 
   EXPECT_CALL(*this, MockableRecordCallback2(MDnsTransaction::RESULT_RECORD,
                                              _))
@@ -873,7 +882,7 @@
 TEST_F(MDnsTest, GoodbyePacketNotification) {
   StrictMock<MockListenerDelegate> delegate_privet;
 
-  scoped_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
       dns_protocol::kTypePTR, "_privet._tcp.local", &delegate_privet);
   ASSERT_TRUE(listener_privet->Start());
 
@@ -885,7 +894,7 @@
 TEST_F(MDnsTest, GoodbyePacketRemoval) {
   StrictMock<MockListenerDelegate> delegate_privet;
 
-  scoped_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
       dns_protocol::kTypePTR, "_privet._tcp.local", &delegate_privet);
   ASSERT_TRUE(listener_privet->Start());
 
@@ -940,7 +949,7 @@
   IPAddress address;
   StrictMock<MockListenerDelegate> delegate_privet;
 
-  scoped_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
       dns_protocol::kTypeA, "privet.local", &delegate_privet);
 
   ASSERT_TRUE(listener_privet->Start());
@@ -957,13 +966,13 @@
 
 TEST_F(MDnsTest, NsecWithListener) {
   StrictMock<MockListenerDelegate> delegate_privet;
-  scoped_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
       dns_protocol::kTypeA, "_privet._tcp.local", &delegate_privet);
 
   // Test to make sure nsec callback is NOT called for PTR
   // (which is marked as existing).
   StrictMock<MockListenerDelegate> delegate_privet2;
-  scoped_ptr<MDnsListener> listener_privet2 = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_privet2 = test_client_->CreateListener(
       dns_protocol::kTypePTR, "_privet._tcp.local", &delegate_privet2);
 
   ASSERT_TRUE(listener_privet->Start());
@@ -976,7 +985,7 @@
 }
 
 TEST_F(MDnsTest, NsecWithTransactionFromNetwork) {
-  scoped_ptr<MDnsTransaction> transaction_privet =
+  std::unique_ptr<MDnsTransaction> transaction_privet =
       test_client_->CreateTransaction(
           dns_protocol::kTypeA, "_privet._tcp.local",
           MDnsTransaction::QUERY_NETWORK | MDnsTransaction::QUERY_CACHE |
@@ -998,8 +1007,9 @@
 TEST_F(MDnsTest, NsecWithTransactionFromCache) {
   // Force mDNS to listen.
   StrictMock<MockListenerDelegate> delegate_irrelevant;
-  scoped_ptr<MDnsListener> listener_irrelevant = test_client_->CreateListener(
-      dns_protocol::kTypePTR, "_privet._tcp.local", &delegate_irrelevant);
+  std::unique_ptr<MDnsListener> listener_irrelevant =
+      test_client_->CreateListener(dns_protocol::kTypePTR, "_privet._tcp.local",
+                                   &delegate_irrelevant);
   listener_irrelevant->Start();
 
   SimulatePacketReceive(kSamplePacketNsec,
@@ -1008,7 +1018,7 @@
   EXPECT_CALL(*this,
               MockableRecordCallback(MDnsTransaction::RESULT_NSEC, NULL));
 
-  scoped_ptr<MDnsTransaction> transaction_privet_a =
+  std::unique_ptr<MDnsTransaction> transaction_privet_a =
       test_client_->CreateTransaction(
           dns_protocol::kTypeA, "_privet._tcp.local",
           MDnsTransaction::QUERY_NETWORK | MDnsTransaction::QUERY_CACHE |
@@ -1021,7 +1031,7 @@
   // Test that a PTR transaction does NOT consider the same NSEC record to be a
   // valid answer to the query
 
-  scoped_ptr<MDnsTransaction> transaction_privet_ptr =
+  std::unique_ptr<MDnsTransaction> transaction_privet_ptr =
       test_client_->CreateTransaction(
           dns_protocol::kTypePTR, "_privet._tcp.local",
           MDnsTransaction::QUERY_NETWORK | MDnsTransaction::QUERY_CACHE |
@@ -1036,7 +1046,7 @@
 
 TEST_F(MDnsTest, NsecConflictRemoval) {
   StrictMock<MockListenerDelegate> delegate_privet;
-  scoped_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
       dns_protocol::kTypeA, "_privet._tcp.local", &delegate_privet);
 
   ASSERT_TRUE(listener_privet->Start());
@@ -1065,7 +1075,7 @@
 
 TEST_F(MDnsTest, RefreshQuery) {
   StrictMock<MockListenerDelegate> delegate_privet;
-  scoped_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
+  std::unique_ptr<MDnsListener> listener_privet = test_client_->CreateListener(
       dns_protocol::kTypeA, "_privet._tcp.local", &delegate_privet);
 
   listener_privet->SetActiveRefresh(true);
@@ -1092,17 +1102,17 @@
 class SimpleMockSocketFactory : public MDnsSocketFactory {
  public:
   void CreateSockets(
-      std::vector<scoped_ptr<DatagramServerSocket>>* sockets) override {
+      std::vector<std::unique_ptr<DatagramServerSocket>>* sockets) override {
     sockets->clear();
     sockets->swap(sockets_);
   }
 
-  void PushSocket(scoped_ptr<DatagramServerSocket> socket) {
+  void PushSocket(std::unique_ptr<DatagramServerSocket> socket) {
     sockets_.push_back(std::move(socket));
   }
 
  private:
-  std::vector<scoped_ptr<DatagramServerSocket>> sockets_;
+  std::vector<std::unique_ptr<DatagramServerSocket>> sockets_;
 };
 
 class MockMDnsConnectionDelegate : public MDnsConnection::Delegate {
@@ -1126,8 +1136,8 @@
   void SetUp() override {
     socket_ipv4_ = new MockMDnsDatagramServerSocket(ADDRESS_FAMILY_IPV4);
     socket_ipv6_ = new MockMDnsDatagramServerSocket(ADDRESS_FAMILY_IPV6);
-    factory_.PushSocket(make_scoped_ptr(socket_ipv6_));
-    factory_.PushSocket(make_scoped_ptr(socket_ipv4_));
+    factory_.PushSocket(base::WrapUnique(socket_ipv6_));
+    factory_.PushSocket(base::WrapUnique(socket_ipv4_));
     sample_packet_ = MakeString(kSamplePacket1, sizeof(kSamplePacket1));
     sample_buffer_ = new StringIOBuffer(sample_packet_);
   }
diff --git a/net/dns/mock_host_resolver.cc b/net/dns/mock_host_resolver.cc
index b734cd3..fb71bc06 100644
--- a/net/dns/mock_host_resolver.cc
+++ b/net/dns/mock_host_resolver.cc
@@ -116,7 +116,7 @@
   size_t id = reinterpret_cast<size_t>(handle);
   RequestMap::iterator it = requests_.find(id);
   if (it != requests_.end()) {
-    scoped_ptr<Request> req(it->second);
+    std::unique_ptr<Request> req(it->second);
     requests_.erase(it);
   } else {
     NOTREACHED() << "CancelRequest must NOT be called after request is "
@@ -212,7 +212,7 @@
   if (it == requests_.end())
     return;  // was canceled
 
-  scoped_ptr<Request> req(it->second);
+  std::unique_ptr<Request> req(it->second);
   requests_.erase(it);
   int rv = ResolveProc(id, req->info, req->addresses);
   if (!req->callback.is_null())
diff --git a/net/dns/mock_host_resolver.h b/net/dns/mock_host_resolver.h
index 71f557e..c4312fb 100644
--- a/net/dns/mock_host_resolver.h
+++ b/net/dns/mock_host_resolver.h
@@ -135,7 +135,7 @@
   bool synchronous_mode_;
   bool ondemand_mode_;
   scoped_refptr<RuleBasedHostResolverProc> rules_;
-  scoped_ptr<HostCache> cache_;
+  std::unique_ptr<HostCache> cache_;
   RequestMap requests_;
   size_t next_request_id_;
 
diff --git a/net/dns/mock_mdns_socket_factory.cc b/net/dns/mock_mdns_socket_factory.cc
index ae46d2f..e0a3b3e 100644
--- a/net/dns/mock_mdns_socket_factory.cc
+++ b/net/dns/mock_mdns_socket_factory.cc
@@ -67,15 +67,15 @@
 }
 
 void MockMDnsSocketFactory::CreateSockets(
-    std::vector<scoped_ptr<DatagramServerSocket>>* sockets) {
+    std::vector<std::unique_ptr<DatagramServerSocket>>* sockets) {
   CreateSocket(ADDRESS_FAMILY_IPV4, sockets);
   CreateSocket(ADDRESS_FAMILY_IPV6, sockets);
 }
 
 void MockMDnsSocketFactory::CreateSocket(
     AddressFamily address_family,
-    std::vector<scoped_ptr<DatagramServerSocket>>* sockets) {
-  scoped_ptr<testing::NiceMock<MockMDnsDatagramServerSocket> > new_socket(
+    std::vector<std::unique_ptr<DatagramServerSocket>>* sockets) {
+  std::unique_ptr<testing::NiceMock<MockMDnsDatagramServerSocket>> new_socket(
       new testing::NiceMock<MockMDnsDatagramServerSocket>(address_family));
 
   ON_CALL(*new_socket, SendToInternal(_, _, _))
diff --git a/net/dns/mock_mdns_socket_factory.h b/net/dns/mock_mdns_socket_factory.h
index 179fb39..a55d517 100644
--- a/net/dns/mock_mdns_socket_factory.h
+++ b/net/dns/mock_mdns_socket_factory.h
@@ -7,10 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "net/dns/mdns_client_impl.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
@@ -83,7 +83,7 @@
   ~MockMDnsSocketFactory() override;
 
   void CreateSockets(
-      std::vector<scoped_ptr<DatagramServerSocket>>* sockets) override;
+      std::vector<std::unique_ptr<DatagramServerSocket>>* sockets) override;
 
   void SimulateReceive(const uint8_t* packet, int size);
 
@@ -99,8 +99,9 @@
                        IPEndPoint* address,
                        const CompletionCallback& callback);
 
-  void CreateSocket(AddressFamily address_family,
-                    std::vector<scoped_ptr<DatagramServerSocket>>* sockets);
+  void CreateSocket(
+      AddressFamily address_family,
+      std::vector<std::unique_ptr<DatagramServerSocket>>* sockets);
 
   scoped_refptr<IOBuffer> recv_buffer_;
   int recv_buffer_size_;
diff --git a/net/dns/mojo_host_resolver_impl_unittest.cc b/net/dns/mojo_host_resolver_impl_unittest.cc
index 6816a6b8..0bb28a9 100644
--- a/net/dns/mojo_host_resolver_impl_unittest.cc
+++ b/net/dns/mojo_host_resolver_impl_unittest.cc
@@ -4,10 +4,10 @@
 
 #include "net/dns/mojo_host_resolver_impl.h"
 
+#include <memory>
 #include <string>
 #include <utility>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/time/time.h"
 #include "mojo/public/cpp/bindings/binding.h"
@@ -157,7 +157,7 @@
   }
 
   CallbackMockHostResolver mock_host_resolver_;
-  scoped_ptr<MojoHostResolverImpl> resolver_service_;
+  std::unique_ptr<MojoHostResolverImpl> resolver_service_;
 };
 
 TEST_F(MojoHostResolverImplTest, Resolve) {
@@ -267,7 +267,7 @@
 
 TEST_F(MojoHostResolverImplTest, DestroyClient) {
   interfaces::HostResolverRequestClientPtr client_ptr;
-  scoped_ptr<TestRequestClient> client(
+  std::unique_ptr<TestRequestClient> client(
       new TestRequestClient(mojo::GetProxy(&client_ptr)));
 
   mock_host_resolver_.set_ondemand_mode(true);
diff --git a/net/dns/record_parsed.cc b/net/dns/record_parsed.cc
index c5a72ef5..68948f6 100644
--- a/net/dns/record_parsed.cc
+++ b/net/dns/record_parsed.cc
@@ -16,7 +16,7 @@
                            uint16_t type,
                            uint16_t klass,
                            uint32_t ttl,
-                           scoped_ptr<const RecordRdata> rdata,
+                           std::unique_ptr<const RecordRdata> rdata,
                            base::Time time_created)
     : name_(name),
       type_(type),
@@ -29,14 +29,14 @@
 }
 
 // static
-scoped_ptr<const RecordParsed> RecordParsed::CreateFrom(
+std::unique_ptr<const RecordParsed> RecordParsed::CreateFrom(
     DnsRecordParser* parser,
     base::Time time_created) {
   DnsResourceRecord record;
-  scoped_ptr<const RecordRdata> rdata;
+  std::unique_ptr<const RecordRdata> rdata;
 
   if (!parser->ReadRecord(&record))
-    return scoped_ptr<const RecordParsed>();
+    return std::unique_ptr<const RecordParsed>();
 
   switch (record.type) {
     case ARecordRdata::kType:
@@ -62,13 +62,13 @@
       break;
     default:
       DVLOG(1) << "Unknown RData type for received record: " << record.type;
-      return scoped_ptr<const RecordParsed>();
+      return std::unique_ptr<const RecordParsed>();
   }
 
   if (!rdata.get())
-    return scoped_ptr<const RecordParsed>();
+    return std::unique_ptr<const RecordParsed>();
 
-  return scoped_ptr<const RecordParsed>(
+  return std::unique_ptr<const RecordParsed>(
       new RecordParsed(record.name, record.type, record.klass, record.ttl,
                        std::move(rdata), time_created));
 }
diff --git a/net/dns/record_parsed.h b/net/dns/record_parsed.h
index 654574c..be227d4 100644
--- a/net/dns/record_parsed.h
+++ b/net/dns/record_parsed.h
@@ -7,9 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/net_export.h"
 
@@ -25,8 +25,9 @@
   virtual ~RecordParsed();
 
   // All records are inherently immutable. Return a const pointer.
-  static scoped_ptr<const RecordParsed> CreateFrom(DnsRecordParser* parser,
-                                                   base::Time time_created);
+  static std::unique_ptr<const RecordParsed> CreateFrom(
+      DnsRecordParser* parser,
+      base::Time time_created);
 
   const std::string& name() const { return name_; }
   uint16_t type() const { return type_; }
@@ -51,7 +52,7 @@
                uint16_t type,
                uint16_t klass,
                uint32_t ttl,
-               scoped_ptr<const RecordRdata> rdata,
+               std::unique_ptr<const RecordRdata> rdata,
                base::Time time_created);
 
   std::string name_;  // in dotted form
@@ -59,7 +60,7 @@
   const uint16_t klass_;
   const uint32_t ttl_;
 
-  const scoped_ptr<const RecordRdata> rdata_;
+  const std::unique_ptr<const RecordRdata> rdata_;
 
   const base::Time time_created_;
 };
diff --git a/net/dns/record_parsed_unittest.cc b/net/dns/record_parsed_unittest.cc
index cfaac31..558d196 100644
--- a/net/dns/record_parsed_unittest.cc
+++ b/net/dns/record_parsed_unittest.cc
@@ -26,7 +26,7 @@
 TEST(RecordParsedTest, ParseSingleRecord) {
   DnsRecordParser parser(kT1ResponseDatagram, sizeof(kT1ResponseDatagram),
                          sizeof(dns_protocol::Header));
-  scoped_ptr<const RecordParsed> record;
+  std::unique_ptr<const RecordParsed> record;
   const CnameRecordRdata* rdata;
 
   parser.SkipQuestion();
@@ -49,14 +49,14 @@
   DnsRecordParser parser1(kT1ResponseDatagram, sizeof(kT1ResponseDatagram),
                          sizeof(dns_protocol::Header));
   parser1.SkipQuestion();
-  scoped_ptr<const RecordParsed> record1 =
+  std::unique_ptr<const RecordParsed> record1 =
       RecordParsed::CreateFrom(&parser1, base::Time());
 
   DnsRecordParser parser2(kT1ResponseWithCacheFlushBit,
                           sizeof(kT1ResponseWithCacheFlushBit),
                           0);
 
-  scoped_ptr<const RecordParsed> record2 =
+  std::unique_ptr<const RecordParsed> record2 =
       RecordParsed::CreateFrom(&parser2, base::Time());
 
   EXPECT_FALSE(record1->IsEqual(record2.get(), false));
diff --git a/net/dns/record_rdata.cc b/net/dns/record_rdata.cc
index be9d387f..d413f4e 100644
--- a/net/dns/record_rdata.cc
+++ b/net/dns/record_rdata.cc
@@ -22,12 +22,13 @@
 SrvRecordRdata::~SrvRecordRdata() {}
 
 // static
-scoped_ptr<SrvRecordRdata> SrvRecordRdata::Create(
+std::unique_ptr<SrvRecordRdata> SrvRecordRdata::Create(
     const base::StringPiece& data,
     const DnsRecordParser& parser) {
-  if (data.size() < kSrvRecordMinimumSize) return scoped_ptr<SrvRecordRdata>();
+  if (data.size() < kSrvRecordMinimumSize)
+    return std::unique_ptr<SrvRecordRdata>();
 
-  scoped_ptr<SrvRecordRdata> rdata(new SrvRecordRdata);
+  std::unique_ptr<SrvRecordRdata> rdata(new SrvRecordRdata);
 
   base::BigEndianReader reader(data.data(), data.size());
   // 2 bytes for priority, 2 bytes for weight, 2 bytes for port.
@@ -37,7 +38,7 @@
 
   if (!parser.ReadName(data.substr(kSrvRecordMinimumSize).begin(),
                        &rdata->target_))
-    return scoped_ptr<SrvRecordRdata>();
+    return std::unique_ptr<SrvRecordRdata>();
 
   return rdata;
 }
@@ -62,13 +63,13 @@
 }
 
 // static
-scoped_ptr<ARecordRdata> ARecordRdata::Create(
+std::unique_ptr<ARecordRdata> ARecordRdata::Create(
     const base::StringPiece& data,
     const DnsRecordParser& parser) {
   if (data.size() != IPAddress::kIPv4AddressSize)
-    return scoped_ptr<ARecordRdata>();
+    return std::unique_ptr<ARecordRdata>();
 
-  scoped_ptr<ARecordRdata> rdata(new ARecordRdata);
+  std::unique_ptr<ARecordRdata> rdata(new ARecordRdata);
   rdata->address_ =
       IPAddress(reinterpret_cast<const uint8_t*>(data.data()), data.length());
   return rdata;
@@ -91,13 +92,13 @@
 }
 
 // static
-scoped_ptr<AAAARecordRdata> AAAARecordRdata::Create(
+std::unique_ptr<AAAARecordRdata> AAAARecordRdata::Create(
     const base::StringPiece& data,
     const DnsRecordParser& parser) {
   if (data.size() != IPAddress::kIPv6AddressSize)
-    return scoped_ptr<AAAARecordRdata>();
+    return std::unique_ptr<AAAARecordRdata>();
 
-  scoped_ptr<AAAARecordRdata> rdata(new AAAARecordRdata);
+  std::unique_ptr<AAAARecordRdata> rdata(new AAAARecordRdata);
   rdata->address_ =
       IPAddress(reinterpret_cast<const uint8_t*>(data.data()), data.length());
   return rdata;
@@ -120,13 +121,13 @@
 }
 
 // static
-scoped_ptr<CnameRecordRdata> CnameRecordRdata::Create(
+std::unique_ptr<CnameRecordRdata> CnameRecordRdata::Create(
     const base::StringPiece& data,
     const DnsRecordParser& parser) {
-  scoped_ptr<CnameRecordRdata> rdata(new CnameRecordRdata);
+  std::unique_ptr<CnameRecordRdata> rdata(new CnameRecordRdata);
 
   if (!parser.ReadName(data.begin(), &rdata->cname_))
-    return scoped_ptr<CnameRecordRdata>();
+    return std::unique_ptr<CnameRecordRdata>();
 
   return rdata;
 }
@@ -149,13 +150,13 @@
 }
 
 // static
-scoped_ptr<PtrRecordRdata> PtrRecordRdata::Create(
+std::unique_ptr<PtrRecordRdata> PtrRecordRdata::Create(
     const base::StringPiece& data,
     const DnsRecordParser& parser) {
-  scoped_ptr<PtrRecordRdata> rdata(new PtrRecordRdata);
+  std::unique_ptr<PtrRecordRdata> rdata(new PtrRecordRdata);
 
   if (!parser.ReadName(data.begin(), &rdata->ptrdomain_))
-    return scoped_ptr<PtrRecordRdata>();
+    return std::unique_ptr<PtrRecordRdata>();
 
   return rdata;
 }
@@ -177,16 +178,16 @@
 }
 
 // static
-scoped_ptr<TxtRecordRdata> TxtRecordRdata::Create(
+std::unique_ptr<TxtRecordRdata> TxtRecordRdata::Create(
     const base::StringPiece& data,
     const DnsRecordParser& parser) {
-  scoped_ptr<TxtRecordRdata> rdata(new TxtRecordRdata);
+  std::unique_ptr<TxtRecordRdata> rdata(new TxtRecordRdata);
 
   for (size_t i = 0; i < data.size(); ) {
     uint8_t length = data[i];
 
     if (i + length >= data.size())
-      return scoped_ptr<TxtRecordRdata>();
+      return std::unique_ptr<TxtRecordRdata>();
 
     rdata->texts_.push_back(data.substr(i + 1, length).as_string());
 
@@ -214,10 +215,10 @@
 }
 
 // static
-scoped_ptr<NsecRecordRdata> NsecRecordRdata::Create(
+std::unique_ptr<NsecRecordRdata> NsecRecordRdata::Create(
     const base::StringPiece& data,
     const DnsRecordParser& parser) {
-  scoped_ptr<NsecRecordRdata> rdata(new NsecRecordRdata);
+  std::unique_ptr<NsecRecordRdata> rdata(new NsecRecordRdata);
 
   // Read the "next domain". This part for the NSEC record format is
   // ignored for mDNS, since it has no semantic meaning.
@@ -226,7 +227,7 @@
   // If we did not succeed in getting the next domain or the data length
   // is too short for reading the bitmap header, return.
   if (next_domain_length == 0 || data.length() < next_domain_length + 2)
-    return scoped_ptr<NsecRecordRdata>();
+    return std::unique_ptr<NsecRecordRdata>();
 
   struct BitmapHeader {
     uint8_t block_number;  // The block number should be zero.
@@ -239,14 +240,14 @@
   // The block number must be zero in mDns-specific NSEC records. The bitmap
   // length must be between 1 and 32.
   if (header->block_number != 0 || header->length == 0 || header->length > 32)
-    return scoped_ptr<NsecRecordRdata>();
+    return std::unique_ptr<NsecRecordRdata>();
 
   base::StringPiece bitmap_data = data.substr(next_domain_length + 2);
 
   // Since we may only have one block, the data length must be exactly equal to
   // the domain length plus bitmap size.
   if (bitmap_data.length() != header->length)
-    return scoped_ptr<NsecRecordRdata>();
+    return std::unique_ptr<NsecRecordRdata>();
 
   rdata->bitmap_.insert(rdata->bitmap_.begin(),
                         bitmap_data.begin(),
diff --git a/net/dns/record_rdata.h b/net/dns/record_rdata.h
index fea1f6b..d2ca587 100644
--- a/net/dns/record_rdata.h
+++ b/net/dns/record_rdata.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/ip_address.h"
 #include "net/base/net_export.h"
@@ -47,8 +47,8 @@
   static const uint16_t kType = dns_protocol::kTypeSRV;
 
   ~SrvRecordRdata() override;
-  static scoped_ptr<SrvRecordRdata> Create(const base::StringPiece& data,
-                                           const DnsRecordParser& parser);
+  static std::unique_ptr<SrvRecordRdata> Create(const base::StringPiece& data,
+                                                const DnsRecordParser& parser);
 
   bool IsEqual(const RecordRdata* other) const override;
   uint16_t Type() const override;
@@ -78,8 +78,8 @@
   static const uint16_t kType = dns_protocol::kTypeA;
 
   ~ARecordRdata() override;
-  static scoped_ptr<ARecordRdata> Create(const base::StringPiece& data,
-                                         const DnsRecordParser& parser);
+  static std::unique_ptr<ARecordRdata> Create(const base::StringPiece& data,
+                                              const DnsRecordParser& parser);
   bool IsEqual(const RecordRdata* other) const override;
   uint16_t Type() const override;
 
@@ -100,8 +100,8 @@
   static const uint16_t kType = dns_protocol::kTypeAAAA;
 
   ~AAAARecordRdata() override;
-  static scoped_ptr<AAAARecordRdata> Create(const base::StringPiece& data,
-                                         const DnsRecordParser& parser);
+  static std::unique_ptr<AAAARecordRdata> Create(const base::StringPiece& data,
+                                                 const DnsRecordParser& parser);
   bool IsEqual(const RecordRdata* other) const override;
   uint16_t Type() const override;
 
@@ -122,8 +122,9 @@
   static const uint16_t kType = dns_protocol::kTypeCNAME;
 
   ~CnameRecordRdata() override;
-  static scoped_ptr<CnameRecordRdata> Create(const base::StringPiece& data,
-                                             const DnsRecordParser& parser);
+  static std::unique_ptr<CnameRecordRdata> Create(
+      const base::StringPiece& data,
+      const DnsRecordParser& parser);
   bool IsEqual(const RecordRdata* other) const override;
   uint16_t Type() const override;
 
@@ -144,8 +145,8 @@
   static const uint16_t kType = dns_protocol::kTypePTR;
 
   ~PtrRecordRdata() override;
-  static scoped_ptr<PtrRecordRdata> Create(const base::StringPiece& data,
-                                           const DnsRecordParser& parser);
+  static std::unique_ptr<PtrRecordRdata> Create(const base::StringPiece& data,
+                                                const DnsRecordParser& parser);
   bool IsEqual(const RecordRdata* other) const override;
   uint16_t Type() const override;
 
@@ -167,8 +168,8 @@
   static const uint16_t kType = dns_protocol::kTypeTXT;
 
   ~TxtRecordRdata() override;
-  static scoped_ptr<TxtRecordRdata> Create(const base::StringPiece& data,
-                                           const DnsRecordParser& parser);
+  static std::unique_ptr<TxtRecordRdata> Create(const base::StringPiece& data,
+                                                const DnsRecordParser& parser);
   bool IsEqual(const RecordRdata* other) const override;
   uint16_t Type() const override;
 
@@ -191,8 +192,8 @@
   static const uint16_t kType = dns_protocol::kTypeNSEC;
 
   ~NsecRecordRdata() override;
-  static scoped_ptr<NsecRecordRdata> Create(const base::StringPiece& data,
-                                            const DnsRecordParser& parser);
+  static std::unique_ptr<NsecRecordRdata> Create(const base::StringPiece& data,
+                                                 const DnsRecordParser& parser);
   bool IsEqual(const RecordRdata* other) const override;
   uint16_t Type() const override;
 
diff --git a/net/dns/record_rdata_unittest.cc b/net/dns/record_rdata_unittest.cc
index 5db22e6..c41e39a 100644
--- a/net/dns/record_rdata_unittest.cc
+++ b/net/dns/record_rdata_unittest.cc
@@ -4,7 +4,8 @@
 
 #include "net/dns/record_rdata.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/dns/dns_response.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -16,8 +17,8 @@
 }
 
 TEST(RecordRdataTest, ParseSrvRecord) {
-  scoped_ptr<SrvRecordRdata> record1_obj;
-  scoped_ptr<SrvRecordRdata> record2_obj;
+  std::unique_ptr<SrvRecordRdata> record1_obj;
+  std::unique_ptr<SrvRecordRdata> record2_obj;
 
   // These are just the rdata portions of the DNS records, rather than complete
   // records, but it works well enough for this test.
@@ -60,7 +61,7 @@
 }
 
 TEST(RecordRdataTest, ParseARecord) {
-  scoped_ptr<ARecordRdata> record_obj;
+  std::unique_ptr<ARecordRdata> record_obj;
 
   // These are just the rdata portions of the DNS records, rather than complete
   // records, but it works well enough for this test.
@@ -81,7 +82,7 @@
 }
 
 TEST(RecordRdataTest, ParseAAAARecord) {
-  scoped_ptr<AAAARecordRdata> record_obj;
+  std::unique_ptr<AAAARecordRdata> record_obj;
 
   // These are just the rdata portions of the DNS records, rather than complete
   // records, but it works well enough for this test.
@@ -103,7 +104,7 @@
 }
 
 TEST(RecordRdataTest, ParseCnameRecord) {
-  scoped_ptr<CnameRecordRdata> record_obj;
+  std::unique_ptr<CnameRecordRdata> record_obj;
 
   // These are just the rdata portions of the DNS records, rather than complete
   // records, but it works well enough for this test.
@@ -123,7 +124,7 @@
 }
 
 TEST(RecordRdataTest, ParsePtrRecord) {
-  scoped_ptr<PtrRecordRdata> record_obj;
+  std::unique_ptr<PtrRecordRdata> record_obj;
 
   // These are just the rdata portions of the DNS records, rather than complete
   // records, but it works well enough for this test.
@@ -143,7 +144,7 @@
 }
 
 TEST(RecordRdataTest, ParseTxtRecord) {
-  scoped_ptr<TxtRecordRdata> record_obj;
+  std::unique_ptr<TxtRecordRdata> record_obj;
 
   // These are just the rdata portions of the DNS records, rather than complete
   // records, but it works well enough for this test.
@@ -168,7 +169,7 @@
 }
 
 TEST(RecordRdataTest, ParseNsecRecord) {
-  scoped_ptr<NsecRecordRdata> record_obj;
+  std::unique_ptr<NsecRecordRdata> record_obj;
 
   // These are just the rdata portions of the DNS records, rather than complete
   // records, but it works well enough for this test.
diff --git a/net/http/bidirectional_stream.cc b/net/http/bidirectional_stream.cc
index 6e0e7899..4e8724a 100644
--- a/net/http/bidirectional_stream.cc
+++ b/net/http/bidirectional_stream.cc
@@ -4,10 +4,12 @@
 
 #include "net/http/bidirectional_stream.h"
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
@@ -29,19 +31,19 @@
 BidirectionalStream::Delegate::~Delegate() {}
 
 BidirectionalStream::BidirectionalStream(
-    scoped_ptr<BidirectionalStreamRequestInfo> request_info,
+    std::unique_ptr<BidirectionalStreamRequestInfo> request_info,
     HttpNetworkSession* session,
     Delegate* delegate)
     : BidirectionalStream(std::move(request_info),
                           session,
                           delegate,
-                          make_scoped_ptr(new base::Timer(false, false))) {}
+                          base::WrapUnique(new base::Timer(false, false))) {}
 
 BidirectionalStream::BidirectionalStream(
-    scoped_ptr<BidirectionalStreamRequestInfo> request_info,
+    std::unique_ptr<BidirectionalStreamRequestInfo> request_info,
     HttpNetworkSession* session,
     Delegate* delegate,
-    scoped_ptr<base::Timer> timer)
+    std::unique_ptr<base::Timer> timer)
     : request_info_(std::move(request_info)),
       net_log_(BoundNetLog::Make(session->net_log(),
                                  NetLog::SOURCE_BIDIRECTIONAL_STREAM)),
diff --git a/net/http/bidirectional_stream.h b/net/http/bidirectional_stream.h
index d91e41b..1663c16 100644
--- a/net/http/bidirectional_stream.h
+++ b/net/http/bidirectional_stream.h
@@ -7,10 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/http/bidirectional_stream_impl.h"
 #include "net/http/http_stream_factory.h"
 #include "net/log/net_log.h"
@@ -92,16 +93,18 @@
   // the request, and must be non-NULL. |session| is the http network session
   // with which this request will be made. |delegate| must be non-NULL.
   // |session| and |delegate| must outlive |this|.
-  BidirectionalStream(scoped_ptr<BidirectionalStreamRequestInfo> request_info,
-                      HttpNetworkSession* session,
-                      Delegate* delegate);
+  BidirectionalStream(
+      std::unique_ptr<BidirectionalStreamRequestInfo> request_info,
+      HttpNetworkSession* session,
+      Delegate* delegate);
 
   // Constructor that accepts a Timer, which can be used in tests to control
   // the buffering of received data.
-  BidirectionalStream(scoped_ptr<BidirectionalStreamRequestInfo> request_info,
-                      HttpNetworkSession* session,
-                      Delegate* delegate,
-                      scoped_ptr<base::Timer> timer);
+  BidirectionalStream(
+      std::unique_ptr<BidirectionalStreamRequestInfo> request_info,
+      HttpNetworkSession* session,
+      Delegate* delegate,
+      std::unique_ptr<base::Timer> timer);
 
   // Cancels |stream_request_| or |stream_impl_| if applicable.
   // |this| should not be destroyed during Delegate::OnHeadersSent or
@@ -186,7 +189,7 @@
   void OnQuicBroken() override;
 
   // BidirectionalStreamRequestInfo used when requesting the stream.
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info_;
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info_;
   const BoundNetLog net_log_;
 
   HttpNetworkSession* session_;
@@ -195,13 +198,13 @@
 
   // Timer used to buffer data received in short time-spans and send a single
   // read completion notification.
-  scoped_ptr<base::Timer> timer_;
+  std::unique_ptr<base::Timer> timer_;
   // HttpStreamRequest used to request a BidirectionalStreamImpl. This is NULL
   // if the request has been canceled or completed.
-  scoped_ptr<HttpStreamRequest> stream_request_;
+  std::unique_ptr<HttpStreamRequest> stream_request_;
   // The underlying BidirectioanlStreamImpl used for this stream. It is
   // non-NULL, if the |stream_request_| successfully finishes.
-  scoped_ptr<BidirectionalStreamImpl> stream_impl_;
+  std::unique_ptr<BidirectionalStreamImpl> stream_impl_;
 
   // Buffer used for reading.
   scoped_refptr<IOBuffer> read_buffer_;
diff --git a/net/http/bidirectional_stream_impl.h b/net/http/bidirectional_stream_impl.h
index 3f82e6f..68caa3e6 100644
--- a/net/http/bidirectional_stream_impl.h
+++ b/net/http/bidirectional_stream_impl.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/socket/next_proto.h"
 
@@ -91,7 +92,7 @@
   virtual void Start(const BidirectionalStreamRequestInfo* request_info,
                      const BoundNetLog& net_log,
                      BidirectionalStreamImpl::Delegate* delegate,
-                     scoped_ptr<base::Timer> timer) = 0;
+                     std::unique_ptr<base::Timer> timer) = 0;
 
   // Reads at most |buf_len| bytes into |buf|. Returns the number of bytes read,
   // ERR_IO_PENDING if the read is to be completed asynchronously, or an error
diff --git a/net/http/bidirectional_stream_unittest.cc b/net/http/bidirectional_stream_unittest.cc
index 6a4510b..2500458 100644
--- a/net/http/bidirectional_stream_unittest.cc
+++ b/net/http/bidirectional_stream_unittest.cc
@@ -4,8 +4,10 @@
 
 #include "net/http/bidirectional_stream.h"
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_piece.h"
@@ -42,11 +44,11 @@
   TestDelegateBase(IOBuffer* read_buf, int read_buf_len)
       : TestDelegateBase(read_buf,
                          read_buf_len,
-                         make_scoped_ptr(new base::Timer(false, false))) {}
+                         base::WrapUnique(new base::Timer(false, false))) {}
 
   TestDelegateBase(IOBuffer* read_buf,
                    int read_buf_len,
-                   scoped_ptr<base::Timer> timer)
+                   std::unique_ptr<base::Timer> timer)
       : read_buf_(read_buf),
         read_buf_len_(read_buf_len),
         timer_(std::move(timer)),
@@ -104,7 +106,7 @@
       loop_->Quit();
   }
 
-  void Start(scoped_ptr<BidirectionalStreamRequestInfo> request_info,
+  void Start(std::unique_ptr<BidirectionalStreamRequestInfo> request_info,
              HttpNetworkSession* session) {
     stream_.reset(new BidirectionalStream(std::move(request_info), session,
                                           this, std::move(timer_)));
@@ -176,12 +178,12 @@
   void QuitLoop() { loop_->Quit(); }
 
  private:
-  scoped_ptr<BidirectionalStream> stream_;
+  std::unique_ptr<BidirectionalStream> stream_;
   scoped_refptr<IOBuffer> read_buf_;
   int read_buf_len_;
-  scoped_ptr<base::Timer> timer_;
+  std::unique_ptr<base::Timer> timer_;
   std::string data_received_;
-  scoped_ptr<base::RunLoop> loop_;
+  std::unique_ptr<base::RunLoop> loop_;
   SpdyHeaderBlock response_headers_;
   SpdyHeaderBlock trailers_;
   int error_;
@@ -335,8 +337,8 @@
   BoundTestNetLog net_log_;
   SpdyTestUtil spdy_util_;
   SpdySessionDependencies session_deps_;
-  scoped_ptr<SequencedSocketData> sequenced_data_;
-  scoped_ptr<HttpNetworkSession> http_session_;
+  std::unique_ptr<SequencedSocketData> sequenced_data_;
+  std::unique_ptr<HttpNetworkSession> http_session_;
 
  private:
   SSLSocketDataProvider ssl_data_;
@@ -344,7 +346,7 @@
 };
 
 TEST_F(BidirectionalStreamTest, CreateInsecureStream) {
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "GET";
   request_info->url = GURL("http://www.example.org/");
@@ -352,7 +354,7 @@
   TestDelegateBase delegate(nullptr, 0);
   HttpNetworkSession::Params params =
       SpdySessionDependencies::CreateSessionParams(&session_deps_);
-  scoped_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
+  std::unique_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
   delegate.SetRunUntilCompletion(true);
   delegate.Start(std::move(request_info), session.get());
 
@@ -362,10 +364,10 @@
 // Simulates user calling ReadData after END_STREAM has been received in
 // BidirectionalStreamSpdyImpl.
 TEST_F(BidirectionalStreamTest, TestReadDataAfterClose) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
   // Empty DATA frame with an END_STREAM flag.
-  scoped_ptr<SpdySerializedFrame> end_stream(
+  std::unique_ptr<SpdySerializedFrame> end_stream(
       spdy_util_.ConstructSpdyBodyFrame(1, nullptr, 0, true));
   MockWrite writes[] = {
       CreateMockWrite(*req.get(), 0),
@@ -373,13 +375,13 @@
 
   const char* const kExtraResponseHeaders[] = {"header-name", "header-value"};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(kExtraResponseHeaders, 1, 1));
 
-  scoped_ptr<SpdySerializedFrame> body_frame(
+  std::unique_ptr<SpdySerializedFrame> body_frame(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
   // Last body frame has END_STREAM flag set.
-  scoped_ptr<SpdySerializedFrame> last_body_frame(
+  std::unique_ptr<SpdySerializedFrame> last_body_frame(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   MockRead reads[] = {
@@ -397,7 +399,7 @@
                      PRIVACY_MODE_DISABLED);
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "GET";
   request_info->url = GURL("https://www.example.org/");
@@ -408,8 +410,8 @@
   // Create a MockTimer. Retain a raw pointer since the underlying
   // BidirectionalStreamImpl owns it.
   MockTimer* timer = new MockTimer();
-  scoped_ptr<TestDelegateBase> delegate(new TestDelegateBase(
-      read_buffer.get(), kReadBufferSize, make_scoped_ptr(timer)));
+  std::unique_ptr<TestDelegateBase> delegate(new TestDelegateBase(
+      read_buffer.get(), kReadBufferSize, base::WrapUnique(timer)));
   delegate->set_do_not_start_read(true);
 
   delegate->Start(std::move(request_info), http_session_.get());
@@ -453,19 +455,19 @@
 TEST_F(BidirectionalStreamTest, TestContainFullBytes) {
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       "https://www.example.org", 1, kBodyDataSize * 3, LOWEST, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> data_frame(
+  std::unique_ptr<SpdySerializedFrame> data_frame(
       framer.CreateDataFrame(1, kBodyData, kBodyDataSize, DATA_FLAG_FIN));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*data_frame, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> response_body_frame1(
+  std::unique_ptr<SpdySerializedFrame> response_body_frame1(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> response_body_frame2(
+  std::unique_ptr<SpdySerializedFrame> response_body_frame2(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   MockRead reads[] = {
@@ -482,7 +484,7 @@
                      PRIVACY_MODE_DISABLED);
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "POST";
   request_info->url = GURL("https://www.example.org/");
@@ -492,8 +494,8 @@
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
   MockTimer* timer = new MockTimer();
-  scoped_ptr<TestDelegateBase> delegate(new TestDelegateBase(
-      read_buffer.get(), kReadBufferSize, make_scoped_ptr(timer)));
+  std::unique_ptr<TestDelegateBase> delegate(new TestDelegateBase(
+      read_buffer.get(), kReadBufferSize, base::WrapUnique(timer)));
   delegate->set_do_not_start_read(true);
   delegate->Start(std::move(request_info), http_session_.get());
   // Send the request and receive response headers.
@@ -558,24 +560,24 @@
 TEST_F(BidirectionalStreamTest, TestInterleaveReadDataAndSendData) {
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       "https://www.example.org", 1, kBodyDataSize * 3, LOWEST, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> data_frame1(
+  std::unique_ptr<SpdySerializedFrame> data_frame1(
       framer.CreateDataFrame(1, kBodyData, kBodyDataSize, DATA_FLAG_NONE));
-  scoped_ptr<SpdySerializedFrame> data_frame2(
+  std::unique_ptr<SpdySerializedFrame> data_frame2(
       framer.CreateDataFrame(1, kBodyData, kBodyDataSize, DATA_FLAG_NONE));
-  scoped_ptr<SpdySerializedFrame> data_frame3(
+  std::unique_ptr<SpdySerializedFrame> data_frame3(
       framer.CreateDataFrame(1, kBodyData, kBodyDataSize, DATA_FLAG_FIN));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*data_frame1, 3),
       CreateMockWrite(*data_frame2, 6), CreateMockWrite(*data_frame3, 9),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> response_body_frame1(
+  std::unique_ptr<SpdySerializedFrame> response_body_frame1(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> response_body_frame2(
+  std::unique_ptr<SpdySerializedFrame> response_body_frame2(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   MockRead reads[] = {
@@ -593,7 +595,7 @@
                      PRIVACY_MODE_DISABLED);
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "POST";
   request_info->url = GURL("https://www.example.org/");
@@ -603,8 +605,8 @@
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
   MockTimer* timer = new MockTimer();
-  scoped_ptr<TestDelegateBase> delegate(new TestDelegateBase(
-      read_buffer.get(), kReadBufferSize, make_scoped_ptr(timer)));
+  std::unique_ptr<TestDelegateBase> delegate(new TestDelegateBase(
+      read_buffer.get(), kReadBufferSize, base::WrapUnique(timer)));
   delegate->set_do_not_start_read(true);
   delegate->Start(std::move(request_info), http_session_.get());
   // Send the request and receive response headers.
@@ -665,18 +667,18 @@
 // Tests that BidirectionalStreamSpdyImpl::OnClose will complete any remaining
 // read even if the read queue is empty.
 TEST_F(BidirectionalStreamTest, TestCompleteAsyncRead) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
   // Empty DATA frame with an END_STREAM flag.
-  scoped_ptr<SpdySerializedFrame> end_stream(
+  std::unique_ptr<SpdySerializedFrame> end_stream(
       spdy_util_.ConstructSpdyBodyFrame(1, nullptr, 0, true));
 
   MockWrite writes[] = {CreateMockWrite(*req.get(), 0)};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
 
-  scoped_ptr<SpdySerializedFrame> response_body_frame(
+  std::unique_ptr<SpdySerializedFrame> response_body_frame(
       spdy_util_.ConstructSpdyBodyFrame(1, nullptr, 0, true));
 
   MockRead reads[] = {
@@ -690,7 +692,7 @@
                      PRIVACY_MODE_DISABLED);
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "GET";
   request_info->url = GURL("https://www.example.org/");
@@ -699,8 +701,8 @@
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
   MockTimer* timer = new MockTimer();
-  scoped_ptr<TestDelegateBase> delegate(new TestDelegateBase(
-      read_buffer.get(), kReadBufferSize, make_scoped_ptr(timer)));
+  std::unique_ptr<TestDelegateBase> delegate(new TestDelegateBase(
+      read_buffer.get(), kReadBufferSize, base::WrapUnique(timer)));
   delegate->set_do_not_start_read(true);
   delegate->Start(std::move(request_info), http_session_.get());
   // Write request, and deliver response headers.
@@ -727,23 +729,23 @@
 }
 
 TEST_F(BidirectionalStreamTest, TestBuffering) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
   // Empty DATA frame with an END_STREAM flag.
-  scoped_ptr<SpdySerializedFrame> end_stream(
+  std::unique_ptr<SpdySerializedFrame> end_stream(
       spdy_util_.ConstructSpdyBodyFrame(1, nullptr, 0, true));
 
   MockWrite writes[] = {CreateMockWrite(*req.get(), 0)};
 
   const char* const kExtraResponseHeaders[] = {"header-name", "header-value"};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(kExtraResponseHeaders, 1, 1));
 
-  scoped_ptr<SpdySerializedFrame> body_frame(
+  std::unique_ptr<SpdySerializedFrame> body_frame(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
   // Last body frame has END_STREAM flag set.
-  scoped_ptr<SpdySerializedFrame> last_body_frame(
+  std::unique_ptr<SpdySerializedFrame> last_body_frame(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   MockRead reads[] = {
@@ -760,7 +762,7 @@
                      PRIVACY_MODE_DISABLED);
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "GET";
   request_info->url = GURL("https://www.example.org/");
@@ -769,8 +771,8 @@
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
   MockTimer* timer = new MockTimer();
-  scoped_ptr<TestDelegateBase> delegate(new TestDelegateBase(
-      read_buffer.get(), kReadBufferSize, make_scoped_ptr(timer)));
+  std::unique_ptr<TestDelegateBase> delegate(new TestDelegateBase(
+      read_buffer.get(), kReadBufferSize, base::WrapUnique(timer)));
   delegate->Start(std::move(request_info), http_session_.get());
   // Deliver two DATA frames together.
   sequenced_data_->RunUntilPaused();
@@ -809,10 +811,10 @@
 }
 
 TEST_F(BidirectionalStreamTest, TestBufferingWithTrailers) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
   // Empty DATA frame with an END_STREAM flag.
-  scoped_ptr<SpdySerializedFrame> end_stream(
+  std::unique_ptr<SpdySerializedFrame> end_stream(
       spdy_util_.ConstructSpdyBodyFrame(1, nullptr, 0, true));
 
   MockWrite writes[] = {
@@ -821,15 +823,15 @@
 
   const char* const kExtraResponseHeaders[] = {"header-name", "header-value"};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(kExtraResponseHeaders, 1, 1));
 
-  scoped_ptr<SpdySerializedFrame> body_frame(
+  std::unique_ptr<SpdySerializedFrame> body_frame(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
 
   SpdyHeaderBlock late_headers;
   late_headers["foo"] = "bar";
-  scoped_ptr<SpdySerializedFrame> trailers(
+  std::unique_ptr<SpdySerializedFrame> trailers(
       spdy_util_.ConstructSpdyResponseHeaders(1, late_headers, true));
 
   MockRead reads[] = {
@@ -846,10 +848,10 @@
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
   MockTimer* timer = new MockTimer();
-  scoped_ptr<TestDelegateBase> delegate(new TestDelegateBase(
-      read_buffer.get(), kReadBufferSize, make_scoped_ptr(timer)));
+  std::unique_ptr<TestDelegateBase> delegate(new TestDelegateBase(
+      read_buffer.get(), kReadBufferSize, base::WrapUnique(timer)));
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "GET";
   request_info->url = GURL("https://www.example.org/");
@@ -889,11 +891,11 @@
 TEST_F(BidirectionalStreamTest, CancelStreamAfterSendData) {
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       "https://www.example.org", 1, kBodyDataSize * 3, LOWEST, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> data_frame(
+  std::unique_ptr<SpdySerializedFrame> data_frame(
       framer.CreateDataFrame(1, kBodyData, kBodyDataSize, DATA_FLAG_NONE));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
 
   MockWrite writes[] = {
@@ -901,9 +903,9 @@
       CreateMockWrite(*rst, 5),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> response_body_frame(
+  std::unique_ptr<SpdySerializedFrame> response_body_frame(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
 
   MockRead reads[] = {
@@ -918,7 +920,7 @@
                      PRIVACY_MODE_DISABLED);
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "POST";
   request_info->url = GURL("https://www.example.org/");
@@ -927,7 +929,7 @@
                                         base::SizeTToString(kBodyDataSize * 3));
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<TestDelegateBase> delegate(
+  std::unique_ptr<TestDelegateBase> delegate(
       new TestDelegateBase(read_buffer.get(), kReadBufferSize));
   delegate->set_do_not_start_read(true);
   delegate->Start(std::move(request_info), http_session_.get());
@@ -959,20 +961,20 @@
 TEST_F(BidirectionalStreamTest, CancelStreamDuringReadData) {
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       "https://www.example.org", 1, kBodyDataSize * 3, LOWEST, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> data_frame(
+  std::unique_ptr<SpdySerializedFrame> data_frame(
       framer.CreateDataFrame(1, kBodyData, kBodyDataSize, DATA_FLAG_NONE));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
 
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 4),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> response_body_frame(
+  std::unique_ptr<SpdySerializedFrame> response_body_frame(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
 
   MockRead reads[] = {
@@ -986,7 +988,7 @@
                      PRIVACY_MODE_DISABLED);
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "POST";
   request_info->url = GURL("https://www.example.org/");
@@ -995,7 +997,7 @@
                                         base::SizeTToString(kBodyDataSize * 3));
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<TestDelegateBase> delegate(
+  std::unique_ptr<TestDelegateBase> delegate(
       new TestDelegateBase(read_buffer.get(), kReadBufferSize));
   delegate->set_do_not_start_read(true);
   delegate->Start(std::move(request_info), http_session_.get());
@@ -1022,9 +1024,9 @@
 // Receiving a header with uppercase ASCII will result in a protocol error,
 // which should be propagated via Delegate::OnFailed.
 TEST_F(BidirectionalStreamTest, PropagateProtocolError) {
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       "https://www.example.org", 1, kBodyDataSize * 3, LOW, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_PROTOCOL_ERROR));
 
   MockWrite writes[] = {
@@ -1032,7 +1034,7 @@
   };
 
   const char* const kExtraHeaders[] = {"X-UpperCase", "yes"};
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(kExtraHeaders, 1, 1));
 
   MockRead reads[] = {
@@ -1044,7 +1046,7 @@
                      PRIVACY_MODE_DISABLED);
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "POST";
   request_info->url = GURL("https://www.example.org/");
@@ -1052,7 +1054,7 @@
                                         base::SizeTToString(kBodyDataSize * 3));
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<TestDelegateBase> delegate(
+  std::unique_ptr<TestDelegateBase> delegate(
       new TestDelegateBase(read_buffer.get(), kReadBufferSize));
   delegate->SetRunUntilCompletion(true);
   delegate->Start(std::move(request_info), http_session_.get());
@@ -1076,10 +1078,10 @@
                         ::testing::Values(true, false));
 
 TEST_P(BidirectionalStreamTest, CancelOrDeleteStreamDuringOnHeadersReceived) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
 
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 2),
@@ -1087,7 +1089,7 @@
 
   const char* const kExtraResponseHeaders[] = {"header-name", "header-value"};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(kExtraResponseHeaders, 1, 1));
 
   MockRead reads[] = {
@@ -1099,7 +1101,7 @@
                      PRIVACY_MODE_DISABLED);
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "GET";
   request_info->url = GURL("https://www.example.org/");
@@ -1107,7 +1109,7 @@
   request_info->end_stream_on_headers = true;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<CancelOrDeleteStreamDelegate> delegate(
+  std::unique_ptr<CancelOrDeleteStreamDelegate> delegate(
       new CancelOrDeleteStreamDelegate(
           read_buffer.get(), kReadBufferSize,
           CancelOrDeleteStreamDelegate::Phase::ON_HEADERS_RECEIVED,
@@ -1132,10 +1134,10 @@
 }
 
 TEST_P(BidirectionalStreamTest, CancelOrDeleteStreamDuringOnDataRead) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
 
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 3),
@@ -1143,10 +1145,10 @@
 
   const char* const kExtraResponseHeaders[] = {"header-name", "header-value"};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(kExtraResponseHeaders, 1, 1));
 
-  scoped_ptr<SpdySerializedFrame> response_body_frame(
+  std::unique_ptr<SpdySerializedFrame> response_body_frame(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
 
   MockRead reads[] = {
@@ -1159,7 +1161,7 @@
                      PRIVACY_MODE_DISABLED);
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "GET";
   request_info->url = GURL("https://www.example.org/");
@@ -1167,7 +1169,7 @@
   request_info->end_stream_on_headers = true;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<CancelOrDeleteStreamDelegate> delegate(
+  std::unique_ptr<CancelOrDeleteStreamDelegate> delegate(
       new CancelOrDeleteStreamDelegate(
           read_buffer.get(), kReadBufferSize,
           CancelOrDeleteStreamDelegate::Phase::ON_DATA_READ, GetParam()));
@@ -1191,10 +1193,10 @@
 }
 
 TEST_P(BidirectionalStreamTest, CancelOrDeleteStreamDuringOnTrailersReceived) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
 
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 4),
@@ -1202,15 +1204,15 @@
 
   const char* const kExtraResponseHeaders[] = {"header-name", "header-value"};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(kExtraResponseHeaders, 1, 1));
 
-  scoped_ptr<SpdySerializedFrame> response_body_frame(
+  std::unique_ptr<SpdySerializedFrame> response_body_frame(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
 
   SpdyHeaderBlock late_headers;
   late_headers["foo"] = "bar";
-  scoped_ptr<SpdySerializedFrame> trailers(
+  std::unique_ptr<SpdySerializedFrame> trailers(
       spdy_util_.ConstructSpdyResponseHeaders(1, late_headers, true));
 
   MockRead reads[] = {
@@ -1223,7 +1225,7 @@
                      PRIVACY_MODE_DISABLED);
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "GET";
   request_info->url = GURL("https://www.example.org/");
@@ -1231,7 +1233,7 @@
   request_info->end_stream_on_headers = true;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<CancelOrDeleteStreamDelegate> delegate(
+  std::unique_ptr<CancelOrDeleteStreamDelegate> delegate(
       new CancelOrDeleteStreamDelegate(
           read_buffer.get(), kReadBufferSize,
           CancelOrDeleteStreamDelegate::Phase::ON_TRAILERS_RECEIVED,
@@ -1257,10 +1259,10 @@
 }
 
 TEST_P(BidirectionalStreamTest, CancelOrDeleteStreamDuringOnFailed) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
 
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_PROTOCOL_ERROR));
 
   MockWrite writes[] = {
@@ -1268,7 +1270,7 @@
   };
 
   const char* const kExtraHeaders[] = {"X-UpperCase", "yes"};
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(kExtraHeaders, 1, 1));
 
   MockRead reads[] = {
@@ -1280,7 +1282,7 @@
                      PRIVACY_MODE_DISABLED);
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "GET";
   request_info->url = GURL("https://www.example.org/");
@@ -1288,7 +1290,7 @@
   request_info->end_stream_on_headers = true;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<CancelOrDeleteStreamDelegate> delegate(
+  std::unique_ptr<CancelOrDeleteStreamDelegate> delegate(
       new CancelOrDeleteStreamDelegate(
           read_buffer.get(), kReadBufferSize,
           CancelOrDeleteStreamDelegate::Phase::ON_FAILED, GetParam()));
@@ -1311,10 +1313,10 @@
 }
 
 TEST_F(BidirectionalStreamTest, TestHonorAlternativeServiceHeader) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
   // Empty DATA frame with an END_STREAM flag.
-  scoped_ptr<SpdySerializedFrame> end_stream(
+  std::unique_ptr<SpdySerializedFrame> end_stream(
       spdy_util_.ConstructSpdyBodyFrame(1, nullptr, 0, true));
 
   MockWrite writes[] = {CreateMockWrite(*req.get(), 0)};
@@ -1324,9 +1326,9 @@
   const char* const kExtraResponseHeaders[] = {"alt-svc",
                                                alt_svc_header_value.c_str()};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(kExtraResponseHeaders, 1, 1));
-  scoped_ptr<SpdySerializedFrame> body_frame(
+  std::unique_ptr<SpdySerializedFrame> body_frame(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   MockRead reads[] = {
@@ -1343,7 +1345,7 @@
   session_deps_.enable_quic = true;
   InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
 
-  scoped_ptr<BidirectionalStreamRequestInfo> request_info(
+  std::unique_ptr<BidirectionalStreamRequestInfo> request_info(
       new BidirectionalStreamRequestInfo);
   request_info->method = "GET";
   request_info->url = GURL("https://www.example.org/");
@@ -1352,8 +1354,8 @@
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
   MockTimer* timer = new MockTimer();
-  scoped_ptr<TestDelegateBase> delegate(new TestDelegateBase(
-      read_buffer.get(), kReadBufferSize, make_scoped_ptr(timer)));
+  std::unique_ptr<TestDelegateBase> delegate(new TestDelegateBase(
+      read_buffer.get(), kReadBufferSize, base::WrapUnique(timer)));
   delegate->SetRunUntilCompletion(true);
   delegate->Start(std::move(request_info), http_session_.get());
 
diff --git a/net/http/disk_cache_based_quic_server_info_unittest.cc b/net/http/disk_cache_based_quic_server_info_unittest.cc
index 490b9358..853559e2 100644
--- a/net/http/disk_cache_based_quic_server_info_unittest.cc
+++ b/net/http/disk_cache_based_quic_server_info_unittest.cc
@@ -8,6 +8,7 @@
 #include "base/bind_helpers.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "net/base/net_errors.h"
 #include "net/http/mock_http_cache.h"
@@ -86,9 +87,9 @@
   // Use the blocking mock backend factory to force asynchronous completion
   // of quic_server_info->WaitForDataReady(), so that the callback will run.
   MockBlockingBackendFactory* factory = new MockBlockingBackendFactory();
-  MockHttpCache cache(make_scoped_ptr(factory));
+  MockHttpCache cache(base::WrapUnique(factory));
   QuicServerId server_id("www.verisign.com", 443, PRIVACY_MODE_DISABLED);
-  scoped_ptr<QuicServerInfo> quic_server_info(
+  std::unique_ptr<QuicServerInfo> quic_server_info(
       new DiskCacheBasedQuicServerInfo(server_id, cache.http_cache()));
   quic_server_info->Start();
   TestCompletionCallback callback;
@@ -106,7 +107,7 @@
   TestCompletionCallback callback;
 
   QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
-  scoped_ptr<QuicServerInfo> quic_server_info(
+  std::unique_ptr<QuicServerInfo> quic_server_info(
       new DiskCacheBasedQuicServerInfo(server_id, cache.http_cache()));
   quic_server_info->Start();
   int rv = quic_server_info->WaitForDataReady(callback.callback());
@@ -179,7 +180,7 @@
 
   // Persist data for port 443.
   QuicServerId server_id1("www.google.com", 443, PRIVACY_MODE_DISABLED);
-  scoped_ptr<QuicServerInfo> quic_server_info1(
+  std::unique_ptr<QuicServerInfo> quic_server_info1(
       new DiskCacheBasedQuicServerInfo(server_id1, cache.http_cache()));
   quic_server_info1->Start();
   int rv = quic_server_info1->WaitForDataReady(callback.callback());
@@ -207,7 +208,7 @@
 
   // Persist data for port 80.
   QuicServerId server_id2("www.google.com", 80, PRIVACY_MODE_DISABLED);
-  scoped_ptr<QuicServerInfo> quic_server_info2(
+  std::unique_ptr<QuicServerInfo> quic_server_info2(
       new DiskCacheBasedQuicServerInfo(server_id2, cache.http_cache()));
   quic_server_info2->Start();
   rv = quic_server_info2->WaitForDataReady(callback.callback());
@@ -234,7 +235,7 @@
   base::MessageLoop::current()->RunUntilIdle();
 
   // Verify the stored QuicServerInfo for port 443.
-  scoped_ptr<QuicServerInfo> quic_server_info(
+  std::unique_ptr<QuicServerInfo> quic_server_info(
       new DiskCacheBasedQuicServerInfo(server_id1, cache.http_cache()));
   quic_server_info->Start();
   rv = quic_server_info->WaitForDataReady(callback.callback());
@@ -278,7 +279,7 @@
   TestCompletionCallback callback;
 
   QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
-  scoped_ptr<QuicServerInfo> quic_server_info(
+  std::unique_ptr<QuicServerInfo> quic_server_info(
       new DiskCacheBasedQuicServerInfo(server_id, cache.http_cache()));
   EXPECT_FALSE(quic_server_info->IsDataReady());
   quic_server_info->Start();
@@ -340,7 +341,7 @@
   TestCompletionCallback callback;
 
   QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
-  scoped_ptr<QuicServerInfo> quic_server_info(
+  std::unique_ptr<QuicServerInfo> quic_server_info(
       new DiskCacheBasedQuicServerInfo(server_id, cache.http_cache()));
   EXPECT_FALSE(quic_server_info->IsDataReady());
   quic_server_info->Start();
@@ -425,10 +426,10 @@
 
 TEST(DiskCacheBasedQuicServerInfo, CancelWaitForDataReady) {
   MockBlockingBackendFactory* factory = new MockBlockingBackendFactory();
-  MockHttpCache cache(make_scoped_ptr(factory));
+  MockHttpCache cache(base::WrapUnique(factory));
   TestCompletionCallback callback;
   QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
-  scoped_ptr<QuicServerInfo> quic_server_info(
+  std::unique_ptr<QuicServerInfo> quic_server_info(
       new DiskCacheBasedQuicServerInfo(server_id, cache.http_cache()));
   EXPECT_FALSE(quic_server_info->IsDataReady());
   quic_server_info->Start();
@@ -448,7 +449,7 @@
   TestCompletionCallback callback;
 
   QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
-  scoped_ptr<QuicServerInfo> quic_server_info(
+  std::unique_ptr<QuicServerInfo> quic_server_info(
       new DiskCacheBasedQuicServerInfo(server_id, cache.http_cache()));
   EXPECT_FALSE(quic_server_info->IsDataReady());
   quic_server_info->Start();
@@ -460,7 +461,7 @@
 }
 
 TEST(DiskCacheBasedQuicServerInfo, CancelWaitForDataReadyAfterDeleteCache) {
-  scoped_ptr<QuicServerInfo> quic_server_info;
+  std::unique_ptr<QuicServerInfo> quic_server_info;
   {
     MockHttpCache cache;
     AddMockTransaction(&kHostInfoTransaction1);
@@ -487,7 +488,7 @@
   AddMockTransaction(&kHostInfoTransaction1);
 
   QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
-  scoped_ptr<QuicServerInfo> quic_server_info(
+  std::unique_ptr<QuicServerInfo> quic_server_info(
       new DiskCacheBasedQuicServerInfo(server_id, cache.http_cache()));
   EXPECT_FALSE(quic_server_info->IsDataReady());
   quic_server_info->Start();
@@ -549,12 +550,12 @@
 // persists the data when Start() finishes.
 TEST(DiskCacheBasedQuicServerInfo, PersistWhenNotReadyToPersist) {
   MockBlockingBackendFactory* factory = new MockBlockingBackendFactory();
-  MockHttpCache cache(make_scoped_ptr(factory));
+  MockHttpCache cache(base::WrapUnique(factory));
   AddMockTransaction(&kHostInfoTransaction1);
   TestCompletionCallback callback;
 
   QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
-  scoped_ptr<QuicServerInfo> quic_server_info(
+  std::unique_ptr<QuicServerInfo> quic_server_info(
       new DiskCacheBasedQuicServerInfo(server_id, cache.http_cache()));
   EXPECT_FALSE(quic_server_info->IsDataReady());
   // We do a Start(), but don't call WaitForDataReady(). Because we haven't
@@ -615,7 +616,7 @@
   TestCompletionCallback callback;
 
   QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
-  scoped_ptr<QuicServerInfo> quic_server_info(
+  std::unique_ptr<QuicServerInfo> quic_server_info(
       new DiskCacheBasedQuicServerInfo(server_id, cache.http_cache()));
   EXPECT_FALSE(quic_server_info->IsDataReady());
   quic_server_info->Start();
@@ -696,7 +697,7 @@
   // Use the blocking mock backend factory to force asynchronous completion
   // of quic_server_info->WaitForDataReady(), so that the callback will run.
   MockBlockingBackendFactory* factory = new MockBlockingBackendFactory();
-  MockHttpCache cache(make_scoped_ptr(factory));
+  MockHttpCache cache(base::WrapUnique(factory));
   QuicServerId server_id("www.verisign.com", 443, PRIVACY_MODE_DISABLED);
   QuicServerInfo* quic_server_info =
       new DiskCacheBasedQuicServerInfo(server_id, cache.http_cache());
diff --git a/net/http/failing_http_transaction_factory.cc b/net/http/failing_http_transaction_factory.cc
index be82407..3e07838 100644
--- a/net/http/failing_http_transaction_factory.cc
+++ b/net/http/failing_http_transaction_factory.cc
@@ -207,7 +207,7 @@
 // HttpTransactionFactory:
 int FailingHttpTransactionFactory::CreateTransaction(
     RequestPriority priority,
-    scoped_ptr<HttpTransaction>* trans) {
+    std::unique_ptr<HttpTransaction>* trans) {
   trans->reset(new FailingHttpTransaction(error_));
   return OK;
 }
diff --git a/net/http/failing_http_transaction_factory.h b/net/http/failing_http_transaction_factory.h
index dd4a811..6b85d28 100644
--- a/net/http/failing_http_transaction_factory.h
+++ b/net/http/failing_http_transaction_factory.h
@@ -5,7 +5,8 @@
 #ifndef NET_FAILING_HTTP_TRANSACTION_FACTORY_H_
 #define NET_FAILING_HTTP_TRANSACTION_FACTORY_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/base/net_errors.h"
 #include "net/base/request_priority.h"
 #include "net/http/http_transaction.h"
@@ -27,7 +28,7 @@
 
   // HttpTransactionFactory:
   int CreateTransaction(RequestPriority priority,
-                        scoped_ptr<HttpTransaction>* trans) override;
+                        std::unique_ptr<HttpTransaction>* trans) override;
   HttpCache* GetCache() override;
   HttpNetworkSession* GetSession() override;
 
diff --git a/net/http/http_auth.cc b/net/http/http_auth.cc
index 570d8f7..738c1b8d 100644
--- a/net/http/http_auth.cc
+++ b/net/http/http_auth.cc
@@ -30,17 +30,17 @@
     const GURL& origin,
     const std::set<Scheme>& disabled_schemes,
     const BoundNetLog& net_log,
-    scoped_ptr<HttpAuthHandler>* handler) {
+    std::unique_ptr<HttpAuthHandler>* handler) {
   DCHECK(http_auth_handler_factory);
   DCHECK(handler->get() == NULL);
 
   // Choose the challenge whose authentication handler gives the maximum score.
-  scoped_ptr<HttpAuthHandler> best;
+  std::unique_ptr<HttpAuthHandler> best;
   const std::string header_name = GetChallengeHeaderName(target);
   std::string cur_challenge;
   size_t iter = 0;
   while (response_headers.EnumerateHeader(&iter, header_name, &cur_challenge)) {
-    scoped_ptr<HttpAuthHandler> cur;
+    std::unique_ptr<HttpAuthHandler> cur;
     int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
         cur_challenge, target, ssl_info, origin, net_log, &cur);
     if (rv != OK) {
diff --git a/net/http/http_auth.h b/net/http/http_auth.h
index f804a4d13..464a39e 100644
--- a/net/http/http_auth.h
+++ b/net/http/http_auth.h
@@ -5,10 +5,10 @@
 #ifndef NET_HTTP_HTTP_AUTH_H_
 #define NET_HTTP_HTTP_AUTH_H_
 
+#include <memory>
 #include <set>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "net/base/auth.h"
 #include "net/base/net_export.h"
 #include "net/http/http_util.h"
@@ -143,7 +143,7 @@
       const GURL& origin,
       const std::set<Scheme>& disabled_schemes,
       const BoundNetLog& net_log,
-      scoped_ptr<HttpAuthHandler>* handler);
+      std::unique_ptr<HttpAuthHandler>* handler);
 
   // Handle a 401/407 response from a server/proxy after a previous
   // authentication attempt. For connection-based authentication schemes, the
diff --git a/net/http/http_auth_cache_unittest.cc b/net/http/http_auth_cache_unittest.cc
index cb7d640..c0509ce1 100644
--- a/net/http/http_auth_cache_unittest.cc
+++ b/net/http/http_auth_cache_unittest.cc
@@ -87,28 +87,22 @@
   // Add cache entries for 4 realms: "Realm1", "Realm2", "Realm3" and
   // "Realm4"
 
-  scoped_ptr<HttpAuthHandler> realm1_handler(
-      new MockAuthHandler(HttpAuth::AUTH_SCHEME_BASIC,
-                          kRealm1,
-                          HttpAuth::AUTH_SERVER));
+  std::unique_ptr<HttpAuthHandler> realm1_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_BASIC, kRealm1, HttpAuth::AUTH_SERVER));
   cache.Add(origin, realm1_handler->realm(), realm1_handler->auth_scheme(),
             "Basic realm=Realm1",
             CreateASCIICredentials("realm1-user", "realm1-password"),
             "/foo/bar/index.html");
 
-  scoped_ptr<HttpAuthHandler> realm2_handler(
-      new MockAuthHandler(HttpAuth::AUTH_SCHEME_BASIC,
-                          kRealm2,
-                          HttpAuth::AUTH_SERVER));
+  std::unique_ptr<HttpAuthHandler> realm2_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_BASIC, kRealm2, HttpAuth::AUTH_SERVER));
   cache.Add(origin, realm2_handler->realm(), realm2_handler->auth_scheme(),
             "Basic realm=Realm2",
             CreateASCIICredentials("realm2-user", "realm2-password"),
             "/foo2/index.html");
 
-  scoped_ptr<HttpAuthHandler> realm3_basic_handler(
-      new MockAuthHandler(HttpAuth::AUTH_SCHEME_BASIC,
-                          kRealm3,
-                          HttpAuth::AUTH_PROXY));
+  std::unique_ptr<HttpAuthHandler> realm3_basic_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_BASIC, kRealm3, HttpAuth::AUTH_PROXY));
   cache.Add(
       origin,
       realm3_basic_handler->realm(),
@@ -117,20 +111,16 @@
       CreateASCIICredentials("realm3-basic-user", "realm3-basic-password"),
       std::string());
 
-  scoped_ptr<HttpAuthHandler> realm3_digest_handler(
-      new MockAuthHandler(HttpAuth::AUTH_SCHEME_DIGEST,
-                          kRealm3,
-                          HttpAuth::AUTH_PROXY));
+  std::unique_ptr<HttpAuthHandler> realm3_digest_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_DIGEST, kRealm3, HttpAuth::AUTH_PROXY));
   cache.Add(origin, realm3_digest_handler->realm(),
             realm3_digest_handler->auth_scheme(), "Digest realm=Realm3",
             CreateASCIICredentials("realm3-digest-user",
                                    "realm3-digest-password"),
             "/baz/index.html");
 
-  scoped_ptr<HttpAuthHandler> realm4_basic_handler(
-      new MockAuthHandler(HttpAuth::AUTH_SCHEME_BASIC,
-                          kRealm4,
-                          HttpAuth::AUTH_SERVER));
+  std::unique_ptr<HttpAuthHandler> realm4_basic_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_BASIC, kRealm4, HttpAuth::AUTH_SERVER));
   cache.Add(origin, realm4_basic_handler->realm(),
             realm4_basic_handler->auth_scheme(), "Basic realm=Realm4",
             CreateASCIICredentials("realm4-basic-user",
@@ -281,9 +271,8 @@
   GURL origin("http://www.foobar.com:70");
   const std::string auth_challenge = "Basic realm=MyRealm";
 
-  scoped_ptr<HttpAuthHandler> handler(
-      new MockAuthHandler(
-          HttpAuth::AUTH_SCHEME_BASIC, "MyRealm", HttpAuth::AUTH_SERVER));
+  std::unique_ptr<HttpAuthHandler> handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_BASIC, "MyRealm", HttpAuth::AUTH_SERVER));
   HttpAuthCache::Entry* orig_entry = cache.Add(
       origin, handler->realm(), handler->auth_scheme(), auth_challenge,
       CreateASCIICredentials("user1", "password1"), "/x/y/z/");
@@ -307,21 +296,17 @@
 TEST(HttpAuthCacheTest, Remove) {
   GURL origin("http://foobar2.com");
 
-  scoped_ptr<HttpAuthHandler> realm1_handler(
-      new MockAuthHandler(
-          HttpAuth::AUTH_SCHEME_BASIC, kRealm1, HttpAuth::AUTH_SERVER));
+  std::unique_ptr<HttpAuthHandler> realm1_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_BASIC, kRealm1, HttpAuth::AUTH_SERVER));
 
-  scoped_ptr<HttpAuthHandler> realm2_handler(
-      new MockAuthHandler(
-          HttpAuth::AUTH_SCHEME_BASIC, kRealm2, HttpAuth::AUTH_SERVER));
+  std::unique_ptr<HttpAuthHandler> realm2_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_BASIC, kRealm2, HttpAuth::AUTH_SERVER));
 
-  scoped_ptr<HttpAuthHandler> realm3_basic_handler(
-      new MockAuthHandler(
-          HttpAuth::AUTH_SCHEME_BASIC, kRealm3, HttpAuth::AUTH_SERVER));
+  std::unique_ptr<HttpAuthHandler> realm3_basic_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_BASIC, kRealm3, HttpAuth::AUTH_SERVER));
 
-  scoped_ptr<HttpAuthHandler> realm3_digest_handler(
-      new MockAuthHandler(
-          HttpAuth::AUTH_SCHEME_DIGEST, kRealm3, HttpAuth::AUTH_SERVER));
+  std::unique_ptr<HttpAuthHandler> realm3_digest_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_DIGEST, kRealm3, HttpAuth::AUTH_SERVER));
 
   HttpAuthCache cache;
   cache.Add(origin, realm1_handler->realm(), realm1_handler->auth_scheme(),
@@ -395,9 +380,8 @@
 TEST(HttpAuthCacheTest, UpdateStaleChallenge) {
   HttpAuthCache cache;
   GURL origin("http://foobar2.com");
-  scoped_ptr<HttpAuthHandler> digest_handler(
-      new MockAuthHandler(
-          HttpAuth::AUTH_SCHEME_DIGEST, kRealm1, HttpAuth::AUTH_PROXY));
+  std::unique_ptr<HttpAuthHandler> digest_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_DIGEST, kRealm1, HttpAuth::AUTH_PROXY));
   HttpAuthCache::Entry* entry_pre = cache.Add(
       origin,
       digest_handler->realm(),
@@ -446,21 +430,17 @@
   std::string path("/some/path");
   std::string another_path("/another/path");
 
-  scoped_ptr<HttpAuthHandler> realm1_handler(
-      new MockAuthHandler(
-          HttpAuth::AUTH_SCHEME_BASIC, kRealm1, HttpAuth::AUTH_SERVER));
+  std::unique_ptr<HttpAuthHandler> realm1_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_BASIC, kRealm1, HttpAuth::AUTH_SERVER));
 
-  scoped_ptr<HttpAuthHandler> realm2_handler(
-      new MockAuthHandler(
-          HttpAuth::AUTH_SCHEME_BASIC, kRealm2, HttpAuth::AUTH_PROXY));
+  std::unique_ptr<HttpAuthHandler> realm2_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_BASIC, kRealm2, HttpAuth::AUTH_PROXY));
 
-  scoped_ptr<HttpAuthHandler> realm3_digest_handler(
-      new MockAuthHandler(
-          HttpAuth::AUTH_SCHEME_DIGEST, kRealm3, HttpAuth::AUTH_SERVER));
+  std::unique_ptr<HttpAuthHandler> realm3_digest_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_DIGEST, kRealm3, HttpAuth::AUTH_SERVER));
 
-  scoped_ptr<HttpAuthHandler> realm4_handler(
-      new MockAuthHandler(
-          HttpAuth::AUTH_SCHEME_BASIC, kRealm4, HttpAuth::AUTH_SERVER));
+  std::unique_ptr<HttpAuthHandler> realm4_handler(new MockAuthHandler(
+      HttpAuth::AUTH_SCHEME_BASIC, kRealm4, HttpAuth::AUTH_SERVER));
 
   HttpAuthCache first_cache;
   HttpAuthCache::Entry* entry;
diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc
index fa7d5ae..36375f9a 100644
--- a/net/http/http_auth_controller.cc
+++ b/net/http/http_auth_controller.cc
@@ -186,7 +186,7 @@
     return false;
 
   // Try to create a handler using the previous auth challenge.
-  scoped_ptr<HttpAuthHandler> handler_preemptive;
+  std::unique_ptr<HttpAuthHandler> handler_preemptive;
   int rv_create = http_auth_handler_factory_->
       CreatePreemptiveAuthHandlerFromString(entry->auth_challenge(), target_,
                                             auth_origin_,
diff --git a/net/http/http_auth_controller.h b/net/http/http_auth_controller.h
index 9b016f73..04f3264 100644
--- a/net/http/http_auth_controller.h
+++ b/net/http/http_auth_controller.h
@@ -5,11 +5,11 @@
 #ifndef NET_HTTP_HTTP_AUTH_CONTROLLER_H_
 #define NET_HTTP_HTTP_AUTH_CONTROLLER_H_
 
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
@@ -133,7 +133,7 @@
   // |handler_| encapsulates the logic for the particular auth-scheme.
   // This includes the challenge's parameters. If NULL, then there is no
   // associated auth handler.
-  scoped_ptr<HttpAuthHandler> handler_;
+  std::unique_ptr<HttpAuthHandler> handler_;
 
   // |identity_| holds the credentials that should be used by
   // the handler_ to generate challenge responses. This identity can come from
diff --git a/net/http/http_auth_filter_unittest.cc b/net/http/http_auth_filter_unittest.cc
index a23d73b8..40d67ce 100644
--- a/net/http/http_auth_filter_unittest.cc
+++ b/net/http/http_auth_filter_unittest.cc
@@ -2,10 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "net/http/http_auth_filter.h"
+
+#include <memory>
 #include <ostream>
 
-#include "base/memory/scoped_ptr.h"
-#include "net/http/http_auth_filter.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
diff --git a/net/http/http_auth_gssapi_posix.cc b/net/http/http_auth_gssapi_posix.cc
index 40fbd63..891bd8de 100644
--- a/net/http/http_auth_gssapi_posix.cc
+++ b/net/http/http_auth_gssapi_posix.cc
@@ -847,7 +847,7 @@
   ScopedName scoped_name(principal_name, library_);
 
   std::vector<char> channel_bindings_data;
-  scoped_ptr<gss_channel_bindings_struct> gss_channel_bindings;
+  std::unique_ptr<gss_channel_bindings_struct> gss_channel_bindings;
   if (!channel_bindings.empty()) {
     gss_channel_bindings.reset(new gss_channel_bindings_struct);
     memset(gss_channel_bindings.get(), 0, sizeof(gss_channel_bindings_struct));
diff --git a/net/http/http_auth_gssapi_posix_unittest.cc b/net/http/http_auth_gssapi_posix_unittest.cc
index 8208701..21eecacf 100644
--- a/net/http/http_auth_gssapi_posix_unittest.cc
+++ b/net/http/http_auth_gssapi_posix_unittest.cc
@@ -4,8 +4,9 @@
 
 #include "net/http/http_auth_gssapi_posix.h"
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/native_library.h"
 #include "net/base/net_errors.h"
 #include "net/http/http_auth_challenge_tokenizer.h"
@@ -82,21 +83,22 @@
   // TODO(ahendrickson): Manipulate the libraries and paths to test each of the
   // libraries we expect, and also whether or not they have the interface
   // functions we want.
-  scoped_ptr<GSSAPILibrary> gssapi(new GSSAPISharedLibrary(std::string()));
+  std::unique_ptr<GSSAPILibrary> gssapi(new GSSAPISharedLibrary(std::string()));
   DCHECK(gssapi.get());
   EXPECT_TRUE(gssapi.get()->Init());
 }
 
 #if defined(DLOPEN_KERBEROS)
 TEST(HttpAuthGSSAPIPOSIXTest, GSSAPILoadCustomLibrary) {
-  scoped_ptr<GSSAPILibrary> gssapi(
+  std::unique_ptr<GSSAPILibrary> gssapi(
       new GSSAPISharedLibrary("/this/library/does/not/exist"));
   EXPECT_FALSE(gssapi.get()->Init());
 }
 #endif  // defined(DLOPEN_KERBEROS)
 
 TEST(HttpAuthGSSAPIPOSIXTest, GSSAPICycle) {
-  scoped_ptr<test::MockGSSAPILibrary> mock_library(new test::MockGSSAPILibrary);
+  std::unique_ptr<test::MockGSSAPILibrary> mock_library(
+      new test::MockGSSAPILibrary);
   DCHECK(mock_library.get());
   mock_library->Init();
   const char kAuthResponse[] = "Mary had a little lamb";
diff --git a/net/http/http_auth_handler_basic.cc b/net/http/http_auth_handler_basic.cc
index c5a1d235..276c128 100644
--- a/net/http/http_auth_handler_basic.cc
+++ b/net/http/http_auth_handler_basic.cc
@@ -115,10 +115,10 @@
     CreateReason reason,
     int digest_nonce_count,
     const BoundNetLog& net_log,
-    scoped_ptr<HttpAuthHandler>* handler) {
+    std::unique_ptr<HttpAuthHandler>* handler) {
   // TODO(cbentzel): Move towards model of parsing in the factory
   //                 method and only constructing when valid.
-  scoped_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerBasic());
+  std::unique_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerBasic());
   if (!tmp_handler->InitFromChallenge(challenge, target, ssl_info, origin,
                                       net_log))
     return ERR_INVALID_RESPONSE;
diff --git a/net/http/http_auth_handler_basic.h b/net/http/http_auth_handler_basic.h
index 9ad311a..98415f1 100644
--- a/net/http/http_auth_handler_basic.h
+++ b/net/http/http_auth_handler_basic.h
@@ -28,7 +28,7 @@
                           CreateReason reason,
                           int digest_nonce_count,
                           const BoundNetLog& net_log,
-                          scoped_ptr<HttpAuthHandler>* handler) override;
+                          std::unique_ptr<HttpAuthHandler>* handler) override;
   };
 
   HttpAuth::AuthorizationResult HandleAnotherChallenge(
diff --git a/net/http/http_auth_handler_basic_unittest.cc b/net/http/http_auth_handler_basic_unittest.cc
index 0b0e115..4b8c9ff 100644
--- a/net/http/http_auth_handler_basic_unittest.cc
+++ b/net/http/http_auth_handler_basic_unittest.cc
@@ -2,15 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "net/http/http_auth_handler_basic.h"
+
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "net/base/net_errors.h"
 #include "net/base/test_completion_callback.h"
 #include "net/http/http_auth_challenge_tokenizer.h"
-#include "net/http/http_auth_handler_basic.h"
 #include "net/http/http_request_info.h"
 #include "net/ssl/ssl_info.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -36,7 +37,7 @@
   for (size_t i = 0; i < arraysize(tests); ++i) {
     std::string challenge = "Basic realm=\"Atlantis\"";
     SSLInfo null_ssl_info;
-    scoped_ptr<HttpAuthHandler> basic;
+    std::unique_ptr<HttpAuthHandler> basic;
     EXPECT_EQ(OK, factory.CreateAuthHandlerFromString(
                       challenge, HttpAuth::AUTH_SERVER, null_ssl_info, origin,
                       BoundNetLog(), &basic));
@@ -90,7 +91,7 @@
   GURL origin("http://www.example.com");
   HttpAuthHandlerBasic::Factory factory;
   SSLInfo null_ssl_info;
-  scoped_ptr<HttpAuthHandler> basic;
+  std::unique_ptr<HttpAuthHandler> basic;
   EXPECT_EQ(OK, factory.CreateAuthHandlerFromString(
                     tests[0].challenge, HttpAuth::AUTH_SERVER, null_ssl_info,
                     origin, BoundNetLog(), &basic));
@@ -191,7 +192,7 @@
   for (size_t i = 0; i < arraysize(tests); ++i) {
     std::string challenge = tests[i].challenge;
     SSLInfo null_ssl_info;
-    scoped_ptr<HttpAuthHandler> basic;
+    std::unique_ptr<HttpAuthHandler> basic;
     int rv = factory.CreateAuthHandlerFromString(
         challenge, HttpAuth::AUTH_SERVER, null_ssl_info, origin, BoundNetLog(),
         &basic);
diff --git a/net/http/http_auth_handler_digest.cc b/net/http/http_auth_handler_digest.cc
index eb03ad7..e4c8c16f 100644
--- a/net/http/http_auth_handler_digest.cc
+++ b/net/http/http_auth_handler_digest.cc
@@ -98,10 +98,10 @@
     CreateReason reason,
     int digest_nonce_count,
     const BoundNetLog& net_log,
-    scoped_ptr<HttpAuthHandler>* handler) {
+    std::unique_ptr<HttpAuthHandler>* handler) {
   // TODO(cbentzel): Move towards model of parsing in the factory
   //                 method and only constructing when valid.
-  scoped_ptr<HttpAuthHandler> tmp_handler(
+  std::unique_ptr<HttpAuthHandler> tmp_handler(
       new HttpAuthHandlerDigest(digest_nonce_count, nonce_generator_.get()));
   if (!tmp_handler->InitFromChallenge(challenge, target, ssl_info, origin,
                                       net_log))
diff --git a/net/http/http_auth_handler_digest.h b/net/http/http_auth_handler_digest.h
index 2b98946e..c5c172a 100644
--- a/net/http/http_auth_handler_digest.h
+++ b/net/http/http_auth_handler_digest.h
@@ -5,11 +5,11 @@
 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_DIGEST_H_
 #define NET_HTTP_HTTP_AUTH_HANDLER_DIGEST_H_
 
+#include <memory>
 #include <string>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/http/http_auth_handler.h"
 #include "net/http/http_auth_handler_factory.h"
@@ -72,10 +72,10 @@
                           CreateReason reason,
                           int digest_nonce_count,
                           const BoundNetLog& net_log,
-                          scoped_ptr<HttpAuthHandler>* handler) override;
+                          std::unique_ptr<HttpAuthHandler>* handler) override;
 
    private:
-    scoped_ptr<const NonceGenerator> nonce_generator_;
+    std::unique_ptr<const NonceGenerator> nonce_generator_;
   };
 
   HttpAuth::AuthorizationResult HandleAnotherChallenge(
diff --git a/net/http/http_auth_handler_digest_unittest.cc b/net/http/http_auth_handler_digest_unittest.cc
index 92e3455..3f7e442 100644
--- a/net/http/http_auth_handler_digest_unittest.cc
+++ b/net/http/http_auth_handler_digest_unittest.cc
@@ -45,12 +45,12 @@
   EXPECT_FALSE(challenge.empty());
 
   token->clear();
-  scoped_ptr<HttpAuthHandlerDigest::Factory> factory(
+  std::unique_ptr<HttpAuthHandlerDigest::Factory> factory(
       new HttpAuthHandlerDigest::Factory());
   HttpAuthHandlerDigest::NonceGenerator* nonce_generator =
       new HttpAuthHandlerDigest::FixedNonceGenerator("client_nonce");
   factory->set_nonce_generator(nonce_generator);
-  scoped_ptr<HttpAuthHandler> handler;
+  std::unique_ptr<HttpAuthHandler> handler;
 
   // Create a handler for a particular challenge.
   SSLInfo null_ssl_info;
@@ -68,7 +68,7 @@
   // completes synchronously. That's why this test can get away with a
   // TestCompletionCallback without an IO thread.
   TestCompletionCallback callback;
-  scoped_ptr<HttpRequestInfo> request(new HttpRequestInfo());
+  std::unique_ptr<HttpRequestInfo> request(new HttpRequestInfo());
   request->url = GURL(request_url);
   AuthCredentials credentials(base::ASCIIToUTF16("foo"),
                               base::ASCIIToUTF16("bar"));
@@ -351,11 +351,11 @@
   };
 
   GURL origin("http://www.example.com");
-  scoped_ptr<HttpAuthHandlerDigest::Factory> factory(
+  std::unique_ptr<HttpAuthHandlerDigest::Factory> factory(
       new HttpAuthHandlerDigest::Factory());
   for (size_t i = 0; i < arraysize(tests); ++i) {
     SSLInfo null_ssl_info;
-    scoped_ptr<HttpAuthHandler> handler;
+    std::unique_ptr<HttpAuthHandler> handler;
     int rv = factory->CreateAuthHandlerFromString(
         tests[i].challenge, HttpAuth::AUTH_SERVER, null_ssl_info, origin,
         BoundNetLog(), &handler);
@@ -515,11 +515,11 @@
     }
   };
   GURL origin("http://www.example.com");
-  scoped_ptr<HttpAuthHandlerDigest::Factory> factory(
+  std::unique_ptr<HttpAuthHandlerDigest::Factory> factory(
       new HttpAuthHandlerDigest::Factory());
   for (size_t i = 0; i < arraysize(tests); ++i) {
     SSLInfo null_ssl_info;
-    scoped_ptr<HttpAuthHandler> handler;
+    std::unique_ptr<HttpAuthHandler> handler;
     int rv = factory->CreateAuthHandlerFromString(
         tests[i].challenge, HttpAuth::AUTH_SERVER, null_ssl_info, origin,
         BoundNetLog(), &handler);
@@ -542,9 +542,9 @@
 }
 
 TEST(HttpAuthHandlerDigest, HandleAnotherChallenge) {
-  scoped_ptr<HttpAuthHandlerDigest::Factory> factory(
+  std::unique_ptr<HttpAuthHandlerDigest::Factory> factory(
       new HttpAuthHandlerDigest::Factory());
-  scoped_ptr<HttpAuthHandler> handler;
+  std::unique_ptr<HttpAuthHandler> handler;
   std::string default_challenge =
       "Digest realm=\"Oblivion\", nonce=\"nonce-value\"";
   GURL origin("intranet.google.com");
diff --git a/net/http/http_auth_handler_factory.cc b/net/http/http_auth_handler_factory.cc
index af682e12..a30f7e6 100644
--- a/net/http/http_auth_handler_factory.cc
+++ b/net/http/http_auth_handler_factory.cc
@@ -4,6 +4,7 @@
 
 #include "net/http/http_auth_handler_factory.h"
 
+#include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
 #include "net/base/net_errors.h"
@@ -28,7 +29,7 @@
     const SSLInfo& ssl_info,
     const GURL& origin,
     const BoundNetLog& net_log,
-    scoped_ptr<HttpAuthHandler>* handler) {
+    std::unique_ptr<HttpAuthHandler>* handler) {
   HttpAuthChallengeTokenizer props(challenge.begin(), challenge.end());
   return CreateAuthHandler(&props, target, ssl_info, origin, CREATE_CHALLENGE,
                            1, net_log, handler);
@@ -40,7 +41,7 @@
     const GURL& origin,
     int digest_nonce_count,
     const BoundNetLog& net_log,
-    scoped_ptr<HttpAuthHandler>* handler) {
+    std::unique_ptr<HttpAuthHandler>* handler) {
   HttpAuthChallengeTokenizer props(challenge.begin(), challenge.end());
   SSLInfo null_ssl_info;
   return CreateAuthHandler(&props, target, null_ssl_info, origin,
@@ -60,10 +61,10 @@
 // should only be used to create the factories. It should not be passed
 // to the registry factory or its children as the preferences they should
 // use.
-scoped_ptr<HttpAuthHandlerRegistryFactory> CreateAuthHandlerRegistryFactory(
-    const HttpAuthPreferences& prefs,
-    HostResolver* host_resolver) {
-  scoped_ptr<HttpAuthHandlerRegistryFactory> registry_factory(
+std::unique_ptr<HttpAuthHandlerRegistryFactory>
+CreateAuthHandlerRegistryFactory(const HttpAuthPreferences& prefs,
+                                 HostResolver* host_resolver) {
+  std::unique_ptr<HttpAuthHandlerRegistryFactory> registry_factory(
       new HttpAuthHandlerRegistryFactory());
   if (prefs.IsSupportedScheme(kBasicAuthScheme))
     registry_factory->RegisterSchemeFactory(
@@ -85,10 +86,10 @@
     HttpAuthHandlerNegotiate::Factory* negotiate_factory =
         new HttpAuthHandlerNegotiate::Factory();
 #if defined(OS_WIN)
-    negotiate_factory->set_library(make_scoped_ptr(new SSPILibraryDefault()));
+    negotiate_factory->set_library(base::WrapUnique(new SSPILibraryDefault()));
 #elif defined(OS_POSIX) && !defined(OS_ANDROID)
     negotiate_factory->set_library(
-        make_scoped_ptr(new GSSAPISharedLibrary(prefs.GssapiLibraryName())));
+        base::WrapUnique(new GSSAPISharedLibrary(prefs.GssapiLibraryName())));
 #endif  // defined(OS_POSIX) && !defined(OS_ANDROID)
     negotiate_factory->set_host_resolver(host_resolver);
     registry_factory->RegisterSchemeFactory(kNegotiateAuthScheme,
@@ -120,7 +121,7 @@
   factory->set_http_auth_preferences(http_auth_preferences());
   std::string lower_scheme = base::ToLowerASCII(scheme);
   if (factory)
-    factory_map_[lower_scheme] = make_scoped_ptr(factory);
+    factory_map_[lower_scheme] = base::WrapUnique(factory);
   else
     factory_map_.erase(lower_scheme);
 }
@@ -136,7 +137,7 @@
 }
 
 // static
-scoped_ptr<HttpAuthHandlerRegistryFactory>
+std::unique_ptr<HttpAuthHandlerRegistryFactory>
 HttpAuthHandlerFactory::CreateDefault(HostResolver* host_resolver) {
   std::vector<std::string> auth_types(std::begin(kDefaultAuthSchemes),
                                       std::end(kDefaultAuthSchemes));
@@ -150,10 +151,10 @@
 }
 
 // static
-scoped_ptr<HttpAuthHandlerRegistryFactory>
+std::unique_ptr<HttpAuthHandlerRegistryFactory>
 HttpAuthHandlerRegistryFactory::Create(const HttpAuthPreferences* prefs,
                                        HostResolver* host_resolver) {
-  scoped_ptr<HttpAuthHandlerRegistryFactory> registry_factory(
+  std::unique_ptr<HttpAuthHandlerRegistryFactory> registry_factory(
       CreateAuthHandlerRegistryFactory(*prefs, host_resolver));
   registry_factory->set_http_auth_preferences(prefs);
   for (auto& factory_entry : registry_factory->factory_map_) {
@@ -170,7 +171,7 @@
     CreateReason reason,
     int digest_nonce_count,
     const BoundNetLog& net_log,
-    scoped_ptr<HttpAuthHandler>* handler) {
+    std::unique_ptr<HttpAuthHandler>* handler) {
   std::string scheme = challenge->scheme();
   if (scheme.empty()) {
     handler->reset();
diff --git a/net/http/http_auth_handler_factory.h b/net/http/http_auth_handler_factory.h
index 60ec3f9..f17adc57 100644
--- a/net/http/http_auth_handler_factory.h
+++ b/net/http/http_auth_handler_factory.h
@@ -6,11 +6,11 @@
 #define NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_
 
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/http/http_auth.h"
 #include "net/http/url_security_manager.h"
@@ -89,7 +89,7 @@
                                 CreateReason create_reason,
                                 int digest_nonce_count,
                                 const BoundNetLog& net_log,
-                                scoped_ptr<HttpAuthHandler>* handler) = 0;
+                                std::unique_ptr<HttpAuthHandler>* handler) = 0;
 
   // Creates an HTTP authentication handler based on the authentication
   // challenge string |challenge|.
@@ -101,7 +101,7 @@
                                   const SSLInfo& ssl_info,
                                   const GURL& origin,
                                   const BoundNetLog& net_log,
-                                  scoped_ptr<HttpAuthHandler>* handler);
+                                  std::unique_ptr<HttpAuthHandler>* handler);
 
   // Creates an HTTP authentication handler based on the authentication
   // challenge string |challenge|.
@@ -114,7 +114,7 @@
       const GURL& origin,
       int digest_nonce_count,
       const BoundNetLog& net_log,
-      scoped_ptr<HttpAuthHandler>* handler);
+      std::unique_ptr<HttpAuthHandler>* handler);
 
   // Creates a standard HttpAuthHandlerRegistryFactory. The caller is
   // responsible for deleting the factory.
@@ -125,7 +125,7 @@
   // non-NULL.  |resolver| must remain valid for the lifetime of the
   // HttpAuthHandlerRegistryFactory and any HttpAuthHandlers created by said
   // factory.
-  static scoped_ptr<HttpAuthHandlerRegistryFactory> CreateDefault(
+  static std::unique_ptr<HttpAuthHandlerRegistryFactory> CreateDefault(
       HostResolver* resolver);
 
  private:
@@ -175,7 +175,7 @@
   // CNAME lookups to generate a Kerberos SPN for the server. If the "negotiate"
   // scheme is used and |negotiate_disable_cname_lookup| is false,
   // |host_resolver| must not be NULL.
-  static scoped_ptr<HttpAuthHandlerRegistryFactory> Create(
+  static std::unique_ptr<HttpAuthHandlerRegistryFactory> Create(
       const HttpAuthPreferences* prefs,
       HostResolver* host_resolver);
   // Creates an auth handler by dispatching out to the registered factories
@@ -187,10 +187,11 @@
                         CreateReason reason,
                         int digest_nonce_count,
                         const BoundNetLog& net_log,
-                        scoped_ptr<HttpAuthHandler>* handler) override;
+                        std::unique_ptr<HttpAuthHandler>* handler) override;
 
  private:
-  using FactoryMap = std::map<std::string, scoped_ptr<HttpAuthHandlerFactory>>;
+  using FactoryMap =
+      std::map<std::string, std::unique_ptr<HttpAuthHandlerFactory>>;
 
   FactoryMap factory_map_;
   DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerRegistryFactory);
diff --git a/net/http/http_auth_handler_factory_unittest.cc b/net/http/http_auth_handler_factory_unittest.cc
index 6d85121..6ed7c2fc 100644
--- a/net/http/http_auth_handler_factory_unittest.cc
+++ b/net/http/http_auth_handler_factory_unittest.cc
@@ -2,11 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/memory/scoped_ptr.h"
+#include "net/http/http_auth_handler_factory.h"
+
+#include <memory>
+
 #include "net/base/net_errors.h"
 #include "net/dns/mock_host_resolver.h"
 #include "net/http/http_auth_handler.h"
-#include "net/http/http_auth_handler_factory.h"
 #include "net/http/http_auth_scheme.h"
 #include "net/http/mock_allow_http_auth_preferences.h"
 #include "net/http/url_security_manager.h"
@@ -30,7 +32,7 @@
                         CreateReason reason,
                         int nonce_count,
                         const BoundNetLog& net_log,
-                        scoped_ptr<HttpAuthHandler>* handler) override {
+                        std::unique_ptr<HttpAuthHandler>* handler) override {
     handler->reset();
     return return_code_;
   }
@@ -57,7 +59,7 @@
   MockHttpAuthHandlerFactory* mock_factory_digest_replace =
       new MockHttpAuthHandlerFactory(kDigestReturnCodeReplace);
 
-  scoped_ptr<HttpAuthHandler> handler;
+  std::unique_ptr<HttpAuthHandler> handler;
 
   // No schemes should be supported in the beginning.
   EXPECT_EQ(ERR_UNSUPPORTED_AUTH_SCHEME,
@@ -102,9 +104,9 @@
 }
 
 TEST(HttpAuthHandlerFactoryTest, DefaultFactory) {
-  scoped_ptr<HostResolver> host_resolver(new MockHostResolver());
+  std::unique_ptr<HostResolver> host_resolver(new MockHostResolver());
   MockAllowHttpAuthPreferences http_auth_preferences;
-  scoped_ptr<HttpAuthHandlerRegistryFactory> http_auth_handler_factory(
+  std::unique_ptr<HttpAuthHandlerRegistryFactory> http_auth_handler_factory(
       HttpAuthHandlerFactory::CreateDefault(host_resolver.get()));
   http_auth_handler_factory->SetHttpAuthPreferences(kNegotiateAuthScheme,
                                                     &http_auth_preferences);
@@ -112,7 +114,7 @@
   GURL proxy_origin("http://cache.example.com:3128");
   SSLInfo null_ssl_info;
   {
-    scoped_ptr<HttpAuthHandler> handler;
+    std::unique_ptr<HttpAuthHandler> handler;
     int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
         "Basic realm=\"FooBar\"", HttpAuth::AUTH_SERVER, null_ssl_info,
         server_origin, BoundNetLog(), &handler);
@@ -125,7 +127,7 @@
     EXPECT_FALSE(handler->is_connection_based());
   }
   {
-    scoped_ptr<HttpAuthHandler> handler;
+    std::unique_ptr<HttpAuthHandler> handler;
     int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
         "UNSUPPORTED realm=\"FooBar\"", HttpAuth::AUTH_SERVER, null_ssl_info,
         server_origin, BoundNetLog(), &handler);
@@ -133,7 +135,7 @@
     EXPECT_TRUE(handler.get() == NULL);
   }
   {
-    scoped_ptr<HttpAuthHandler> handler;
+    std::unique_ptr<HttpAuthHandler> handler;
     int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
         "Digest realm=\"FooBar\", nonce=\"xyz\"", HttpAuth::AUTH_PROXY,
         null_ssl_info, proxy_origin, BoundNetLog(), &handler);
@@ -146,7 +148,7 @@
     EXPECT_FALSE(handler->is_connection_based());
   }
   {
-    scoped_ptr<HttpAuthHandler> handler;
+    std::unique_ptr<HttpAuthHandler> handler;
     int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
         "NTLM", HttpAuth::AUTH_SERVER, null_ssl_info, server_origin,
         BoundNetLog(), &handler);
@@ -159,7 +161,7 @@
     EXPECT_TRUE(handler->is_connection_based());
   }
   {
-    scoped_ptr<HttpAuthHandler> handler;
+    std::unique_ptr<HttpAuthHandler> handler;
     int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
         "Negotiate", HttpAuth::AUTH_SERVER, null_ssl_info, server_origin,
         BoundNetLog(), &handler);
diff --git a/net/http/http_auth_handler_mock.cc b/net/http/http_auth_handler_mock.cc
index 513cbb69..2f374b0 100644
--- a/net/http/http_auth_handler_mock.cc
+++ b/net/http/http_auth_handler_mock.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_util.h"
 #include "base/thread_task_runner_handle.h"
@@ -162,7 +163,7 @@
 
 void HttpAuthHandlerMock::Factory::AddMockHandler(
     HttpAuthHandler* handler, HttpAuth::Target target) {
-  handlers_[target].push_back(make_scoped_ptr(handler));
+  handlers_[target].push_back(base::WrapUnique(handler));
 }
 
 int HttpAuthHandlerMock::Factory::CreateAuthHandler(
@@ -173,11 +174,12 @@
     CreateReason reason,
     int nonce_count,
     const BoundNetLog& net_log,
-    scoped_ptr<HttpAuthHandler>* handler) {
+    std::unique_ptr<HttpAuthHandler>* handler) {
   if (handlers_[target].empty())
     return ERR_UNEXPECTED;
-  scoped_ptr<HttpAuthHandler> tmp_handler = std::move(handlers_[target][0]);
-  std::vector<scoped_ptr<HttpAuthHandler>>& handlers = handlers_[target];
+  std::unique_ptr<HttpAuthHandler> tmp_handler =
+      std::move(handlers_[target][0]);
+  std::vector<std::unique_ptr<HttpAuthHandler>>& handlers = handlers_[target];
   handlers.erase(handlers.begin());
   if (do_init_from_challenge_ &&
       !tmp_handler->InitFromChallenge(challenge, target, ssl_info, origin,
diff --git a/net/http/http_auth_handler_mock.h b/net/http/http_auth_handler_mock.h
index 41aaa2d..06546af 100644
--- a/net/http/http_auth_handler_mock.h
+++ b/net/http/http_auth_handler_mock.h
@@ -5,10 +5,10 @@
 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_MOCK_H_
 #define NET_HTTP_HTTP_AUTH_HANDLER_MOCK_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "net/http/http_auth_handler.h"
 #include "net/http/http_auth_handler_factory.h"
@@ -50,10 +50,10 @@
                           CreateReason reason,
                           int nonce_count,
                           const BoundNetLog& net_log,
-                          scoped_ptr<HttpAuthHandler>* handler) override;
+                          std::unique_ptr<HttpAuthHandler>* handler) override;
 
    private:
-    std::vector<scoped_ptr<HttpAuthHandler>>
+    std::vector<std::unique_ptr<HttpAuthHandler>>
         handlers_[HttpAuth::AUTH_NUM_TARGETS];
     bool do_init_from_challenge_;
   };
diff --git a/net/http/http_auth_handler_negotiate.cc b/net/http/http_auth_handler_negotiate.cc
index 1ca6d54..ca1cddce 100644
--- a/net/http/http_auth_handler_negotiate.cc
+++ b/net/http/http_auth_handler_negotiate.cc
@@ -25,10 +25,10 @@
 
 namespace {
 
-scoped_ptr<base::Value> NetLogParameterChannelBindings(
+std::unique_ptr<base::Value> NetLogParameterChannelBindings(
     const std::string& channel_binding_token,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict;
+  std::unique_ptr<base::DictionaryValue> dict;
   if (!capture_mode.include_socket_bytes())
     return std::move(dict);
 
@@ -64,7 +64,7 @@
     CreateReason reason,
     int digest_nonce_count,
     const BoundNetLog& net_log,
-    scoped_ptr<HttpAuthHandler>* handler) {
+    std::unique_ptr<HttpAuthHandler>* handler) {
 #if defined(OS_WIN)
   if (is_unsupported_ || reason == CREATE_PREEMPTIVE)
     return ERR_UNSUPPORTED_AUTH_SCHEME;
@@ -78,7 +78,7 @@
   }
   // TODO(cbentzel): Move towards model of parsing in the factory
   //                 method and only constructing when valid.
-  scoped_ptr<HttpAuthHandler> tmp_handler(
+  std::unique_ptr<HttpAuthHandler> tmp_handler(
       new HttpAuthHandlerNegotiate(auth_library_.get(), max_token_length_,
                                    http_auth_preferences(), resolver_));
 #elif defined(OS_ANDROID)
@@ -88,7 +88,7 @@
     return ERR_UNSUPPORTED_AUTH_SCHEME;
   // TODO(cbentzel): Move towards model of parsing in the factory
   //                 method and only constructing when valid.
-  scoped_ptr<HttpAuthHandler> tmp_handler(
+  std::unique_ptr<HttpAuthHandler> tmp_handler(
       new HttpAuthHandlerNegotiate(http_auth_preferences(), resolver_));
 #elif defined(OS_POSIX)
   if (is_unsupported_)
@@ -99,7 +99,7 @@
   }
   // TODO(ahendrickson): Move towards model of parsing in the factory
   //                     method and only constructing when valid.
-  scoped_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNegotiate(
+  std::unique_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNegotiate(
       auth_library_.get(), http_auth_preferences(), resolver_));
 #endif
   if (!tmp_handler->InitFromChallenge(challenge, target, ssl_info, origin,
diff --git a/net/http/http_auth_handler_negotiate.h b/net/http/http_auth_handler_negotiate.h
index abdbe93..0f9154e 100644
--- a/net/http/http_auth_handler_negotiate.h
+++ b/net/http/http_auth_handler_negotiate.h
@@ -55,7 +55,7 @@
 #if !defined(OS_ANDROID)
     // Sets the system library to use, thereby assuming ownership of
     // |auth_library|.
-    void set_library(scoped_ptr<AuthLibrary> auth_provider) {
+    void set_library(std::unique_ptr<AuthLibrary> auth_provider) {
       auth_library_ = std::move(auth_provider);
     }
 #endif
@@ -68,7 +68,7 @@
                           CreateReason reason,
                           int digest_nonce_count,
                           const BoundNetLog& net_log,
-                          scoped_ptr<HttpAuthHandler>* handler) override;
+                          std::unique_ptr<HttpAuthHandler>* handler) override;
 
    private:
     HostResolver* resolver_;
@@ -77,7 +77,7 @@
 #endif
     bool is_unsupported_;
 #if !defined(OS_ANDROID)
-    scoped_ptr<AuthLibrary> auth_library_;
+    std::unique_ptr<AuthLibrary> auth_library_;
 #endif
   };
 
@@ -137,7 +137,7 @@
 
   // Members which are needed for DNS lookup + SPN.
   AddressList address_list_;
-  scoped_ptr<SingleRequestHostResolver> single_resolve_;
+  std::unique_ptr<SingleRequestHostResolver> single_resolve_;
 
   // Things which should be consistent after first call to GenerateAuthToken.
   bool already_called_;
diff --git a/net/http/http_auth_handler_negotiate_unittest.cc b/net/http/http_auth_handler_negotiate_unittest.cc
index 57a7b7e..775a5b4 100644
--- a/net/http/http_auth_handler_negotiate_unittest.cc
+++ b/net/http/http_auth_handler_negotiate_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <string>
 
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "net/base/net_errors.h"
@@ -52,7 +53,7 @@
     MockAuthLibrary::EnsureTestAccountExists();
 #endif
 #if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_ANDROID))
-    factory_->set_library(make_scoped_ptr(auth_library_));
+    factory_->set_library(base::WrapUnique(auth_library_));
 #endif
     factory_->set_host_resolver(resolver_.get());
   }
@@ -195,7 +196,7 @@
                     bool use_port,
                     bool synchronous_resolve_mode,
                     const std::string& url_string,
-                    scoped_ptr<HttpAuthHandlerNegotiate>* handler) {
+                    std::unique_ptr<HttpAuthHandlerNegotiate>* handler) {
     http_auth_preferences_->set_negotiate_disable_cname_lookup(
         disable_cname_lookup);
     http_auth_preferences_->set_negotiate_enable_port(use_port);
@@ -203,11 +204,11 @@
     GURL gurl(url_string);
 
     // Note: This is a little tricky because CreateAuthHandlerFromString
-    // expects a scoped_ptr<HttpAuthHandler>* rather than a
-    // scoped_ptr<HttpAuthHandlerNegotiate>*. This needs to do the cast
+    // expects a std::unique_ptr<HttpAuthHandler>* rather than a
+    // std::unique_ptr<HttpAuthHandlerNegotiate>*. This needs to do the cast
     // after creating the handler, and make sure that generic_handler
     // no longer holds on to the HttpAuthHandlerNegotiate object.
-    scoped_ptr<HttpAuthHandler> generic_handler;
+    std::unique_ptr<HttpAuthHandler> generic_handler;
     SSLInfo null_ssl_info;
     int rv = factory_->CreateAuthHandlerFromString(
         "Negotiate", HttpAuth::AUTH_SERVER, null_ssl_info, gurl, BoundNetLog(),
@@ -224,20 +225,20 @@
 
  private:
 #if defined(OS_WIN)
-  scoped_ptr<SecPkgInfoW> security_package_;
+  std::unique_ptr<SecPkgInfoW> security_package_;
 #endif
   // |auth_library_| is passed to |factory_|, which assumes ownership of it, but
   // can't be a scoped pointer to it since the tests need access when they set
   // up the mocks after passing ownership.
   MockAuthLibrary* auth_library_;
-  scoped_ptr<MockHostResolver> resolver_;
-  scoped_ptr<MockAllowHttpAuthPreferences> http_auth_preferences_;
-  scoped_ptr<HttpAuthHandlerNegotiate::Factory> factory_;
+  std::unique_ptr<MockHostResolver> resolver_;
+  std::unique_ptr<MockAllowHttpAuthPreferences> http_auth_preferences_;
+  std::unique_ptr<HttpAuthHandlerNegotiate::Factory> factory_;
 };
 
 TEST_F(HttpAuthHandlerNegotiateTest, DisableCname) {
   SetupMocks(AuthLibrary());
-  scoped_ptr<HttpAuthHandlerNegotiate> auth_handler;
+  std::unique_ptr<HttpAuthHandlerNegotiate> auth_handler;
   EXPECT_EQ(OK, CreateHandler(
       true, false, true, "http://alias:500", &auth_handler));
 
@@ -256,7 +257,7 @@
 
 TEST_F(HttpAuthHandlerNegotiateTest, DisableCnameStandardPort) {
   SetupMocks(AuthLibrary());
-  scoped_ptr<HttpAuthHandlerNegotiate> auth_handler;
+  std::unique_ptr<HttpAuthHandlerNegotiate> auth_handler;
   EXPECT_EQ(OK, CreateHandler(
       true, true, true, "http://alias:80", &auth_handler));
   ASSERT_TRUE(auth_handler.get() != NULL);
@@ -274,7 +275,7 @@
 
 TEST_F(HttpAuthHandlerNegotiateTest, DisableCnameNonstandardPort) {
   SetupMocks(AuthLibrary());
-  scoped_ptr<HttpAuthHandlerNegotiate> auth_handler;
+  std::unique_ptr<HttpAuthHandlerNegotiate> auth_handler;
   EXPECT_EQ(OK, CreateHandler(
       true, true, true, "http://alias:500", &auth_handler));
   ASSERT_TRUE(auth_handler.get() != NULL);
@@ -292,7 +293,7 @@
 
 TEST_F(HttpAuthHandlerNegotiateTest, CnameSync) {
   SetupMocks(AuthLibrary());
-  scoped_ptr<HttpAuthHandlerNegotiate> auth_handler;
+  std::unique_ptr<HttpAuthHandlerNegotiate> auth_handler;
   EXPECT_EQ(OK, CreateHandler(
       false, false, true, "http://alias:500", &auth_handler));
   ASSERT_TRUE(auth_handler.get() != NULL);
@@ -310,7 +311,7 @@
 
 TEST_F(HttpAuthHandlerNegotiateTest, CnameAsync) {
   SetupMocks(AuthLibrary());
-  scoped_ptr<HttpAuthHandlerNegotiate> auth_handler;
+  std::unique_ptr<HttpAuthHandlerNegotiate> auth_handler;
   EXPECT_EQ(OK, CreateHandler(
       false, false, false, "http://alias:500", &auth_handler));
   ASSERT_TRUE(auth_handler.get() != NULL);
@@ -333,7 +334,7 @@
 // that library.
 TEST_F(HttpAuthHandlerNegotiateTest, ServerNotInKerberosDatabase) {
   SetupErrorMocks(AuthLibrary(), GSS_S_FAILURE, 0x96C73A07);  // No server
-  scoped_ptr<HttpAuthHandlerNegotiate> auth_handler;
+  std::unique_ptr<HttpAuthHandlerNegotiate> auth_handler;
   EXPECT_EQ(OK, CreateHandler(
       false, false, false, "http://alias:500", &auth_handler));
   ASSERT_TRUE(auth_handler.get() != NULL);
@@ -349,7 +350,7 @@
 // that library.
 TEST_F(HttpAuthHandlerNegotiateTest, NoKerberosCredentials) {
   SetupErrorMocks(AuthLibrary(), GSS_S_FAILURE, 0x96C73AC3);  // No credentials
-  scoped_ptr<HttpAuthHandlerNegotiate> auth_handler;
+  std::unique_ptr<HttpAuthHandlerNegotiate> auth_handler;
   EXPECT_EQ(OK, CreateHandler(
       false, false, false, "http://alias:500", &auth_handler));
   ASSERT_TRUE(auth_handler.get() != NULL);
@@ -363,17 +364,17 @@
 
 #if defined(DLOPEN_KERBEROS)
 TEST_F(HttpAuthHandlerNegotiateTest, MissingGSSAPI) {
-  scoped_ptr<HostResolver> host_resolver(new MockHostResolver());
+  std::unique_ptr<HostResolver> host_resolver(new MockHostResolver());
   MockAllowHttpAuthPreferences http_auth_preferences;
-  scoped_ptr<HttpAuthHandlerNegotiate::Factory> negotiate_factory(
+  std::unique_ptr<HttpAuthHandlerNegotiate::Factory> negotiate_factory(
       new HttpAuthHandlerNegotiate::Factory());
   negotiate_factory->set_host_resolver(host_resolver);
   negotiate_factory->set_http_auth_preferences(&http_auth_preferences);
-  negotiate_factory->set_library(
-      make_scoped_ptr(new GSSAPISharedLibrary("/this/library/does/not/exist")));
+  negotiate_factory->set_library(base::WrapUnique(
+      new GSSAPISharedLibrary("/this/library/does/not/exist")));
 
   GURL gurl("http://www.example.com");
-  scoped_ptr<HttpAuthHandler> generic_handler;
+  std::unique_ptr<HttpAuthHandler> generic_handler;
   int rv = negotiate_factory->CreateAuthHandlerFromString(
       "Negotiate",
       HttpAuth::AUTH_SERVER,
diff --git a/net/http/http_auth_handler_ntlm.h b/net/http/http_auth_handler_ntlm.h
index 58e2993..d1d2314f 100644
--- a/net/http/http_auth_handler_ntlm.h
+++ b/net/http/http_auth_handler_ntlm.h
@@ -50,7 +50,7 @@
                           CreateReason reason,
                           int digest_nonce_count,
                           const BoundNetLog& net_log,
-                          scoped_ptr<HttpAuthHandler>* handler) override;
+                          std::unique_ptr<HttpAuthHandler>* handler) override;
 #if defined(NTLM_SSPI)
     // Set the SSPILibrary to use. Typically the only callers which need to use
     // this are unit tests which pass in a mocked-out version of the SSPI
@@ -64,7 +64,7 @@
 #if defined(NTLM_SSPI)
     ULONG max_token_length_;
     bool is_unsupported_;
-    scoped_ptr<SSPILibrary> sspi_library_;
+    std::unique_ptr<SSPILibrary> sspi_library_;
 #endif  // defined(NTLM_SSPI)
   };
 
diff --git a/net/http/http_auth_handler_ntlm_portable.cc b/net/http/http_auth_handler_ntlm_portable.cc
index b5a4882..5c4e0100 100644
--- a/net/http/http_auth_handler_ntlm_portable.cc
+++ b/net/http/http_auth_handler_ntlm_portable.cc
@@ -719,14 +719,14 @@
     CreateReason reason,
     int digest_nonce_count,
     const BoundNetLog& net_log,
-    scoped_ptr<HttpAuthHandler>* handler) {
+    std::unique_ptr<HttpAuthHandler>* handler) {
   if (reason == CREATE_PREEMPTIVE)
     return ERR_UNSUPPORTED_AUTH_SCHEME;
   // TODO(cbentzel): Move towards model of parsing in the factory
   //                 method and only constructing when valid.
   // NOTE: Default credentials are not supported for the portable implementation
   // of NTLM.
-  scoped_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM);
+  std::unique_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM);
   if (!tmp_handler->InitFromChallenge(challenge, target, ssl_info, origin,
                                       net_log))
     return ERR_INVALID_RESPONSE;
diff --git a/net/http/http_auth_handler_ntlm_win.cc b/net/http/http_auth_handler_ntlm_win.cc
index 844a0a0..c069f736 100644
--- a/net/http/http_auth_handler_ntlm_win.cc
+++ b/net/http/http_auth_handler_ntlm_win.cc
@@ -55,7 +55,7 @@
     CreateReason reason,
     int digest_nonce_count,
     const BoundNetLog& net_log,
-    scoped_ptr<HttpAuthHandler>* handler) {
+    std::unique_ptr<HttpAuthHandler>* handler) {
   if (is_unsupported_ || reason == CREATE_PREEMPTIVE)
     return ERR_UNSUPPORTED_AUTH_SCHEME;
   if (max_token_length_ == 0) {
@@ -68,7 +68,7 @@
   }
   // TODO(cbentzel): Move towards model of parsing in the factory
   //                 method and only constructing when valid.
-  scoped_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM(
+  std::unique_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM(
       sspi_library_.get(), max_token_length_, http_auth_preferences()));
   if (!tmp_handler->InitFromChallenge(challenge, target, ssl_info, origin,
                                       net_log))
diff --git a/net/http/http_auth_preferences.cc b/net/http/http_auth_preferences.cc
index bdb12b3..01df88c2 100644
--- a/net/http/http_auth_preferences.cc
+++ b/net/http/http_auth_preferences.cc
@@ -62,9 +62,9 @@
 void HttpAuthPreferences::set_server_whitelist(
     const std::string& server_whitelist) {
   if (server_whitelist.empty()) {
-    security_manager_->SetDefaultWhitelist(scoped_ptr<HttpAuthFilter>());
+    security_manager_->SetDefaultWhitelist(std::unique_ptr<HttpAuthFilter>());
   } else {
-    security_manager_->SetDefaultWhitelist(scoped_ptr<HttpAuthFilter>(
+    security_manager_->SetDefaultWhitelist(std::unique_ptr<HttpAuthFilter>(
         new net::HttpAuthFilterWhitelist(server_whitelist)));
   }
 }
@@ -72,9 +72,9 @@
 void HttpAuthPreferences::set_delegate_whitelist(
     const std::string& delegate_whitelist) {
   if (delegate_whitelist.empty()) {
-    security_manager_->SetDelegateWhitelist(scoped_ptr<HttpAuthFilter>());
+    security_manager_->SetDelegateWhitelist(std::unique_ptr<HttpAuthFilter>());
   } else {
-    security_manager_->SetDelegateWhitelist(scoped_ptr<HttpAuthFilter>(
+    security_manager_->SetDelegateWhitelist(std::unique_ptr<HttpAuthFilter>(
         new net::HttpAuthFilterWhitelist(delegate_whitelist)));
   }
 }
diff --git a/net/http/http_auth_unittest.cc b/net/http/http_auth_unittest.cc
index 82b37411..ca9410f 100644
--- a/net/http/http_auth_unittest.cc
+++ b/net/http/http_auth_unittest.cc
@@ -2,15 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "net/http/http_auth.h"
+
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_util.h"
 #include "net/base/net_errors.h"
 #include "net/dns/mock_host_resolver.h"
-#include "net/http/http_auth.h"
 #include "net/http/http_auth_challenge_tokenizer.h"
 #include "net/http/http_auth_filter.h"
 #include "net/http/http_auth_handler.h"
@@ -49,7 +50,7 @@
     bool connection_based,
     const std::string& headers_text,
     std::string* challenge_used) {
-  scoped_ptr<HttpAuthHandlerMock> mock_handler(
+  std::unique_ptr<HttpAuthHandlerMock> mock_handler(
       CreateMockHandler(connection_based));
   std::set<HttpAuth::Scheme> disabled_schemes;
   scoped_refptr<HttpResponseHeaders> headers(
@@ -120,8 +121,8 @@
   GURL origin("http://www.example.com");
   std::set<HttpAuth::Scheme> disabled_schemes;
   MockAllowHttpAuthPreferences http_auth_preferences;
-  scoped_ptr<HostResolver> host_resolver(new MockHostResolver());
-  scoped_ptr<HttpAuthHandlerRegistryFactory> http_auth_handler_factory(
+  std::unique_ptr<HostResolver> host_resolver(new MockHostResolver());
+  std::unique_ptr<HttpAuthHandlerRegistryFactory> http_auth_handler_factory(
       HttpAuthHandlerFactory::CreateDefault(host_resolver.get()));
   http_auth_handler_factory->SetHttpAuthPreferences(kNegotiateAuthScheme,
                                                     &http_auth_preferences);
@@ -134,7 +135,7 @@
         HeadersFromResponseText(headers_with_status_line));
 
     SSLInfo null_ssl_info;
-    scoped_ptr<HttpAuthHandler> handler;
+    std::unique_ptr<HttpAuthHandler> handler;
     HttpAuth::ChooseBestChallenge(http_auth_handler_factory.get(), *headers,
                                   null_ssl_info, HttpAuth::AUTH_SERVER, origin,
                                   disabled_schemes, BoundNetLog(), &handler);
diff --git a/net/http/http_basic_state.cc b/net/http/http_basic_state.cc
index b6e04df..2e5ca06e 100644
--- a/net/http/http_basic_state.cc
+++ b/net/http/http_basic_state.cc
@@ -36,7 +36,7 @@
   return OK;
 }
 
-scoped_ptr<ClientSocketHandle> HttpBasicState::ReleaseConnection() {
+std::unique_ptr<ClientSocketHandle> HttpBasicState::ReleaseConnection() {
   return std::move(connection_);
 }
 
diff --git a/net/http/http_basic_state.h b/net/http/http_basic_state.h
index 41298e4..b215480 100644
--- a/net/http/http_basic_state.h
+++ b/net/http/http_basic_state.h
@@ -8,11 +8,11 @@
 #ifndef NET_HTTP_HTTP_BASIC_STATE_H_
 #define NET_HTTP_HTTP_BASIC_STATE_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
 #include "net/base/request_priority.h"
@@ -45,7 +45,7 @@
 
   ClientSocketHandle* connection() const { return connection_.get(); }
 
-  scoped_ptr<ClientSocketHandle> ReleaseConnection();
+  std::unique_ptr<ClientSocketHandle> ReleaseConnection();
 
   scoped_refptr<GrowableIOBuffer> read_buf() const;
 
@@ -56,9 +56,9 @@
  private:
   scoped_refptr<GrowableIOBuffer> read_buf_;
 
-  scoped_ptr<HttpStreamParser> parser_;
+  std::unique_ptr<HttpStreamParser> parser_;
 
-  scoped_ptr<ClientSocketHandle> connection_;
+  std::unique_ptr<ClientSocketHandle> connection_;
 
   const bool using_proxy_;
 
diff --git a/net/http/http_basic_state_unittest.cc b/net/http/http_basic_state_unittest.cc
index e95cfd2..98540e0e 100644
--- a/net/http/http_basic_state_unittest.cc
+++ b/net/http/http_basic_state_unittest.cc
@@ -29,7 +29,7 @@
 TEST(HttpBasicStateTest, ReleaseConnectionWorks) {
   ClientSocketHandle* const handle = new ClientSocketHandle;
   HttpBasicState state(handle, false);
-  const scoped_ptr<ClientSocketHandle> released_connection(
+  const std::unique_ptr<ClientSocketHandle> released_connection(
       state.ReleaseConnection());
   EXPECT_EQ(NULL, state.connection());
   EXPECT_EQ(handle, released_connection.get());
diff --git a/net/http/http_basic_stream.cc b/net/http/http_basic_stream.cc
index 0dd7a9e..9ebb5e3 100644
--- a/net/http/http_basic_stream.cc
+++ b/net/http/http_basic_stream.cc
@@ -4,7 +4,8 @@
 
 #include "net/http/http_basic_stream.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/http/http_request_info.h"
 #include "net/http/http_response_body_drainer.h"
 #include "net/http/http_stream_parser.h"
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index f572c14..2b2e5bb 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -15,6 +15,7 @@
 #include "base/format_macros.h"
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram_macros.h"
@@ -66,15 +67,16 @@
 HttpCache::DefaultBackend::~DefaultBackend() {}
 
 // static
-scoped_ptr<HttpCache::BackendFactory> HttpCache::DefaultBackend::InMemory(
+std::unique_ptr<HttpCache::BackendFactory> HttpCache::DefaultBackend::InMemory(
     int max_bytes) {
-  return make_scoped_ptr(new DefaultBackend(MEMORY_CACHE, CACHE_BACKEND_DEFAULT,
-                                            base::FilePath(), max_bytes,
-                                            nullptr));
+  return base::WrapUnique(
+      new DefaultBackend(MEMORY_CACHE, CACHE_BACKEND_DEFAULT, base::FilePath(),
+                         max_bytes, nullptr));
 }
 
 int HttpCache::DefaultBackend::CreateBackend(
-    NetLog* net_log, scoped_ptr<disk_cache::Backend>* backend,
+    NetLog* net_log,
+    std::unique_ptr<disk_cache::Backend>* backend,
     const CompletionCallback& callback) {
   DCHECK_GE(max_bytes_, 0);
   return disk_cache::CreateCacheBackend(type_,
@@ -113,7 +115,7 @@
   ~PendingOp() {}
 
   disk_cache::Entry* disk_entry;
-  scoped_ptr<disk_cache::Backend> backend;
+  std::unique_ptr<disk_cache::Backend> backend;
   WorkItem* writer;
   CompletionCallback callback;  // BackendCallback.
   WorkItemList pending_queue;
@@ -210,7 +212,7 @@
   void SelfDestroy();
   void OnIOComplete(int result);
 
-  scoped_ptr<HttpCache::Transaction> transaction_;
+  std::unique_ptr<HttpCache::Transaction> transaction_;
   bool verified_;
   scoped_refptr<IOBuffer> buf_;
   int buf_len_;
@@ -289,14 +291,14 @@
 
 //-----------------------------------------------------------------------------
 HttpCache::HttpCache(HttpNetworkSession* session,
-                     scoped_ptr<BackendFactory> backend_factory,
+                     std::unique_ptr<BackendFactory> backend_factory,
                      bool set_up_quic_server_info)
-    : HttpCache(make_scoped_ptr(new HttpNetworkLayer(session)),
+    : HttpCache(base::WrapUnique(new HttpNetworkLayer(session)),
                 std::move(backend_factory),
                 set_up_quic_server_info) {}
 
-HttpCache::HttpCache(scoped_ptr<HttpTransactionFactory> network_layer,
-                     scoped_ptr<BackendFactory> backend_factory,
+HttpCache::HttpCache(std::unique_ptr<HttpTransactionFactory> network_layer,
+                     std::unique_ptr<BackendFactory> backend_factory,
                      bool set_up_quic_server_info)
     : net_log_(nullptr),
       backend_factory_(std::move(backend_factory)),
@@ -441,7 +443,7 @@
 }
 
 int HttpCache::CreateTransaction(RequestPriority priority,
-                                 scoped_ptr<HttpTransaction>* trans) {
+                                 std::unique_ptr<HttpTransaction>* trans) {
   // Do lazy initialization of disk cache if needed.
   if (!disk_cache_.get()) {
     // We don't care about the result.
@@ -467,10 +469,10 @@
   return network_layer_->GetSession();
 }
 
-scoped_ptr<HttpTransactionFactory>
+std::unique_ptr<HttpTransactionFactory>
 HttpCache::SetHttpNetworkTransactionFactoryForTesting(
-    scoped_ptr<HttpTransactionFactory> new_network_layer) {
-  scoped_ptr<HttpTransactionFactory> old_network_layer(
+    std::unique_ptr<HttpTransactionFactory> new_network_layer) {
+  std::unique_ptr<HttpTransactionFactory> old_network_layer(
       std::move(network_layer_));
   network_layer_ = std::move(new_network_layer);
   return old_network_layer;
@@ -485,8 +487,8 @@
 
   building_backend_ = true;
 
-  scoped_ptr<WorkItem> item(new WorkItem(WI_CREATE_BACKEND, NULL, callback,
-                                         backend));
+  std::unique_ptr<WorkItem> item(
+      new WorkItem(WI_CREATE_BACKEND, NULL, callback, backend));
 
   // This is the only operation that we can do that is not related to any given
   // entry, so we use an empty key for it.
@@ -1023,7 +1025,7 @@
   if (op == WI_CREATE_BACKEND)
     return OnBackendCreated(result, pending_op);
 
-  scoped_ptr<WorkItem> item(pending_op->writer);
+  std::unique_ptr<WorkItem> item(pending_op->writer);
   bool fail_requests = false;
 
   ActiveEntry* entry = NULL;
@@ -1119,7 +1121,7 @@
 }
 
 void HttpCache::OnBackendCreated(int result, PendingOp* pending_op) {
-  scoped_ptr<WorkItem> item(pending_op->writer);
+  std::unique_ptr<WorkItem> item(pending_op->writer);
   WorkItemOperation op = item->operation();
   DCHECK_EQ(WI_CREATE_BACKEND, op);
 
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index 1c9c891..230a7f5b 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -15,13 +15,13 @@
 #define NET_HTTP_HTTP_CACHE_H_
 
 #include <list>
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/containers/hash_tables.h"
 #include "base/files/file_path.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "base/time/clock.h"
@@ -87,7 +87,7 @@
     // The implementation must not access the factory object after invoking the
     // |callback| because the object can be deleted from within the callback.
     virtual int CreateBackend(NetLog* net_log,
-                              scoped_ptr<disk_cache::Backend>* backend,
+                              std::unique_ptr<disk_cache::Backend>* backend,
                               const CompletionCallback& callback) = 0;
   };
 
@@ -105,11 +105,11 @@
     ~DefaultBackend() override;
 
     // Returns a factory for an in-memory cache.
-    static scoped_ptr<BackendFactory> InMemory(int max_bytes);
+    static std::unique_ptr<BackendFactory> InMemory(int max_bytes);
 
     // BackendFactory implementation.
     int CreateBackend(NetLog* net_log,
-                      scoped_ptr<disk_cache::Backend>* backend,
+                      std::unique_ptr<disk_cache::Backend>* backend,
                       const CompletionCallback& callback) override;
 
    private:
@@ -135,13 +135,13 @@
   // If |set_up_quic_server_info| is true, configures the cache to track
   // information about servers supporting QUIC.
   HttpCache(HttpNetworkSession* session,
-            scoped_ptr<BackendFactory> backend_factory,
+            std::unique_ptr<BackendFactory> backend_factory,
             bool set_up_quic_server_info);
 
   // Initialize the cache from its component parts. |network_layer| and
   // |backend_factory| will be destroyed when the HttpCache is.
-  HttpCache(scoped_ptr<HttpTransactionFactory> network_layer,
-            scoped_ptr<BackendFactory> backend_factory,
+  HttpCache(std::unique_ptr<HttpTransactionFactory> network_layer,
+            std::unique_ptr<BackendFactory> backend_factory,
             bool set_up_quic_server_info);
 
   ~HttpCache() override;
@@ -180,7 +180,7 @@
   Mode mode() { return mode_; }
 
   // Get/Set the cache's clock. These are public only for testing.
-  void SetClockForTesting(scoped_ptr<base::Clock> clock) {
+  void SetClockForTesting(std::unique_ptr<base::Clock> clock) {
     clock_.reset(clock.release());
   }
   base::Clock* clock() const { return clock_.get(); }
@@ -211,7 +211,7 @@
 
   // HttpTransactionFactory implementation:
   int CreateTransaction(RequestPriority priority,
-                        scoped_ptr<HttpTransaction>* trans) override;
+                        std::unique_ptr<HttpTransaction>* trans) override;
   HttpCache* GetCache() override;
   HttpNetworkSession* GetSession() override;
 
@@ -221,9 +221,9 @@
   // network changes (e.g. host unreachable).  The old network layer is
   // returned to allow for filter patterns that only intercept
   // some creation requests.  Note ownership exchange.
-  scoped_ptr<HttpTransactionFactory>
-      SetHttpNetworkTransactionFactoryForTesting(
-          scoped_ptr<HttpTransactionFactory> new_network_layer);
+  std::unique_ptr<HttpTransactionFactory>
+  SetHttpNetworkTransactionFactoryForTesting(
+      std::unique_ptr<HttpTransactionFactory> new_network_layer);
 
  private:
   // Types --------------------------------------------------------------------
@@ -405,16 +405,16 @@
   NetLog* net_log_;
 
   // Used when lazily constructing the disk_cache_.
-  scoped_ptr<BackendFactory> backend_factory_;
+  std::unique_ptr<BackendFactory> backend_factory_;
   bool building_backend_;
   bool bypass_lock_for_test_;
   bool fail_conditionalization_for_test_;
 
   Mode mode_;
 
-  scoped_ptr<HttpTransactionFactory> network_layer_;
+  std::unique_ptr<HttpTransactionFactory> network_layer_;
 
-  scoped_ptr<disk_cache::Backend> disk_cache_;
+  std::unique_ptr<disk_cache::Backend> disk_cache_;
 
   // The set of active entries indexed by cache key.
   ActiveEntriesMap active_entries_;
@@ -425,10 +425,10 @@
   // The set of entries "under construction".
   PendingOpsMap pending_ops_;
 
-  scoped_ptr<PlaybackCacheMap> playback_cache_map_;
+  std::unique_ptr<PlaybackCacheMap> playback_cache_map_;
 
   // A clock that can be swapped out for testing.
-  scoped_ptr<base::Clock> clock_;
+  std::unique_ptr<base::Clock> clock_;
 
   base::WeakPtrFactory<HttpCache> weak_factory_;
 
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
index b3c90e94..0c9b112 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -11,11 +11,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "net/base/completion_callback.h"
@@ -430,7 +430,7 @@
   const HttpRequestInfo* request_;
   RequestPriority priority_;
   BoundNetLog net_log_;
-  scoped_ptr<HttpRequestInfo> custom_request_;
+  std::unique_ptr<HttpRequestInfo> custom_request_;
   HttpRequestHeaders request_headers_copy_;
   // If extra_headers specified a "if-modified-since" or "if-none-match",
   // |external_validation_| contains the value of those headers.
@@ -438,7 +438,7 @@
   base::WeakPtr<HttpCache> cache_;
   HttpCache::ActiveEntry* entry_;
   HttpCache::ActiveEntry* new_entry_;
-  scoped_ptr<HttpTransaction> network_trans_;
+  std::unique_ptr<HttpTransaction> network_trans_;
   CompletionCallback callback_;  // Consumer's callback.
   HttpResponseInfo response_;
   HttpResponseInfo auth_response_;
@@ -462,7 +462,7 @@
   int read_offset_;
   int effective_load_flags_;
   int write_len_;
-  scoped_ptr<PartialData> partial_;  // We are dealing with range requests.
+  std::unique_ptr<PartialData> partial_;  // We are dealing with range requests.
   UploadProgress final_upload_progress_;
   CompletionCallback io_callback_;
 
@@ -478,7 +478,7 @@
   // Load timing information for the last network request, if any.  Set in the
   // 304 and 206 response cases, as the network transaction may be destroyed
   // before the caller requests load timing information.
-  scoped_ptr<LoadTimingInfo> old_network_trans_load_timing_;
+  std::unique_ptr<LoadTimingInfo> old_network_trans_load_timing_;
 
   ConnectionAttempts old_connection_attempts_;
   IPEndPoint old_remote_endpoint_;
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index 44039e4..cdacc62 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -5,14 +5,16 @@
 #include "net/http/http_cache.h"
 
 #include <stdint.h>
+
 #include <algorithm>
+#include <memory>
 #include <utility>
 #include <vector>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/string_util.h"
@@ -148,7 +150,7 @@
 
   // write to the cache
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   int rv = cache->CreateTransaction(DEFAULT_PRIORITY, &trans);
   EXPECT_EQ(OK, rv);
   ASSERT_TRUE(trans.get());
@@ -570,7 +572,7 @@
 
   int result;
   TestCompletionCallback callback;
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
 };
 
 class FakeWebSocketHandshakeStreamCreateHelper
@@ -578,7 +580,7 @@
  public:
   ~FakeWebSocketHandshakeStreamCreateHelper() override {}
   WebSocketHandshakeStreamBase* CreateBasicStream(
-      scoped_ptr<ClientSocketHandle> connect,
+      std::unique_ptr<ClientSocketHandle> connect,
       bool using_proxy) override {
     return NULL;
   }
@@ -634,7 +636,7 @@
 TEST(HttpCache, CreateThenDestroy) {
   MockHttpCache cache;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   EXPECT_EQ(OK, cache.CreateTransaction(&trans));
   ASSERT_TRUE(trans.get());
 }
@@ -704,7 +706,7 @@
 
 TEST(HttpCache, SimpleGETNoDiskCache2) {
   // This will initialize a cache object with NULL backend.
-  scoped_ptr<MockBlockingBackendFactory> factory(
+  std::unique_ptr<MockBlockingBackendFactory> factory(
       new MockBlockingBackendFactory());
   factory->set_fail(true);
   factory->FinishCreation();  // We'll complete synchronously.
@@ -725,7 +727,7 @@
   RunTransactionTest(cache.http_cache(), kSimpleGET_Transaction);
 
   MockHttpRequest request(kSimpleGET_Transaction);
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   ASSERT_EQ(OK, cache.CreateTransaction(&trans));
 
   const int kBufferSize = 10;
@@ -766,7 +768,7 @@
 
   MockHttpRequest request(kSimpleGET_Transaction);
 
-  scoped_ptr<Context> c(new Context());
+  std::unique_ptr<Context> c(new Context());
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_EQ(OK, rv);
 
@@ -811,7 +813,7 @@
   cache.disk_cache()->set_soft_failures(true);
 
   // Now fail to read from the cache.
-  scoped_ptr<Context> c(new Context());
+  std::unique_ptr<Context> c(new Context());
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_EQ(OK, rv);
 
@@ -915,7 +917,7 @@
   MockHttpRequest request(transaction);
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   ASSERT_EQ(OK, cache.CreateTransaction(&trans));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -1032,7 +1034,7 @@
 
   MockHttpRequest request(transaction);
   TestCompletionCallback callback;
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   int rv = cache.http_cache()->CreateTransaction(DEFAULT_PRIORITY, &trans);
   EXPECT_EQ(OK, rv);
   ASSERT_TRUE(trans.get());
@@ -1416,11 +1418,11 @@
   MockHttpRequest writer_request(kSimpleGET_Transaction);
   writer_request.load_flags = LOAD_BYPASS_CACHE;
 
-  std::vector<scoped_ptr<Context>> context_list;
+  std::vector<std::unique_ptr<Context>> context_list;
   const int kNumTransactions = 4;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(make_scoped_ptr(new Context()));
+    context_list.push_back(base::WrapUnique(new Context()));
     Context* c = context_list[i].get();
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -1723,7 +1725,7 @@
   MockHttpRequest request(kSimpleGET_Transaction);
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   ASSERT_EQ(OK, cache.CreateTransaction(&trans));
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
   if (rv == ERR_IO_PENDING)
@@ -1746,8 +1748,8 @@
 // Tests that we can delete the HttpCache and deal with queued transactions
 // ("waiting for the backend" as opposed to Active or Doomed entries).
 TEST(HttpCache, SimpleGET_ManyWriters_DeleteCache) {
-  scoped_ptr<MockHttpCache> cache(
-      new MockHttpCache(make_scoped_ptr(new MockBackendNoCbFactory())));
+  std::unique_ptr<MockHttpCache> cache(
+      new MockHttpCache(base::WrapUnique(new MockBackendNoCbFactory())));
 
   MockHttpRequest request(kSimpleGET_Transaction);
 
@@ -1784,7 +1786,7 @@
 // Tests that we queue requests when initializing the backend.
 TEST(HttpCache, SimpleGET_WaitForBackend) {
   MockBlockingBackendFactory* factory = new MockBlockingBackendFactory();
-  MockHttpCache cache(make_scoped_ptr(factory));
+  MockHttpCache cache(base::WrapUnique(factory));
 
   MockHttpRequest request0(kSimpleGET_Transaction);
   MockHttpRequest request1(kTypicalGET_Transaction);
@@ -1830,7 +1832,7 @@
 // to be initialized.
 TEST(HttpCache, SimpleGET_WaitForBackend_CancelCreate) {
   MockBlockingBackendFactory* factory = new MockBlockingBackendFactory();
-  MockHttpCache cache(make_scoped_ptr(factory));
+  MockHttpCache cache(base::WrapUnique(factory));
 
   MockHttpRequest request0(kSimpleGET_Transaction);
   MockHttpRequest request1(kTypicalGET_Transaction);
@@ -1884,11 +1886,12 @@
 // Tests that we can delete the cache while creating the backend.
 TEST(HttpCache, DeleteCacheWaitingForBackend) {
   MockBlockingBackendFactory* factory = new MockBlockingBackendFactory();
-  scoped_ptr<MockHttpCache> cache(new MockHttpCache(make_scoped_ptr(factory)));
+  std::unique_ptr<MockHttpCache> cache(
+      new MockHttpCache(base::WrapUnique(factory)));
 
   MockHttpRequest request(kSimpleGET_Transaction);
 
-  scoped_ptr<Context> c(new Context());
+  std::unique_ptr<Context> c(new Context());
   c->result = cache->CreateTransaction(&c->trans);
   ASSERT_EQ(OK, c->result);
 
@@ -1903,7 +1906,7 @@
   // We cannot call FinishCreation because the factory itself will go away with
   // the cache, so grab the callback and attempt to use it.
   CompletionCallback callback = factory->callback();
-  scoped_ptr<disk_cache::Backend>* backend = factory->backend();
+  std::unique_ptr<disk_cache::Backend>* backend = factory->backend();
 
   cache.reset();
   base::MessageLoop::current()->RunUntilIdle();
@@ -1916,7 +1919,7 @@
 // one of the callbacks.
 TEST(HttpCache, DeleteCacheWaitingForBackend2) {
   MockBlockingBackendFactory* factory = new MockBlockingBackendFactory();
-  MockHttpCache* cache = new MockHttpCache(make_scoped_ptr(factory));
+  MockHttpCache* cache = new MockHttpCache(base::WrapUnique(factory));
 
   DeleteCacheCompletionCallback cb(cache);
   disk_cache::Backend* backend;
@@ -1926,7 +1929,7 @@
   // Now let's queue a regular transaction
   MockHttpRequest request(kSimpleGET_Transaction);
 
-  scoped_ptr<Context> c(new Context());
+  std::unique_ptr<Context> c(new Context());
   c->result = cache->CreateTransaction(&c->trans);
   ASSERT_EQ(OK, c->result);
 
@@ -2904,7 +2907,7 @@
   MockHttpRequest request(transaction);
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   ASSERT_EQ(OK, cache.CreateTransaction(&trans));
   ASSERT_TRUE(trans.get());
 
@@ -2927,9 +2930,9 @@
 
   const int64_t kUploadId = 1;  // Just a dummy value.
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers),
                                               kUploadId);
   MockHttpRequest request(transaction);
@@ -2960,9 +2963,9 @@
 
   const int64_t kUploadId = 1;  // Just a dummy value.
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers),
                                               kUploadId);
 
@@ -2981,9 +2984,9 @@
 TEST(HttpCache, SimplePOST_SeparateCache) {
   MockHttpCache cache;
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 1);
 
   MockTransaction transaction(kSimplePOST_Transaction);
@@ -3021,9 +3024,9 @@
   EXPECT_EQ(0, cache.disk_cache()->open_count());
   EXPECT_EQ(1, cache.disk_cache()->create_count());
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 1);
 
   transaction.method = "POST";
@@ -3061,9 +3064,9 @@
   EXPECT_EQ(0, cache.disk_cache()->open_count());
   EXPECT_EQ(1, cache.disk_cache()->create_count());
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   transaction.method = "POST";
@@ -3088,15 +3091,15 @@
 // Tests that processing a POST before creating the backend doesn't crash.
 TEST(HttpCache, SimplePOST_NoUploadId_NoBackend) {
   // This will initialize a cache object with NULL backend.
-  scoped_ptr<MockBlockingBackendFactory> factory(
+  std::unique_ptr<MockBlockingBackendFactory> factory(
       new MockBlockingBackendFactory());
   factory->set_fail(true);
   factory->FinishCreation();
   MockHttpCache cache(std::move(factory));
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   MockTransaction transaction(kSimplePOST_Transaction);
@@ -3124,9 +3127,9 @@
   EXPECT_EQ(0, cache.disk_cache()->open_count());
   EXPECT_EQ(1, cache.disk_cache()->create_count());
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 1);
 
   transaction.method = "POST";
@@ -3159,7 +3162,7 @@
   MockHttpRequest request(transaction);
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   ASSERT_EQ(OK, cache.CreateTransaction(&trans));
   ASSERT_TRUE(trans.get());
 
@@ -3436,9 +3439,9 @@
   MockTransaction transaction(kSimplePOST_Transaction);
   transaction.method = "PUT";
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   MockHttpRequest request(transaction);
@@ -3466,9 +3469,9 @@
   EXPECT_EQ(0, cache.disk_cache()->open_count());
   EXPECT_EQ(1, cache.disk_cache()->create_count());
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   transaction.method = "PUT";
@@ -3503,9 +3506,9 @@
   EXPECT_EQ(0, cache.disk_cache()->open_count());
   EXPECT_EQ(1, cache.disk_cache()->create_count());
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   transaction.method = "PUT";
@@ -3542,9 +3545,9 @@
   EXPECT_EQ(0, cache.disk_cache()->open_count());
   EXPECT_EQ(1, cache.disk_cache()->create_count());
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   transaction.method = "PUT";
@@ -3573,9 +3576,9 @@
   MockTransaction transaction(kSimplePOST_Transaction);
   transaction.method = "DELETE";
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   MockHttpRequest request(transaction);
@@ -3603,9 +3606,9 @@
   EXPECT_EQ(0, cache.disk_cache()->open_count());
   EXPECT_EQ(1, cache.disk_cache()->create_count());
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello", 5)));
+      base::WrapUnique(new UploadBytesElementReader("hello", 5)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   transaction.method = "DELETE";
@@ -5433,7 +5436,7 @@
 // Tests that we don't crash with a range request if the disk cache was not
 // initialized properly.
 TEST(HttpCache, RangeGET_NoDiskCache) {
-  scoped_ptr<MockBlockingBackendFactory> factory(
+  std::unique_ptr<MockBlockingBackendFactory> factory(
       new MockBlockingBackendFactory());
   factory->set_fail(true);
   factory->FinishCreation();  // We'll complete synchronously.
@@ -5554,7 +5557,7 @@
   MockHttpRequest request(transaction);
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   int rv = cache.http_cache()->CreateTransaction(DEFAULT_PRIORITY, &trans);
   EXPECT_EQ(OK, rv);
   ASSERT_TRUE(trans.get());
@@ -5747,7 +5750,7 @@
       "Etag: \"foopy\"\n";
   MockHttpRequest request(transaction);
 
-  scoped_ptr<Context> c(new Context());
+  std::unique_ptr<Context> c(new Context());
 
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_EQ(OK, rv);
@@ -5800,7 +5803,7 @@
       "Etag: \"foopy\"\n";
   MockHttpRequest request(transaction);
 
-  scoped_ptr<Context> c(new Context());
+  std::unique_ptr<Context> c(new Context());
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_EQ(OK, rv);
 
@@ -5826,8 +5829,8 @@
   ScopedMockTransaction transaction(kRangeGET_TransactionOK);
   transaction.request_headers = "Range: bytes = 0-19\r\n" EXTRA_HEADER;
 
-  scoped_ptr<MockHttpRequest> request(new MockHttpRequest(transaction));
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<MockHttpRequest> request(new MockHttpRequest(transaction));
+  std::unique_ptr<HttpTransaction> trans;
 
   int rv = cache.http_cache()->CreateTransaction(DEFAULT_PRIORITY, &trans);
   EXPECT_EQ(OK, rv);
@@ -5853,8 +5856,8 @@
   ScopedMockTransaction transaction(kRangeGET_TransactionOK);
   transaction.request_headers = "Range: bytes = 30-49\r\n" EXTRA_HEADER;
 
-  scoped_ptr<MockHttpRequest> request(new MockHttpRequest(transaction));
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<MockHttpRequest> request(new MockHttpRequest(transaction));
+  std::unique_ptr<HttpTransaction> trans;
 
   int rv = cache.http_cache()->CreateTransaction(DEFAULT_PRIORITY, &trans);
   EXPECT_EQ(OK, rv);
@@ -6067,7 +6070,7 @@
   transaction.request_headers = EXTRA_HEADER;
   transaction.data = kFullRangeData;
 
-  scoped_ptr<Context> c(new Context);
+  std::unique_ptr<Context> c(new Context);
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_EQ(OK, rv);
 
@@ -6102,7 +6105,7 @@
   transaction.data = kFullRangeData;
   RangeTransactionServer handler;
 
-  scoped_ptr<Context> c(new Context);
+  std::unique_ptr<Context> c(new Context);
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_EQ(OK, rv);
 
@@ -6153,7 +6156,7 @@
       "Range: bytes = 0-79\r\n"
       "X-Require-Mock-Auth-Alt: dummy\r\n" EXTRA_HEADER;
 
-  scoped_ptr<Context> c(new Context);
+  std::unique_ptr<Context> c(new Context);
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_EQ(OK, rv);
 
@@ -6332,7 +6335,7 @@
 
   // Write to the cache.
   {
-    scoped_ptr<HttpTransaction> trans;
+    std::unique_ptr<HttpTransaction> trans;
     ASSERT_EQ(OK, cache.CreateTransaction(&trans));
 
     int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -6366,7 +6369,7 @@
 
   // Read from the cache.
   {
-    scoped_ptr<HttpTransaction> trans;
+    std::unique_ptr<HttpTransaction> trans;
     ASSERT_EQ(OK, cache.CreateTransaction(&trans));
 
     int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -6547,7 +6550,7 @@
   MockHttpRequest request(transaction);
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   ASSERT_EQ(OK, cache.CreateTransaction(&trans));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -6560,7 +6563,7 @@
 TEST(HttpCache, OutlivedTransactions) {
   MockHttpCache* cache = new MockHttpCache;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   EXPECT_EQ(OK, cache->CreateTransaction(&trans));
 
   delete cache;
@@ -6801,7 +6804,7 @@
   TestCompletionCallback callback;
 
   {
-    scoped_ptr<HttpTransaction> trans;
+    std::unique_ptr<HttpTransaction> trans;
     ASSERT_EQ(OK, cache.CreateTransaction(&trans));
 
     MockHttpRequest request(kSimpleGET_Transaction);
@@ -6837,7 +6840,7 @@
   ScopedMockTransaction transaction(kSimpleGET_Transaction);
   transaction.data = "";
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   ASSERT_EQ(OK, cache.CreateTransaction(&trans));
 
   MockHttpRequest request(transaction);
@@ -6865,7 +6868,7 @@
   MockHttpRequest request(kSimpleGET_Transaction);
 
   {
-    scoped_ptr<HttpTransaction> trans;
+    std::unique_ptr<HttpTransaction> trans;
     ASSERT_EQ(OK, cache.CreateTransaction(&trans));
 
     int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -6903,7 +6906,7 @@
   MockHttpRequest request(kSimpleGET_Transaction);
 
   {
-    scoped_ptr<HttpTransaction> trans;
+    std::unique_ptr<HttpTransaction> trans;
     ASSERT_EQ(OK, cache.CreateTransaction(&trans));
 
     int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -6946,7 +6949,7 @@
   MockHttpRequest request(mock_transaction);
 
   {
-    scoped_ptr<HttpTransaction> trans;
+    std::unique_ptr<HttpTransaction> trans;
     ASSERT_EQ(OK, cache.CreateTransaction(&trans));
 
     int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -6978,7 +6981,7 @@
   MockHttpRequest request(kSimpleGET_Transaction);
 
   {
-    scoped_ptr<HttpTransaction> trans;
+    std::unique_ptr<HttpTransaction> trans;
     ASSERT_EQ(OK, cache.CreateTransaction(&trans));
 
     // Force a response that can be resumed.
@@ -7026,7 +7029,7 @@
 
   {
     // Now make a regular request.
-    scoped_ptr<HttpTransaction> trans;
+    std::unique_ptr<HttpTransaction> trans;
     ASSERT_EQ(OK, cache.CreateTransaction(&trans));
 
     int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -7097,7 +7100,7 @@
 TEST(HttpCache, SetPriority) {
   MockHttpCache cache;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   ASSERT_EQ(OK, cache.http_cache()->CreateTransaction(IDLE, &trans));
 
   // Shouldn't crash, but doesn't do anything either.
@@ -7135,7 +7138,7 @@
   MockHttpCache cache;
 
   FakeWebSocketHandshakeStreamCreateHelper create_helper;
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   ASSERT_EQ(OK, cache.http_cache()->CreateTransaction(IDLE, &trans));
 
   EXPECT_FALSE(cache.network_layer()->last_transaction());
@@ -7175,7 +7178,7 @@
   transaction.request_headers = EXTRA_HEADER;
   transaction.data = kFullRangeData;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   ASSERT_EQ(OK, cache.http_cache()->CreateTransaction(MEDIUM, &trans));
   EXPECT_EQ(DEFAULT_PRIORITY,
             cache.network_layer()->last_create_transaction_priority());
@@ -7312,7 +7315,7 @@
     DCHECK_LT(kMaxAgeSecs, prefetch_reuse_mins() * kNumSecondsPerMinute);
 
     clock_ = new base::SimpleTestClock();
-    cache_.http_cache()->SetClockForTesting(make_scoped_ptr(clock_));
+    cache_.http_cache()->SetClockForTesting(base::WrapUnique(clock_));
     cache_.network_layer()->SetClock(clock_);
 
     transaction_.response_headers = "Cache-Control: max-age=100\n";
@@ -7568,7 +7571,7 @@
   AddMockTransaction(&transaction);
 
   TestCompletionCallback callback;
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   int rv = cache.http_cache()->CreateTransaction(DEFAULT_PRIORITY, &trans);
   EXPECT_EQ(OK, rv);
   ASSERT_TRUE(trans.get());
@@ -7597,7 +7600,7 @@
   mock_transaction.response_headers = "Cache-Control: no-store\n";
   MockHttpRequest request(mock_transaction);
 
-  scoped_ptr<Context> first(new Context);
+  std::unique_ptr<Context> first(new Context);
   first->result = cache.CreateTransaction(&first->trans);
   ASSERT_EQ(OK, first->result);
   EXPECT_EQ(LOAD_STATE_IDLE, first->trans->GetLoadState());
@@ -7613,7 +7616,7 @@
   // Here we have read the response header but not read the response body yet.
 
   // Let us create the second (read) transaction.
-  scoped_ptr<Context> second(new Context);
+  std::unique_ptr<Context> second(new Context);
   second->result = cache.CreateTransaction(&second->trans);
   ASSERT_EQ(OK, second->result);
   EXPECT_EQ(LOAD_STATE_IDLE, second->trans->GetLoadState());
diff --git a/net/http/http_chunked_decoder_unittest.cc b/net/http/http_chunked_decoder_unittest.cc
index 2f2ab25..2cd4fc1 100644
--- a/net/http/http_chunked_decoder_unittest.cc
+++ b/net/http/http_chunked_decoder_unittest.cc
@@ -4,7 +4,8 @@
 
 #include "net/http/http_chunked_decoder.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/base/net_errors.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -327,7 +328,7 @@
 // Test when the line with the chunk length is too long.
 TEST(HttpChunkedDecoderTest, LongChunkLengthLine) {
   int big_chunk_length = HttpChunkedDecoder::kMaxLineBufLen;
-  scoped_ptr<char[]> big_chunk(new char[big_chunk_length + 1]);
+  std::unique_ptr<char[]> big_chunk(new char[big_chunk_length + 1]);
   memset(big_chunk.get(), '0', big_chunk_length);
   big_chunk[big_chunk_length] = 0;
   const char* const inputs[] = {
@@ -341,7 +342,7 @@
 // long.
 TEST(HttpChunkedDecoderTest, LongLengthLengthLine) {
   int big_chunk_length = HttpChunkedDecoder::kMaxLineBufLen;
-  scoped_ptr<char[]> big_chunk(new char[big_chunk_length + 1]);
+  std::unique_ptr<char[]> big_chunk(new char[big_chunk_length + 1]);
   memset(big_chunk.get(), '0', big_chunk_length);
   big_chunk[big_chunk_length] = 0;
   const char* const inputs[] = {
diff --git a/net/http/http_network_layer.cc b/net/http/http_network_layer.cc
index 169a1cc1..60fd5a8 100644
--- a/net/http/http_network_layer.cc
+++ b/net/http/http_network_layer.cc
@@ -38,8 +38,9 @@
 #endif
 }
 
-int HttpNetworkLayer::CreateTransaction(RequestPriority priority,
-                                        scoped_ptr<HttpTransaction>* trans) {
+int HttpNetworkLayer::CreateTransaction(
+    RequestPriority priority,
+    std::unique_ptr<HttpTransaction>* trans) {
   if (suspended_)
     return ERR_NETWORK_IO_SUSPENDED;
 
diff --git a/net/http/http_network_layer.h b/net/http/http_network_layer.h
index 3026f2e1..86679dd 100644
--- a/net/http/http_network_layer.h
+++ b/net/http/http_network_layer.h
@@ -5,12 +5,12 @@
 #ifndef NET_HTTP_HTTP_NETWORK_LAYER_H_
 #define NET_HTTP_HTTP_NETWORK_LAYER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/power_monitor/power_observer.h"
 #include "base/threading/non_thread_safe.h"
 #include "net/base/net_export.h"
@@ -33,7 +33,7 @@
 
   // HttpTransactionFactory methods:
   int CreateTransaction(RequestPriority priority,
-                        scoped_ptr<HttpTransaction>* trans) override;
+                        std::unique_ptr<HttpTransaction>* trans) override;
   HttpCache* GetCache() override;
   HttpNetworkSession* GetSession() override;
 
diff --git a/net/http/http_network_layer_unittest.cc b/net/http/http_network_layer_unittest.cc
index 8589cbf2..6753309 100644
--- a/net/http/http_network_layer_unittest.cc
+++ b/net/http/http_network_layer_unittest.cc
@@ -33,7 +33,7 @@
     ConfigureTestDependencies(ProxyService::CreateDirect());
   }
 
-  void ConfigureTestDependencies(scoped_ptr<ProxyService> proxy_service) {
+  void ConfigureTestDependencies(std::unique_ptr<ProxyService> proxy_service) {
     cert_verifier_.reset(new MockCertVerifier);
     transport_security_state_.reset(new TransportSecurityState);
     proxy_service_ = std::move(proxy_service);
@@ -61,7 +61,7 @@
     request_info.method = method;
     request_info.load_flags = LOAD_NORMAL;
 
-    scoped_ptr<HttpTransaction> trans;
+    std::unique_ptr<HttpTransaction> trans;
     int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans);
     EXPECT_EQ(OK, rv);
 
@@ -256,24 +256,24 @@
 
   MockClientSocketFactory mock_socket_factory_;
   MockHostResolver host_resolver_;
-  scoped_ptr<CertVerifier> cert_verifier_;
-  scoped_ptr<TransportSecurityState> transport_security_state_;
-  scoped_ptr<ProxyService> proxy_service_;
+  std::unique_ptr<CertVerifier> cert_verifier_;
+  std::unique_ptr<TransportSecurityState> transport_security_state_;
+  std::unique_ptr<ProxyService> proxy_service_;
   const scoped_refptr<SSLConfigService> ssl_config_service_;
-  scoped_ptr<HttpNetworkSession> network_session_;
-  scoped_ptr<HttpNetworkLayer> factory_;
+  std::unique_ptr<HttpNetworkSession> network_session_;
+  std::unique_ptr<HttpNetworkLayer> factory_;
   HttpServerPropertiesImpl http_server_properties_;
 };
 
 TEST_F(HttpNetworkLayerTest, CreateAndDestroy) {
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans);
   EXPECT_EQ(OK, rv);
   EXPECT_TRUE(trans.get() != NULL);
 }
 
 TEST_F(HttpNetworkLayerTest, Suspend) {
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans);
   EXPECT_EQ(OK, rv);
 
@@ -317,7 +317,7 @@
                                        "Foo/1.0");
   request_info.load_flags = LOAD_NORMAL;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans);
   EXPECT_EQ(OK, rv);
 
@@ -356,7 +356,7 @@
                                        "Foo/1.0");
   request_info.load_flags = LOAD_NORMAL;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans);
   EXPECT_EQ(OK, rv);
 
@@ -389,7 +389,7 @@
                                        "Foo/1.0");
   request_info.load_flags = LOAD_NORMAL;
 
-  scoped_ptr<HttpTransaction> trans;
+  std::unique_ptr<HttpTransaction> trans;
   int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans);
   EXPECT_EQ(OK, rv);
 
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index 613a0ee3..e23324d 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -295,23 +295,24 @@
       proxy_server);
 }
 
-scoped_ptr<base::Value> HttpNetworkSession::SocketPoolInfoToValue() const {
+std::unique_ptr<base::Value> HttpNetworkSession::SocketPoolInfoToValue() const {
   // TODO(yutak): Should merge values from normal pools and WebSocket pools.
   return normal_socket_pool_manager_->SocketPoolInfoToValue();
 }
 
-scoped_ptr<base::Value> HttpNetworkSession::SpdySessionPoolInfoToValue() const {
+std::unique_ptr<base::Value> HttpNetworkSession::SpdySessionPoolInfoToValue()
+    const {
   return spdy_session_pool_.SpdySessionPoolInfoToValue();
 }
 
-scoped_ptr<base::Value> HttpNetworkSession::QuicInfoToValue() const {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+std::unique_ptr<base::Value> HttpNetworkSession::QuicInfoToValue() const {
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue());
   dict->SetBoolean("quic_enabled", params_.enable_quic);
   dict->SetBoolean("quic_enabled_for_proxies", params_.enable_quic_for_proxies);
   dict->SetBoolean("enable_quic_port_selection",
                    params_.enable_quic_port_selection);
-  scoped_ptr<base::ListValue> connection_options(new base::ListValue);
+  std::unique_ptr<base::ListValue> connection_options(new base::ListValue);
   for (QuicTagVector::const_iterator it =
            params_.quic_connection_options.begin();
        it != params_.quic_connection_options.end(); ++it) {
@@ -319,7 +320,8 @@
   }
   dict->Set("connection_options", std::move(connection_options));
 
-  scoped_ptr<base::ListValue> origins_to_force_quic_on(new base::ListValue);
+  std::unique_ptr<base::ListValue> origins_to_force_quic_on(
+      new base::ListValue);
   for (const auto& origin : params_.origins_to_force_quic_on) {
     origins_to_force_quic_on->AppendString("'" + origin.ToString() + "'");
   }
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h
index c779539..41c5340 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -244,14 +244,14 @@
   }
 
   // Creates a Value summary of the state of the socket pools.
-  scoped_ptr<base::Value> SocketPoolInfoToValue() const;
+  std::unique_ptr<base::Value> SocketPoolInfoToValue() const;
 
   // Creates a Value summary of the state of the SPDY sessions.
-  scoped_ptr<base::Value> SpdySessionPoolInfoToValue() const;
+  std::unique_ptr<base::Value> SpdySessionPoolInfoToValue() const;
 
   // Creates a Value summary of the state of the QUIC sessions and
   // configuration.
-  scoped_ptr<base::Value> QuicInfoToValue() const;
+  std::unique_ptr<base::Value> QuicInfoToValue() const;
 
   void CloseAllConnections();
   void CloseIdleConnections();
@@ -283,12 +283,12 @@
 
   HttpAuthCache http_auth_cache_;
   SSLClientAuthCache ssl_client_auth_cache_;
-  scoped_ptr<ClientSocketPoolManager> normal_socket_pool_manager_;
-  scoped_ptr<ClientSocketPoolManager> websocket_socket_pool_manager_;
+  std::unique_ptr<ClientSocketPoolManager> normal_socket_pool_manager_;
+  std::unique_ptr<ClientSocketPoolManager> websocket_socket_pool_manager_;
   QuicStreamFactory quic_stream_factory_;
   SpdySessionPool spdy_session_pool_;
-  scoped_ptr<HttpStreamFactory> http_stream_factory_;
-  scoped_ptr<HttpStreamFactory> http_stream_factory_for_websocket_;
+  std::unique_ptr<HttpStreamFactory> http_stream_factory_;
+  std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket_;
   std::set<HttpResponseBodyDrainer*> response_drainers_;
 
   NextProtoVector next_protos_;
diff --git a/net/http/http_network_session_peer.cc b/net/http/http_network_session_peer.cc
index a5fb8a5..df729762 100644
--- a/net/http/http_network_session_peer.cc
+++ b/net/http/http_network_session_peer.cc
@@ -20,7 +20,7 @@
 HttpNetworkSessionPeer::~HttpNetworkSessionPeer() {}
 
 void HttpNetworkSessionPeer::SetClientSocketPoolManager(
-    scoped_ptr<ClientSocketPoolManager> socket_pool_manager) {
+    std::unique_ptr<ClientSocketPoolManager> socket_pool_manager) {
   session_->normal_socket_pool_manager_.swap(socket_pool_manager);
 }
 
@@ -29,12 +29,12 @@
 }
 
 void HttpNetworkSessionPeer::SetHttpStreamFactory(
-    scoped_ptr<HttpStreamFactory> http_stream_factory) {
+    std::unique_ptr<HttpStreamFactory> http_stream_factory) {
   session_->http_stream_factory_.swap(http_stream_factory);
 }
 
 void HttpNetworkSessionPeer::SetHttpStreamFactoryForWebSocket(
-    scoped_ptr<HttpStreamFactory> http_stream_factory) {
+    std::unique_ptr<HttpStreamFactory> http_stream_factory) {
   session_->http_stream_factory_for_websocket_.swap(http_stream_factory);
 }
 
diff --git a/net/http/http_network_session_peer.h b/net/http/http_network_session_peer.h
index 18d7a23..da057f0 100644
--- a/net/http/http_network_session_peer.h
+++ b/net/http/http_network_session_peer.h
@@ -5,9 +5,10 @@
 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_
 #define NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
@@ -24,13 +25,14 @@
   ~HttpNetworkSessionPeer();
 
   void SetClientSocketPoolManager(
-      scoped_ptr<ClientSocketPoolManager> socket_pool_manager);
+      std::unique_ptr<ClientSocketPoolManager> socket_pool_manager);
 
   void SetProxyService(ProxyService* proxy_service);
 
-  void SetHttpStreamFactory(scoped_ptr<HttpStreamFactory> http_stream_factory);
+  void SetHttpStreamFactory(
+      std::unique_ptr<HttpStreamFactory> http_stream_factory);
   void SetHttpStreamFactoryForWebSocket(
-      scoped_ptr<HttpStreamFactory> http_stream_factory_for_websocket);
+      std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket);
 
  private:
   HttpNetworkSession* const session_;
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index ebbe1552..5a70587 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -4,6 +4,7 @@
 
 #include "net/http/http_network_transaction.h"
 
+#include <memory>
 #include <set>
 #include <utility>
 #include <vector>
@@ -13,7 +14,6 @@
 #include "base/bind_helpers.h"
 #include "base/compiler_specific.h"
 #include "base/format_macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/sparse_histogram.h"
@@ -71,14 +71,14 @@
 
 namespace {
 
-scoped_ptr<base::Value> NetLogSSLVersionFallbackCallback(
+std::unique_ptr<base::Value> NetLogSSLVersionFallbackCallback(
     const GURL* url,
     int net_error,
     SSLFailureState ssl_failure_state,
     uint16_t version_before,
     uint16_t version_after,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("host_and_port", GetHostAndPort(*url));
   dict->SetInteger("net_error", net_error);
   dict->SetInteger("ssl_failure_state", ssl_failure_state);
@@ -87,11 +87,11 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSSLCipherFallbackCallback(
+std::unique_ptr<base::Value> NetLogSSLCipherFallbackCallback(
     const GURL* url,
     int net_error,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("host_and_port", GetHostAndPort(*url));
   dict->SetInteger("net_error", net_error);
   return std::move(dict);
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index 98b2e729..f95cd36 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "crypto/ec_private_key.h"
 #include "net/base/net_error_details.h"
@@ -325,8 +325,8 @@
   // |proxy_info_| is the ProxyInfo used by the HttpStreamRequest.
   ProxyInfo proxy_info_;
 
-  scoped_ptr<HttpStreamRequest> stream_request_;
-  scoped_ptr<HttpStream> stream_;
+  std::unique_ptr<HttpStreamRequest> stream_request_;
+  std::unique_ptr<HttpStream> stream_;
 
   // True if we've validated the headers that the stream parser has returned.
   bool headers_valid_;
@@ -345,8 +345,8 @@
   SSLFailureState fallback_failure_state_;
 
   // Keys to use for signing message in Token Binding header.
-  scoped_ptr<crypto::ECPrivateKey> provided_token_binding_key_;
-  scoped_ptr<crypto::ECPrivateKey> referred_token_binding_key_;
+  std::unique_ptr<crypto::ECPrivateKey> provided_token_binding_key_;
+  std::unique_ptr<crypto::ECPrivateKey> referred_token_binding_key_;
   // Object to manage lookup of |provided_token_binding_key_| and
   // |referred_token_binding_key_|.
   ChannelIDService::Request token_binding_request_;
diff --git a/net/http/http_network_transaction_ssl_unittest.cc b/net/http/http_network_transaction_ssl_unittest.cc
index 575b2b94..45c46e4 100644
--- a/net/http/http_network_transaction_ssl_unittest.cc
+++ b/net/http/http_network_transaction_ssl_unittest.cc
@@ -2,11 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include <string>
 #include <vector>
 
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/request_priority.h"
 #include "net/dns/mock_host_resolver.h"
 #include "net/http/http_auth_handler_mock.h"
@@ -93,7 +94,7 @@
     HttpRequestInfo* request_info = new HttpRequestInfo;
     request_info->url = GURL(url);
     request_info->method = "GET";
-    request_info_vector_.push_back(make_scoped_ptr(request_info));
+    request_info_vector_.push_back(base::WrapUnique(request_info));
     return request_info;
   }
 
@@ -102,15 +103,15 @@
   }
 
   scoped_refptr<SSLConfigService> ssl_config_service_;
-  scoped_ptr<HttpAuthHandlerMock::Factory> auth_handler_factory_;
-  scoped_ptr<ProxyService> proxy_service_;
+  std::unique_ptr<HttpAuthHandlerMock::Factory> auth_handler_factory_;
+  std::unique_ptr<ProxyService> proxy_service_;
 
   MockClientSocketFactory mock_socket_factory_;
   MockHostResolver mock_resolver_;
   HttpServerPropertiesImpl http_server_properties_;
   TransportSecurityState transport_security_state_;
   HttpNetworkSession::Params session_params_;
-  std::vector<scoped_ptr<HttpRequestInfo>> request_info_vector_;
+  std::vector<std::unique_ptr<HttpRequestInfo>> request_info_vector_;
 };
 
 // Tests that HttpNetworkTransaction attempts to fallback from
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index 3b180d89..31250f3a 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -7,7 +7,9 @@
 #include <math.h>  // ceil
 #include <stdarg.h>
 #include <stdint.h>
+
 #include <limits>
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
@@ -18,7 +20,7 @@
 #include "base/json/json_writer.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/string_util.h"
@@ -253,7 +255,7 @@
   headers->SetHeader("Sec-WebSocket-Key", "dGhlIHNhbXBsZSBub25jZQ==");
 }
 
-scoped_ptr<HttpNetworkSession> CreateSession(
+std::unique_ptr<HttpNetworkSession> CreateSession(
     SpdySessionDependencies* session_deps) {
   return SpdySessionDependencies::SpdyCreateSession(session_deps);
 }
@@ -359,8 +361,8 @@
 
     BoundTestNetLog log;
     session_deps_.net_log = log.bound().net_log();
-    scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     for (size_t i = 0; i < data_count; ++i) {
@@ -599,7 +601,7 @@
   void CancelRequest(const std::string& group_name,
                      ClientSocketHandle* handle) override {}
   void ReleaseSocket(const std::string& group_name,
-                     scoped_ptr<StreamSocket> socket,
+                     std::unique_ptr<StreamSocket> socket,
                      int id) override {}
   void CloseIdleSockets() override {}
   int IdleSocketCount() const override { return 0; }
@@ -709,8 +711,8 @@
 }  // namespace
 
 TEST_P(HttpNetworkTransactionTest, Basic) {
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 }
 
@@ -1030,8 +1032,8 @@
   request.url = GURL("http://redirect.com/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
@@ -1075,8 +1077,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   BeforeProxyHeadersSentHandler proxy_headers_handler;
   trans->SetBeforeProxyHeadersSentCallback(
@@ -1134,7 +1136,7 @@
 }
 
 TEST_P(HttpNetworkTransactionTest, ReuseConnection) {
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   MockRead data_reads[] = {
     MockRead("HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\n"),
@@ -1156,7 +1158,7 @@
     request.url = GURL("http://www.example.org/");
     request.load_flags = 0;
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     TestCompletionCallback callback;
@@ -1182,9 +1184,9 @@
 }
 
 TEST_P(HttpNetworkTransactionTest, Ignores100) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("foo", 3)));
+      base::WrapUnique(new UploadBytesElementReader("foo", 3)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -1193,8 +1195,8 @@
   request.upload_data_stream = &upload_data_stream;
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockRead data_reads[] = {
@@ -1235,8 +1237,8 @@
   request.url = GURL("http://www.foo.com/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockRead data_reads[] = {
@@ -1274,8 +1276,8 @@
   request.url = GURL("http://www.foo.com/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockRead data_reads[] = {
@@ -1305,8 +1307,8 @@
   request.url = GURL("http://www.foo.com/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockRead data_reads[] = {
@@ -1334,7 +1336,7 @@
 
   TestNetLog net_log;
   session_deps_.net_log = &net_log;
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Written data for successfully sending both requests.
   MockWrite data1_writes[] = {
@@ -1381,7 +1383,7 @@
   for (int i = 0; i < 2; ++i) {
     TestCompletionCallback callback;
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -1424,7 +1426,7 @@
 
   TestNetLog net_log;
   session_deps_.net_log = &net_log;
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   SSLSocketDataProvider ssl1(ASYNC, OK);
   SSLSocketDataProvider ssl2(ASYNC, OK);
@@ -1436,11 +1438,11 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl2);
 
   // SPDY versions of the request and response.
-  scoped_ptr<SpdySerializedFrame> spdy_request(spdy_util_.ConstructSpdyGet(
+  std::unique_ptr<SpdySerializedFrame> spdy_request(spdy_util_.ConstructSpdyGet(
       request.url.spec().c_str(), 1, DEFAULT_PRIORITY));
-  scoped_ptr<SpdySerializedFrame> spdy_response(
+  std::unique_ptr<SpdySerializedFrame> spdy_response(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> spdy_data(
+  std::unique_ptr<SpdySerializedFrame> spdy_data(
       spdy_util_.ConstructSpdyBodyFrame(1, "hello", 5, true));
 
   // HTTP/1.1 versions of the request and response.
@@ -1507,7 +1509,7 @@
   // Make the request.
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -1625,8 +1627,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockRead data_reads[] = {
@@ -1679,8 +1681,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Defer on OnBeforeNetworkStart.
@@ -1728,8 +1730,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Defer on OnBeforeNetworkStart.
@@ -1759,8 +1761,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockRead data_reads[] = {
@@ -1800,8 +1802,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockRead data_reads[] = {
@@ -1842,7 +1844,7 @@
 
   TestNetLog net_log;
   session_deps_.net_log = &net_log;
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   const char* request_data =
       "GET / HTTP/1.1\r\n"
@@ -1909,7 +1911,7 @@
   for (size_t i = 0; i < kNumUnreadBodies; ++i) {
     TestCompletionCallback callback;
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -1956,7 +1958,7 @@
     EXPECT_EQ(kStatusLines[i], response_lines[i]);
 
   TestCompletionCallback callback;
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
   EXPECT_EQ(OK, callback.GetResult(rv));
@@ -1980,8 +1982,8 @@
 
   TestNetLog log;
   session_deps_.net_log = &log;
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes1[] = {
@@ -2091,8 +2093,8 @@
   MockHostResolver* resolver = new MockHostResolver();
   session_deps_.net_log = &log;
   session_deps_.host_resolver.reset(resolver);
-  scoped_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   resolver->rules()->ClearRules();
@@ -2201,8 +2203,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = LOAD_DO_NOT_SEND_AUTH_DATA;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -2256,7 +2258,7 @@
 
     TestNetLog log;
     session_deps_.net_log = &log;
-    scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+    std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
     MockWrite data_writes[] = {
         MockWrite(ASYNC, 0,
@@ -2294,7 +2296,7 @@
 
     TestCompletionCallback callback1;
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
     int rv = trans->Start(&request, callback1.callback(), BoundNetLog());
     ASSERT_EQ(OK, callback1.GetResult(rv));
@@ -2345,7 +2347,7 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   MockWrite data_writes1[] = {
       MockWrite(
@@ -2388,7 +2390,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   int rv = trans->Start(&request, callback1.callback(), BoundNetLog());
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2423,7 +2425,7 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   MockWrite data_writes1[] = {
       MockWrite(
@@ -2474,7 +2476,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   int rv = trans->Start(&request, callback1.callback(), BoundNetLog());
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2509,7 +2511,7 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   MockWrite data_writes1[] = {
       MockWrite(
@@ -2563,7 +2565,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   int rv = trans->Start(&request, callback1.callback(), BoundNetLog());
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -2604,7 +2606,7 @@
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Since we have proxy, should try to establish tunnel.
   MockWrite data_writes1[] = {
@@ -2656,7 +2658,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
@@ -2728,7 +2730,7 @@
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Since we have proxy, should try to establish tunnel.
   MockWrite data_writes1[] = {
@@ -2779,7 +2781,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
@@ -2856,9 +2858,9 @@
     session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
     BoundTestNetLog log;
     session_deps_.net_log = log.bound().net_log();
-    scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+    std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     // Since we have proxy, should try to establish tunnel.
@@ -2967,9 +2969,9 @@
     session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
     BoundTestNetLog log;
     session_deps_.net_log = log.bound().net_log();
-    scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+    std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     // Since we have proxy, should try to establish tunnel.
@@ -3074,7 +3076,7 @@
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Since we have proxy, should try to establish tunnel.
   MockWrite data_writes1[] = {
@@ -3134,7 +3136,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
@@ -3197,9 +3199,9 @@
 
   // Configure against proxy server "myproxy:70".
   session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
-  scoped_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
+  std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Since we have proxy, should try to establish tunnel.
@@ -3287,9 +3289,9 @@
   // Configure against proxy server "myproxy:70".
   session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Since we have proxy, should try to establish tunnel.
@@ -3346,9 +3348,9 @@
   // Configure against proxy server "myproxy:70".
   session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Since we have proxy, should try to establish tunnel.
@@ -3406,8 +3408,8 @@
   request.load_flags = 0;
 
   // We are using a DIRECT connection (i.e. no proxy) for this session.
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes1[] = {
@@ -3454,7 +3456,7 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Since we have proxy, should try to establish tunnel.
   MockWrite data_writes1[] = {
@@ -3484,7 +3486,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
@@ -3515,10 +3517,10 @@
   session_deps_.proxy_service =
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
 
-  scoped_ptr<HttpAuthHandlerMock::Factory> auth_handler_factory(
+  std::unique_ptr<HttpAuthHandlerMock::Factory> auth_handler_factory(
       new HttpAuthHandlerMock::Factory());
   auth_handler_factory->set_do_init_from_challenge(true);
-  scoped_ptr<HttpAuthHandlerMock> mock_handler(new HttpAuthHandlerMock());
+  std::unique_ptr<HttpAuthHandlerMock> mock_handler(new HttpAuthHandlerMock());
   mock_handler->set_allows_default_credentials(true);
   auth_handler_factory->AddMockHandler(mock_handler.release(),
                                        HttpAuth::AUTH_PROXY);
@@ -3527,7 +3529,7 @@
   // Add NetLog just so can verify load timing information gets a NetLog ID.
   NetLog net_log;
   session_deps_.net_log = &net_log;
-  scoped_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
+  std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
 
   // Since we have proxy, should try to establish tunnel.
   MockWrite data_writes1[] = {
@@ -3578,7 +3580,7 @@
   SSLSocketDataProvider ssl(ASYNC, OK);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   TestCompletionCallback callback;
@@ -3632,10 +3634,10 @@
   session_deps_.proxy_service =
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
 
-  scoped_ptr<HttpAuthHandlerMock::Factory> auth_handler_factory(
+  std::unique_ptr<HttpAuthHandlerMock::Factory> auth_handler_factory(
       new HttpAuthHandlerMock::Factory());
   auth_handler_factory->set_do_init_from_challenge(true);
-  scoped_ptr<HttpAuthHandlerMock> mock_handler(new HttpAuthHandlerMock());
+  std::unique_ptr<HttpAuthHandlerMock> mock_handler(new HttpAuthHandlerMock());
   mock_handler->set_allows_default_credentials(true);
   auth_handler_factory->AddMockHandler(mock_handler.release(),
                                        HttpAuth::AUTH_PROXY);
@@ -3644,7 +3646,7 @@
   // Add NetLog just so can verify load timing information gets a NetLog ID.
   NetLog net_log;
   session_deps_.net_log = &net_log;
-  scoped_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
+  std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
 
   // Should try to establish tunnel.
   MockWrite data_writes1[] = {
@@ -3698,7 +3700,7 @@
   SSLSocketDataProvider ssl(ASYNC, OK);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   TestCompletionCallback callback;
@@ -3754,10 +3756,10 @@
   session_deps_.proxy_service =
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
 
-  scoped_ptr<HttpAuthHandlerMock::Factory> auth_handler_factory(
+  std::unique_ptr<HttpAuthHandlerMock::Factory> auth_handler_factory(
       new HttpAuthHandlerMock::Factory());
   auth_handler_factory->set_do_init_from_challenge(true);
-  scoped_ptr<HttpAuthHandlerMock> mock_handler(new HttpAuthHandlerMock());
+  std::unique_ptr<HttpAuthHandlerMock> mock_handler(new HttpAuthHandlerMock());
   mock_handler->set_allows_default_credentials(true);
   auth_handler_factory->AddMockHandler(mock_handler.release(),
                                        HttpAuth::AUTH_PROXY);
@@ -3766,7 +3768,7 @@
   // Add NetLog just so can verify load timing information gets a NetLog ID.
   NetLog net_log;
   session_deps_.net_log = &net_log;
-  scoped_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
+  std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
 
   // Should try to establish tunnel.
   MockWrite data_writes1[] = {
@@ -3813,7 +3815,7 @@
                                  data_writes2, arraysize(data_writes2));
   session_deps_.socket_factory->AddSocketDataProvider(&data2);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   TestCompletionCallback callback;
@@ -3852,10 +3854,10 @@
   session_deps_.proxy_service =
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
 
-  scoped_ptr<HttpAuthHandlerMock::Factory> auth_handler_factory(
+  std::unique_ptr<HttpAuthHandlerMock::Factory> auth_handler_factory(
       new HttpAuthHandlerMock::Factory());
   auth_handler_factory->set_do_init_from_challenge(true);
-  scoped_ptr<HttpAuthHandlerMock> mock_handler(new HttpAuthHandlerMock());
+  std::unique_ptr<HttpAuthHandlerMock> mock_handler(new HttpAuthHandlerMock());
   mock_handler->set_allows_default_credentials(true);
   auth_handler_factory->AddMockHandler(mock_handler.release(),
                                        HttpAuth::AUTH_PROXY);
@@ -3870,7 +3872,7 @@
   // Add NetLog just so can verify load timing information gets a NetLog ID.
   NetLog net_log;
   session_deps_.net_log = &net_log;
-  scoped_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
+  std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
 
   // Should try to establish tunnel.
   MockWrite data_writes1[] = {
@@ -3912,7 +3914,7 @@
   SSLSocketDataProvider ssl(ASYNC, OK);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   TestCompletionCallback callback;
@@ -3957,7 +3959,7 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("PROXY myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Since we have proxy, should try to establish tunnel.
   MockWrite data_writes1[] = {
@@ -3995,7 +3997,7 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
   TestCompletionCallback callback1;
-  scoped_ptr<HttpTransaction> trans1(
+  std::unique_ptr<HttpTransaction> trans1(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans1->Start(&request1, callback1.callback(), log.bound());
@@ -4016,7 +4018,7 @@
   trans1.reset();
 
   TestCompletionCallback callback2;
-  scoped_ptr<HttpTransaction> trans2(
+  std::unique_ptr<HttpTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   rv = trans2->Start(&request2, callback2.callback(), log.bound());
@@ -4055,7 +4057,7 @@
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Since we have proxy, should try to establish tunnel.
   MockWrite data_writes1[] = {
@@ -4093,7 +4095,7 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
   TestCompletionCallback callback1;
-  scoped_ptr<HttpTransaction> trans1(
+  std::unique_ptr<HttpTransaction> trans1(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans1->Start(&request1, callback1.callback(), log.bound());
@@ -4115,7 +4117,7 @@
   trans1.reset();
 
   TestCompletionCallback callback2;
-  scoped_ptr<HttpTransaction> trans2(
+  std::unique_ptr<HttpTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   rv = trans2->Start(&request2, callback2.callback(), log.bound());
@@ -4149,7 +4151,7 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Since we have proxy, should use full url
   MockWrite data_writes1[] = {
@@ -4174,7 +4176,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
@@ -4211,16 +4213,16 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // fetch http://www.example.org/ via SPDY
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, false));
   MockWrite spdy_writes[] = {CreateMockWrite(*req, 0)};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> data(
+  std::unique_ptr<SpdySerializedFrame> data(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*resp, 1), CreateMockRead(*data, 2), MockRead(ASYNC, 0, 3),
@@ -4236,7 +4238,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
@@ -4273,16 +4275,16 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Fetch http://www.example.org/ through the SPDY proxy.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, false));
   MockWrite spdy_writes[] = {CreateMockWrite(*req, 0)};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> data(
+  std::unique_ptr<SpdySerializedFrame> data(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*resp, 1), CreateMockRead(*data, 2), MockRead(ASYNC, 0, 3),
@@ -4298,7 +4300,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Stall the hostname resolution begun by the transaction.
@@ -4344,17 +4346,17 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("https://myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // The first request will be a bare GET, the second request will be a
   // GET with a Proxy-Authorization header.
-  scoped_ptr<SpdySerializedFrame> req_get(
+  std::unique_ptr<SpdySerializedFrame> req_get(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, false));
   spdy_util_.UpdateWithStreamDestruction(1);
   const char* const kExtraAuthorizationHeaders[] = {
     "proxy-authorization", "Basic Zm9vOmJhcg=="
   };
-  scoped_ptr<SpdySerializedFrame> req_get_authorization(
+  std::unique_ptr<SpdySerializedFrame> req_get_authorization(
       spdy_util_.ConstructSpdyGet(kExtraAuthorizationHeaders,
                                   arraysize(kExtraAuthorizationHeaders) / 2, 3,
                                   LOWEST, false));
@@ -4368,15 +4370,15 @@
   const char* const kExtraAuthenticationHeaders[] = {
     "proxy-authenticate", "Basic realm=\"MyRealm1\""
   };
-  scoped_ptr<SpdySerializedFrame> resp_authentication(
+  std::unique_ptr<SpdySerializedFrame> resp_authentication(
       spdy_util_.ConstructSpdySynReplyError(
           "407 Proxy Authentication Required", kExtraAuthenticationHeaders,
           arraysize(kExtraAuthenticationHeaders) / 2, 1));
-  scoped_ptr<SpdySerializedFrame> body_authentication(
+  std::unique_ptr<SpdySerializedFrame> body_authentication(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> resp_data(
+  std::unique_ptr<SpdySerializedFrame> resp_data(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body_data(
+  std::unique_ptr<SpdySerializedFrame> body_data(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*resp_authentication, 1),
@@ -4396,7 +4398,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
@@ -4442,13 +4444,13 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // CONNECT to www.example.org:443 via SPDY
-  scoped_ptr<SpdySerializedFrame> connect(spdy_util_.ConstructSpdyConnect(
+  std::unique_ptr<SpdySerializedFrame> connect(spdy_util_.ConstructSpdyConnect(
       NULL, 0, 1, LOWEST, HostPortPair("www.example.org", 443)));
   // fetch https://www.example.org/ via HTTP
 
@@ -4456,17 +4458,17 @@
       "GET / HTTP/1.1\r\n"
       "Host: www.example.org\r\n"
       "Connection: keep-alive\r\n\r\n";
-  scoped_ptr<SpdySerializedFrame> wrapped_get(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get(
       spdy_util_.ConstructSpdyBodyFrame(1, get, strlen(get), false));
-  scoped_ptr<SpdySerializedFrame> conn_resp(
+  std::unique_ptr<SpdySerializedFrame> conn_resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   const char resp[] = "HTTP/1.1 200 OK\r\n"
       "Content-Length: 10\r\n\r\n";
-  scoped_ptr<SpdySerializedFrame> wrapped_get_resp(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get_resp(
       spdy_util_.ConstructSpdyBodyFrame(1, resp, strlen(resp), false));
-  scoped_ptr<SpdySerializedFrame> wrapped_body(
+  std::unique_ptr<SpdySerializedFrame> wrapped_body(
       spdy_util_.ConstructSpdyBodyFrame(1, "1234567890", 10, false));
-  scoped_ptr<SpdySerializedFrame> window_update(
+  std::unique_ptr<SpdySerializedFrame> window_update(
       spdy_util_.ConstructSpdyWindowUpdate(1, wrapped_get_resp->size()));
 
   MockWrite spdy_writes[] = {
@@ -4528,33 +4530,33 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // CONNECT to www.example.org:443 via SPDY
-  scoped_ptr<SpdySerializedFrame> connect(spdy_util_.ConstructSpdyConnect(
+  std::unique_ptr<SpdySerializedFrame> connect(spdy_util_.ConstructSpdyConnect(
       NULL, 0, 1, LOWEST, HostPortPair("www.example.org", 443)));
   // fetch https://www.example.org/ via SPDY
   const char kMyUrl[] = "https://www.example.org/";
-  scoped_ptr<SpdySerializedFrame> get(
+  std::unique_ptr<SpdySerializedFrame> get(
       spdy_util_wrapped.ConstructSpdyGet(kMyUrl, 1, LOWEST));
-  scoped_ptr<SpdySerializedFrame> wrapped_get(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get(
       spdy_util_.ConstructWrappedSpdyFrame(get, 1));
-  scoped_ptr<SpdySerializedFrame> conn_resp(
+  std::unique_ptr<SpdySerializedFrame> conn_resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> get_resp(
+  std::unique_ptr<SpdySerializedFrame> get_resp(
       spdy_util_wrapped.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> wrapped_get_resp(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get_resp(
       spdy_util_.ConstructWrappedSpdyFrame(get_resp, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_wrapped.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> wrapped_body(
+  std::unique_ptr<SpdySerializedFrame> wrapped_body(
       spdy_util_.ConstructWrappedSpdyFrame(body, 1));
-  scoped_ptr<SpdySerializedFrame> window_update_get_resp(
+  std::unique_ptr<SpdySerializedFrame> window_update_get_resp(
       spdy_util_.ConstructSpdyWindowUpdate(1, wrapped_get_resp->size()));
-  scoped_ptr<SpdySerializedFrame> window_update_body(
+  std::unique_ptr<SpdySerializedFrame> window_update_body(
       spdy_util_.ConstructSpdyWindowUpdate(1, wrapped_body->size()));
 
   MockWrite spdy_writes[] = {
@@ -4620,24 +4622,24 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // CONNECT to www.example.org:443 via SPDY
-  scoped_ptr<SpdySerializedFrame> connect(spdy_util_.ConstructSpdyConnect(
+  std::unique_ptr<SpdySerializedFrame> connect(spdy_util_.ConstructSpdyConnect(
       NULL, 0, 1, LOWEST, HostPortPair("www.example.org", 443)));
-  scoped_ptr<SpdySerializedFrame> get(
+  std::unique_ptr<SpdySerializedFrame> get(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
 
   MockWrite spdy_writes[] = {
       CreateMockWrite(*connect, 0), CreateMockWrite(*get, 2),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdySynReplyError(1));
-  scoped_ptr<SpdySerializedFrame> data(
+  std::unique_ptr<SpdySerializedFrame> data(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, 0, 3),
@@ -4673,7 +4675,7 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps_));
 
   HttpRequestInfo request1;
@@ -4687,9 +4689,9 @@
   request2.load_flags = 0;
 
   // CONNECT to www.example.org:443 via SPDY.
-  scoped_ptr<SpdySerializedFrame> connect1(spdy_util_.ConstructSpdyConnect(
+  std::unique_ptr<SpdySerializedFrame> connect1(spdy_util_.ConstructSpdyConnect(
       NULL, 0, 1, LOWEST, HostPortPair("www.example.org", 443)));
-  scoped_ptr<SpdySerializedFrame> conn_resp1(
+  std::unique_ptr<SpdySerializedFrame> conn_resp1(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
 
   // Fetch https://www.example.org/ via HTTP.
@@ -4697,15 +4699,15 @@
       "GET / HTTP/1.1\r\n"
       "Host: www.example.org\r\n"
       "Connection: keep-alive\r\n\r\n";
-  scoped_ptr<SpdySerializedFrame> wrapped_get1(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get1(
       spdy_util_.ConstructSpdyBodyFrame(1, get1, strlen(get1), false));
   const char resp1[] = "HTTP/1.1 200 OK\r\n"
       "Content-Length: 1\r\n\r\n";
-  scoped_ptr<SpdySerializedFrame> wrapped_get_resp1(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get_resp1(
       spdy_util_.ConstructSpdyBodyFrame(1, resp1, strlen(resp1), false));
-  scoped_ptr<SpdySerializedFrame> wrapped_body1(
+  std::unique_ptr<SpdySerializedFrame> wrapped_body1(
       spdy_util_.ConstructSpdyBodyFrame(1, "1", 1, false));
-  scoped_ptr<SpdySerializedFrame> window_update(
+  std::unique_ptr<SpdySerializedFrame> window_update(
       spdy_util_.ConstructSpdyWindowUpdate(1, wrapped_get_resp1->size()));
 
   // CONNECT to mail.example.org:443 via SPDY.
@@ -4718,10 +4720,10 @@
     connect2_block[spdy_util_.GetHostKey()] = "mail.example.org";
     connect2_block[spdy_util_.GetPathKey()] = "mail.example.org:443";
   }
-  scoped_ptr<SpdySerializedFrame> connect2(
+  std::unique_ptr<SpdySerializedFrame> connect2(
       spdy_util_.ConstructSpdySyn(3, connect2_block, LOWEST, false));
 
-  scoped_ptr<SpdySerializedFrame> conn_resp2(
+  std::unique_ptr<SpdySerializedFrame> conn_resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
 
   // Fetch https://mail.example.org/ via HTTP.
@@ -4729,13 +4731,13 @@
       "GET / HTTP/1.1\r\n"
       "Host: mail.example.org\r\n"
       "Connection: keep-alive\r\n\r\n";
-  scoped_ptr<SpdySerializedFrame> wrapped_get2(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get2(
       spdy_util_.ConstructSpdyBodyFrame(3, get2, strlen(get2), false));
   const char resp2[] = "HTTP/1.1 200 OK\r\n"
       "Content-Length: 2\r\n\r\n";
-  scoped_ptr<SpdySerializedFrame> wrapped_get_resp2(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get_resp2(
       spdy_util_.ConstructSpdyBodyFrame(3, resp2, strlen(resp2), false));
-  scoped_ptr<SpdySerializedFrame> wrapped_body2(
+  std::unique_ptr<SpdySerializedFrame> wrapped_body2(
       spdy_util_.ConstructSpdyBodyFrame(3, "22", 2, false));
 
   MockWrite spdy_writes[] = {
@@ -4769,7 +4771,7 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   int rv = trans->Start(&request1, callback.callback(), BoundNetLog());
   EXPECT_EQ(OK, callback.GetResult(rv));
@@ -4788,7 +4790,7 @@
   rv = trans->Read(buf.get(), 256, callback.callback());
   EXPECT_EQ(1, callback.GetResult(rv));
 
-  scoped_ptr<HttpTransaction> trans2(
+  std::unique_ptr<HttpTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   rv = trans2->Start(&request2, callback.callback(), BoundNetLog());
   EXPECT_EQ(OK, callback.GetResult(rv));
@@ -4815,7 +4817,7 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps_));
 
   HttpRequestInfo request1;
@@ -4829,9 +4831,9 @@
   request2.load_flags = 0;
 
   // CONNECT to www.example.org:443 via SPDY.
-  scoped_ptr<SpdySerializedFrame> connect1(spdy_util_.ConstructSpdyConnect(
+  std::unique_ptr<SpdySerializedFrame> connect1(spdy_util_.ConstructSpdyConnect(
       NULL, 0, 1, LOWEST, HostPortPair("www.example.org", 443)));
-  scoped_ptr<SpdySerializedFrame> conn_resp1(
+  std::unique_ptr<SpdySerializedFrame> conn_resp1(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
 
   // Fetch https://www.example.org/ via HTTP.
@@ -4839,15 +4841,15 @@
       "GET / HTTP/1.1\r\n"
       "Host: www.example.org\r\n"
       "Connection: keep-alive\r\n\r\n";
-  scoped_ptr<SpdySerializedFrame> wrapped_get1(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get1(
       spdy_util_.ConstructSpdyBodyFrame(1, get1, strlen(get1), false));
   const char resp1[] = "HTTP/1.1 200 OK\r\n"
       "Content-Length: 1\r\n\r\n";
-  scoped_ptr<SpdySerializedFrame> wrapped_get_resp1(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get_resp1(
       spdy_util_.ConstructSpdyBodyFrame(1, resp1, strlen(resp1), false));
-  scoped_ptr<SpdySerializedFrame> wrapped_body1(
+  std::unique_ptr<SpdySerializedFrame> wrapped_body1(
       spdy_util_.ConstructSpdyBodyFrame(1, "1", 1, false));
-  scoped_ptr<SpdySerializedFrame> window_update(
+  std::unique_ptr<SpdySerializedFrame> window_update(
       spdy_util_.ConstructSpdyWindowUpdate(1, wrapped_get_resp1->size()));
 
   // Fetch https://www.example.org/2 via HTTP.
@@ -4855,13 +4857,13 @@
       "GET /2 HTTP/1.1\r\n"
       "Host: www.example.org\r\n"
       "Connection: keep-alive\r\n\r\n";
-  scoped_ptr<SpdySerializedFrame> wrapped_get2(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get2(
       spdy_util_.ConstructSpdyBodyFrame(1, get2, strlen(get2), false));
   const char resp2[] = "HTTP/1.1 200 OK\r\n"
       "Content-Length: 2\r\n\r\n";
-  scoped_ptr<SpdySerializedFrame> wrapped_get_resp2(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get_resp2(
       spdy_util_.ConstructSpdyBodyFrame(1, resp2, strlen(resp2), false));
-  scoped_ptr<SpdySerializedFrame> wrapped_body2(
+  std::unique_ptr<SpdySerializedFrame> wrapped_body2(
       spdy_util_.ConstructSpdyBodyFrame(1, "22", 2, false));
 
   MockWrite spdy_writes[] = {
@@ -4891,7 +4893,7 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   int rv = trans->Start(&request1, callback.callback(), BoundNetLog());
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4913,7 +4915,7 @@
   EXPECT_EQ(1, trans->Read(buf.get(), 256, callback.callback()));
   trans.reset();
 
-  scoped_ptr<HttpTransaction> trans2(
+  std::unique_ptr<HttpTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   rv = trans2->Start(&request2, callback.callback(), BoundNetLog());
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -4938,7 +4940,7 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps_));
 
   HttpRequestInfo request1;
@@ -4952,24 +4954,24 @@
   request2.load_flags = 0;
 
   // http://www.example.org/
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlockForProxy("http://www.example.org/"));
-  scoped_ptr<SpdySerializedFrame> get1(
+  std::unique_ptr<SpdySerializedFrame> get1(
       spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> get_resp1(
+  std::unique_ptr<SpdySerializedFrame> get_resp1(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body1(
+  std::unique_ptr<SpdySerializedFrame> body1(
       spdy_util_.ConstructSpdyBodyFrame(1, "1", 1, true));
   spdy_util_.UpdateWithStreamDestruction(1);
 
   // http://mail.example.org/
-  scoped_ptr<SpdyHeaderBlock> headers2(
+  std::unique_ptr<SpdyHeaderBlock> headers2(
       spdy_util_.ConstructGetHeaderBlockForProxy("http://mail.example.org/"));
-  scoped_ptr<SpdySerializedFrame> get2(
+  std::unique_ptr<SpdySerializedFrame> get2(
       spdy_util_.ConstructSpdySyn(3, *headers2, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> get_resp2(
+  std::unique_ptr<SpdySerializedFrame> get_resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, "22", 2, true));
 
   MockWrite spdy_writes[] = {
@@ -4995,7 +4997,7 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   int rv = trans->Start(&request1, callback.callback(), BoundNetLog());
   EXPECT_EQ(OK, callback.GetResult(rv));
@@ -5017,7 +5019,7 @@
   // Delete the first request, so the second one can reuse the socket.
   trans.reset();
 
-  scoped_ptr<HttpTransaction> trans2(
+  std::unique_ptr<HttpTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   rv = trans2->Start(&request2, callback.callback(), BoundNetLog());
   EXPECT_EQ(OK, callback.GetResult(rv));
@@ -5045,7 +5047,7 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("https://myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Since we have proxy, should use full url
   MockWrite data_writes1[] = {
@@ -5086,7 +5088,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
@@ -5142,7 +5144,7 @@
 
   // Configure against proxy server "myproxy:70".
   session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Since we have proxy, should try to establish tunnel.
   MockWrite data_writes[] = {
@@ -5163,7 +5165,7 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -5358,9 +5360,9 @@
 
   // Configure against proxy server "myproxy:70".
   session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes1[] = {
@@ -5494,7 +5496,7 @@
 
   HttpAuthHandlerNTLM::ScopedProcSetter proc_setter(MockGenerateRandom1,
                                                     MockGetHostName);
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   MockWrite data_writes1[] = {
     MockWrite("GET /kids/login.aspx HTTP/1.1\r\n"
@@ -5570,7 +5572,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), BoundNetLog());
@@ -5623,7 +5625,7 @@
 
   HttpAuthHandlerNTLM::ScopedProcSetter proc_setter(MockGenerateRandom2,
                                                     MockGetHostName);
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   MockWrite data_writes1[] = {
     MockWrite("GET /kids/login.aspx HTTP/1.1\r\n"
@@ -5750,7 +5752,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), BoundNetLog());
@@ -5823,8 +5825,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Respond with 300 kb of headers (we should fail after 256 kb).
@@ -5862,9 +5864,9 @@
   // Configure against proxy server "myproxy:70".
   session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Since we have proxy, should try to establish tunnel.
@@ -5915,9 +5917,9 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockRead data_reads[] = {
@@ -5994,8 +5996,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -6060,8 +6062,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -6128,7 +6130,7 @@
       "rt=prt.2642,ol.2649,xjs.2951");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   MockRead data_reads[] = {
     MockRead("HTTP/1.1 204 No Content\r\n"
@@ -6143,7 +6145,7 @@
 
   // Transaction must be created after the MockReads, so it's destroyed before
   // them.
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   TestCompletionCallback callback;
@@ -6177,9 +6179,9 @@
 }
 
 TEST_P(HttpNetworkTransactionTest, ResendRequestOnWriteBodyError) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("foo", 3)));
+      base::WrapUnique(new UploadBytesElementReader("foo", 3)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request[2];
@@ -6197,7 +6199,7 @@
   request[1].upload_data_stream = &upload_data_stream;
   request[1].load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // The first socket is used for transaction 1 and the first attempt of
   // transaction 2.
@@ -6242,7 +6244,7 @@
   };
 
   for (int i = 0; i < 2; ++i) {
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     TestCompletionCallback callback;
@@ -6275,8 +6277,8 @@
   request.url = GURL("http://foo:b@r@www.example.org/");
   request.load_flags = LOAD_NORMAL;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // The password contains an escaped character -- for this test to pass it
@@ -6358,8 +6360,8 @@
 
   request.load_flags = LOAD_NORMAL;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes1[] = {
@@ -6469,8 +6471,8 @@
   request.url = GURL("http://foo:bar@www.example.org/");
   request.load_flags = LOAD_DO_NOT_USE_EMBEDDED_IDENTITY;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes1[] = {
@@ -6543,7 +6545,7 @@
 
 // Test that previously tried username/passwords for a realm get re-used.
 TEST_P(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) {
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Transaction 1: authenticate (foo, bar) on MyRealm1
   {
@@ -6552,7 +6554,7 @@
     request.url = GURL("http://www.example.org/x/y/z");
     request.load_flags = 0;
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     MockWrite data_writes1[] = {
@@ -6630,7 +6632,7 @@
     request.url = GURL("http://www.example.org/x/y/a/b");
     request.load_flags = 0;
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     MockWrite data_writes1[] = {
@@ -6716,7 +6718,7 @@
     request.url = GURL("http://www.example.org/x/y/z2");
     request.load_flags = 0;
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     MockWrite data_writes1[] = {
@@ -6765,7 +6767,7 @@
     request.url = GURL("http://www.example.org/x/1");
     request.load_flags = 0;
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     MockWrite data_writes1[] = {
@@ -6837,7 +6839,7 @@
     request.url = GURL("http://www.example.org/p/q/t");
     request.load_flags = 0;
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     MockWrite data_writes1[] = {
@@ -6943,7 +6945,7 @@
       new HttpAuthHandlerDigest::FixedNonceGenerator("0123456789abcdef");
   digest_factory->set_nonce_generator(nonce_generator);
   session_deps_.http_auth_handler_factory.reset(digest_factory);
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Transaction 1: authenticate (foo, bar) on MyRealm1
   {
@@ -6952,7 +6954,7 @@
     request.url = GURL("http://www.example.org/x/y/z");
     request.load_flags = 0;
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     MockWrite data_writes1[] = {
@@ -7033,7 +7035,7 @@
     request.url = GURL("http://www.example.org/x/y/a/b");
     request.load_flags = 0;
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     MockWrite data_writes1[] = {
@@ -7075,8 +7077,8 @@
 // Test the ResetStateForRestart() private method.
 TEST_P(HttpNetworkTransactionTest, ResetStateForRestart) {
   // Create a transaction (the dependencies aren't important).
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpNetworkTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Setup some state (which we expect ResetStateForRestart() will clear).
@@ -7122,8 +7124,8 @@
   request.url = GURL("https://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -7227,8 +7229,8 @@
   for (int i = 0; i < 2; i++) {
     session_deps_.socket_factory->ResetNextMockIndexes();
 
-    scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -7291,8 +7293,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -7349,8 +7351,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -7400,9 +7402,9 @@
   request.url = GURL("https://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<SpdySerializedFrame> conn(spdy_util_.ConstructSpdyConnect(
+  std::unique_ptr<SpdySerializedFrame> conn(spdy_util_.ConstructSpdyConnect(
       NULL, 0, 1, LOWEST, HostPortPair("www.example.org", 443)));
-  scoped_ptr<SpdySerializedFrame> goaway(
+  std::unique_ptr<SpdySerializedFrame> goaway(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite data_writes[] = {
       CreateMockWrite(*conn.get(), 0, SYNCHRONOUS),
@@ -7413,8 +7415,9 @@
     "location",
     "http://login.example.com/",
   };
-  scoped_ptr<SpdySerializedFrame> resp(spdy_util_.ConstructSpdySynReplyError(
-      "302 Redirect", kExtraHeaders, arraysize(kExtraHeaders) / 2, 1));
+  std::unique_ptr<SpdySerializedFrame> resp(
+      spdy_util_.ConstructSpdySynReplyError("302 Redirect", kExtraHeaders,
+                                            arraysize(kExtraHeaders) / 2, 1));
   MockRead data_reads[] = {
       CreateMockRead(*resp.get(), 1), MockRead(ASYNC, 0, 3),  // EOF
   };
@@ -7429,8 +7432,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -7480,8 +7483,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -7503,9 +7506,9 @@
   request.url = GURL("https://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<SpdySerializedFrame> conn(spdy_util_.ConstructSpdyConnect(
+  std::unique_ptr<SpdySerializedFrame> conn(spdy_util_.ConstructSpdyConnect(
       NULL, 0, 1, LOWEST, HostPortPair("www.example.org", 443)));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite data_writes[] = {
       CreateMockWrite(*conn.get(), 0), CreateMockWrite(*rst.get(), 3),
@@ -7515,9 +7518,10 @@
     "location",
     "http://login.example.com/",
   };
-  scoped_ptr<SpdySerializedFrame> resp(spdy_util_.ConstructSpdySynReplyError(
-      "404 Not Found", kExtraHeaders, arraysize(kExtraHeaders) / 2, 1));
-  scoped_ptr<SpdySerializedFrame> body(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> resp(
+      spdy_util_.ConstructSpdySynReplyError("404 Not Found", kExtraHeaders,
+                                            arraysize(kExtraHeaders) / 2, 1));
+  std::unique_ptr<SpdySerializedFrame> body(spdy_util_.ConstructSpdyBodyFrame(
       1, "The host does not exist", 23, true));
   MockRead data_reads[] = {
       CreateMockRead(*resp.get(), 1),
@@ -7535,8 +7539,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -7562,12 +7566,12 @@
       ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Since we have proxy, should try to establish tunnel.
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyConnect(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyConnect(
       NULL, 0, 1, LOWEST, HostPortPair("www.example.org", 443)));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   spdy_util_.UpdateWithStreamDestruction(1);
 
@@ -7576,7 +7580,7 @@
   const char* const kAuthCredentials[] = {
       "proxy-authorization", "Basic Zm9vOmJhcg==",
   };
-  scoped_ptr<SpdySerializedFrame> connect2(spdy_util_.ConstructSpdyConnect(
+  std::unique_ptr<SpdySerializedFrame> connect2(spdy_util_.ConstructSpdyConnect(
       kAuthCredentials, arraysize(kAuthCredentials) / 2, 3, LOWEST,
       HostPortPair("www.example.org", 443)));
   // fetch https://www.example.org/ via HTTP
@@ -7584,7 +7588,7 @@
       "GET / HTTP/1.1\r\n"
       "Host: www.example.org\r\n"
       "Connection: keep-alive\r\n\r\n";
-  scoped_ptr<SpdySerializedFrame> wrapped_get(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get(
       spdy_util_.ConstructSpdyBodyFrame(3, get, strlen(get), false));
 
   MockWrite spdy_writes[] = {
@@ -7600,18 +7604,18 @@
   const char* const kAuthChallenge[] = {
     "proxy-authenticate", "Basic realm=\"MyRealm1\"",
   };
-  scoped_ptr<SpdySerializedFrame> conn_auth_resp(
+  std::unique_ptr<SpdySerializedFrame> conn_auth_resp(
       spdy_util_.ConstructSpdySynReplyError(kAuthStatus, kAuthChallenge,
                                             arraysize(kAuthChallenge) / 2, 1));
 
-  scoped_ptr<SpdySerializedFrame> conn_resp(
+  std::unique_ptr<SpdySerializedFrame> conn_resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
   const char resp[] = "HTTP/1.1 200 OK\r\n"
       "Content-Length: 5\r\n\r\n";
 
-  scoped_ptr<SpdySerializedFrame> wrapped_get_resp(
+  std::unique_ptr<SpdySerializedFrame> wrapped_get_resp(
       spdy_util_.ConstructSpdyBodyFrame(3, resp, strlen(resp), false));
-  scoped_ptr<SpdySerializedFrame> wrapped_body(
+  std::unique_ptr<SpdySerializedFrame> wrapped_body(
       spdy_util_.ConstructSpdyBodyFrame(3, "hello", 5, false));
   MockRead spdy_reads[] = {
       CreateMockRead(*conn_auth_resp, 1, ASYNC),
@@ -7634,7 +7638,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
@@ -7693,7 +7697,7 @@
 // origin that is different from that of its associated resource.
 TEST_P(HttpNetworkTransactionTest, CrossOriginSPDYProxyPush) {
   // Configure the proxy delegate to allow cross-origin SPDY pushes.
-  scoped_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
+  std::unique_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
   proxy_delegate->set_trusted_spdy_proxy(net::ProxyServer::FromURI(
       "https://myproxy:443", net::ProxyServer::SCHEME_HTTP));
   HttpRequestInfo request;
@@ -7712,25 +7716,25 @@
 
   session_deps_.proxy_delegate.reset(proxy_delegate.release());
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, false));
 
   MockWrite spdy_writes[] = {
       CreateMockWrite(*stream1_syn, 0, ASYNC),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
 
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       NULL, 0, 2, 1, "http://www.another-origin.com/foo.dat"));
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> stream2_body(
+  std::unique_ptr<SpdySerializedFrame> stream2_body(
       spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                         true));
 
@@ -7750,7 +7754,7 @@
   proxy.SetNextProto(GetProtocol());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&proxy);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), log.bound());
@@ -7760,7 +7764,7 @@
   EXPECT_EQ(OK, rv);
   const HttpResponseInfo* response = trans->GetResponseInfo();
 
-  scoped_ptr<HttpTransaction> push_trans(
+  std::unique_ptr<HttpTransaction> push_trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   rv = push_trans->Start(&push_request, callback.callback(), log.bound());
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -7809,7 +7813,7 @@
 // Test that an explicitly trusted SPDY proxy cannot push HTTPS content.
 TEST_P(HttpNetworkTransactionTest, CrossOriginProxyPushCorrectness) {
   // Configure the proxy delegate to allow cross-origin SPDY pushes.
-  scoped_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
+  std::unique_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
   proxy_delegate->set_trusted_spdy_proxy(net::ProxyServer::FromURI(
       "https://myproxy:443", net::ProxyServer::SCHEME_HTTP));
   HttpRequestInfo request;
@@ -7825,25 +7829,25 @@
   // Enable cross-origin push.
   session_deps_.proxy_delegate.reset(proxy_delegate.release());
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, false));
 
-  scoped_ptr<SpdySerializedFrame> push_rst(
+  std::unique_ptr<SpdySerializedFrame> push_rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_REFUSED_STREAM));
 
   MockWrite spdy_writes[] = {
       CreateMockWrite(*stream1_syn, 0, ASYNC), CreateMockWrite(*push_rst, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
 
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       NULL, 0, 2, 1, "https://www.another-origin.com/foo.dat"));
 
   MockRead spdy_reads[] = {
@@ -7861,7 +7865,7 @@
   proxy.SetNextProto(GetProtocol());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&proxy);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), log.bound());
@@ -7890,7 +7894,7 @@
 // resources.
 TEST_P(HttpNetworkTransactionTest, SameOriginProxyPushCorrectness) {
   // Configure the proxy delegate to allow cross-origin SPDY pushes.
-  scoped_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
+  std::unique_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
   proxy_delegate->set_trusted_spdy_proxy(
       net::ProxyServer::FromURI("myproxy:70", net::ProxyServer::SCHEME_HTTP));
 
@@ -7907,28 +7911,28 @@
   // Enable cross-origin push.
   session_deps_.proxy_delegate.reset(proxy_delegate.release());
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, false));
 
   MockWrite spdy_writes[] = {
       CreateMockWrite(*stream1_syn, 0, ASYNC),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
 
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 2, 1, "https://myproxy:70/foo.dat"));
 
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
-  scoped_ptr<SpdySerializedFrame> stream2_reply(
+  std::unique_ptr<SpdySerializedFrame> stream2_reply(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
 
-  scoped_ptr<SpdySerializedFrame> stream2_body(
+  std::unique_ptr<SpdySerializedFrame> stream2_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   MockRead spdy_reads[] = {
@@ -7947,7 +7951,7 @@
   proxy.SetNextProto(GetProtocol());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&proxy);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), log.bound());
@@ -8032,8 +8036,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -8061,8 +8065,8 @@
   request.extra_headers.SetHeader(HttpRequestHeaders::kUserAgent,
                                   "Chromium Ultra Awesome X Edition");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -8102,8 +8106,8 @@
                                   "Chromium Ultra Awesome X Edition");
 
   session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -8141,8 +8145,8 @@
   request.extra_headers.SetHeader(HttpRequestHeaders::kReferer,
                                   "http://the.previous.site.com/");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -8179,8 +8183,8 @@
   request.method = "POST";
   request.url = GURL("http://www.example.org/");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -8217,8 +8221,8 @@
   request.method = "PUT";
   request.url = GURL("http://www.example.org/");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -8255,8 +8259,8 @@
   request.method = "HEAD";
   request.url = GURL("http://www.example.org/");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -8292,8 +8296,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = LOAD_BYPASS_CACHE;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -8333,8 +8337,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = LOAD_VALIDATE_CACHE;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -8372,8 +8376,8 @@
   request.url = GURL("http://www.example.org/");
   request.extra_headers.SetHeader("FooHeader", "Bar");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -8413,8 +8417,8 @@
   request.extra_headers.SetHeader("hEllo", "Kitty");
   request.extra_headers.SetHeader("FoO", "bar");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -8459,8 +8463,8 @@
   TestNetLog net_log;
   session_deps_.net_log = &net_log;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   char write_buffer[] = { 0x04, 0x01, 0x00, 0x50, 127, 0, 0, 1, 0 };
@@ -8518,8 +8522,8 @@
   TestNetLog net_log;
   session_deps_.net_log = &net_log;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   unsigned char write_buffer[] = { 0x04, 0x01, 0x01, 0xBB, 127, 0, 0, 1, 0 };
@@ -8582,8 +8586,8 @@
   TestNetLog net_log;
   session_deps_.net_log = &net_log;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   char write_buffer[] = { 0x04, 0x01, 0x00, 0x50, 127, 0, 0, 1, 0 };
@@ -8641,8 +8645,8 @@
   TestNetLog net_log;
   session_deps_.net_log = &net_log;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   const char kSOCKS5GreetRequest[] = { 0x05, 0x01, 0x00 };
@@ -8713,8 +8717,8 @@
   TestNetLog net_log;
   session_deps_.net_log = &net_log;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   const char kSOCKS5GreetRequest[] = { 0x05, 0x01, 0x00 };
@@ -8790,10 +8794,10 @@
   bool ssl;
 };
 
-scoped_ptr<HttpNetworkSession> SetupSessionForGroupNameTests(
+std::unique_ptr<HttpNetworkSession> SetupSessionForGroupNameTests(
     NextProto next_proto,
     SpdySessionDependencies* session_deps_) {
-  scoped_ptr<HttpNetworkSession> session(CreateSession(session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(session_deps_));
 
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
@@ -8813,7 +8817,7 @@
   request.url = GURL(url);
   request.load_flags = 0;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session));
 
   TestCompletionCallback callback;
@@ -8866,7 +8870,7 @@
   for (size_t i = 0; i < arraysize(tests); ++i) {
     session_deps_.proxy_service =
         ProxyService::CreateFixed(tests[i].proxy_server);
-    scoped_ptr<HttpNetworkSession> session(
+    std::unique_ptr<HttpNetworkSession> session(
         SetupSessionForGroupNameTests(GetProtocol(), &session_deps_));
 
     HttpNetworkSessionPeer peer(session.get());
@@ -8874,7 +8878,7 @@
         new CaptureGroupNameTransportSocketPool(NULL, NULL);
     CaptureGroupNameSSLSocketPool* ssl_conn_pool =
         new CaptureGroupNameSSLSocketPool(NULL, NULL);
-    scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
+    std::unique_ptr<MockClientSocketPoolManager> mock_pool_manager(
         new MockClientSocketPoolManager);
     mock_pool_manager->SetTransportSocketPool(transport_conn_pool);
     mock_pool_manager->SetSSLSocketPool(ssl_conn_pool);
@@ -8929,7 +8933,7 @@
   for (size_t i = 0; i < arraysize(tests); ++i) {
     session_deps_.proxy_service =
         ProxyService::CreateFixed(tests[i].proxy_server);
-    scoped_ptr<HttpNetworkSession> session(
+    std::unique_ptr<HttpNetworkSession> session(
         SetupSessionForGroupNameTests(GetProtocol(), &session_deps_));
 
     HttpNetworkSessionPeer peer(session.get());
@@ -8940,7 +8944,7 @@
     CaptureGroupNameSSLSocketPool* ssl_conn_pool =
         new CaptureGroupNameSSLSocketPool(NULL, NULL);
 
-    scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
+    std::unique_ptr<MockClientSocketPoolManager> mock_pool_manager(
         new MockClientSocketPoolManager);
     mock_pool_manager->SetSocketPoolForHTTPProxy(proxy_host, http_proxy_pool);
     mock_pool_manager->SetSocketPoolForSSLWithProxy(proxy_host, ssl_conn_pool);
@@ -9000,7 +9004,7 @@
   for (size_t i = 0; i < arraysize(tests); ++i) {
     session_deps_.proxy_service =
         ProxyService::CreateFixed(tests[i].proxy_server);
-    scoped_ptr<HttpNetworkSession> session(
+    std::unique_ptr<HttpNetworkSession> session(
         SetupSessionForGroupNameTests(GetProtocol(), &session_deps_));
 
     HttpNetworkSessionPeer peer(session.get());
@@ -9011,13 +9015,13 @@
     CaptureGroupNameSSLSocketPool* ssl_conn_pool =
         new CaptureGroupNameSSLSocketPool(NULL, NULL);
 
-    scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
+    std::unique_ptr<MockClientSocketPoolManager> mock_pool_manager(
         new MockClientSocketPoolManager);
     mock_pool_manager->SetSocketPoolForSOCKSProxy(proxy_host, socks_conn_pool);
     mock_pool_manager->SetSocketPoolForSSLWithProxy(proxy_host, ssl_conn_pool);
     peer.SetClientSocketPoolManager(std::move(mock_pool_manager));
 
-    scoped_ptr<HttpTransaction> trans(
+    std::unique_ptr<HttpTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     EXPECT_EQ(ERR_IO_PENDING,
@@ -9043,8 +9047,8 @@
   // connecting to both proxies (myproxy:70 and foobar:80).
   session_deps_.host_resolver->rules()->AddSimulatedFailure("*");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   TestCompletionCallback callback;
@@ -9069,8 +9073,8 @@
   // Select a host resolver that does caching.
   session_deps_.host_resolver.reset(new MockCachingHostResolver);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Warm up the host cache so it has an entry for "www.example.org".
@@ -9138,11 +9142,11 @@
   StaticSocketDataProvider data(NULL, 0,
                                 write_failure, arraysize(write_failure));
   session_deps_.socket_factory->AddSocketDataProvider(&data);
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -9170,11 +9174,11 @@
 
   StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&data);
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -9248,11 +9252,11 @@
   StaticSocketDataProvider data2(data_reads2, arraysize(data_reads2),
                                  data_writes2, arraysize(data_writes2));
   session_deps_.socket_factory->AddSocketDataProvider(&data2);
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), BoundNetLog());
@@ -9304,8 +9308,8 @@
 
   session_deps_.socket_factory->ResetNextMockIndexes();
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -9321,8 +9325,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockRead data_reads[] = {
@@ -9358,8 +9362,8 @@
   UploadFileElementReader::ScopedOverridingContentLengthForTests
       overriding_content_length(kFakeSize);
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
-  element_readers.push_back(make_scoped_ptr(new UploadFileElementReader(
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
+  element_readers.push_back(base::WrapUnique(new UploadFileElementReader(
       base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
       std::numeric_limits<uint64_t>::max(), base::Time())));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
@@ -9370,8 +9374,8 @@
   request.upload_data_stream = &upload_data_stream;
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockRead data_reads[] = {
@@ -9412,8 +9416,8 @@
                                    temp_file_content.length()));
   ASSERT_TRUE(base::MakeFileUnreadable(temp_file));
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
-  element_readers.push_back(make_scoped_ptr(new UploadFileElementReader(
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
+  element_readers.push_back(base::WrapUnique(new UploadFileElementReader(
       base::ThreadTaskRunnerHandle::Get().get(), temp_file, 0,
       std::numeric_limits<uint64_t>::max(), base::Time())));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
@@ -9425,8 +9429,8 @@
   request.load_flags = 0;
 
   // If we try to upload an unreadable file, the transaction should fail.
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   StaticSocketDataProvider data(NULL, 0, NULL, 0);
@@ -9469,8 +9473,8 @@
   };
 
   FakeUploadElementReader* fake_reader = new FakeUploadElementReader;
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
-  element_readers.push_back(make_scoped_ptr(fake_reader));
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
+  element_readers.push_back(base::WrapUnique(fake_reader));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -9479,8 +9483,8 @@
   request.upload_data_stream = &upload_data_stream;
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   StaticSocketDataProvider data;
@@ -9586,8 +9590,8 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Issue the first request with Authorize headers. There should be a
@@ -9681,8 +9685,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -9722,7 +9726,7 @@
   session_deps_.enable_alternative_service_with_different_host = false;
 
   // Set an alternative service for origin.
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   HttpServerProperties& http_server_properties =
       *session->http_server_properties();
   HostPortPair http_host_port_pair("www.example.org", 80);
@@ -9752,7 +9756,7 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -9801,8 +9805,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -9859,8 +9863,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -9926,8 +9930,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -9983,7 +9987,7 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   HostPortPair http_host_port_pair("www.example.org", 80);
   HttpServerProperties& http_server_properties =
@@ -9998,7 +10002,7 @@
   ASSERT_EQ(1u, alternative_service_vector.size());
   EXPECT_EQ(QUIC, alternative_service_vector[0].protocol);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -10052,8 +10056,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -10112,7 +10116,7 @@
                                        nullptr, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&second_data);
 
-  scoped_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
+  std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
 
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
@@ -10123,7 +10127,7 @@
   http_server_properties->SetAlternativeService(
       HostPortPair::FromURL(request.url), alternative_service, expiration);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback;
 
@@ -10169,7 +10173,7 @@
   // Set up a QUIC alternative service for origin.
   session_deps_.parse_alternative_services = true;
   session_deps_.enable_alternative_service_with_different_host = false;
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
   AlternativeService alternative_service(QUIC, alternative);
@@ -10179,7 +10183,7 @@
   // Mark the QUIC alternative service as broken.
   http_server_properties->MarkAlternativeServiceBroken(alternative_service);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   HttpRequestInfo request;
   request.method = "GET";
@@ -10230,7 +10234,7 @@
 
   session_deps_.parse_alternative_services = true;
   session_deps_.enable_alternative_service_with_different_host = true;
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
 
@@ -10256,7 +10260,7 @@
   const AlternativeServiceVector alternative_service_vector =
       http_server_properties->GetAlternativeServices(origin);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   HttpRequestInfo request;
   request.method = "GET";
@@ -10295,7 +10299,7 @@
       data_reads, arraysize(data_reads), NULL, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&second_data);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
@@ -10309,7 +10313,7 @@
   http_server_properties->SetAlternativeService(
       host_port_pair, alternative_service, expiration);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback;
 
@@ -10362,7 +10366,7 @@
       data_reads, arraysize(data_reads), NULL, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&second_data);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
@@ -10375,7 +10379,7 @@
       HostPortPair::FromURL(restricted_port_request.url), alternative_service,
       expiration);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback;
 
@@ -10415,7 +10419,7 @@
       data_reads, arraysize(data_reads), NULL, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&second_data);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
@@ -10428,7 +10432,7 @@
       HostPortPair::FromURL(restricted_port_request.url), alternative_service,
       expiration);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback;
 
@@ -10467,7 +10471,7 @@
       data_reads, arraysize(data_reads), NULL, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&second_data);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
@@ -10480,7 +10484,7 @@
       HostPortPair::FromURL(restricted_port_request.url), alternative_service,
       expiration);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback;
 
@@ -10520,7 +10524,7 @@
       data_reads, arraysize(data_reads), NULL, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&second_data);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
@@ -10533,7 +10537,7 @@
       HostPortPair::FromURL(unrestricted_port_request.url), alternative_service,
       expiration);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback;
 
@@ -10572,7 +10576,7 @@
       data_reads, arraysize(data_reads), NULL, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&second_data);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
@@ -10585,7 +10589,7 @@
       HostPortPair::FromURL(unrestricted_port_request.url), alternative_service,
       expiration);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback;
 
@@ -10619,7 +10623,7 @@
       data_reads, arraysize(data_reads), NULL, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&data);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
@@ -10631,7 +10635,7 @@
   http_server_properties->SetAlternativeService(
       HostPortPair::FromURL(request.url), alternative_service, expiration);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback;
 
@@ -10680,13 +10684,13 @@
   ASSERT_TRUE(ssl.cert.get());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite spdy_writes[] = {CreateMockWrite(*req, 0)};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> data(
+  std::unique_ptr<SpdySerializedFrame> data(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*resp, 1), CreateMockRead(*data, 2), MockRead(ASYNC, 0, 3),
@@ -10706,8 +10710,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -10783,20 +10787,20 @@
   ASSERT_TRUE(ssl.cert.get());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
   MockWrite spdy_writes[] = {
       CreateMockWrite(*req1, 0), CreateMockWrite(*req2, 1),
   };
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> data1(
+  std::unique_ptr<SpdySerializedFrame> data1(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> data2(
+  std::unique_ptr<SpdySerializedFrame> data2(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*resp1, 2),
@@ -10816,7 +10820,7 @@
   hanging_socket3.set_connect_data(never_finishing_connect);
   session_deps_.socket_factory->AddSocketDataProvider(&hanging_socket3);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   TestCompletionCallback callback1;
   HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session.get());
 
@@ -10909,8 +10913,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -10982,9 +10986,9 @@
 
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const net::CompletionCallback& callback,
-      scoped_ptr<Request>* request) override {
+      std::unique_ptr<Request>* request) override {
     resolver->reset(new ForwardingProxyResolver(resolver_));
     return OK;
   }
@@ -11004,8 +11008,8 @@
 
   CapturingProxyResolver capturing_proxy_resolver;
   session_deps_.proxy_service.reset(new ProxyService(
-      make_scoped_ptr(new ProxyConfigServiceFixed(proxy_config)),
-      make_scoped_ptr(
+      base::WrapUnique(new ProxyConfigServiceFixed(proxy_config)),
+      base::WrapUnique(
           new CapturingProxyResolverFactory(&capturing_proxy_resolver)),
       NULL));
   TestNetLog net_log;
@@ -11038,7 +11042,7 @@
   ASSERT_TRUE(ssl.cert.get());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite spdy_writes[] = {
       MockWrite(ASYNC, 0,
@@ -11050,9 +11054,9 @@
 
   const char kCONNECTResponse[] = "HTTP/1.1 200 Connected\r\n\r\n";
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> data(
+  std::unique_ptr<SpdySerializedFrame> data(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead spdy_reads[] = {
       MockRead(ASYNC, 1, kCONNECTResponse), CreateMockRead(*resp.get(), 3),
@@ -11073,8 +11077,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -11150,13 +11154,13 @@
   ASSERT_TRUE(ssl.cert.get());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite spdy_writes[] = {CreateMockWrite(*req, 0)};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> data(
+  std::unique_ptr<SpdySerializedFrame> data(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*resp, 1), CreateMockRead(*data, 2), MockRead(ASYNC, 0, 3),
@@ -11168,9 +11172,9 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -11561,7 +11565,7 @@
     request.url = GURL(test_config.server_url);
     request.load_flags = 0;
 
-    scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+    std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
     SSLSocketDataProvider ssl_socket_data_provider(SYNCHRONOUS, OK);
 
@@ -11594,9 +11598,9 @@
             &ssl_socket_data_provider);
     }
 
-    std::vector<scoped_ptr<StaticSocketDataProvider>> data_providers;
+    std::vector<std::unique_ptr<StaticSocketDataProvider>> data_providers;
     for (size_t i = 0; i < mock_reads.size(); ++i) {
-      data_providers.push_back(make_scoped_ptr(new StaticSocketDataProvider(
+      data_providers.push_back(base::WrapUnique(new StaticSocketDataProvider(
           mock_reads[i].data(), mock_reads[i].size(), mock_writes[i].data(),
           mock_writes[i].size())));
       session_deps_.socket_factory->AddSocketDataProvider(
@@ -11664,7 +11668,7 @@
   request.url = origin;
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Use a TCP Socket Pool with only one connection per group. This is used
   // to validate that the TCP socket is not released to the pool between
@@ -11675,12 +11679,12 @@
       1,   // Max sockets per group
       session_deps_.host_resolver.get(), session_deps_.socket_factory.get(),
       NULL, session_deps_.net_log);
-  scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
+  std::unique_ptr<MockClientSocketPoolManager> mock_pool_manager(
       new MockClientSocketPoolManager);
   mock_pool_manager->SetTransportSocketPool(transport_pool);
   session_peer.SetClientSocketPoolManager(std::move(mock_pool_manager));
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback;
 
@@ -11750,7 +11754,7 @@
   // In between rounds, another request comes in for the same domain.
   // It should not be able to grab the TCP socket that trans has already
   // claimed.
-  scoped_ptr<HttpTransaction> trans_compete(
+  std::unique_ptr<HttpTransaction> trans_compete(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   TestCompletionCallback callback_compete;
   rv = trans_compete->Start(
@@ -11861,8 +11865,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -11899,7 +11903,7 @@
   ssl.SetNextProto(GetProtocol());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite spdy_writes[] = {CreateMockWrite(*req, 1)};
 
@@ -11913,8 +11917,8 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback.callback(), BoundNetLog());
@@ -12008,11 +12012,11 @@
   // retry-http-when-alternate-protocol fails logic kicks in, which was more
   // complicated to set up expectations for than the SPDY session.
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> data(
+  std::unique_ptr<SpdySerializedFrame> data(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   MockWrite data_writes_2[] = {
@@ -12069,11 +12073,11 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
   session_deps_.socket_factory->AddSocketDataProvider(
       &hanging_non_alternate_protocol_socket);
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // First round should work and provide the Alternate-Protocol state.
   TestCompletionCallback callback_1;
-  scoped_ptr<HttpTransaction> trans_1(
+  std::unique_ptr<HttpTransaction> trans_1(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   int rv = trans_1->Start(&request, callback_1.callback(), BoundNetLog());
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -12081,7 +12085,7 @@
 
   // Second round should attempt a tunnel connect and get an auth challenge.
   TestCompletionCallback callback_2;
-  scoped_ptr<HttpTransaction> trans_2(
+  std::unique_ptr<HttpTransaction> trans_2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   rv = trans_2->Start(&request, callback_2.callback(), BoundNetLog());
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -12129,8 +12133,8 @@
   request.load_flags = 0;
 
   session_deps_.host_resolver->set_synchronous_mode(true);
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
@@ -12167,7 +12171,7 @@
   StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&data);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   {
     HttpRequestInfo request;
@@ -12203,7 +12207,7 @@
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   HttpRequestInfo request;
   request.method = "GET";
@@ -12229,7 +12233,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   BeforeProxyHeadersSentHandler proxy_headers_handler;
   trans->SetBeforeProxyHeadersSentCallback(
@@ -12267,7 +12271,7 @@
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   HttpRequestInfo request;
   request.method = "GET";
@@ -12301,7 +12305,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
@@ -12343,7 +12347,7 @@
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   HttpRequestInfo request;
   request.method = "GET";
@@ -12377,7 +12381,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
@@ -12417,7 +12421,7 @@
   session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
   BoundTestNetLog log;
   session_deps_.net_log = log.bound().net_log();
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   HttpRequestInfo request;
   request.method = "GET";
@@ -12448,7 +12452,7 @@
 
   TestCompletionCallback callback1;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
@@ -12469,13 +12473,13 @@
 
 // Test for crbug.com/55424.
 TEST_P(HttpNetworkTransactionTest, PreconnectWithExistingSpdySession) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
   MockWrite spdy_writes[] = {CreateMockWrite(*req, 0)};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> data(
+  std::unique_ptr<SpdySerializedFrame> data(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*resp, 1), CreateMockRead(*data, 2), MockRead(ASYNC, 0, 3),
@@ -12489,7 +12493,7 @@
   ssl.SetNextProto(GetProtocol());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Set up an initial SpdySession in the pool to reuse.
   HostPortPair host_port_pair("www.example.org", 443);
@@ -12506,7 +12510,7 @@
   // This is the important line that marks this as a preconnect.
   request.motivation = HttpRequestInfo::PRECONNECT_MOTIVATED;
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   TestCompletionCallback callback;
@@ -12532,8 +12536,8 @@
   session_deps_.socket_factory->AddSocketDataProvider(&data);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl_data);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   TestCompletionCallback callback;
@@ -12619,8 +12623,8 @@
   StaticSocketDataProvider data4(NULL, 0, NULL, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&data4);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Begin the SSL handshake with the peer. This consumes ssl_data1.
@@ -12737,8 +12741,8 @@
   StaticSocketDataProvider data5(data2_reads, arraysize(data2_reads), NULL, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&data5);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   // Begin the initial SSL handshake.
@@ -12830,8 +12834,8 @@
 
   for (size_t i = 0; i < arraysize(requests); ++i) {
     session_deps_.socket_factory->ResetNextMockIndexes();
-    scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-    scoped_ptr<HttpNetworkTransaction> trans(
+    std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+    std::unique_ptr<HttpNetworkTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
     // Begin the SSL handshake with the proxy.
@@ -12886,7 +12890,7 @@
 
   // Set up a special HttpNetworkSession with a MockCachingHostResolver.
   session_deps_.host_resolver.reset(new MockCachingHostResolver());
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   SpdySessionPoolPeer pool_peer(session->spdy_session_pool());
   pool_peer.DisableDomainAuthenticationVerification();
 
@@ -12894,21 +12898,21 @@
   ssl.SetNextProto(GetProtocol());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<SpdySerializedFrame> host1_req(
+  std::unique_ptr<SpdySerializedFrame> host1_req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
   spdy_util_.UpdateWithStreamDestruction(1);
-  scoped_ptr<SpdySerializedFrame> host2_req(
+  std::unique_ptr<SpdySerializedFrame> host2_req(
       spdy_util_.ConstructSpdyGet("https://www.gmail.com", 3, LOWEST));
   MockWrite spdy_writes[] = {
       CreateMockWrite(*host1_req, 0), CreateMockWrite(*host2_req, 3),
   };
-  scoped_ptr<SpdySerializedFrame> host1_resp(
+  std::unique_ptr<SpdySerializedFrame> host1_resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> host1_resp_body(
+  std::unique_ptr<SpdySerializedFrame> host1_resp_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> host2_resp(
+  std::unique_ptr<SpdySerializedFrame> host2_resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> host2_resp_body(
+  std::unique_ptr<SpdySerializedFrame> host2_resp_body(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*host1_resp, 1),
@@ -12984,7 +12988,7 @@
 
   // Set up a special HttpNetworkSession with a MockCachingHostResolver.
   session_deps_.host_resolver.reset(new MockCachingHostResolver());
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   SpdySessionPoolPeer pool_peer(session->spdy_session_pool());
   pool_peer.DisableDomainAuthenticationVerification();
 
@@ -12992,21 +12996,21 @@
   ssl.SetNextProto(GetProtocol());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<SpdySerializedFrame> host1_req(
+  std::unique_ptr<SpdySerializedFrame> host1_req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
   spdy_util_.UpdateWithStreamDestruction(1);
-  scoped_ptr<SpdySerializedFrame> host2_req(
+  std::unique_ptr<SpdySerializedFrame> host2_req(
       spdy_util_.ConstructSpdyGet("https://www.gmail.com", 3, LOWEST));
   MockWrite spdy_writes[] = {
       CreateMockWrite(*host1_req, 0), CreateMockWrite(*host2_req, 3),
   };
-  scoped_ptr<SpdySerializedFrame> host1_resp(
+  std::unique_ptr<SpdySerializedFrame> host1_resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> host1_resp_body(
+  std::unique_ptr<SpdySerializedFrame> host1_resp_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> host2_resp(
+  std::unique_ptr<SpdySerializedFrame> host2_resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> host2_resp_body(
+  std::unique_ptr<SpdySerializedFrame> host2_resp_body(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*host1_resp, 1),
@@ -13113,7 +13117,7 @@
   HttpNetworkSession::Params params =
       SpdySessionDependencies::CreateSessionParams(&session_deps_);
   params.host_resolver = &host_resolver;
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   SpdySessionPoolPeer pool_peer(session->spdy_session_pool());
   pool_peer.DisableDomainAuthenticationVerification();
 
@@ -13121,21 +13125,21 @@
   ssl.SetNextProto(GetProtocol());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<SpdySerializedFrame> host1_req(
+  std::unique_ptr<SpdySerializedFrame> host1_req(
       spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST));
   spdy_util_.UpdateWithStreamDestruction(1);
-  scoped_ptr<SpdySerializedFrame> host2_req(
+  std::unique_ptr<SpdySerializedFrame> host2_req(
       spdy_util_.ConstructSpdyGet("https://www.gmail.com", 3, LOWEST));
   MockWrite spdy_writes[] = {
       CreateMockWrite(*host1_req, 0), CreateMockWrite(*host2_req, 3),
   };
-  scoped_ptr<SpdySerializedFrame> host1_resp(
+  std::unique_ptr<SpdySerializedFrame> host1_resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> host1_resp_body(
+  std::unique_ptr<SpdySerializedFrame> host1_resp_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> host2_resp(
+  std::unique_ptr<SpdySerializedFrame> host2_resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> host2_resp_body(
+  std::unique_ptr<SpdySerializedFrame> host2_resp_body(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*host1_resp, 1),
@@ -13209,16 +13213,16 @@
   const std::string http_url = "http://www.example.org:8080/";
 
   // SPDY GET for HTTPS URL
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(https_url.c_str(), 1, LOWEST));
 
   MockWrite writes1[] = {
     CreateMockWrite(*req1, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body1(
+  std::unique_ptr<SpdySerializedFrame> body1(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads1[] = {CreateMockRead(*resp1, 1), CreateMockRead(*body1, 2),
                        MockRead(SYNCHRONOUS, ERR_IO_PENDING, 3)};
@@ -13251,7 +13255,7 @@
   session_deps_.socket_factory->AddSocketDataProvider(&data1);
   session_deps_.socket_factory->AddSocketDataProvider(&data2);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Start the first transaction to set up the SpdySession
   HttpRequestInfo request1;
@@ -13312,12 +13316,12 @@
     url1.append(origin.host());
     url1.append(":443");
 
-    scoped_ptr<SpdySerializedFrame> req0;
-    scoped_ptr<SpdySerializedFrame> req1;
-    scoped_ptr<SpdySerializedFrame> resp0;
-    scoped_ptr<SpdySerializedFrame> body0;
-    scoped_ptr<SpdySerializedFrame> resp1;
-    scoped_ptr<SpdySerializedFrame> body1;
+    std::unique_ptr<SpdySerializedFrame> req0;
+    std::unique_ptr<SpdySerializedFrame> req1;
+    std::unique_ptr<SpdySerializedFrame> resp0;
+    std::unique_ptr<SpdySerializedFrame> body0;
+    std::unique_ptr<SpdySerializedFrame> resp1;
+    std::unique_ptr<SpdySerializedFrame> body1;
     std::vector<MockWrite> writes;
     std::vector<MockRead> reads;
 
@@ -13365,7 +13369,7 @@
 
     session_deps_.parse_alternative_services = true;
     session_deps_.enable_alternative_service_with_different_host = true;
-    scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+    std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
     base::WeakPtr<HttpServerProperties> http_server_properties =
         session->http_server_properties();
     AlternativeService alternative_service(
@@ -13376,7 +13380,7 @@
 
     // First request to alternative.
     if (pooling) {
-      scoped_ptr<HttpTransaction> trans0(
+      std::unique_ptr<HttpTransaction> trans0(
           new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
       HttpRequestInfo request0;
       request0.method = "GET";
@@ -13391,7 +13395,7 @@
     }
 
     // Second request to origin.
-    scoped_ptr<HttpTransaction> trans1(
+    std::unique_ptr<HttpTransaction> trans1(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
     HttpRequestInfo request1;
     request1.method = "GET";
@@ -13470,7 +13474,7 @@
   // Set up alternative service for origin.
   session_deps_.parse_alternative_services = true;
   session_deps_.enable_alternative_service_with_different_host = true;
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
   AlternativeService alternative_service(
@@ -13479,7 +13483,7 @@
   http_server_properties->SetAlternativeService(origin, alternative_service,
                                                 expiration);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   HttpRequestInfo request;
   request.method = "GET";
@@ -13544,7 +13548,7 @@
   // Set up alternative service for origin.
   session_deps_.parse_alternative_services = true;
   session_deps_.enable_alternative_service_with_different_host = true;
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
   AlternativeService alternative_service(
@@ -13654,7 +13658,7 @@
   // Set up alternative service for origin.
   session_deps_.parse_alternative_services = true;
   session_deps_.enable_alternative_service_with_different_host = false;
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   base::WeakPtr<HttpServerProperties> http_server_properties =
       session->http_server_properties();
   AlternativeService alternative_service(
@@ -13664,7 +13668,7 @@
                                                 expiration);
 
   // First transaction to alternative to open an HTTP/1.1 socket.
-  scoped_ptr<HttpTransaction> trans1(
+  std::unique_ptr<HttpTransaction> trans1(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   HttpRequestInfo request1;
   request1.method = "GET";
@@ -13689,7 +13693,7 @@
   // finds one which is HTTP/1.1, and should ignore it, and should not try to
   // open other connections to alternative server.  The Job to origin fails, so
   // this request fails.
-  scoped_ptr<HttpTransaction> trans2(
+  std::unique_ptr<HttpTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   HttpRequestInfo request2;
   request2.method = "GET";
@@ -13702,7 +13706,7 @@
 
   // Another transaction to alternative.  This is to test that the HTTP/1.1
   // socket is still open and in the pool.
-  scoped_ptr<HttpTransaction> trans3(
+  std::unique_ptr<HttpTransaction> trans3(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   HttpRequestInfo request3;
   request3.method = "GET";
@@ -13732,11 +13736,11 @@
 
   // SPDY GET for HTTPS URL (through CONNECT tunnel)
   const HostPortPair host_port_pair("www.example.org", 8080);
-  scoped_ptr<SpdySerializedFrame> connect(
+  std::unique_ptr<SpdySerializedFrame> connect(
       spdy_util_.ConstructSpdyConnect(NULL, 0, 1, LOWEST, host_port_pair));
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_wrapped.ConstructSpdyGet(https_url.c_str(), 1, LOWEST));
-  scoped_ptr<SpdySerializedFrame> wrapped_req1(
+  std::unique_ptr<SpdySerializedFrame> wrapped_req1(
       spdy_util_.ConstructWrappedSpdyFrame(req1, 1));
 
   // SPDY GET for HTTP URL (through the proxy, but not the tunnel).
@@ -13746,7 +13750,7 @@
   req2_block[spdy_util_.GetHostKey()] = "www.example.org:8080";
   req2_block[spdy_util_.GetSchemeKey()] = "http";
   req2_block[spdy_util_.GetPathKey()] = "/";
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdySyn(3, req2_block, MEDIUM, true));
 
   MockWrite writes1[] = {
@@ -13754,19 +13758,19 @@
       CreateMockWrite(*req2, 6),
   };
 
-  scoped_ptr<SpdySerializedFrame> conn_resp(
+  std::unique_ptr<SpdySerializedFrame> conn_resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_wrapped.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body1(
+  std::unique_ptr<SpdySerializedFrame> body1(
       spdy_util_wrapped.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> wrapped_resp1(
+  std::unique_ptr<SpdySerializedFrame> wrapped_resp1(
       spdy_util_wrapped.ConstructWrappedSpdyFrame(resp1, 1));
-  scoped_ptr<SpdySerializedFrame> wrapped_body1(
+  std::unique_ptr<SpdySerializedFrame> wrapped_body1(
       spdy_util_wrapped.ConstructWrappedSpdyFrame(body1, 1));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
   MockRead reads1[] = {
       CreateMockRead(*conn_resp, 1),
@@ -13796,7 +13800,7 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl2);
   session_deps_.socket_factory->AddSocketDataProvider(&data1);
 
-  scoped_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
+  std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
 
   // Start the first transaction to set up the SpdySession
   HttpRequestInfo request1;
@@ -13858,18 +13862,18 @@
   SpdyTestUtil spdy_util_secure(GetProtocol(), GetDependenciesFromPriority());
 
   // SPDY GET for HTTP URL (through SPDY proxy)
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlockForProxy("http://www.example.org/"));
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, true));
 
   MockWrite writes1[] = {
     CreateMockWrite(*req1, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body1(
+  std::unique_ptr<SpdySerializedFrame> body1(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads1[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 1), CreateMockRead(*resp1, 2),
@@ -13885,16 +13889,16 @@
   data1.set_connect_data(connect_data1);
 
   // SPDY GET for HTTPS URL (direct)
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_secure.ConstructSpdyGet(url2.c_str(), 1, MEDIUM));
 
   MockWrite writes2[] = {
     CreateMockWrite(*req2, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_secure.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_secure.ConstructSpdyBodyFrame(1, true));
   MockRead reads2[] = {CreateMockRead(*resp2, 1), CreateMockRead(*body2, 2),
                        MockRead(ASYNC, OK, 3)};
@@ -13909,7 +13913,7 @@
   ProxyConfig proxy_config;
   proxy_config.proxy_rules().ParseFromString("http=https://proxy:443");
   session_deps_.proxy_service.reset(new ProxyService(
-      make_scoped_ptr(new ProxyConfigServiceFixed(proxy_config)), nullptr,
+      base::WrapUnique(new ProxyConfigServiceFixed(proxy_config)), nullptr,
       NULL));
 
   SSLSocketDataProvider ssl1(ASYNC, OK);  // to the proxy
@@ -13932,7 +13936,7 @@
   session_deps_.host_resolver->rules()->AddRule("news.example.org", ip_addr);
   session_deps_.host_resolver->rules()->AddRule("proxy", ip_addr);
 
-  scoped_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
+  std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
 
   // Start the first transaction to set up the SpdySession
   HttpRequestInfo request1;
@@ -13980,15 +13984,15 @@
 
   SequencedSocketData data1(reads1, arraysize(reads1), NULL, 0);
 
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(https_url.c_str(), 1, MEDIUM));
   MockWrite writes2[] = {
     CreateMockWrite(*req2, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads2[] = {
     CreateMockRead(*resp2, 1),
@@ -14009,7 +14013,7 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl2);
   session_deps_.socket_factory->AddSocketDataProvider(&data2);
 
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps_));
 
   // Start the first transaction to set up the SpdySession and verify that
@@ -14047,7 +14051,7 @@
   // Use two different hosts with different IPs so they don't get pooled.
   session_deps_.host_resolver->rules()->AddRule("www.a.com", "10.0.0.1");
   session_deps_.host_resolver->rules()->AddRule("www.b.com", "10.0.0.2");
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   SSLSocketDataProvider ssl1(ASYNC, OK);
   ssl1.SetNextProto(GetProtocol());
@@ -14056,14 +14060,14 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl1);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl2);
 
-  scoped_ptr<SpdySerializedFrame> host1_req(
+  std::unique_ptr<SpdySerializedFrame> host1_req(
       spdy_util_.ConstructSpdyGet("https://www.a.com", 1, DEFAULT_PRIORITY));
   MockWrite spdy1_writes[] = {
       CreateMockWrite(*host1_req, 0),
   };
-  scoped_ptr<SpdySerializedFrame> host1_resp(
+  std::unique_ptr<SpdySerializedFrame> host1_resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> host1_resp_body(
+  std::unique_ptr<SpdySerializedFrame> host1_resp_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead spdy1_reads[] = {
       CreateMockRead(*host1_resp, 1), CreateMockRead(*host1_resp_body, 2),
@@ -14073,26 +14077,26 @@
   // Use a separate test instance for the separate SpdySession that will be
   // created.
   SpdyTestUtil spdy_util_2(GetProtocol(), GetDependenciesFromPriority());
-  scoped_ptr<SequencedSocketData> spdy1_data(
+  std::unique_ptr<SequencedSocketData> spdy1_data(
       new SequencedSocketData(spdy1_reads, arraysize(spdy1_reads), spdy1_writes,
                               arraysize(spdy1_writes)));
   session_deps_.socket_factory->AddSocketDataProvider(spdy1_data.get());
 
-  scoped_ptr<SpdySerializedFrame> host2_req(
+  std::unique_ptr<SpdySerializedFrame> host2_req(
       spdy_util_2.ConstructSpdyGet("https://www.b.com", 1, DEFAULT_PRIORITY));
   MockWrite spdy2_writes[] = {
       CreateMockWrite(*host2_req, 0),
   };
-  scoped_ptr<SpdySerializedFrame> host2_resp(
+  std::unique_ptr<SpdySerializedFrame> host2_resp(
       spdy_util_2.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> host2_resp_body(
+  std::unique_ptr<SpdySerializedFrame> host2_resp_body(
       spdy_util_2.ConstructSpdyBodyFrame(1, true));
   MockRead spdy2_reads[] = {
       CreateMockRead(*host2_resp, 1), CreateMockRead(*host2_resp_body, 2),
       MockRead(SYNCHRONOUS, ERR_IO_PENDING, 3),
   };
 
-  scoped_ptr<SequencedSocketData> spdy2_data(
+  std::unique_ptr<SequencedSocketData> spdy2_data(
       new SequencedSocketData(spdy2_reads, arraysize(spdy2_reads), spdy2_writes,
                               arraysize(spdy2_writes)));
   session_deps_.socket_factory->AddSocketDataProvider(spdy2_data.get());
@@ -14124,7 +14128,7 @@
   request1.method = "GET";
   request1.url = GURL("https://www.a.com/");
   request1.load_flags = 0;
-  scoped_ptr<HttpNetworkTransaction> trans(
+  std::unique_ptr<HttpNetworkTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   int rv = trans->Start(&request1, callback.callback(), BoundNetLog());
@@ -14208,8 +14212,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockConnect mock_connect(SYNCHRONOUS, ERR_NAME_NOT_RESOLVED);
@@ -14245,8 +14249,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockConnect mock_connect(ASYNC, ERR_NAME_NOT_RESOLVED);
@@ -14282,8 +14286,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -14316,8 +14320,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -14350,8 +14354,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -14387,8 +14391,8 @@
   request.url = GURL("http://www.example.org/");
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -14425,8 +14429,8 @@
   request.load_flags = 0;
   request.extra_headers.SetHeader("X-Foo", "bar");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -14699,8 +14703,9 @@
 // url_request_http_job_unittest.cc ?
 class FakeWebSocketBasicHandshakeStream : public WebSocketHandshakeStreamBase {
  public:
-  FakeWebSocketBasicHandshakeStream(scoped_ptr<ClientSocketHandle> connection,
-                                    bool using_proxy)
+  FakeWebSocketBasicHandshakeStream(
+      std::unique_ptr<ClientSocketHandle> connection,
+      bool using_proxy)
       : state_(connection.release(), using_proxy) {}
 
   // Fake implementation of HttpStreamBase methods.
@@ -14798,9 +14803,9 @@
   }
 
   // Fake implementation of WebSocketHandshakeStreamBase method(s)
-  scoped_ptr<WebSocketStream> Upgrade() override {
+  std::unique_ptr<WebSocketStream> Upgrade() override {
     NOTREACHED();
-    return scoped_ptr<WebSocketStream>();
+    return std::unique_ptr<WebSocketStream>();
   }
 
  private:
@@ -14816,7 +14821,7 @@
       public WebSocketHandshakeStreamBase::CreateHelper {
  public:
   WebSocketHandshakeStreamBase* CreateBasicStream(
-      scoped_ptr<ClientSocketHandle> connection,
+      std::unique_ptr<ClientSocketHandle> connection,
       bool using_proxy) override {
     return new FakeWebSocketBasicHandshakeStream(std::move(connection),
                                                  using_proxy);
@@ -14831,9 +14836,9 @@
 
   ~FakeWebSocketStreamCreateHelper() override {}
 
-  virtual scoped_ptr<WebSocketStream> Upgrade() {
+  virtual std::unique_ptr<WebSocketStream> Upgrade() {
     NOTREACHED();
-    return scoped_ptr<WebSocketStream>();
+    return std::unique_ptr<WebSocketStream>();
   }
 };
 
@@ -14842,10 +14847,10 @@
 // Make sure that HttpNetworkTransaction passes on its priority to its
 // stream request on start.
 TEST_P(HttpNetworkTransactionTest, SetStreamRequestPriorityOnStart) {
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   HttpNetworkSessionPeer peer(session.get());
   FakeStreamFactory* fake_factory = new FakeStreamFactory();
-  peer.SetHttpStreamFactory(scoped_ptr<HttpStreamFactory>(fake_factory));
+  peer.SetHttpStreamFactory(std::unique_ptr<HttpStreamFactory>(fake_factory));
 
   HttpNetworkTransaction trans(LOW, session.get());
 
@@ -14865,10 +14870,10 @@
 // Make sure that HttpNetworkTransaction passes on its priority
 // updates to its stream request.
 TEST_P(HttpNetworkTransactionTest, SetStreamRequestPriority) {
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   HttpNetworkSessionPeer peer(session.get());
   FakeStreamFactory* fake_factory = new FakeStreamFactory();
-  peer.SetHttpStreamFactory(scoped_ptr<HttpStreamFactory>(fake_factory));
+  peer.SetHttpStreamFactory(std::unique_ptr<HttpStreamFactory>(fake_factory));
 
   HttpNetworkTransaction trans(LOW, session.get());
 
@@ -14890,10 +14895,10 @@
 // Make sure that HttpNetworkTransaction passes on its priority
 // updates to its stream.
 TEST_P(HttpNetworkTransactionTest, SetStreamPriority) {
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   HttpNetworkSessionPeer peer(session.get());
   FakeStreamFactory* fake_factory = new FakeStreamFactory();
-  peer.SetHttpStreamFactory(scoped_ptr<HttpStreamFactory>(fake_factory));
+  peer.SetHttpStreamFactory(std::unique_ptr<HttpStreamFactory>(fake_factory));
 
   HttpNetworkTransaction trans(LOW, session.get());
 
@@ -14920,12 +14925,12 @@
   std::string test_cases[] = {"ws://www.example.org/",
                               "wss://www.example.org/"};
   for (size_t i = 0; i < arraysize(test_cases); ++i) {
-    scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+    std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
     HttpNetworkSessionPeer peer(session.get());
     FakeStreamFactory* fake_factory = new FakeStreamFactory();
     FakeWebSocketStreamCreateHelper websocket_stream_create_helper;
     peer.SetHttpStreamFactoryForWebSocket(
-        scoped_ptr<HttpStreamFactory>(fake_factory));
+        std::unique_ptr<HttpStreamFactory>(fake_factory));
 
     HttpNetworkTransaction trans(LOW, session.get());
     trans.SetWebSocketHandshakeStreamCreateHelper(
@@ -15002,11 +15007,11 @@
                                      http_writes, arraysize(http_writes));
   session_deps_.socket_factory->AddSocketDataProvider(&http_data);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Start the SSL request.
   TestCompletionCallback ssl_callback;
-  scoped_ptr<HttpTransaction> ssl_trans(
+  std::unique_ptr<HttpTransaction> ssl_trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   ASSERT_EQ(ERR_IO_PENDING,
             ssl_trans->Start(&ssl_request, ssl_callback.callback(),
@@ -15014,7 +15019,7 @@
 
   // Start the HTTP request.  Pool should stall.
   TestCompletionCallback http_callback;
-  scoped_ptr<HttpTransaction> http_trans(
+  std::unique_ptr<HttpTransaction> http_trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   ASSERT_EQ(ERR_IO_PENDING,
             http_trans->Start(&http_request, http_callback.callback(),
@@ -15084,7 +15089,7 @@
                                      http_writes, arraysize(http_writes));
   session_deps_.socket_factory->AddSocketDataProvider(&http_data);
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Preconnect an SSL socket.  A preconnect is needed because connect jobs are
   // cancelled when a normal transaction is cancelled.
@@ -15097,7 +15102,7 @@
 
   // Start the HTTP request.  Pool should stall.
   TestCompletionCallback http_callback;
-  scoped_ptr<HttpTransaction> http_trans(
+  std::unique_ptr<HttpTransaction> http_trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   ASSERT_EQ(ERR_IO_PENDING,
             http_trans->Start(&http_request, http_callback.callback(),
@@ -15115,9 +15120,9 @@
 }
 
 TEST_P(HttpNetworkTransactionTest, PostReadsErrorResponseAfterReset) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("foo", 3)));
+      base::WrapUnique(new UploadBytesElementReader("foo", 3)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -15126,8 +15131,8 @@
   request.upload_data_stream = &upload_data_stream;
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   // Send headers successfully, but get an error while sending the body.
   MockWrite data_writes[] = {
@@ -15171,7 +15176,7 @@
 // response from a server that rejected a POST with a CONNECTION_RESET.
 TEST_P(HttpNetworkTransactionTest,
        PostReadsErrorResponseAfterResetOnReusedSocket) {
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   MockWrite data_writes[] = {
     MockWrite("GET / HTTP/1.1\r\n"
               "Host: www.foo.com\r\n"
@@ -15202,7 +15207,7 @@
   request1.url = GURL("http://www.foo.com/");
   request1.load_flags = 0;
 
-  scoped_ptr<HttpTransaction> trans1(
+  std::unique_ptr<HttpTransaction> trans1(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   int rv = trans1->Start(&request1, callback.callback(), BoundNetLog());
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -15223,9 +15228,9 @@
   // Delete the transaction to release the socket back into the socket pool.
   trans1.reset();
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("foo", 3)));
+      base::WrapUnique(new UploadBytesElementReader("foo", 3)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request2;
@@ -15234,7 +15239,7 @@
   request2.upload_data_stream = &upload_data_stream;
   request2.load_flags = 0;
 
-  scoped_ptr<HttpTransaction> trans2(
+  std::unique_ptr<HttpTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   rv = trans2->Start(&request2, callback.callback(), BoundNetLog());
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -15256,9 +15261,9 @@
 
 TEST_P(HttpNetworkTransactionTest,
        PostReadsErrorResponseAfterResetPartialBodySent) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("foo", 3)));
+      base::WrapUnique(new UploadBytesElementReader("foo", 3)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -15267,8 +15272,8 @@
   request.upload_data_stream = &upload_data_stream;
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   // Send headers successfully, but get an error while sending the body.
   MockWrite data_writes[] = {
@@ -15320,8 +15325,8 @@
   request.upload_data_stream = &upload_data_stream;
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   // Send headers successfully, but get an error while sending the body.
   MockWrite data_writes[] = {
@@ -15369,9 +15374,9 @@
 }
 
 TEST_P(HttpNetworkTransactionTest, PostReadsErrorResponseAfterResetAnd100) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("foo", 3)));
+      base::WrapUnique(new UploadBytesElementReader("foo", 3)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -15380,8 +15385,8 @@
   request.upload_data_stream = &upload_data_stream;
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 
   MockWrite data_writes[] = {
@@ -15423,9 +15428,9 @@
 }
 
 TEST_P(HttpNetworkTransactionTest, PostIgnoresNonErrorResponseAfterReset) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("foo", 3)));
+      base::WrapUnique(new UploadBytesElementReader("foo", 3)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -15434,8 +15439,8 @@
   request.upload_data_stream = &upload_data_stream;
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   // Send headers successfully, but get an error while sending the body.
   MockWrite data_writes[] = {
@@ -15466,9 +15471,9 @@
 
 TEST_P(HttpNetworkTransactionTest,
        PostIgnoresNonErrorResponseAfterResetAnd100) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("foo", 3)));
+      base::WrapUnique(new UploadBytesElementReader("foo", 3)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -15477,8 +15482,8 @@
   request.upload_data_stream = &upload_data_stream;
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   // Send headers successfully, but get an error while sending the body.
   MockWrite data_writes[] = {
@@ -15510,9 +15515,9 @@
 }
 
 TEST_P(HttpNetworkTransactionTest, PostIgnoresHttp09ResponseAfterReset) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("foo", 3)));
+      base::WrapUnique(new UploadBytesElementReader("foo", 3)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -15521,8 +15526,8 @@
   request.upload_data_stream = &upload_data_stream;
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   // Send headers successfully, but get an error while sending the body.
   MockWrite data_writes[] = {
@@ -15551,9 +15556,9 @@
 }
 
 TEST_P(HttpNetworkTransactionTest, PostIgnoresPartial400HeadersAfterReset) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("foo", 3)));
+      base::WrapUnique(new UploadBytesElementReader("foo", 3)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -15562,8 +15567,8 @@
   request.upload_data_stream = &upload_data_stream;
   request.load_flags = 0;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   // Send headers successfully, but get an error while sending the body.
   MockWrite data_writes[] = {
@@ -15603,7 +15608,7 @@
   session_deps_.proxy_service =
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   // Since a proxy is configured, try to establish a tunnel.
   MockWrite data_writes[] = {
@@ -15650,7 +15655,7 @@
   SSLSocketDataProvider ssl(ASYNC, OK);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   FakeWebSocketStreamCreateHelper websocket_stream_create_helper;
   trans->SetWebSocketHandshakeStreamCreateHelper(
@@ -15707,7 +15712,7 @@
   session_deps_.proxy_service =
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   MockWrite data_writes[] = {
       // Try to establish a tunnel for the WebSocket connection, with
@@ -15749,7 +15754,7 @@
       GURL("http://myproxy:70/"), "MyRealm1", HttpAuth::AUTH_SCHEME_BASIC,
       "Basic realm=MyRealm1", AuthCredentials(kFoo, kBar), "/");
 
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   FakeWebSocketStreamCreateHelper websocket_stream_create_helper;
   trans->SetWebSocketHandshakeStreamCreateHelper(
@@ -15774,9 +15779,9 @@
 }
 
 TEST_P(HttpNetworkTransactionTest, TotalNetworkBytesPost) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("foo", 3)));
+      base::WrapUnique(new UploadBytesElementReader("foo", 3)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -15784,8 +15789,8 @@
   request.url = GURL("http://www.foo.com/");
   request.upload_data_stream = &upload_data_stream;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   MockWrite data_writes[] = {
       MockWrite("POST / HTTP/1.1\r\n"
@@ -15819,9 +15824,9 @@
 }
 
 TEST_P(HttpNetworkTransactionTest, TotalNetworkBytesPost100Continue) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("foo", 3)));
+      base::WrapUnique(new UploadBytesElementReader("foo", 3)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -15829,8 +15834,8 @@
   request.url = GURL("http://www.foo.com/");
   request.upload_data_stream = &upload_data_stream;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   MockWrite data_writes[] = {
       MockWrite("POST / HTTP/1.1\r\n"
@@ -15872,8 +15877,8 @@
   request.url = GURL("http://www.foo.com/");
   request.upload_data_stream = &upload_data_stream;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
   // Send headers successfully, but get an error while sending the body.
   MockWrite data_writes[] = {
@@ -15917,7 +15922,7 @@
 TEST_P(HttpNetworkTransactionTest, EnableNPN) {
   session_deps_.enable_npn = true;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
 
   EXPECT_THAT(trans.server_ssl_config_.alpn_protos,
@@ -15929,7 +15934,7 @@
 TEST_P(HttpNetworkTransactionTest, DisableNPN) {
   session_deps_.enable_npn = false;
 
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
 
   EXPECT_THAT(trans.server_ssl_config_.alpn_protos,
@@ -15950,9 +15955,9 @@
   ssl.SetNextProto(GetProtocol());
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {CreateMockRead(*resp), CreateMockRead(*body),
                       MockRead(ASYNC, ERR_IO_PENDING)};
@@ -15960,7 +15965,7 @@
   session_deps_.socket_factory->AddSocketDataProvider(&data);
   session_deps_.channel_id_service.reset(new ChannelIDService(
       new DefaultChannelIDStore(nullptr), base::ThreadTaskRunnerHandle::Get()));
-  scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+  std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
   TestCompletionCallback callback;
diff --git a/net/http/http_proxy_client_socket.h b/net/http/http_proxy_client_socket.h
index fb090e6..1c433ea 100644
--- a/net/http/http_proxy_client_socket.h
+++ b/net/http/http_proxy_client_socket.h
@@ -14,6 +14,7 @@
 #include "net/base/completion_callback.h"
 #include "net/base/host_port_pair.h"
 #include "net/base/load_timing_info.h"
+#include "net/base/net_export.h"
 #include "net/http/http_auth_controller.h"
 #include "net/http/http_request_headers.h"
 #include "net/http/http_request_info.h"
@@ -32,7 +33,7 @@
 class IOBuffer;
 class ProxyDelegate;
 
-class HttpProxyClientSocket : public ProxyClientSocket {
+class NET_EXPORT_PRIVATE HttpProxyClientSocket : public ProxyClientSocket {
  public:
   // Takes ownership of |transport_socket|, which should already be connected
   // by the time Connect() is called.  If tunnel is true then on Connect()
@@ -135,11 +136,11 @@
   HttpResponseInfo response_;
 
   scoped_refptr<GrowableIOBuffer> parser_buf_;
-  scoped_ptr<HttpStreamParser> http_stream_parser_;
+  std::unique_ptr<HttpStreamParser> http_stream_parser_;
   scoped_refptr<IOBuffer> drain_buf_;
 
   // Stores the underlying socket.
-  scoped_ptr<ClientSocketHandle> transport_;
+  std::unique_ptr<ClientSocketHandle> transport_;
 
   // The hostname and port of the endpoint.  This is not necessarily the one
   // specified by the URL, due to Alternate-Protocol or fixed testing ports.
diff --git a/net/http/http_proxy_client_socket_fuzzer.cc b/net/http/http_proxy_client_socket_fuzzer.cc
new file mode 100644
index 0000000..f39e3685
--- /dev/null
+++ b/net/http/http_proxy_client_socket_fuzzer.cc
@@ -0,0 +1,89 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/http/http_proxy_client_socket.h"
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include <memory>
+#include <string>
+
+#include "base/logging.h"
+#include "base/message_loop/message_loop.h"
+#include "base/strings/utf_string_conversions.h"
+#include "net/base/address_list.h"
+#include "net/base/auth.h"
+#include "net/base/host_port_pair.h"
+#include "net/base/test_completion_callback.h"
+#include "net/http/http_auth_cache.h"
+#include "net/http/http_auth_handler_basic.h"
+#include "net/http/http_auth_handler_digest.h"
+#include "net/http/http_auth_handler_factory.h"
+#include "net/http/http_auth_scheme.h"
+#include "net/log/test_net_log.h"
+#include "net/socket/client_socket_handle.h"
+#include "net/socket/fuzzed_socket.h"
+#include "net/socket/next_proto.h"
+
+// Fuzzer for HttpProxyClientSocket only tests establishing a connection when
+// using the proxy as a tunnel.
+//
+// |data| is used to create a FuzzedSocket to fuzz reads and writes, see that
+// class for details.
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+  // Needed for thread checks and waits.
+  base::MessageLoopForIO message_loop;
+
+  // Use a test NetLog, to exercise logging code.
+  net::BoundTestNetLog bound_test_net_log;
+
+  // Use last byte to determine if the HttpProxyClientSocket should be told the
+  // underlying socket is HTTPS.
+  bool is_https_proxy = 0;
+  if (size > 0) {
+    is_https_proxy = !(data[size - 1] & 1);
+    size--;
+  }
+
+  net::TestCompletionCallback callback;
+  std::unique_ptr<net::FuzzedSocket> fuzzed_socket(
+      new net::FuzzedSocket(data, size, bound_test_net_log.bound()));
+  CHECK_EQ(net::OK, fuzzed_socket->Connect(callback.callback()));
+
+  std::unique_ptr<net::ClientSocketHandle> socket_handle(
+      new net::ClientSocketHandle());
+  socket_handle->SetSocket(std::move(fuzzed_socket));
+
+  // Create auth handler supporting basic and digest schemes.  Other schemes can
+  // make system calls, which doesn't seem like a great idea.
+  net::HttpAuthCache auth_cache;
+  net::HttpAuthHandlerRegistryFactory auth_handler_factory;
+  auth_handler_factory.RegisterSchemeFactory(
+      net::kBasicAuthScheme, new net::HttpAuthHandlerBasic::Factory());
+  auth_handler_factory.RegisterSchemeFactory(
+      net::kDigestAuthScheme, new net::HttpAuthHandlerDigest::Factory());
+
+  scoped_refptr<net::HttpAuthController> auth_controller(
+      new net::HttpAuthController(net::HttpAuth::AUTH_PROXY,
+                                  GURL("http://proxy:42/"), &auth_cache,
+                                  &auth_handler_factory));
+  net::HttpProxyClientSocket socket(
+      socket_handle.release(), "Bond/007", net::HostPortPair("foo", 80),
+      net::HostPortPair("proxy", 42), auth_controller.get(), true /* tunnel */,
+      false /* using_spdy */, net::kProtoUnknown, nullptr /* proxy_delegate */,
+      is_https_proxy);
+  int result = socket.Connect(callback.callback());
+  result = callback.GetResult(result);
+
+  // Repeatedly try to log in with the same credentials.
+  while (result == net::ERR_PROXY_AUTH_REQUESTED) {
+    auth_controller->ResetAuth(net::AuthCredentials(
+        base::ASCIIToUTF16("user"), base::ASCIIToUTF16("pass")));
+    result = socket.RestartWithAuth(callback.callback());
+    result = callback.GetResult(result);
+  }
+
+  return 0;
+}
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc
index 5368ab9..11bf04d0 100644
--- a/net/http/http_proxy_client_socket_pool.cc
+++ b/net/http/http_proxy_client_socket_pool.cc
@@ -169,13 +169,12 @@
     base::TimeDelta::FromSeconds(kHttpProxyConnectJobTimeoutInSeconds);
 }
 
-
-scoped_ptr<ConnectJob>
+std::unique_ptr<ConnectJob>
 HttpProxyClientSocketPool::HttpProxyConnectJobFactory::NewConnectJob(
     const std::string& group_name,
     const PoolBase::Request& request,
     ConnectJob::Delegate* delegate) const {
-  return scoped_ptr<ConnectJob>(new HttpProxyConnectJob(
+  return std::unique_ptr<ConnectJob>(new HttpProxyConnectJob(
       group_name, request.priority(), request.respect_limits(),
       request.params(), ConnectionTimeout(), transport_pool_, ssl_pool_,
       delegate, net_log_));
@@ -242,9 +241,10 @@
   base_.CancelRequest(group_name, handle);
 }
 
-void HttpProxyClientSocketPool::ReleaseSocket(const std::string& group_name,
-                                              scoped_ptr<StreamSocket> socket,
-                                              int id) {
+void HttpProxyClientSocketPool::ReleaseSocket(
+    const std::string& group_name,
+    std::unique_ptr<StreamSocket> socket,
+    int id) {
   base_.ReleaseSocket(group_name, std::move(socket), id);
 }
 
@@ -270,11 +270,11 @@
   return base_.GetLoadState(group_name, handle);
 }
 
-scoped_ptr<base::DictionaryValue> HttpProxyClientSocketPool::GetInfoAsValue(
-    const std::string& name,
-    const std::string& type,
-    bool include_nested_pools) const {
-  scoped_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type));
+std::unique_ptr<base::DictionaryValue>
+HttpProxyClientSocketPool::GetInfoAsValue(const std::string& name,
+                                          const std::string& type,
+                                          bool include_nested_pools) const {
+  std::unique_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type));
   if (include_nested_pools) {
     base::ListValue* list = new base::ListValue();
     if (transport_pool_) {
diff --git a/net/http/http_proxy_client_socket_pool.h b/net/http/http_proxy_client_socket_pool.h
index 64c13f1..167aa615 100644
--- a/net/http/http_proxy_client_socket_pool.h
+++ b/net/http/http_proxy_client_socket_pool.h
@@ -5,11 +5,11 @@
 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_
 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "net/base/host_port_pair.h"
@@ -126,9 +126,9 @@
 
   int HandleConnectResult(int result);
 
-  scoped_ptr<HttpProxyClientSocketWrapper> client_socket_;
+  std::unique_ptr<HttpProxyClientSocketWrapper> client_socket_;
 
-  scoped_ptr<HttpResponseInfo> error_response_info_;
+  std::unique_ptr<HttpResponseInfo> error_response_info_;
 
   DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob);
 };
@@ -165,7 +165,7 @@
                      ClientSocketHandle* handle) override;
 
   void ReleaseSocket(const std::string& group_name,
-                     scoped_ptr<StreamSocket> socket,
+                     std::unique_ptr<StreamSocket> socket,
                      int id) override;
 
   void FlushWithError(int error) override;
@@ -179,7 +179,7 @@
   LoadState GetLoadState(const std::string& group_name,
                          const ClientSocketHandle* handle) const override;
 
-  scoped_ptr<base::DictionaryValue> GetInfoAsValue(
+  std::unique_ptr<base::DictionaryValue> GetInfoAsValue(
       const std::string& name,
       const std::string& type,
       bool include_nested_pools) const override;
@@ -206,7 +206,7 @@
                                NetLog* net_log);
 
     // ClientSocketPoolBase::ConnectJobFactory methods.
-    scoped_ptr<ConnectJob> NewConnectJob(
+    std::unique_ptr<ConnectJob> NewConnectJob(
         const std::string& group_name,
         const PoolBase::Request& request,
         ConnectJob::Delegate* delegate) const override;
diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc
index 1daca24..f9d853d 100644
--- a/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -201,7 +201,7 @@
     ssl_data_->SetNextProto(GetParam().protocol);
   }
 
-  scoped_ptr<HttpNetworkSession> CreateNetworkSession() {
+  std::unique_ptr<HttpNetworkSession> CreateNetworkSession() {
     return SpdySessionDependencies::SpdyCreateSession(&session_deps_);
   }
 
@@ -214,15 +214,15 @@
 
   MockTransportClientSocketPool transport_socket_pool_;
   MockHostResolver host_resolver_;
-  scoped_ptr<CertVerifier> cert_verifier_;
+  std::unique_ptr<CertVerifier> cert_verifier_;
   SSLClientSocketPool ssl_socket_pool_;
 
-  scoped_ptr<HttpNetworkSession> session_;
+  std::unique_ptr<HttpNetworkSession> session_;
 
  protected:
   SpdyTestUtil spdy_util_;
-  scoped_ptr<SSLSocketDataProvider> ssl_data_;
-  scoped_ptr<SequencedSocketData> data_;
+  std::unique_ptr<SSLSocketDataProvider> ssl_data_;
+  std::unique_ptr<SequencedSocketData> data_;
   HttpProxyClientSocketPool pool_;
   ClientSocketHandle handle_;
   TestCompletionCallback callback_;
@@ -251,7 +251,7 @@
 TEST_P(HttpProxyClientSocketPoolTest, NoTunnel) {
   Initialize(NULL, 0, NULL, 0, NULL, 0, NULL, 0);
 
-  scoped_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
+  std::unique_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
   int rv = handle_.Init("a", CreateNoTunnelParams(proxy_delegate.get()), LOW,
                         ClientSocketPool::RespectLimits::ENABLED,
                         CompletionCallback(), &pool_, BoundNetLog());
@@ -288,9 +288,9 @@
     MockRead(ASYNC, 3, "Content-Length: 10\r\n\r\n"),
     MockRead(ASYNC, 4, "0123456789"),
   };
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyConnect(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyConnect(
       NULL, 0, 1, LOW, HostPortPair("www.google.com", 443)));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite spdy_writes[] = {
     CreateMockWrite(*req, 0, ASYNC),
@@ -301,7 +301,7 @@
   resp_block["proxy-authenticate"] = "Basic realm=\"MyRealm1\"";
   spdy_util_.MaybeAddVersionHeader(&resp_block);
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyReply(1, resp_block));
   MockRead spdy_reads[] = {
     CreateMockRead(*resp, 1, ASYNC),
@@ -361,7 +361,7 @@
              NULL, 0);
   AddAuthToCache();
 
-  scoped_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
+  std::unique_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
   int rv = handle_.Init("a", CreateTunnelParams(proxy_delegate.get()), LOW,
                         ClientSocketPool::RespectLimits::ENABLED,
                         callback_.callback(), &pool_, BoundNetLog());
@@ -397,13 +397,13 @@
     MockRead(ASYNC, 1, "HTTP/1.1 200 Connection Established\r\n\r\n"),
   };
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyConnect(kAuthHeaders, kAuthHeadersSize, 1, LOW,
                                       HostPortPair("www.google.com", 443)));
   MockWrite spdy_writes[] = {
     CreateMockWrite(*req, 0, ASYNC)
   };
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead spdy_reads[] = {
       CreateMockRead(*resp, 1, ASYNC),
@@ -416,7 +416,7 @@
              arraysize(spdy_writes));
   AddAuthToCache();
 
-  scoped_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
+  std::unique_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
   int rv = handle_.Init("a", CreateTunnelParams(proxy_delegate.get()), LOW,
                         ClientSocketPool::RespectLimits::ENABLED,
                         callback_.callback(), &pool_, BoundNetLog());
@@ -440,13 +440,13 @@
   if (GetParam().proxy_type != SPDY)
     return;
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyConnect(kAuthHeaders, kAuthHeadersSize, 1, MEDIUM,
                                       HostPortPair("www.google.com", 443)));
   MockWrite spdy_writes[] = {
     CreateMockWrite(*req, 0, ASYNC)
   };
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead spdy_reads[] = {
     CreateMockRead(*resp, 1, ASYNC),
@@ -551,7 +551,7 @@
     MockRead(ASYNC, 1, "HTTP/1.1 200 Conn"),
     MockRead(ASYNC, ERR_CONNECTION_CLOSED, 2),
   };
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyConnect(kAuthHeaders, kAuthHeadersSize, 1, LOW,
                                       HostPortPair("www.google.com", 443)));
   MockWrite spdy_writes[] = {
@@ -626,16 +626,16 @@
   MockRead reads[] = {
     MockRead(ASYNC, 1, "HTTP/1.1 304 Not Modified\r\n\r\n"),
   };
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyConnect(kAuthHeaders, kAuthHeadersSize, 1, LOW,
                                       HostPortPair("www.google.com", 443)));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite spdy_writes[] = {
     CreateMockWrite(*req, 0, ASYNC),
     CreateMockWrite(*rst, 2, ASYNC),
   };
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdySynReplyError(1));
   MockRead spdy_reads[] = {
     CreateMockRead(*resp, 1, ASYNC),
@@ -678,10 +678,10 @@
   MockRead reads[] = {
     MockRead(ASYNC, 1, responseText.c_str()),
   };
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyConnect(kAuthHeaders, kAuthHeadersSize, 1, LOW,
                                       HostPortPair("www.google.com", 443)));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
 
   MockWrite spdy_writes[] = {
@@ -694,8 +694,9 @@
     "set-cookie", "foo=bar",
   };
   const int responseHeadersSize = arraysize(responseHeaders) / 2;
-  scoped_ptr<SpdySerializedFrame> resp(spdy_util_.ConstructSpdySynReplyError(
-      "302 Found", responseHeaders, responseHeadersSize, 1));
+  std::unique_ptr<SpdySerializedFrame> resp(
+      spdy_util_.ConstructSpdySynReplyError("302 Found", responseHeaders,
+                                            responseHeadersSize, 1));
   MockRead spdy_reads[] = {
     CreateMockRead(*resp, 1, ASYNC),
     MockRead(ASYNC, 0, 2),
diff --git a/net/http/http_proxy_client_socket_wrapper.cc b/net/http/http_proxy_client_socket_wrapper.cc
index bf9acbfa..b63ee4e 100644
--- a/net/http/http_proxy_client_socket_wrapper.cc
+++ b/net/http/http_proxy_client_socket_wrapper.cc
@@ -108,7 +108,7 @@
   return LOAD_STATE_IDLE;
 }
 
-scoped_ptr<HttpResponseInfo>
+std::unique_ptr<HttpResponseInfo>
 HttpProxyClientSocketWrapper::GetAdditionalErrorState() {
   return std::move(error_response_info_);
 }
diff --git a/net/http/http_proxy_client_socket_wrapper.h b/net/http/http_proxy_client_socket_wrapper.h
index c83ccd69..f39d6bef 100644
--- a/net/http/http_proxy_client_socket_wrapper.h
+++ b/net/http/http_proxy_client_socket_wrapper.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
 #include "net/base/completion_callback.h"
@@ -78,7 +78,7 @@
   // LOAD_STATE_IDLE at other times.
   LoadState GetConnectLoadState() const;
 
-  scoped_ptr<HttpResponseInfo> GetAdditionalErrorState();
+  std::unique_ptr<HttpResponseInfo> GetAdditionalErrorState();
 
   // ProxyClientSocket implementation.
   const HttpResponseInfo* GetConnectResponseInfo() const override;
@@ -189,10 +189,10 @@
   bool using_spdy_;
   NextProto protocol_negotiated_;
 
-  scoped_ptr<HttpResponseInfo> error_response_info_;
+  std::unique_ptr<HttpResponseInfo> error_response_info_;
 
-  scoped_ptr<ClientSocketHandle> transport_socket_handle_;
-  scoped_ptr<ProxyClientSocket> transport_socket_;
+  std::unique_ptr<ClientSocketHandle> transport_socket_handle_;
+  std::unique_ptr<ProxyClientSocket> transport_socket_;
 
   // Called when a connection is established. Also used when restarting with
   // AUTH, which will invoke this when ready to restart, after reconnecting
diff --git a/net/http/http_request_headers.cc b/net/http/http_request_headers.cc
index 312702c0..b04a0b5 100644
--- a/net/http/http_request_headers.cc
+++ b/net/http/http_request_headers.cc
@@ -187,10 +187,10 @@
   return output;
 }
 
-scoped_ptr<base::Value> HttpRequestHeaders::NetLogCallback(
+std::unique_ptr<base::Value> HttpRequestHeaders::NetLogCallback(
     const std::string* request_line,
     NetLogCaptureMode capture_mode) const {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("line", *request_line);
   base::ListValue* headers = new base::ListValue();
   for (HeaderVector::const_iterator it = headers_.begin();
diff --git a/net/http/http_request_headers.h b/net/http/http_request_headers.h
index c500d8c3..62ec37c 100644
--- a/net/http/http_request_headers.h
+++ b/net/http/http_request_headers.h
@@ -153,8 +153,9 @@
 
   // Takes in the request line and returns a Value for use with the NetLog
   // containing both the request line and all headers fields.
-  scoped_ptr<base::Value> NetLogCallback(const std::string* request_line,
-                                         NetLogCaptureMode capture_mode) const;
+  std::unique_ptr<base::Value> NetLogCallback(
+      const std::string* request_line,
+      NetLogCaptureMode capture_mode) const;
 
   // Takes in a Value created by the above function, and attempts to extract the
   // request line and create a copy of the original headers.  Returns true on
diff --git a/net/http/http_request_headers_unittest.cc b/net/http/http_request_headers_unittest.cc
index 7c00c6ee..6a09e46 100644
--- a/net/http/http_request_headers_unittest.cc
+++ b/net/http/http_request_headers_unittest.cc
@@ -4,7 +4,8 @@
 
 #include "net/http/http_request_headers.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/values.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -171,7 +172,7 @@
   headers.SetHeader("A", "a");
   std::string request_line("GET /stuff");
 
-  scoped_ptr<base::Value> event_param(headers.NetLogCallback(
+  std::unique_ptr<base::Value> event_param(headers.NetLogCallback(
       &request_line, NetLogCaptureMode::IncludeCookiesAndCredentials()));
   HttpRequestHeaders headers2;
   std::string request_line2;
diff --git a/net/http/http_response_body_drainer.h b/net/http/http_response_body_drainer.h
index 2ff4a76..e2d159d 100644
--- a/net/http/http_response_body_drainer.h
+++ b/net/http/http_response_body_drainer.h
@@ -5,9 +5,10 @@
 #ifndef NET_HTTP_HTTP_RESPONSE_BODY_DRAINER_H_
 #define NET_HTTP_HTTP_RESPONSE_BODY_DRAINER_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/timer/timer.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
@@ -52,7 +53,7 @@
   void Finish(int result);
 
   scoped_refptr<IOBuffer> read_buf_;
-  const scoped_ptr<HttpStream> stream_;
+  const std::unique_ptr<HttpStream> stream_;
   State next_state_;
   int total_read_;
   CompletionCallback user_callback_;
diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc
index 9ee6f84..88e32bfb7 100644
--- a/net/http/http_response_body_drainer_unittest.cc
+++ b/net/http/http_response_body_drainer_unittest.cc
@@ -236,11 +236,11 @@
     return new HttpNetworkSession(params);
   }
 
-  scoped_ptr<ProxyService> proxy_service_;
+  std::unique_ptr<ProxyService> proxy_service_;
   scoped_refptr<SSLConfigService> ssl_config_service_;
-  scoped_ptr<HttpServerPropertiesImpl> http_server_properties_;
-  scoped_ptr<TransportSecurityState> transport_security_state_;
-  const scoped_ptr<HttpNetworkSession> session_;
+  std::unique_ptr<HttpServerPropertiesImpl> http_server_properties_;
+  std::unique_ptr<TransportSecurityState> transport_security_state_;
+  const std::unique_ptr<HttpNetworkSession> session_;
   CloseResultWaiter result_waiter_;
   MockHttpStream* const mock_stream_;  // Owned by |drainer_|.
   HttpResponseBodyDrainer* const drainer_;  // Deletes itself.
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index 2f89d1f..edaf922 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -1411,11 +1411,11 @@
   return true;
 }
 
-scoped_ptr<base::Value> HttpResponseHeaders::NetLogCallback(
+std::unique_ptr<base::Value> HttpResponseHeaders::NetLogCallback(
     NetLogCaptureMode capture_mode) const {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   base::ListValue* headers = new base::ListValue();
-  headers->Append(new base::StringValue(GetStatusLine()));
+  headers->Append(new base::StringValue(EscapeNonASCII(GetStatusLine())));
   size_t iterator = 0;
   std::string name;
   std::string value;
diff --git a/net/http/http_response_headers.h b/net/http/http_response_headers.h
index c115bee..17833a4 100644
--- a/net/http/http_response_headers.h
+++ b/net/http/http_response_headers.h
@@ -301,7 +301,8 @@
   bool IsChunkEncoded() const;
 
   // Creates a Value for use with the NetLog containing the response headers.
-  scoped_ptr<base::Value> NetLogCallback(NetLogCaptureMode capture_mode) const;
+  std::unique_ptr<base::Value> NetLogCallback(
+      NetLogCaptureMode capture_mode) const;
 
   // Takes in a Value created by the above function, and attempts to create a
   // copy of the original headers.  Returns true on success.  On failure,
diff --git a/net/http/http_response_headers_unittest.cc b/net/http/http_response_headers_unittest.cc
index 6442238..a9567c6 100644
--- a/net/http/http_response_headers_unittest.cc
+++ b/net/http/http_response_headers_unittest.cc
@@ -2,18 +2,19 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "net/http/http_response_headers.h"
+
 #include <stdint.h>
 
 #include <algorithm>
 #include <iostream>
 #include <limits>
+#include <memory>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/pickle.h"
 #include "base/time/time.h"
 #include "base/values.h"
 #include "net/http/http_byte_range.h"
-#include "net/http/http_response_headers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace net {
@@ -2087,7 +2088,7 @@
   HeadersToRaw(&headers);
   scoped_refptr<HttpResponseHeaders> parsed(new HttpResponseHeaders(headers));
 
-  scoped_ptr<base::Value> event_param(parsed->NetLogCallback(
+  std::unique_ptr<base::Value> event_param(parsed->NetLogCallback(
       NetLogCaptureMode::IncludeCookiesAndCredentials()));
   scoped_refptr<HttpResponseHeaders> recreated;
 
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h
index 44224db..9e022fa 100644
--- a/net/http/http_server_properties.h
+++ b/net/http/http_server_properties.h
@@ -316,7 +316,8 @@
 
   // Returns all alternative service mappings as human readable strings.
   // Empty alternative service hostnames will be printed as such.
-  virtual scoped_ptr<base::Value> GetAlternativeServiceInfoAsValue() const = 0;
+  virtual std::unique_ptr<base::Value> GetAlternativeServiceInfoAsValue()
+      const = 0;
 
   // Gets a reference to the SettingsMap stored for a host.
   // If no settings are stored, returns an empty SettingsMap.
diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc
index 316a5893..b45266b 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/net/http/http_server_properties_impl.cc
@@ -5,12 +5,12 @@
 #include "net/http/http_server_properties_impl.h"
 
 #include <algorithm>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
@@ -522,12 +522,12 @@
   return alternative_service_map_;
 }
 
-scoped_ptr<base::Value>
-HttpServerPropertiesImpl::GetAlternativeServiceInfoAsValue()
-    const {
-  scoped_ptr<base::ListValue> dict_list(new base::ListValue);
+std::unique_ptr<base::Value>
+HttpServerPropertiesImpl::GetAlternativeServiceInfoAsValue() const {
+  std::unique_ptr<base::ListValue> dict_list(new base::ListValue);
   for (const auto& alternative_service_map_item : alternative_service_map_) {
-    scoped_ptr<base::ListValue> alternative_service_list(new base::ListValue);
+    std::unique_ptr<base::ListValue> alternative_service_list(
+        new base::ListValue);
     const HostPortPair& host_port_pair = alternative_service_map_item.first;
     for (const AlternativeServiceInfo& alternative_service_info :
          alternative_service_map_item.second) {
@@ -546,10 +546,10 @@
     }
     if (alternative_service_list->empty())
       continue;
-    scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
     dict->SetString("host_port_pair", host_port_pair.ToString());
-    dict->Set("alternative_service",
-              scoped_ptr<base::Value>(std::move(alternative_service_list)));
+    dict->Set("alternative_service", std::unique_ptr<base::Value>(
+                                         std::move(alternative_service_list)));
     dict_list->Append(std::move(dict));
   }
   return std::move(dict_list);
diff --git a/net/http/http_server_properties_impl.h b/net/http/http_server_properties_impl.h
index d6686733..4be257c8 100644
--- a/net/http/http_server_properties_impl.h
+++ b/net/http/http_server_properties_impl.h
@@ -106,7 +106,8 @@
       const AlternativeService& alternative_service) override;
   void ClearAlternativeServices(const HostPortPair& origin) override;
   const AlternativeServiceMap& alternative_service_map() const override;
-  scoped_ptr<base::Value> GetAlternativeServiceInfoAsValue() const override;
+  std::unique_ptr<base::Value> GetAlternativeServiceInfoAsValue()
+      const override;
   const SettingsMap& GetSpdySettings(
       const HostPortPair& host_port_pair) override;
   bool SetSpdySetting(const HostPortPair& host_port_pair,
diff --git a/net/http/http_server_properties_impl_unittest.cc b/net/http/http_server_properties_impl_unittest.cc
index f4edadb..a4c1a59 100644
--- a/net/http/http_server_properties_impl_unittest.cc
+++ b/net/http/http_server_properties_impl_unittest.cc
@@ -4,12 +4,12 @@
 
 #include "net/http/http_server_properties_impl.h"
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/containers/hash_tables.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "net/base/host_port_pair.h"
 #include "net/base/ip_address.h"
diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc
index a592f44..628ec7a 100644
--- a/net/http/http_server_properties_manager.cc
+++ b/net/http/http_server_properties_manager.cc
@@ -279,9 +279,8 @@
   return http_server_properties_impl_->alternative_service_map();
 }
 
-scoped_ptr<base::Value>
-HttpServerPropertiesManager::GetAlternativeServiceInfoAsValue()
-    const {
+std::unique_ptr<base::Value>
+HttpServerPropertiesManager::GetAlternativeServiceInfoAsValue() const {
   DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
   return http_server_properties_impl_->GetAlternativeServiceInfoAsValue();
 }
@@ -490,14 +489,14 @@
   ReadSupportsQuic(http_server_properties_dict, addr);
 
   // String is host/port pair of spdy server.
-  scoped_ptr<ServerList> spdy_servers(new ServerList);
-  scoped_ptr<SpdySettingsMap> spdy_settings_map(
+  std::unique_ptr<ServerList> spdy_servers(new ServerList);
+  std::unique_ptr<SpdySettingsMap> spdy_settings_map(
       new SpdySettingsMap(kMaxSpdySettingsHostsToPersist));
-  scoped_ptr<AlternativeServiceMap> alternative_service_map(
+  std::unique_ptr<AlternativeServiceMap> alternative_service_map(
       new AlternativeServiceMap(kMaxAlternateProtocolHostsToPersist));
-  scoped_ptr<ServerNetworkStatsMap> server_network_stats_map(
+  std::unique_ptr<ServerNetworkStatsMap> server_network_stats_map(
       new ServerNetworkStatsMap(kMaxServerNetworkStatsHostsToPersist));
-  scoped_ptr<QuicServerInfoMap> quic_server_info_map(
+  std::unique_ptr<QuicServerInfoMap> quic_server_info_map(
       new QuicServerInfoMap(QuicServerInfoMap::NO_AUTO_EVICT));
 
   if (version < 4) {
@@ -1164,7 +1163,8 @@
       alternative_service_info_vector->empty()) {
     return;
   }
-  scoped_ptr<base::ListValue> alternative_service_list(new base::ListValue);
+  std::unique_ptr<base::ListValue> alternative_service_list(
+      new base::ListValue);
   for (const AlternativeServiceInfo& alternative_service_info :
        *alternative_service_info_vector) {
     const AlternativeService alternative_service =
diff --git a/net/http/http_server_properties_manager.h b/net/http/http_server_properties_manager.h
index a7ede48f..cb861cec 100644
--- a/net/http/http_server_properties_manager.h
+++ b/net/http/http_server_properties_manager.h
@@ -7,13 +7,13 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/timer/timer.h"
 #include "base/values.h"
@@ -135,7 +135,8 @@
       const AlternativeService& alternative_service) override;
   void ClearAlternativeServices(const HostPortPair& origin) override;
   const AlternativeServiceMap& alternative_service_map() const override;
-  scoped_ptr<base::Value> GetAlternativeServiceInfoAsValue() const override;
+  std::unique_ptr<base::Value> GetAlternativeServiceInfoAsValue()
+      const override;
   const SettingsMap& GetSpdySettings(
       const HostPortPair& host_port_pair) override;
   bool SetSpdySetting(const HostPortPair& host_port_pair,
@@ -297,9 +298,9 @@
   base::WeakPtr<HttpServerPropertiesManager> pref_weak_ptr_;
 
   // Used to post cache update tasks.
-  scoped_ptr<base::OneShotTimer> pref_cache_update_timer_;
+  std::unique_ptr<base::OneShotTimer> pref_cache_update_timer_;
 
-  scoped_ptr<PrefDelegate> pref_delegate_;
+  std::unique_ptr<PrefDelegate> pref_delegate_;
   bool setting_prefs_;
 
   // --------------
@@ -309,16 +310,16 @@
   const scoped_refptr<base::SequencedTaskRunner> network_task_runner_;
 
   // Used to post |prefs::kHttpServerProperties| pref update tasks.
-  scoped_ptr<base::OneShotTimer> network_prefs_update_timer_;
+  std::unique_ptr<base::OneShotTimer> network_prefs_update_timer_;
 
-  scoped_ptr<HttpServerPropertiesImpl> http_server_properties_impl_;
+  std::unique_ptr<HttpServerPropertiesImpl> http_server_properties_impl_;
 
   // Used to get |weak_ptr_| to self on the pref thread.
-  scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> >
+  std::unique_ptr<base::WeakPtrFactory<HttpServerPropertiesManager>>
       pref_weak_ptr_factory_;
 
   // Used to get |weak_ptr_| to self on the network thread.
-  scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> >
+  std::unique_ptr<base::WeakPtrFactory<HttpServerPropertiesManager>>
       network_weak_ptr_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager);
diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc
index bf83ff78..16df3f3c 100644
--- a/net/http/http_server_properties_manager_unittest.cc
+++ b/net/http/http_server_properties_manager_unittest.cc
@@ -213,7 +213,8 @@
   }
 
   MockPrefDelegate* pref_delegate_;  // Owned by HttpServerPropertiesManager.
-  scoped_ptr<TestingHttpServerPropertiesManager> http_server_props_manager_;
+  std::unique_ptr<TestingHttpServerPropertiesManager>
+      http_server_props_manager_;
   base::Time one_day_from_now_;
 
  private:
@@ -1112,7 +1113,7 @@
 }
 
 TEST_P(HttpServerPropertiesManagerTest, AddToAlternativeServiceMap) {
-  scoped_ptr<base::Value> server_value = base::JSONReader::Read(
+  std::unique_ptr<base::Value> server_value = base::JSONReader::Read(
       "{\"alternative_service\":[{\"port\":443,\"protocol_str\":\"npn-h2\"},"
       "{\"port\":123,\"protocol_str\":\"quic\","
       "\"expiration\":\"9223372036854775807\"},{\"host\":\"example.org\","
@@ -1227,7 +1228,8 @@
 
 // Test that expired alternative service entries on disk are ignored.
 TEST_P(HttpServerPropertiesManagerTest, DoNotLoadExpiredAlternativeService) {
-  scoped_ptr<base::ListValue> alternative_service_list(new base::ListValue);
+  std::unique_ptr<base::ListValue> alternative_service_list(
+      new base::ListValue);
   base::DictionaryValue* expired_dict = new base::DictionaryValue;
   expired_dict->SetString("protocol_str", "npn-h2");
   expired_dict->SetString("host", "expired.example.com");
diff --git a/net/http/http_stream.h b/net/http/http_stream.h
index 096dd46..8aeec06 100644
--- a/net/http/http_stream.h
+++ b/net/http/http_stream.h
@@ -13,10 +13,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_error_details.h"
 #include "net/base/net_errors.h"
diff --git a/net/http/http_stream_factory.cc b/net/http/http_stream_factory.cc
index 6ea3224..0f2cf40 100644
--- a/net/http/http_stream_factory.cc
+++ b/net/http/http_stream_factory.cc
@@ -11,6 +11,7 @@
 #include "base/time/time.h"
 #include "net/base/host_mapping_rules.h"
 #include "net/base/host_port_pair.h"
+#include "net/base/parse_number.h"
 #include "net/base/port_util.h"
 #include "net/http/http_network_session.h"
 #include "net/http/http_response_headers.h"
@@ -168,7 +169,8 @@
       break;
     }
 
-    if (!base::StringToInt(port_protocol_vector[0], &port) ||
+    if (!ParseInt32(port_protocol_vector[0], ParseIntFormat::NON_NEGATIVE,
+                    &port) ||
         port == 0 || !IsPortValid(port)) {
       DVLOG(1) << kAlternateProtocolHeader
                << " header has unrecognizable port: "
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 8da356f..80afa94 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -66,7 +66,7 @@
   ssl_socket->GetSSLInfo(&ssl_info);
   if (!ssl_info.channel_id_sent)
     return;
-  scoped_ptr<crypto::ECPrivateKey> request_key;
+  std::unique_ptr<crypto::ECPrivateKey> request_key;
   ChannelIDService::Request request;
   int result = channel_id_service->GetOrCreateChannelID(
       host, &request_key, base::Bind(&DoNothingAsyncCallback), &request);
@@ -114,14 +114,14 @@
 }  // namespace
 
 // Returns parameters associated with the start of a HTTP stream job.
-scoped_ptr<base::Value> NetLogHttpStreamJobCallback(
+std::unique_ptr<base::Value> NetLogHttpStreamJobCallback(
     const NetLog::Source& source,
     const GURL* original_url,
     const GURL* url,
     const AlternativeService* alternative_service,
     RequestPriority priority,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   if (source.IsValid())
     source.AddToEventParameters(dict.get());
   dict->SetString("original_url", original_url->GetOrigin().spec());
@@ -132,21 +132,21 @@
 }
 
 // Returns parameters associated with the delay of the HTTP stream job.
-scoped_ptr<base::Value> NetLogHttpStreamJobDelayCallback(
+std::unique_ptr<base::Value> NetLogHttpStreamJobDelayCallback(
     base::TimeDelta delay,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("resume_after_ms", static_cast<int>(delay.InMilliseconds()));
   return std::move(dict);
 }
 
 // Returns parameters associated with the Proto (with NPN negotiation) of a HTTP
 // stream.
-scoped_ptr<base::Value> NetLogHttpStreamProtoCallback(
+std::unique_ptr<base::Value> NetLogHttpStreamProtoCallback(
     const SSLClientSocket::NextProtoStatus status,
     const std::string* proto,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("next_proto_status",
                   SSLClientSocket::NextProtoStatusToString(status));
@@ -1749,12 +1749,13 @@
 }
 
 int HttpStreamFactoryImpl::Job::ValidSpdySessionPool::
-    CreateAvailableSessionFromSocket(const SpdySessionKey& key,
-                                     scoped_ptr<ClientSocketHandle> connection,
-                                     const BoundNetLog& net_log,
-                                     int certificate_error_code,
-                                     bool is_secure,
-                                     base::WeakPtr<SpdySession>* spdy_session) {
+    CreateAvailableSessionFromSocket(
+        const SpdySessionKey& key,
+        std::unique_ptr<ClientSocketHandle> connection,
+        const BoundNetLog& net_log,
+        int certificate_error_code,
+        bool is_secure,
+        base::WeakPtr<SpdySession>* spdy_session) {
   TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("net"),
                "HttpStreamFactoryImpl::Job::CreateAvailableSessionFromSocket");
   *spdy_session = spdy_session_pool_->CreateAvailableSessionFromSocket(
diff --git a/net/http/http_stream_factory_impl_job.h b/net/http/http_stream_factory_impl_job.h
index 17519741..84a0508 100644
--- a/net/http/http_stream_factory_impl_job.h
+++ b/net/http/http_stream_factory_impl_job.h
@@ -5,9 +5,10 @@
 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_
 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "net/base/completion_callback.h"
@@ -185,7 +186,7 @@
     // |spdy_session| should not be used.
     int CreateAvailableSessionFromSocket(
         const SpdySessionKey& key,
-        scoped_ptr<ClientSocketHandle> connection,
+        std::unique_ptr<ClientSocketHandle> connection,
         const BoundNetLog& net_log,
         int certificate_error_code,
         bool is_secure,
@@ -327,7 +328,7 @@
   const BoundNetLog net_log_;
 
   CompletionCallback io_callback_;
-  scoped_ptr<ClientSocketHandle> connection_;
+  std::unique_ptr<ClientSocketHandle> connection_;
   HttpNetworkSession* const session_;
   HttpStreamFactoryImpl* const stream_factory_;
   State next_state_;
@@ -385,9 +386,9 @@
   // read from the socket until the tunnel is done.
   bool establishing_tunnel_;
 
-  scoped_ptr<HttpStream> stream_;
-  scoped_ptr<WebSocketHandshakeStreamBase> websocket_stream_;
-  scoped_ptr<BidirectionalStreamImpl> bidirectional_stream_impl_;
+  std::unique_ptr<HttpStream> stream_;
+  std::unique_ptr<WebSocketHandshakeStreamBase> websocket_stream_;
+  std::unique_ptr<BidirectionalStreamImpl> bidirectional_stream_impl_;
 
   // True if we negotiated NPN.
   bool was_npn_negotiated_;
@@ -399,7 +400,7 @@
   // preconnect.
   int num_streams_;
 
-  scoped_ptr<ValidSpdySessionPool> valid_spdy_session_pool_;
+  std::unique_ptr<ValidSpdySessionPool> valid_spdy_session_pool_;
 
   // Initialized when we create a new SpdySession.
   base::WeakPtr<SpdySession> new_spdy_session_;
diff --git a/net/http/http_stream_factory_impl_request.cc b/net/http/http_stream_factory_impl_request.cc
index 7c5cbc9..923e9e0e 100644
--- a/net/http/http_stream_factory_impl_request.cc
+++ b/net/http/http_stream_factory_impl_request.cc
@@ -271,8 +271,8 @@
 // request which spawned it).
 void HttpStreamFactoryImpl::Request::OnNewSpdySessionReady(
     Job* job,
-    scoped_ptr<HttpStream> stream,
-    scoped_ptr<BidirectionalStreamImpl> bidirectional_stream_impl,
+    std::unique_ptr<HttpStream> stream,
+    std::unique_ptr<BidirectionalStreamImpl> bidirectional_stream_impl,
     const base::WeakPtr<SpdySession>& spdy_session,
     bool direct) {
   DCHECK(job);
diff --git a/net/http/http_stream_factory_impl_request.h b/net/http/http_stream_factory_impl_request.h
index a84615fc..d6371563 100644
--- a/net/http/http_stream_factory_impl_request.h
+++ b/net/http/http_stream_factory_impl_request.h
@@ -5,10 +5,10 @@
 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_
 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_
 
+#include <memory>
 #include <set>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/http/http_stream_factory_impl.h"
 #include "net/log/net_log.h"
 #include "net/socket/connection_attempts.h"
@@ -67,8 +67,8 @@
   // HttpStreamRequest::BIDIRECTIONAL_STREAM.
   void OnNewSpdySessionReady(
       Job* job,
-      scoped_ptr<HttpStream> stream,
-      scoped_ptr<BidirectionalStreamImpl> bidirectional_stream_spdy_impl,
+      std::unique_ptr<HttpStream> stream,
+      std::unique_ptr<BidirectionalStreamImpl> bidirectional_stream_spdy_impl,
       const base::WeakPtr<SpdySession>& spdy_session,
       bool direct);
 
@@ -152,9 +152,9 @@
   const BoundNetLog net_log_;
 
   // At the point where Job is irrevocably tied to the Request, we set this.
-  scoped_ptr<Job> bound_job_;
+  std::unique_ptr<Job> bound_job_;
   std::set<HttpStreamFactoryImpl::Job*> jobs_;
-  scoped_ptr<const SpdySessionKey> spdy_session_key_;
+  std::unique_ptr<const SpdySessionKey> spdy_session_key_;
 
   bool completed_;
   bool was_npn_negotiated_;
diff --git a/net/http/http_stream_factory_impl_request_unittest.cc b/net/http/http_stream_factory_impl_request_unittest.cc
index 6a08a00..06c9445 100644
--- a/net/http/http_stream_factory_impl_request_unittest.cc
+++ b/net/http/http_stream_factory_impl_request_unittest.cc
@@ -4,7 +4,8 @@
 
 #include "net/http/http_stream_factory_impl_request.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/http/http_stream_factory_impl_job.h"
 #include "net/proxy/proxy_info.h"
 #include "net/proxy/proxy_service.h"
@@ -70,7 +71,7 @@
   SpdySessionDependencies session_deps(GetParam(),
                                        ProxyService::CreateDirect());
 
-  scoped_ptr<HttpNetworkSession> session =
+  std::unique_ptr<HttpNetworkSession> session =
       SpdySessionDependencies::SpdyCreateSession(&session_deps);
   HttpStreamFactoryImpl* factory =
       static_cast<HttpStreamFactoryImpl*>(session->http_stream_factory());
@@ -105,7 +106,7 @@
   SpdySessionDependencies session_deps(GetParam(),
                                        ProxyService::CreateDirect());
 
-  scoped_ptr<HttpNetworkSession> session =
+  std::unique_ptr<HttpNetworkSession> session =
       SpdySessionDependencies::SpdyCreateSession(&session_deps);
 
   StaticSocketDataProvider socket_data;
diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc
index 847a995f..e4f060c 100644
--- a/net/http/http_stream_factory_impl_unittest.cc
+++ b/net/http/http_stream_factory_impl_unittest.cc
@@ -121,8 +121,8 @@
   UploadProgress GetUploadProgress() const override { return UploadProgress(); }
   HttpStream* RenewStreamForAuth() override { return nullptr; }
 
-  scoped_ptr<WebSocketStream> Upgrade() override {
-    return scoped_ptr<WebSocketStream>();
+  std::unique_ptr<WebSocketStream> Upgrade() override {
+    return std::unique_ptr<WebSocketStream>();
   }
 
  private:
@@ -262,9 +262,9 @@
  private:
   bool waiting_for_stream_;
   bool stream_done_;
-  scoped_ptr<HttpStream> stream_;
-  scoped_ptr<WebSocketHandshakeStreamBase> websocket_stream_;
-  scoped_ptr<BidirectionalStreamImpl> bidirectional_stream_impl_;
+  std::unique_ptr<HttpStream> stream_;
+  std::unique_ptr<WebSocketHandshakeStreamBase> websocket_stream_;
+  std::unique_ptr<BidirectionalStreamImpl> bidirectional_stream_impl_;
   SSLConfig used_ssl_config_;
   ProxyInfo used_proxy_info_;
   int error_status_;
@@ -290,7 +290,7 @@
 class WebSocketBasicHandshakeStream : public MockWebSocketHandshakeStream {
  public:
   explicit WebSocketBasicHandshakeStream(
-      scoped_ptr<ClientSocketHandle> connection)
+      std::unique_ptr<ClientSocketHandle> connection)
       : MockWebSocketHandshakeStream(kStreamTypeBasic),
         connection_(std::move(connection)) {}
 
@@ -301,7 +301,7 @@
   ClientSocketHandle* connection() { return connection_.get(); }
 
  private:
-  scoped_ptr<ClientSocketHandle> connection_;
+  std::unique_ptr<ClientSocketHandle> connection_;
 };
 
 class WebSocketStreamCreateHelper
@@ -310,7 +310,7 @@
   ~WebSocketStreamCreateHelper() override {}
 
   WebSocketHandshakeStreamBase* CreateBasicStream(
-      scoped_ptr<ClientSocketHandle> connection,
+      std::unique_ptr<ClientSocketHandle> connection,
       bool using_proxy) override {
     return new WebSocketBasicHandshakeStream(std::move(connection));
   }
@@ -340,7 +340,7 @@
   HttpNetworkSessionPeer peer(session);
   MockHttpStreamFactoryImplForPreconnect* mock_factory =
       new MockHttpStreamFactoryImplForPreconnect(session);
-  peer.SetHttpStreamFactory(scoped_ptr<HttpStreamFactory>(mock_factory));
+  peer.SetHttpStreamFactory(std::unique_ptr<HttpStreamFactory>(mock_factory));
   SSLConfig ssl_config;
   session->ssl_config_service()->GetSSLConfig(&ssl_config);
 
@@ -394,7 +394,7 @@
     ADD_FAILURE();
   }
   void ReleaseSocket(const std::string& group_name,
-                     scoped_ptr<StreamSocket> socket,
+                     std::unique_ptr<StreamSocket> socket,
                      int id) override {
     ADD_FAILURE();
   }
@@ -478,7 +478,7 @@
   for (size_t i = 0; i < arraysize(kTests); ++i) {
     SpdySessionDependencies session_deps(
         GetParam(), ProxyService::CreateDirect());
-    scoped_ptr<HttpNetworkSession> session(
+    std::unique_ptr<HttpNetworkSession> session(
         SpdySessionDependencies::SpdyCreateSession(&session_deps));
     HttpNetworkSessionPeer peer(session.get());
     CapturePreconnectsTransportSocketPool* transport_conn_pool =
@@ -489,7 +489,7 @@
         new CapturePreconnectsSSLSocketPool(
             session_deps.host_resolver.get(),
             session_deps.cert_verifier.get());
-    scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
+    std::unique_ptr<MockClientSocketPoolManager> mock_pool_manager(
         new MockClientSocketPoolManager);
     mock_pool_manager->SetTransportSocketPool(transport_conn_pool);
     mock_pool_manager->SetSSLSocketPool(ssl_conn_pool);
@@ -506,7 +506,7 @@
   for (size_t i = 0; i < arraysize(kTests); ++i) {
     SpdySessionDependencies session_deps(
         GetParam(), ProxyService::CreateFixed("http_proxy"));
-    scoped_ptr<HttpNetworkSession> session(
+    std::unique_ptr<HttpNetworkSession> session(
         SpdySessionDependencies::SpdyCreateSession(&session_deps));
     HttpNetworkSessionPeer peer(session.get());
     HostPortPair proxy_host("http_proxy", 80);
@@ -518,7 +518,7 @@
         new CapturePreconnectsSSLSocketPool(
             session_deps.host_resolver.get(),
             session_deps.cert_verifier.get());
-    scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
+    std::unique_ptr<MockClientSocketPoolManager> mock_pool_manager(
         new MockClientSocketPoolManager);
     mock_pool_manager->SetSocketPoolForHTTPProxy(proxy_host, http_proxy_pool);
     mock_pool_manager->SetSocketPoolForSSLWithProxy(proxy_host, ssl_conn_pool);
@@ -535,7 +535,7 @@
   for (size_t i = 0; i < arraysize(kTests); ++i) {
     SpdySessionDependencies session_deps(
         GetParam(), ProxyService::CreateFixed("socks4://socks_proxy:1080"));
-    scoped_ptr<HttpNetworkSession> session(
+    std::unique_ptr<HttpNetworkSession> session(
         SpdySessionDependencies::SpdyCreateSession(&session_deps));
     HttpNetworkSessionPeer peer(session.get());
     HostPortPair proxy_host("socks_proxy", 1080);
@@ -547,7 +547,7 @@
         new CapturePreconnectsSSLSocketPool(
             session_deps.host_resolver.get(),
             session_deps.cert_verifier.get());
-    scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
+    std::unique_ptr<MockClientSocketPoolManager> mock_pool_manager(
         new MockClientSocketPoolManager);
     mock_pool_manager->SetSocketPoolForSOCKSProxy(proxy_host, socks_proxy_pool);
     mock_pool_manager->SetSocketPoolForSSLWithProxy(proxy_host, ssl_conn_pool);
@@ -564,7 +564,7 @@
   for (size_t i = 0; i < arraysize(kTests); ++i) {
     SpdySessionDependencies session_deps(
         GetParam(), ProxyService::CreateDirect());
-    scoped_ptr<HttpNetworkSession> session(
+    std::unique_ptr<HttpNetworkSession> session(
         SpdySessionDependencies::SpdyCreateSession(&session_deps));
     HttpNetworkSessionPeer peer(session.get());
 
@@ -582,7 +582,7 @@
         new CapturePreconnectsSSLSocketPool(
             session_deps.host_resolver.get(),
             session_deps.cert_verifier.get());
-    scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
+    std::unique_ptr<MockClientSocketPoolManager> mock_pool_manager(
         new MockClientSocketPoolManager);
     mock_pool_manager->SetTransportSocketPool(transport_conn_pool);
     mock_pool_manager->SetSSLSocketPool(ssl_conn_pool);
@@ -605,14 +605,14 @@
 
   SpdySessionDependencies session_deps(
       GetParam(), ProxyService::CreateDirect());
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
   HttpNetworkSessionPeer peer(session.get());
   CapturePreconnectsTransportSocketPool* transport_conn_pool =
       new CapturePreconnectsTransportSocketPool(
           session_deps.host_resolver.get(),
           session_deps.cert_verifier.get());
-  scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
+  std::unique_ptr<MockClientSocketPoolManager> mock_pool_manager(
       new MockClientSocketPoolManager);
   mock_pool_manager->SetTransportSocketPool(transport_conn_pool);
   peer.SetClientSocketPoolManager(std::move(mock_pool_manager));
@@ -636,7 +636,7 @@
   socket_data2.set_connect_data(MockConnect(ASYNC, OK));
   session_deps.socket_factory->AddSocketDataProvider(&socket_data2);
 
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream. It should succeed using the second proxy in the
@@ -647,10 +647,10 @@
 
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory()->RequestStream(
-          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config,
-          &waiter, BoundNetLog()));
+          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
+          BoundNetLog()));
   waiter.WaitForStream();
 
   // The proxy that failed should now be known to the proxy_service as bad.
@@ -680,7 +680,7 @@
                             ERR_SSL_PROTOCOL_ERROR,
                             ERR_MSG_TOO_BIG};
   for (size_t i = 0; i < arraysize(mock_error); ++i) {
-    scoped_ptr<ProxyService> proxy_service;
+    std::unique_ptr<ProxyService> proxy_service;
     proxy_service =
         ProxyService::CreateFixedFromPacResult("QUIC bad:99; DIRECT");
 
@@ -701,7 +701,7 @@
     params.ssl_config_service = ssl_config_service.get();
     params.http_server_properties = http_server_properties.GetWeakPtr();
 
-    scoped_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
+    std::unique_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
     session->quic_stream_factory()->set_require_confirmation(false);
 
     StaticSocketDataProvider socket_data1;
@@ -721,7 +721,7 @@
 
     SSLConfig ssl_config;
     StreamRequestWaiter waiter;
-    scoped_ptr<HttpStreamRequest> request(
+    std::unique_ptr<HttpStreamRequest> request(
         session->http_stream_factory()->RequestStream(
             request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
             BoundNetLog()));
@@ -770,7 +770,7 @@
 
   ~MockQuicData() { STLDeleteElements(&packets_); }
 
-  void AddRead(scoped_ptr<QuicEncryptedPacket> packet) {
+  void AddRead(std::unique_ptr<QuicEncryptedPacket> packet) {
     reads_.push_back(
         MockRead(ASYNC, packet->data(), packet->length(), packet_number_++));
     packets_.push_back(packet.release());
@@ -780,7 +780,7 @@
     reads_.push_back(MockRead(mode, rv, packet_number_++));
   }
 
-  void AddWrite(scoped_ptr<QuicEncryptedPacket> packet) {
+  void AddWrite(std::unique_ptr<QuicEncryptedPacket> packet) {
     writes_.push_back(MockWrite(SYNCHRONOUS, packet->data(), packet->length(),
                                 packet_number_++));
     packets_.push_back(packet.release());
@@ -799,14 +799,14 @@
   std::vector<MockWrite> writes_;
   std::vector<MockRead> reads_;
   size_t packet_number_;
-  scoped_ptr<SequencedSocketData> socket_data_;
+  std::unique_ptr<SequencedSocketData> socket_data_;
 };
 
 }  // namespace
 
 TEST_P(HttpStreamFactoryTest, QuicLossyProxyMarkedAsBad) {
   // Checks if a
-  scoped_ptr<ProxyService> proxy_service;
+  std::unique_ptr<ProxyService> proxy_service;
   proxy_service = ProxyService::CreateFixedFromPacResult("QUIC bad:99; DIRECT");
 
   HttpNetworkSession::Params params;
@@ -827,7 +827,7 @@
   params.http_server_properties = http_server_properties.GetWeakPtr();
   params.quic_max_number_of_lossy_connections = 2;
 
-  scoped_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
+  std::unique_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
   session->quic_stream_factory()->set_require_confirmation(false);
 
   session->quic_stream_factory()->number_of_lossy_connections_[99] =
@@ -847,7 +847,7 @@
 
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory()->RequestStream(
           request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
           BoundNetLog()));
@@ -889,7 +889,7 @@
     params.quic_disable_preconnect_if_0rtt = true;
     params.http_server_properties = http_server_properties.GetWeakPtr();
 
-    scoped_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
+    std::unique_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
     HttpNetworkSessionPeer peer(session.get());
     HostPortPair proxy_host("http_proxy", 80);
     CapturePreconnectsHttpProxySocketPool* http_proxy_pool =
@@ -898,7 +898,7 @@
     CapturePreconnectsSSLSocketPool* ssl_conn_pool =
         new CapturePreconnectsSSLSocketPool(session_deps.host_resolver.get(),
                                             session_deps.cert_verifier.get());
-    scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
+    std::unique_ptr<MockClientSocketPoolManager> mock_pool_manager(
         new MockClientSocketPoolManager);
     mock_pool_manager->SetSocketPoolForHTTPProxy(proxy_host, http_proxy_pool);
     mock_pool_manager->SetSocketPoolForSSLWithProxy(proxy_host, ssl_conn_pool);
@@ -932,7 +932,7 @@
     params.quic_disable_preconnect_if_0rtt = true;
     params.http_server_properties = http_server_properties.GetWeakPtr();
 
-    scoped_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
+    std::unique_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
 
     // Setup 0RTT for QUIC.
     QuicStreamFactory* factory = session->quic_stream_factory();
@@ -944,7 +944,7 @@
     CapturePreconnectsTransportSocketPool* transport_conn_pool =
         new CapturePreconnectsTransportSocketPool(
             session_deps.host_resolver.get(), session_deps.cert_verifier.get());
-    scoped_ptr<MockClientSocketPoolManager> mock_pool_manager(
+    std::unique_ptr<MockClientSocketPoolManager> mock_pool_manager(
         new MockClientSocketPoolManager);
     mock_pool_manager->SetTransportSocketPool(transport_conn_pool);
     peer.SetClientSocketPoolManager(std::move(mock_pool_manager));
@@ -975,7 +975,7 @@
   SSLSocketDataProvider ssl(ASYNC, OK);
   session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Set an existing SpdySession in the pool.
@@ -991,10 +991,10 @@
 
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory()->RequestStream(
-          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config,
-          &waiter, BoundNetLog()));
+          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
+          BoundNetLog()));
   waiter.WaitForStream();
 
   // The stream shouldn't come from spdy as we are using different privacy mode
@@ -1009,7 +1009,8 @@
 // Return count of distinct groups in given socket pool.
 int GetSocketPoolGroupCount(ClientSocketPool* pool) {
   int count = 0;
-  scoped_ptr<base::DictionaryValue> dict(pool->GetInfoAsValue("", "", false));
+  std::unique_ptr<base::DictionaryValue> dict(
+      pool->GetInfoAsValue("", "", false));
   EXPECT_TRUE(dict != nullptr);
   base::DictionaryValue* groups = nullptr;
   if (dict->GetDictionary("groups", &groups) && (groups != nullptr)) {
@@ -1020,7 +1021,7 @@
 
 // Return count of distinct spdy sessions.
 int GetSpdySessionCount(HttpNetworkSession* session) {
-  scoped_ptr<base::Value> value(
+  std::unique_ptr<base::Value> value(
       session->spdy_session_pool()->SpdySessionPoolInfoToValue());
   base::ListValue* session_list;
   if (!value || !value->GetAsList(&session_list))
@@ -1041,7 +1042,7 @@
   SSLSocketDataProvider ssl(ASYNC, OK);
   session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
 
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
   SSLClientSocketPool* ssl_pool = session->GetSSLSocketPool(
       HttpNetworkSession::NORMAL_SOCKET_POOL);
@@ -1057,27 +1058,27 @@
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
 
-  scoped_ptr<HttpStreamRequest> request1(
+  std::unique_ptr<HttpStreamRequest> request1(
       session->http_stream_factory()->RequestStream(
-          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config,
-          &waiter, BoundNetLog()));
+          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
+          BoundNetLog()));
   waiter.WaitForStream();
 
   EXPECT_EQ(GetSocketPoolGroupCount(ssl_pool), 1);
 
-  scoped_ptr<HttpStreamRequest> request2(
+  std::unique_ptr<HttpStreamRequest> request2(
       session->http_stream_factory()->RequestStream(
-          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config,
-          &waiter, BoundNetLog()));
+          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
+          BoundNetLog()));
   waiter.WaitForStream();
 
   EXPECT_EQ(GetSocketPoolGroupCount(ssl_pool), 1);
 
   request_info.privacy_mode = PRIVACY_MODE_ENABLED;
-  scoped_ptr<HttpStreamRequest> request3(
+  std::unique_ptr<HttpStreamRequest> request3(
       session->http_stream_factory()->RequestStream(
-          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config,
-          &waiter, BoundNetLog()));
+          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
+          BoundNetLog()));
   waiter.WaitForStream();
 
   EXPECT_EQ(GetSocketPoolGroupCount(ssl_pool), 2);
@@ -1091,7 +1092,7 @@
   socket_data.set_connect_data(MockConnect(ASYNC, OK));
   session_deps.socket_factory->AddSocketDataProvider(&socket_data);
 
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   HttpRequestInfo request_info;
@@ -1100,10 +1101,10 @@
 
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory()->RequestStream(
-          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config,
-          &waiter, BoundNetLog()));
+          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
+          BoundNetLog()));
 
   EXPECT_EQ(LOAD_STATE_RESOLVING_HOST, request->GetLoadState());
 
@@ -1118,7 +1119,7 @@
   socket_data.set_connect_data(MockConnect(ASYNC, OK));
   session_deps.socket_factory->AddSocketDataProvider(&socket_data);
 
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream.  It should succeed using the second proxy in the
@@ -1130,13 +1131,9 @@
 
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory()->RequestStream(
-          request_info,
-          DEFAULT_PRIORITY,
-          ssl_config,
-          ssl_config,
-          &waiter,
+          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
           BoundNetLog()));
   waiter.WaitForStream();
   EXPECT_TRUE(waiter.stream_done());
@@ -1168,7 +1165,7 @@
   SSLSocketDataProvider ssl_socket_data(ASYNC, OK);
   session_deps.socket_factory->AddSSLSocketDataProvider(&ssl_socket_data);
 
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream.
@@ -1179,13 +1176,9 @@
 
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory()->RequestStream(
-          request_info,
-          DEFAULT_PRIORITY,
-          ssl_config,
-          ssl_config,
-          &waiter,
+          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
           BoundNetLog()));
   waiter.WaitForStream();
   EXPECT_TRUE(waiter.stream_done());
@@ -1213,7 +1206,7 @@
   socket_data.set_connect_data(MockConnect(ASYNC, OK));
   session_deps.socket_factory->AddSocketDataProvider(&socket_data);
 
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream.  It should succeed using the second proxy in the
@@ -1225,13 +1218,9 @@
 
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory()->RequestStream(
-          request_info,
-          DEFAULT_PRIORITY,
-          ssl_config,
-          ssl_config,
-          &waiter,
+          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
           BoundNetLog()));
   waiter.WaitForStream();
   EXPECT_TRUE(waiter.stream_done());
@@ -1266,7 +1255,7 @@
   socket_data.set_connect_data(MockConnect(ASYNC, OK));
   session_deps.socket_factory->AddSocketDataProvider(&socket_data);
 
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream.
@@ -1278,15 +1267,11 @@
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
   WebSocketStreamCreateHelper create_helper;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory_for_websocket()
-          ->RequestWebSocketHandshakeStream(request_info,
-                                            DEFAULT_PRIORITY,
-                                            ssl_config,
-                                            ssl_config,
-                                            &waiter,
-                                            &create_helper,
-                                            BoundNetLog()));
+          ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
+                                            ssl_config, ssl_config, &waiter,
+                                            &create_helper, BoundNetLog()));
   waiter.WaitForStream();
   EXPECT_TRUE(waiter.stream_done());
   EXPECT_TRUE(nullptr == waiter.stream());
@@ -1314,7 +1299,7 @@
   SSLSocketDataProvider ssl_socket_data(ASYNC, OK);
   session_deps.socket_factory->AddSSLSocketDataProvider(&ssl_socket_data);
 
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream.
@@ -1326,15 +1311,11 @@
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
   WebSocketStreamCreateHelper create_helper;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory_for_websocket()
-          ->RequestWebSocketHandshakeStream(request_info,
-                                            DEFAULT_PRIORITY,
-                                            ssl_config,
-                                            ssl_config,
-                                            &waiter,
-                                            &create_helper,
-                                            BoundNetLog()));
+          ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
+                                            ssl_config, ssl_config, &waiter,
+                                            &create_helper, BoundNetLog()));
   waiter.WaitForStream();
   EXPECT_TRUE(waiter.stream_done());
   EXPECT_TRUE(nullptr == waiter.stream());
@@ -1359,7 +1340,7 @@
   socket_data.set_connect_data(MockConnect(ASYNC, OK));
   session_deps.socket_factory->AddSocketDataProvider(&socket_data);
 
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream.
@@ -1371,15 +1352,11 @@
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
   WebSocketStreamCreateHelper create_helper;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory_for_websocket()
-          ->RequestWebSocketHandshakeStream(request_info,
-                                            DEFAULT_PRIORITY,
-                                            ssl_config,
-                                            ssl_config,
-                                            &waiter,
-                                            &create_helper,
-                                            BoundNetLog()));
+          ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
+                                            ssl_config, ssl_config, &waiter,
+                                            &create_helper, BoundNetLog()));
   waiter.WaitForStream();
   EXPECT_TRUE(waiter.stream_done());
   EXPECT_TRUE(nullptr == waiter.stream());
@@ -1420,7 +1397,7 @@
   session_deps.socket_factory->AddSSLSocketDataProvider(&ssl_socket_data);
 
   HostPortPair host_port_pair("www.google.com", 443);
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream.
@@ -1431,13 +1408,9 @@
 
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory()->RequestStream(
-          request_info,
-          DEFAULT_PRIORITY,
-          ssl_config,
-          ssl_config,
-          &waiter,
+          request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
           BoundNetLog()));
   waiter.WaitForStream();
   EXPECT_TRUE(waiter.stream_done());
@@ -1471,7 +1444,7 @@
   session_deps.socket_factory->AddSSLSocketDataProvider(&ssl_socket_data);
 
   HostPortPair host_port_pair("www.google.com", 443);
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream.
@@ -1482,7 +1455,7 @@
 
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory()->RequestBidirectionalStreamImpl(
           request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
           BoundNetLog()));
@@ -1572,14 +1545,14 @@
   MockClock* clock_;  // Owned by QuicStreamFactory
   test::QuicTestPacketMaker packet_maker_;
   MockClientSocketFactory socket_factory_;
-  scoped_ptr<HttpNetworkSession> session_;
+  std::unique_ptr<HttpNetworkSession> session_;
   test::MockRandom random_generator_;
   ProofVerifyDetailsChromium verify_details_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
   HttpServerPropertiesImpl http_server_properties_;
   TransportSecurityState transport_security_state_;
   MockHostResolver host_resolver_;
-  scoped_ptr<ProxyService> proxy_service_;
+  std::unique_ptr<ProxyService> proxy_service_;
   scoped_refptr<SSLConfigServiceDefaults> ssl_config_service_;
   HttpNetworkSession::Params params_;
 };
@@ -1610,7 +1583,7 @@
   mock_quic_data.AddSocketDataToFactory(&socket_factory());
 
   // Add hanging data for http job.
-  scoped_ptr<StaticSocketDataProvider> hanging_data;
+  std::unique_ptr<StaticSocketDataProvider> hanging_data;
   hanging_data.reset(new StaticSocketDataProvider());
   MockConnect hanging_connect(SYNCHRONOUS, ERR_IO_PENDING);
   hanging_data->set_connect_data(hanging_connect);
@@ -1630,7 +1603,7 @@
   request_info.load_flags = 0;
 
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session()->http_stream_factory()->RequestBidirectionalStreamImpl(
           request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
           BoundNetLog()));
@@ -1674,7 +1647,7 @@
   GURL url = GURL("https://www.example.org");
 
   // Make the http job fail.
-  scoped_ptr<StaticSocketDataProvider> http_job_data;
+  std::unique_ptr<StaticSocketDataProvider> http_job_data;
   http_job_data.reset(new StaticSocketDataProvider());
   MockConnect failed_connect(ASYNC, ERR_CONNECTION_REFUSED);
   http_job_data->set_connect_data(failed_connect);
@@ -1695,7 +1668,7 @@
   request_info.load_flags = 0;
 
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session()->http_stream_factory()->RequestBidirectionalStreamImpl(
           request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
           BoundNetLog()));
@@ -1735,7 +1708,7 @@
   mock_quic_data.AddSocketDataToFactory(&socket_factory());
 
   // Make the http job fail.
-  scoped_ptr<StaticSocketDataProvider> http_job_data;
+  std::unique_ptr<StaticSocketDataProvider> http_job_data;
   http_job_data.reset(new StaticSocketDataProvider());
   MockConnect failed_connect(ASYNC, ERR_CONNECTION_REFUSED);
   http_job_data->set_connect_data(failed_connect);
@@ -1755,7 +1728,7 @@
   request_info.load_flags = 0;
 
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session()->http_stream_factory()->RequestBidirectionalStreamImpl(
           request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
           BoundNetLog()));
@@ -1810,7 +1783,7 @@
   session_deps.socket_factory->AddSSLSocketDataProvider(&ssl_socket_data);
 
   HostPortPair host_port_pair("www.google.com", 443);
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream.
@@ -1821,7 +1794,7 @@
 
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory()->RequestBidirectionalStreamImpl(
           request_info, DEFAULT_PRIORITY, ssl_config, ssl_config, &waiter,
           BoundNetLog()));
@@ -1860,7 +1833,7 @@
   session_deps.socket_factory->AddSSLSocketDataProvider(&ssl_socket_data);
 
   HostPortPair host_port_pair("www.google.com", 80);
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream.
@@ -1872,15 +1845,11 @@
   SSLConfig ssl_config;
   StreamRequestWaiter waiter1;
   WebSocketStreamCreateHelper create_helper;
-  scoped_ptr<HttpStreamRequest> request1(
+  std::unique_ptr<HttpStreamRequest> request1(
       session->http_stream_factory_for_websocket()
-          ->RequestWebSocketHandshakeStream(request_info,
-                                            DEFAULT_PRIORITY,
-                                            ssl_config,
-                                            ssl_config,
-                                            &waiter1,
-                                            &create_helper,
-                                            BoundNetLog()));
+          ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
+                                            ssl_config, ssl_config, &waiter1,
+                                            &create_helper, BoundNetLog()));
   waiter1.WaitForStream();
   EXPECT_TRUE(waiter1.stream_done());
   ASSERT_TRUE(nullptr != waiter1.websocket_stream());
@@ -1912,7 +1881,7 @@
   session_deps.socket_factory->AddSSLSocketDataProvider(&ssl_socket_data);
 
   HostPortPair host_port_pair("www.google.com", 80);
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream.
@@ -1924,15 +1893,11 @@
   SSLConfig ssl_config;
   StreamRequestWaiter waiter1;
   WebSocketStreamCreateHelper create_helper;
-  scoped_ptr<HttpStreamRequest> request1(
+  std::unique_ptr<HttpStreamRequest> request1(
       session->http_stream_factory_for_websocket()
-          ->RequestWebSocketHandshakeStream(request_info,
-                                            DEFAULT_PRIORITY,
-                                            ssl_config,
-                                            ssl_config,
-                                            &waiter1,
-                                            &create_helper,
-                                            BoundNetLog()));
+          ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
+                                            ssl_config, ssl_config, &waiter1,
+                                            &create_helper, BoundNetLog()));
   waiter1.WaitForStream();
   EXPECT_TRUE(waiter1.stream_done());
   ASSERT_TRUE(nullptr != waiter1.websocket_stream());
@@ -1941,15 +1906,11 @@
   EXPECT_TRUE(nullptr == waiter1.stream());
 
   StreamRequestWaiter waiter2;
-  scoped_ptr<HttpStreamRequest> request2(
+  std::unique_ptr<HttpStreamRequest> request2(
       session->http_stream_factory_for_websocket()
-          ->RequestWebSocketHandshakeStream(request_info,
-                                            DEFAULT_PRIORITY,
-                                            ssl_config,
-                                            ssl_config,
-                                            &waiter2,
-                                            &create_helper,
-                                            BoundNetLog()));
+          ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
+                                            ssl_config, ssl_config, &waiter2,
+                                            &create_helper, BoundNetLog()));
   waiter2.WaitForStream();
   EXPECT_TRUE(waiter2.stream_done());
   ASSERT_TRUE(nullptr != waiter2.websocket_stream());
@@ -1995,7 +1956,7 @@
   ssl_socket_data.SetNextProto(GetParam());
   session_deps.socket_factory->AddSSLSocketDataProvider(&ssl_socket_data);
 
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(&session_deps));
 
   // Now request a stream.
@@ -2012,15 +1973,11 @@
   SSLConfig ssl_config;
   StreamRequestWaiter waiter;
   WebSocketStreamCreateHelper create_helper;
-  scoped_ptr<HttpStreamRequest> request(
+  std::unique_ptr<HttpStreamRequest> request(
       session->http_stream_factory_for_websocket()
-          ->RequestWebSocketHandshakeStream(request_info,
-                                            DEFAULT_PRIORITY,
-                                            ssl_config,
-                                            ssl_config,
-                                            &waiter,
-                                            &create_helper,
-                                            BoundNetLog()));
+          ->RequestWebSocketHandshakeStream(request_info, DEFAULT_PRIORITY,
+                                            ssl_config, ssl_config, &waiter,
+                                            &create_helper, BoundNetLog()));
   waiter.WaitForStream();
   EXPECT_TRUE(waiter.stream_done());
   EXPECT_TRUE(nullptr == waiter.stream());
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 1c33557..dd7fabd 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -81,12 +81,12 @@
   return false;
 }
 
-scoped_ptr<base::Value> NetLogSendRequestBodyCallback(
+std::unique_ptr<base::Value> NetLogSendRequestBodyCallback(
     uint64_t length,
     bool is_chunked,
     bool did_merge,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("length", static_cast<int>(length));
   dict->SetBoolean("is_chunked", is_chunked);
   dict->SetBoolean("did_merge", did_merge);
diff --git a/net/http/http_stream_parser.h b/net/http/http_stream_parser.h
index b8bb23a..bdd796b 100644
--- a/net/http/http_stream_parser.h
+++ b/net/http/http_stream_parser.h
@@ -8,11 +8,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string_piece.h"
 #include "crypto/ec_private_key.h"
@@ -238,7 +238,7 @@
   int64_t response_body_read_;
 
   // Helper if the data is chunked.
-  scoped_ptr<HttpChunkedDecoder> chunked_decoder_;
+  std::unique_ptr<HttpChunkedDecoder> chunked_decoder_;
 
   // Where the caller wants the body data.
   scoped_refptr<IOBuffer> user_read_buf_;
diff --git a/net/http/http_stream_parser_fuzzer.cc b/net/http/http_stream_parser_fuzzer.cc
index 19cd9af..52343ac3 100644
--- a/net/http/http_stream_parser_fuzzer.cc
+++ b/net/http/http_stream_parser_fuzzer.cc
@@ -8,16 +8,14 @@
 #include <stdint.h>
 
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
-#include "base/numerics/safe_conversions.h"
-#include "net/base/address_list.h"
 #include "net/base/io_buffer.h"
 #include "net/base/net_errors.h"
 #include "net/base/test_completion_callback.h"
@@ -27,87 +25,24 @@
 #include "net/log/net_log.h"
 #include "net/log/test_net_log.h"
 #include "net/socket/client_socket_handle.h"
-#include "net/socket/socket_test_util.h"
+#include "net/socket/fuzzed_socket.h"
 #include "url/gurl.h"
 
 // Fuzzer for HttpStreamParser.
 //
-// |data| is the data received over a mock HTTP connection through one or more
-// reads, along with metadata about the size of each read, and whether or not
-// the read completely synchronously.
+// |data| is used to create a FuzzedSocket.
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   // Needed for thread checks and waits.
   base::MessageLoopForIO message_loop;
 
-  net::MockWrite writes[] = {
-      net::MockWrite(net::ASYNC, 0, "GET / HTTP/1.1\r\n\r\n"),
-  };
-
-  // Break the buffer into a sequence of variable sized sync and async
-  // reads.  Use the last bytes of |data| exclusively for determining
-  // the size and type of each read.
-  std::vector<net::MockRead> reads;
-  // Sequence number for socket operations.
-  int last_sequence_number = 0;
-
-  // IoMode for the final read, where the server closes the mock socket.
-  net::IoMode close_socket_io_mode = net::ASYNC;
-
-  // Break |data| up into reads.  The test may or may not make to the final
-  // read, where the server closes the socket.
-
-  // Each read needs a one byte seed to determine read size and whether it
-  // should be sync or async, so if there's only one byte left unused, can't use
-  // it here.  The bytes used to get this metadata are not used as over-the-wire
-  // bytes.
-  while (size > 0) {
-    size_t read_seed = data[size - 1];
-    size--;
-    net::IoMode io_mode = net::ASYNC;
-    // Low order bit determines IoMode.
-    if (read_seed & 0x1)
-      io_mode = net::SYNCHRONOUS;
-
-    // Use second bit to determine if the last read, when the socket is closed,
-    // is synchronous.  The second bit only matters the last time this loop is
-    // runs.
-    if (read_seed & 0x2) {
-      close_socket_io_mode = net::SYNCHRONOUS;
-    } else {
-      close_socket_io_mode = net::ASYNC;
-    }
-
-    // If there are no more bytes in |data|, next read is the connection close.
-    if (size == 0)
-      break;
-
-    read_seed >>= 2;
-
-    // Last 6 bits determine how many bytes are returned by the read.
-    int read_size = static_cast<int>(std::min(1 + read_seed, size));
-    reads.push_back(net::MockRead(io_mode, reinterpret_cast<const char*>(data),
-                                  read_size, ++last_sequence_number));
-
-    data += read_size;
-    size -= read_size;
-  }
-
-  // Server closes the socket.
-  reads.push_back(net::MockRead(close_socket_io_mode,
-                                net::ERR_CONNECTION_CLOSED,
-                                ++last_sequence_number));
-  net::SequencedSocketData socket_data(reads.data(), reads.size(), writes,
-                                       arraysize(writes));
-  socket_data.set_connect_data(net::MockConnect(net::SYNCHRONOUS, net::OK));
-
-  scoped_ptr<net::MockTCPClientSocket> socket(
-      new net::MockTCPClientSocket(net::AddressList(), nullptr, &socket_data));
-
   net::TestCompletionCallback callback;
-  CHECK_EQ(net::OK, socket->Connect(callback.callback()));
+  net::BoundTestNetLog bound_test_net_log;
+  std::unique_ptr<net::FuzzedSocket> fuzzed_socket(
+      new net::FuzzedSocket(data, size, bound_test_net_log.bound()));
+  CHECK_EQ(net::OK, fuzzed_socket->Connect(callback.callback()));
 
   net::ClientSocketHandle socket_handle;
-  socket_handle.SetSocket(std::move(socket));
+  socket_handle.SetSocket(std::move(fuzzed_socket));
 
   net::HttpRequestInfo request_info;
   request_info.method = "GET";
@@ -116,25 +51,21 @@
   scoped_refptr<net::GrowableIOBuffer> read_buffer(new net::GrowableIOBuffer());
   // Use a NetLog that listens to events, to get coverage of logging
   // callbacks.
-  net::BoundTestNetLog net_log;
   net::HttpStreamParser parser(&socket_handle, &request_info, read_buffer.get(),
-                               net_log.bound());
+                               bound_test_net_log.bound());
 
   net::HttpResponseInfo response_info;
   int result =
       parser.SendRequest("GET / HTTP/1.1\r\n", net::HttpRequestHeaders(),
                          &response_info, callback.callback());
-  CHECK_EQ(net::OK, callback.GetResult(result));
+  result = callback.GetResult(result);
+  if (net::OK != result)
+    return 0;
 
   result = parser.ReadResponseHeaders(callback.callback());
   result = callback.GetResult(result);
 
-  if (result < 0)
-    return 0;
-
-  while (true) {
-    // 64 exactly matches the maximum amount of data returned by a single
-    // MockRead, as created above.
+  while (result > 0) {
     scoped_refptr<net::IOBufferWithSize> io_buffer(
         new net::IOBufferWithSize(64));
     result = parser.ReadResponseBody(io_buffer.get(), io_buffer->size(),
@@ -144,8 +75,7 @@
     // use-after-free.
     io_buffer = nullptr;
 
-    if (callback.GetResult(result) <= 0)
-      break;
+    result = callback.GetResult(result);
   }
 
   return 0;
diff --git a/net/http/http_stream_parser_unittest.cc b/net/http/http_stream_parser_unittest.cc
index 1fa10c9..2f0b870 100644
--- a/net/http/http_stream_parser_unittest.cc
+++ b/net/http/http_stream_parser_unittest.cc
@@ -5,7 +5,9 @@
 #include "net/http/http_stream_parser.h"
 
 #include <stdint.h>
+
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
@@ -13,8 +15,8 @@
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/string_piece.h"
 #include "base/strings/stringprintf.h"
@@ -46,17 +48,17 @@
 
 // Helper method to create a connected ClientSocketHandle using |data|.
 // Modifies |data|.
-scoped_ptr<ClientSocketHandle> CreateConnectedSocketHandle(
+std::unique_ptr<ClientSocketHandle> CreateConnectedSocketHandle(
     SequencedSocketData* data) {
   data->set_connect_data(MockConnect(SYNCHRONOUS, OK));
 
-  scoped_ptr<MockTCPClientSocket> socket(
+  std::unique_ptr<MockTCPClientSocket> socket(
       new MockTCPClientSocket(net::AddressList(), nullptr, data));
 
   TestCompletionCallback callback;
   EXPECT_EQ(OK, socket->Connect(callback.callback()));
 
-  scoped_ptr<ClientSocketHandle> socket_handle(new ClientSocketHandle);
+  std::unique_ptr<ClientSocketHandle> socket_handle(new ClientSocketHandle);
   socket_handle->SetSocket(std::move(socket));
   return socket_handle;
 }
@@ -126,8 +128,8 @@
 }
 
 TEST(HttpStreamParser, ShouldMergeRequestHeadersAndBody_EmptyBody) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
-  scoped_ptr<UploadDataStream> body(make_scoped_ptr(
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
+  std::unique_ptr<UploadDataStream> body(base::WrapUnique(
       new ElementsUploadDataStream(std::move(element_readers), 0)));
   ASSERT_EQ(OK, body->Init(CompletionCallback()));
   // Shouldn't be merged if upload data is empty.
@@ -137,7 +139,7 @@
 
 TEST(HttpStreamParser, ShouldMergeRequestHeadersAndBody_ChunkedBody) {
   const std::string payload = "123";
-  scoped_ptr<ChunkedUploadDataStream> body(new ChunkedUploadDataStream(0));
+  std::unique_ptr<ChunkedUploadDataStream> body(new ChunkedUploadDataStream(0));
   body->AppendData(payload.data(), payload.size(), true);
   ASSERT_EQ(OK, body->Init(TestCompletionCallback().callback()));
   // Shouldn't be merged if upload data carries chunked data.
@@ -153,13 +155,13 @@
   ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir.path(), &temp_file_path));
 
   {
-    std::vector<scoped_ptr<UploadElementReader>> element_readers;
+    std::vector<std::unique_ptr<UploadElementReader>> element_readers;
 
-    element_readers.push_back(make_scoped_ptr(
+    element_readers.push_back(base::WrapUnique(
         new UploadFileElementReader(base::ThreadTaskRunnerHandle::Get().get(),
                                     temp_file_path, 0, 0, base::Time())));
 
-    scoped_ptr<UploadDataStream> body(
+    std::unique_ptr<UploadDataStream> body(
         new ElementsUploadDataStream(std::move(element_readers), 0));
     TestCompletionCallback callback;
     ASSERT_EQ(ERR_IO_PENDING, body->Init(callback.callback()));
@@ -174,12 +176,12 @@
 }
 
 TEST(HttpStreamParser, ShouldMergeRequestHeadersAndBody_SmallBodyInMemory) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   const std::string payload = "123";
-  element_readers.push_back(make_scoped_ptr(
+  element_readers.push_back(base::WrapUnique(
       new UploadBytesElementReader(payload.data(), payload.size())));
 
-  scoped_ptr<UploadDataStream> body(
+  std::unique_ptr<UploadDataStream> body(
       new ElementsUploadDataStream(std::move(element_readers), 0));
   ASSERT_EQ(OK, body->Init(CompletionCallback()));
   // Yes, should be merged if the in-memory body is small here.
@@ -188,12 +190,12 @@
 }
 
 TEST(HttpStreamParser, ShouldMergeRequestHeadersAndBody_LargeBodyInMemory) {
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   const std::string payload(10000, 'a');  // 'a' x 10000.
-  element_readers.push_back(make_scoped_ptr(
+  element_readers.push_back(base::WrapUnique(
       new UploadBytesElementReader(payload.data(), payload.size())));
 
-  scoped_ptr<UploadDataStream> body(
+  std::unique_ptr<UploadDataStream> body(
       new ElementsUploadDataStream(std::move(element_readers), 0));
   ASSERT_EQ(OK, body->Init(CompletionCallback()));
   // Shouldn't be merged if the in-memory body is large here.
@@ -207,7 +209,7 @@
   };
 
   SequencedSocketData data(nullptr, 0, writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
   HttpRequestInfo request;
@@ -235,7 +237,7 @@
   };
 
   SequencedSocketData data(nullptr, 0, writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
   HttpRequestInfo request;
@@ -266,7 +268,7 @@
   };
 
   SequencedSocketData data(nullptr, 0, writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
   HttpRequestInfo request;
@@ -298,7 +300,7 @@
   };
 
   SequencedSocketData data(nullptr, 0, writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
   HttpRequestInfo request;
@@ -330,12 +332,12 @@
   };
 
   SequencedSocketData data(nullptr, 0, writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      make_scoped_ptr(new UploadBytesElementReader("hello world!", 12)));
+      base::WrapUnique(new UploadBytesElementReader("hello world!", 12)));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
   ASSERT_EQ(OK, upload_data_stream.Init(TestCompletionCallback().callback()));
 
@@ -370,7 +372,7 @@
   };
 
   SequencedSocketData data(nullptr, 0, writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
   ChunkedUploadDataStream upload_data_stream(0);
@@ -433,7 +435,7 @@
   ASSERT_EQ(OK, upload_stream.Init(TestCompletionCallback().callback()));
 
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
   HttpRequestInfo request_info;
@@ -510,7 +512,7 @@
   upload_stream.AppendData(kChunk, arraysize(kChunk) - 1, true);
 
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
   HttpRequestInfo request_info;
@@ -587,7 +589,7 @@
   ASSERT_EQ(OK, upload_stream.Init(TestCompletionCallback().callback()));
 
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
   HttpRequestInfo request_info;
@@ -668,7 +670,7 @@
   ASSERT_EQ(OK, upload_stream.Init(TestCompletionCallback().callback()));
 
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
   HttpRequestInfo request_info;
@@ -740,7 +742,7 @@
   upload_stream.AppendData(nullptr, 0, true);
 
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
   HttpRequestInfo request_info;
@@ -837,7 +839,7 @@
     for (size_t i = 0; i < arraysize(reads); i++) {
       SCOPED_TRACE(i);
       SequencedSocketData data(reads[i], 2, writes, arraysize(writes));
-      scoped_ptr<ClientSocketHandle> socket_handle(
+      std::unique_ptr<ClientSocketHandle> socket_handle(
           CreateConnectedSocketHandle(&data));
 
       HttpRequestInfo request_info;
@@ -898,7 +900,7 @@
   };
 
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
   HttpRequestInfo request_info;
@@ -1002,9 +1004,9 @@
   scoped_refptr<GrowableIOBuffer> read_buffer_;
   std::vector<MockRead> reads_;
   std::vector<MockWrite> writes_;
-  scoped_ptr<ClientSocketHandle> socket_handle_;
-  scoped_ptr<SequencedSocketData> data_;
-  scoped_ptr<HttpStreamParser> parser_;
+  std::unique_ptr<ClientSocketHandle> socket_handle_;
+  std::unique_ptr<SequencedSocketData> data_;
+  std::unique_ptr<HttpStreamParser> parser_;
   int sequence_number_;
 };
 
@@ -1254,10 +1256,10 @@
   };
 
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
-  scoped_ptr<ClientSocketHandle> socket_handle =
+  std::unique_ptr<ClientSocketHandle> socket_handle =
       CreateConnectedSocketHandle(&data);
 
-  scoped_ptr<HttpRequestInfo> request_info(new HttpRequestInfo());
+  std::unique_ptr<HttpRequestInfo> request_info(new HttpRequestInfo());
   request_info->method = "GET";
   request_info->url = GURL("http://somewhere/foo.html");
 
@@ -1265,8 +1267,8 @@
   HttpStreamParser parser(socket_handle.get(), request_info.get(),
                           read_buffer.get(), BoundNetLog());
 
-  scoped_ptr<HttpRequestHeaders> request_headers(new HttpRequestHeaders());
-  scoped_ptr<HttpResponseInfo> response_info(new HttpResponseInfo());
+  std::unique_ptr<HttpRequestHeaders> request_headers(new HttpRequestHeaders());
+  std::unique_ptr<HttpResponseInfo> response_info(new HttpResponseInfo());
   TestCompletionCallback callback;
   ASSERT_EQ(OK, parser.SendRequest("GET /foo.html HTTP/1.1\r\n",
             *request_headers, response_info.get(), callback.callback()));
diff --git a/net/http/http_transaction_factory.h b/net/http/http_transaction_factory.h
index 673a6f9..d787c69 100644
--- a/net/http/http_transaction_factory.h
+++ b/net/http/http_transaction_factory.h
@@ -5,7 +5,8 @@
 #ifndef NET_HTTP_HTTP_TRANSACTION_FACTORY_H_
 #define NET_HTTP_HTTP_TRANSACTION_FACTORY_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/base/net_export.h"
 #include "net/base/request_priority.h"
 
@@ -23,7 +24,7 @@
   // Creates a HttpTransaction object. On success, saves the new
   // transaction to |*trans| and returns OK.
   virtual int CreateTransaction(RequestPriority priority,
-                                scoped_ptr<HttpTransaction>* trans) = 0;
+                                std::unique_ptr<HttpTransaction>* trans) = 0;
 
   // Returns the associated cache if any (may be NULL).
   virtual HttpCache* GetCache() = 0;
diff --git a/net/http/http_transaction_test_util.cc b/net/http/http_transaction_test_util.cc
index 2bbe2e9..6a482bf8 100644
--- a/net/http/http_transaction_test_util.cc
+++ b/net/http/http_transaction_test_util.cc
@@ -519,11 +519,12 @@
   stop_caching_called_ = true;
 }
 
-int MockNetworkLayer::CreateTransaction(RequestPriority priority,
-                                        scoped_ptr<HttpTransaction>* trans) {
+int MockNetworkLayer::CreateTransaction(
+    RequestPriority priority,
+    std::unique_ptr<HttpTransaction>* trans) {
   transaction_count_++;
   last_create_transaction_priority_ = priority;
-  scoped_ptr<MockNetworkTransaction> mock_transaction(
+  std::unique_ptr<MockNetworkTransaction> mock_transaction(
       new MockNetworkTransaction(priority, this));
   last_transaction_ = mock_transaction->AsWeakPtr();
   *trans = std::move(mock_transaction);
diff --git a/net/http/http_transaction_test_util.h b/net/http/http_transaction_test_util.h
index 3a9532e..4d78f4d 100644
--- a/net/http/http_transaction_test_util.h
+++ b/net/http/http_transaction_test_util.h
@@ -152,7 +152,7 @@
   void OnIOComplete(int result);
 
   State state_;
-  scoped_ptr<HttpTransaction> trans_;
+  std::unique_ptr<HttpTransaction> trans_;
   std::string content_;
   scoped_refptr<IOBuffer> read_buf_;
   int error_;
@@ -312,7 +312,7 @@
 
   // HttpTransactionFactory:
   int CreateTransaction(RequestPriority priority,
-                        scoped_ptr<HttpTransaction>* trans) override;
+                        std::unique_ptr<HttpTransaction>* trans) override;
   HttpCache* GetCache() override;
   HttpNetworkSession* GetSession() override;
 
diff --git a/net/http/mock_http_cache.cc b/net/http/mock_http_cache.cc
index 533177a..6d97c5b 100644
--- a/net/http/mock_http_cache.cc
+++ b/net/http/mock_http_cache.cc
@@ -9,6 +9,7 @@
 
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "net/base/completion_callback.h"
@@ -493,8 +494,8 @@
   }
 };
 
-scoped_ptr<disk_cache::Backend::Iterator> MockDiskCache::CreateIterator() {
-  return scoped_ptr<Iterator>(new NotImplementedIterator());
+std::unique_ptr<disk_cache::Backend::Iterator> MockDiskCache::CreateIterator() {
+  return std::unique_ptr<Iterator>(new NotImplementedIterator());
 }
 
 void MockDiskCache::GetStats(base::StringPairs* stats) {
@@ -518,9 +519,10 @@
 
 //-----------------------------------------------------------------------------
 
-int MockBackendFactory::CreateBackend(NetLog* net_log,
-                                      scoped_ptr<disk_cache::Backend>* backend,
-                                      const CompletionCallback& callback) {
+int MockBackendFactory::CreateBackend(
+    NetLog* net_log,
+    std::unique_ptr<disk_cache::Backend>* backend,
+    const CompletionCallback& callback) {
   backend->reset(new MockDiskCache());
   return OK;
 }
@@ -528,11 +530,11 @@
 //-----------------------------------------------------------------------------
 
 MockHttpCache::MockHttpCache()
-    : MockHttpCache(make_scoped_ptr(new MockBackendFactory())) {}
+    : MockHttpCache(base::WrapUnique(new MockBackendFactory())) {}
 
 MockHttpCache::MockHttpCache(
-    scoped_ptr<HttpCache::BackendFactory> disk_cache_factory)
-    : http_cache_(make_scoped_ptr(new MockNetworkLayer()),
+    std::unique_ptr<HttpCache::BackendFactory> disk_cache_factory)
+    : http_cache_(base::WrapUnique(new MockNetworkLayer()),
                   std::move(disk_cache_factory),
                   true) {}
 
@@ -548,7 +550,7 @@
   return static_cast<MockDiskCache*>(backend());
 }
 
-int MockHttpCache::CreateTransaction(scoped_ptr<HttpTransaction>* trans) {
+int MockHttpCache::CreateTransaction(std::unique_ptr<HttpTransaction>* trans) {
   return http_cache_.CreateTransaction(DEFAULT_PRIORITY, trans);
 }
 
@@ -633,7 +635,7 @@
 
 int MockBackendNoCbFactory::CreateBackend(
     NetLog* net_log,
-    scoped_ptr<disk_cache::Backend>* backend,
+    std::unique_ptr<disk_cache::Backend>* backend,
     const CompletionCallback& callback) {
   backend->reset(new MockDiskCacheNoCB());
   return OK;
@@ -652,7 +654,7 @@
 
 int MockBlockingBackendFactory::CreateBackend(
     NetLog* net_log,
-    scoped_ptr<disk_cache::Backend>* backend,
+    std::unique_ptr<disk_cache::Backend>* backend,
     const CompletionCallback& callback) {
   if (!block_) {
     if (!fail_)
diff --git a/net/http/mock_http_cache.h b/net/http/mock_http_cache.h
index 86b8e51..185c829 100644
--- a/net/http/mock_http_cache.h
+++ b/net/http/mock_http_cache.h
@@ -130,7 +130,7 @@
   int DoomEntriesSince(base::Time initial_time,
                        const CompletionCallback& callback) override;
   int CalculateSizeOfAllEntries(const CompletionCallback& callback) override;
-  scoped_ptr<Iterator> CreateIterator() override;
+  std::unique_ptr<Iterator> CreateIterator() override;
   void GetStats(base::StringPairs* stats) override;
   void OnExternalCacheHit(const std::string& key) override;
 
@@ -172,7 +172,7 @@
 class MockBackendFactory : public HttpCache::BackendFactory {
  public:
   int CreateBackend(NetLog* net_log,
-                    scoped_ptr<disk_cache::Backend>* backend,
+                    std::unique_ptr<disk_cache::Backend>* backend,
                     const CompletionCallback& callback) override;
 };
 
@@ -180,7 +180,7 @@
  public:
   MockHttpCache();
   explicit MockHttpCache(
-      scoped_ptr<HttpCache::BackendFactory> disk_cache_factory);
+      std::unique_ptr<HttpCache::BackendFactory> disk_cache_factory);
 
   HttpCache* http_cache() { return &http_cache_; }
 
@@ -191,7 +191,7 @@
   MockDiskCache* disk_cache();
 
   // Wrapper around http_cache()->CreateTransaction(DEFAULT_PRIORITY...)
-  int CreateTransaction(scoped_ptr<HttpTransaction>* trans);
+  int CreateTransaction(std::unique_ptr<HttpTransaction>* trans);
 
   // Wrapper to bypass the cache lock for new transactions.
   void BypassCacheLock();
@@ -239,7 +239,7 @@
 class MockBackendNoCbFactory : public HttpCache::BackendFactory {
  public:
   int CreateBackend(NetLog* net_log,
-                    scoped_ptr<disk_cache::Backend>* backend,
+                    std::unique_ptr<disk_cache::Backend>* backend,
                     const CompletionCallback& callback) override;
 };
 
@@ -250,14 +250,14 @@
   ~MockBlockingBackendFactory() override;
 
   int CreateBackend(NetLog* net_log,
-                    scoped_ptr<disk_cache::Backend>* backend,
+                    std::unique_ptr<disk_cache::Backend>* backend,
                     const CompletionCallback& callback) override;
 
   // Completes the backend creation. Any blocked call will be notified via the
   // provided callback.
   void FinishCreation();
 
-  scoped_ptr<disk_cache::Backend>* backend() { return backend_; }
+  std::unique_ptr<disk_cache::Backend>* backend() { return backend_; }
   void set_fail(bool fail) { fail_ = fail; }
 
   const CompletionCallback& callback() { return callback_; }
@@ -265,7 +265,7 @@
  private:
   int Result() { return fail_ ? ERR_FAILED : OK; }
 
-  scoped_ptr<disk_cache::Backend>* backend_;
+  std::unique_ptr<disk_cache::Backend>* backend_;
   CompletionCallback callback_;
   bool block_;
   bool fail_;
diff --git a/net/http/proxy_connect_redirect_http_stream.h b/net/http/proxy_connect_redirect_http_stream.h
index 36e595c..7368e1d 100644
--- a/net/http/proxy_connect_redirect_http_stream.h
+++ b/net/http/proxy_connect_redirect_http_stream.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/load_timing_info.h"
 #include "net/http/http_stream.h"
 
diff --git a/net/http/transport_security_persister.cc b/net/http/transport_security_persister.cc
index de5d831..17f50ca8 100644
--- a/net/http/transport_security_persister.cc
+++ b/net/http/transport_security_persister.cc
@@ -4,6 +4,7 @@
 
 #include "net/http/transport_security_persister.h"
 
+#include <memory>
 #include <utility>
 
 #include "base/base64.h"
@@ -13,7 +14,6 @@
 #include "base/json/json_reader.h"
 #include "base/json/json_writer.h"
 #include "base/location.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/sequenced_task_runner.h"
 #include "base/task_runner_util.h"
 #include "base/thread_task_runner_handle.h"
@@ -146,7 +146,8 @@
         sts_iterator.domain_state();
 
     const std::string key = HashedDomainToExternalString(hostname);
-    scoped_ptr<base::DictionaryValue> serialized(new base::DictionaryValue);
+    std::unique_ptr<base::DictionaryValue> serialized(
+        new base::DictionaryValue);
     PopulateEntryWithDefaults(serialized.get());
 
     serialized->SetBoolean(kStsIncludeSubdomains, sts_state.include_subdomains);
@@ -180,7 +181,7 @@
     const std::string key = HashedDomainToExternalString(hostname);
     base::DictionaryValue* serialized = nullptr;
     if (!toplevel.GetDictionary(key, &serialized)) {
-      scoped_ptr<base::DictionaryValue> serialized_scoped(
+      std::unique_ptr<base::DictionaryValue> serialized_scoped(
           new base::DictionaryValue);
       serialized = serialized_scoped.get();
       PopulateEntryWithDefaults(serialized);
@@ -222,7 +223,7 @@
 bool TransportSecurityPersister::Deserialize(const std::string& serialized,
                                              bool* dirty,
                                              TransportSecurityState* state) {
-  scoped_ptr<base::Value> value = base::JSONReader::Read(serialized);
+  std::unique_ptr<base::Value> value = base::JSONReader::Read(serialized);
   base::DictionaryValue* dict_value = NULL;
   if (!value.get() || !value->GetAsDictionary(&dict_value))
     return false;
diff --git a/net/http/transport_security_persister_unittest.cc b/net/http/transport_security_persister_unittest.cc
index dd5ae5c..5809c92 100644
--- a/net/http/transport_security_persister_unittest.cc
+++ b/net/http/transport_security_persister_unittest.cc
@@ -5,13 +5,13 @@
 #include "net/http/transport_security_persister.h"
 
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "net/http/transport_security_state.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -41,7 +41,7 @@
  protected:
   base::ScopedTempDir temp_dir_;
   TransportSecurityState state_;
-  scoped_ptr<TransportSecurityPersister> persister_;
+  std::unique_ptr<TransportSecurityPersister> persister_;
 };
 
 TEST_F(TransportSecurityPersisterTest, SerializeData1) {
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
index 1a91f8a2..a4b7d30 100644
--- a/net/http/transport_security_state.cc
+++ b/net/http/transport_security_state.cc
@@ -5,13 +5,14 @@
 #include "net/http/transport_security_state.h"
 
 #include <algorithm>
+#include <memory>
 #include <utility>
 
 #include "base/base64.h"
 #include "base/build_time.h"
 #include "base/json/json_writer.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/sparse_histogram.h"
 #include "base/sha1.h"
@@ -54,16 +55,16 @@
       exploded.millisecond);
 }
 
-scoped_ptr<base::ListValue> GetPEMEncodedChainAsList(
+std::unique_ptr<base::ListValue> GetPEMEncodedChainAsList(
     const net::X509Certificate* cert_chain) {
   if (!cert_chain)
-    return make_scoped_ptr(new base::ListValue());
+    return base::WrapUnique(new base::ListValue());
 
-  scoped_ptr<base::ListValue> result(new base::ListValue());
+  std::unique_ptr<base::ListValue> result(new base::ListValue());
   std::vector<std::string> pem_encoded_chain;
   cert_chain->GetPEMEncodedChain(&pem_encoded_chain);
   for (const std::string& cert : pem_encoded_chain)
-    result->Append(make_scoped_ptr(new base::StringValue(cert)));
+    result->Append(base::WrapUnique(new base::StringValue(cert)));
 
   return result;
 }
@@ -99,16 +100,16 @@
   report.SetBoolean("include-subdomains", pkp_state.include_subdomains);
   report.SetString("noted-hostname", pkp_state.domain);
 
-  scoped_ptr<base::ListValue> served_certificate_chain_list =
+  std::unique_ptr<base::ListValue> served_certificate_chain_list =
       GetPEMEncodedChainAsList(served_certificate_chain);
-  scoped_ptr<base::ListValue> validated_certificate_chain_list =
+  std::unique_ptr<base::ListValue> validated_certificate_chain_list =
       GetPEMEncodedChainAsList(validated_certificate_chain);
   report.Set("served-certificate-chain",
              std::move(served_certificate_chain_list));
   report.Set("validated-certificate-chain",
              std::move(validated_certificate_chain_list));
 
-  scoped_ptr<base::ListValue> known_pin_list(new base::ListValue());
+  std::unique_ptr<base::ListValue> known_pin_list(new base::ListValue());
   for (const auto& hash_value : pkp_state.spki_hashes) {
     std::string known_pin;
 
@@ -129,7 +130,7 @@
     known_pin += "\"" + base64_value + "\"";
 
     known_pin_list->Append(
-        scoped_ptr<base::Value>(new base::StringValue(known_pin)));
+        std::unique_ptr<base::Value>(new base::StringValue(known_pin)));
   }
 
   report.Set("known-pins", std::move(known_pin_list));
diff --git a/net/http/transport_security_state_unittest.cc b/net/http/transport_security_state_unittest.cc
index 20726e41..3eac0303 100644
--- a/net/http/transport_security_state_unittest.cc
+++ b/net/http/transport_security_state_unittest.cc
@@ -183,7 +183,7 @@
     const scoped_refptr<X509Certificate>& served_certificate_chain,
     const scoped_refptr<X509Certificate>& validated_certificate_chain,
     const HashValueVector& known_pins) {
-  scoped_ptr<base::Value> value(base::JSONReader::Read(report));
+  std::unique_ptr<base::Value> value(base::JSONReader::Read(report));
   ASSERT_TRUE(value);
   ASSERT_TRUE(value->IsType(base::Value::TYPE_DICTIONARY));
 
diff --git a/net/http/url_security_manager.cc b/net/http/url_security_manager.cc
index 8565fac5..0d992919 100644
--- a/net/http/url_security_manager.cc
+++ b/net/http/url_security_manager.cc
@@ -28,12 +28,12 @@
 }
 
 void URLSecurityManagerWhitelist::SetDefaultWhitelist(
-    scoped_ptr<HttpAuthFilter> whitelist_default) {
+    std::unique_ptr<HttpAuthFilter> whitelist_default) {
   whitelist_default_ = std::move(whitelist_default);
 }
 
 void URLSecurityManagerWhitelist::SetDelegateWhitelist(
-    scoped_ptr<HttpAuthFilter> whitelist_delegate) {
+    std::unique_ptr<HttpAuthFilter> whitelist_delegate) {
   whitelist_delegate_ = std::move(whitelist_delegate);
 }
 
diff --git a/net/http/url_security_manager.h b/net/http/url_security_manager.h
index 694e606..218cccb 100644
--- a/net/http/url_security_manager.h
+++ b/net/http/url_security_manager.h
@@ -5,8 +5,9 @@
 #ifndef NET_HTTP_URL_SECURITY_MANAGER_H_
 #define NET_HTTP_URL_SECURITY_MANAGER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 class GURL;
@@ -51,9 +52,9 @@
   virtual bool CanDelegate(const GURL& auth_origin) const = 0;
 
   virtual void SetDefaultWhitelist(
-      scoped_ptr<HttpAuthFilter> whitelist_default) = 0;
+      std::unique_ptr<HttpAuthFilter> whitelist_default) = 0;
   virtual void SetDelegateWhitelist(
-      scoped_ptr<HttpAuthFilter> whitelist_delegate) = 0;
+      std::unique_ptr<HttpAuthFilter> whitelist_delegate) = 0;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(URLSecurityManager);
@@ -68,16 +69,16 @@
   bool CanUseDefaultCredentials(const GURL& auth_origin) const override;
   bool CanDelegate(const GURL& auth_origin) const override;
   void SetDefaultWhitelist(
-      scoped_ptr<HttpAuthFilter> whitelist_default) override;
+      std::unique_ptr<HttpAuthFilter> whitelist_default) override;
   void SetDelegateWhitelist(
-      scoped_ptr<HttpAuthFilter> whitelist_delegate) override;
+      std::unique_ptr<HttpAuthFilter> whitelist_delegate) override;
 
  protected:
   bool HasDefaultWhitelist() const;
 
  private:
-  scoped_ptr<const HttpAuthFilter> whitelist_default_;
-  scoped_ptr<const HttpAuthFilter> whitelist_delegate_;
+  std::unique_ptr<const HttpAuthFilter> whitelist_default_;
+  std::unique_ptr<const HttpAuthFilter> whitelist_delegate_;
 
   DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerWhitelist);
 };
diff --git a/net/http/url_security_manager_unittest.cc b/net/http/url_security_manager_unittest.cc
index 7120f54..ac0b87c 100644
--- a/net/http/url_security_manager_unittest.cc
+++ b/net/http/url_security_manager_unittest.cc
@@ -45,11 +45,11 @@
 }  // namespace
 
 TEST(URLSecurityManager, UseDefaultCredentials) {
-  scoped_ptr<HttpAuthFilter> auth_filter(
+  std::unique_ptr<HttpAuthFilter> auth_filter(
       new HttpAuthFilterWhitelist(kTestAuthWhitelist));
   ASSERT_TRUE(auth_filter);
   // The URL security manager takes ownership of |auth_filter|.
-  scoped_ptr<URLSecurityManager> url_security_manager(
+  std::unique_ptr<URLSecurityManager> url_security_manager(
       URLSecurityManager::Create());
   url_security_manager->SetDefaultWhitelist(std::move(auth_filter));
   ASSERT_TRUE(url_security_manager.get());
@@ -65,11 +65,11 @@
 }
 
 TEST(URLSecurityManager, CanDelegate) {
-  scoped_ptr<HttpAuthFilter> auth_filter(
+  std::unique_ptr<HttpAuthFilter> auth_filter(
       new HttpAuthFilterWhitelist(kTestAuthWhitelist));
   ASSERT_TRUE(auth_filter);
   // The URL security manager takes ownership of |auth_filter|.
-  scoped_ptr<URLSecurityManager> url_security_manager(
+  std::unique_ptr<URLSecurityManager> url_security_manager(
       URLSecurityManager::Create());
   url_security_manager->SetDelegateWhitelist(std::move(auth_filter));
   ASSERT_TRUE(url_security_manager.get());
@@ -84,7 +84,7 @@
 
 TEST(URLSecurityManager, CanDelegate_NoWhitelist) {
   // Nothing can delegate in this case.
-  scoped_ptr<URLSecurityManager> url_security_manager(
+  std::unique_ptr<URLSecurityManager> url_security_manager(
       URLSecurityManager::Create());
   ASSERT_TRUE(url_security_manager.get());
 
diff --git a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc
index f4ff1e3..275d7515 100644
--- a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc
+++ b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc
@@ -231,7 +231,7 @@
   // The maximum message size is typically 4096 bytes on Windows per
   // http://support.microsoft.com/kb/321592
   DWORD result_buffer_size = 4096;
-  scoped_ptr<BYTE, base::FreeDeleter> result_buffer;
+  std::unique_ptr<BYTE, base::FreeDeleter> result_buffer;
   int retry_count = 0;
   DWORD res = NO_ERROR;
   do {
diff --git a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.h b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.h
index e3699aa..7d72537 100644
--- a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.h
+++ b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.h
@@ -7,11 +7,11 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
 #include "base/threading/non_thread_safe.h"
@@ -178,7 +178,7 @@
   CompletionCallback callback_;
 
   // Fetcher to retrieve PAC files once URL is known.
-  scoped_ptr<ProxyScriptFetcher> script_fetcher_;
+  std::unique_ptr<ProxyScriptFetcher> script_fetcher_;
 
   // Implements a timeout on the call to the Win32 DHCP API.
   base::OneShotTimer wait_timer_;
diff --git a/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc b/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc
index 5fae7a41..9cec7fe 100644
--- a/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc
+++ b/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc
@@ -162,9 +162,9 @@
   }
 
   TestCompletionCallback callback_;
-  scoped_ptr<URLRequestContext> url_request_context_;
+  std::unique_ptr<URLRequestContext> url_request_context_;
   scoped_refptr<base::SequencedWorkerPool> worker_pool_;
-  scoped_ptr<MockDhcpProxyScriptAdapterFetcher> fetcher_;
+  std::unique_ptr<MockDhcpProxyScriptAdapterFetcher> fetcher_;
   base::string16 pac_text_;
 };
 
diff --git a/net/proxy/dhcp_proxy_script_fetcher_factory.cc b/net/proxy/dhcp_proxy_script_fetcher_factory.cc
index 75c0913..f663d79 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_factory.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_factory.cc
@@ -4,6 +4,7 @@
 
 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h"
 
+#include "base/memory/ptr_util.h"
 #include "net/base/net_errors.h"
 #include "net/proxy/dhcp_proxy_script_fetcher.h"
 
@@ -18,13 +19,13 @@
   set_enabled(true);
 }
 
-scoped_ptr<DhcpProxyScriptFetcher> DhcpProxyScriptFetcherFactory::Create(
+std::unique_ptr<DhcpProxyScriptFetcher> DhcpProxyScriptFetcherFactory::Create(
     URLRequestContext* context) {
   if (!feature_enabled_) {
-    return make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher());
+    return base::WrapUnique(new DoNothingDhcpProxyScriptFetcher());
   } else {
     DCHECK(IsSupported());
-    scoped_ptr<DhcpProxyScriptFetcher> ret;
+    std::unique_ptr<DhcpProxyScriptFetcher> ret;
 #if defined(OS_WIN)
     ret.reset(new DhcpProxyScriptFetcherWin(context));
 #endif
diff --git a/net/proxy/dhcp_proxy_script_fetcher_factory.h b/net/proxy/dhcp_proxy_script_fetcher_factory.h
index 45734e3..46d3845c 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_factory.h
+++ b/net/proxy/dhcp_proxy_script_fetcher_factory.h
@@ -5,8 +5,9 @@
 #ifndef NET_PROXY_DHCP_SCRIPT_FETCHER_FACTORY_H_
 #define NET_PROXY_DHCP_SCRIPT_FETCHER_FACTORY_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/singleton.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
@@ -42,7 +43,7 @@
   // reference to |url_request_context|. Be careful not to create cycles
   // between the fetcher and the context; you can break such cycles by calling
   // Cancel().
-  scoped_ptr<DhcpProxyScriptFetcher> Create(
+  std::unique_ptr<DhcpProxyScriptFetcher> Create(
       URLRequestContext* url_request_context);
 
   // Attempts to enable/disable the DHCP WPAD feature.  Does nothing
diff --git a/net/proxy/dhcp_proxy_script_fetcher_factory_unittest.cc b/net/proxy/dhcp_proxy_script_fetcher_factory_unittest.cc
index 9eb7c67..71d67e7 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_factory_unittest.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_factory_unittest.cc
@@ -13,7 +13,7 @@
 TEST(DhcpProxyScriptFetcherFactoryTest, DoNothingWhenDisabled) {
   DhcpProxyScriptFetcherFactory factory;
   factory.set_enabled(false);
-  scoped_ptr<DhcpProxyScriptFetcher> fetcher(factory.Create(NULL));
+  std::unique_ptr<DhcpProxyScriptFetcher> fetcher(factory.Create(NULL));
   EXPECT_EQ("", fetcher->GetFetcherName());
 }
 
@@ -22,8 +22,9 @@
   DhcpProxyScriptFetcherFactory factory;
   factory.set_enabled(true);
 
-  scoped_ptr<TestURLRequestContext> context(new TestURLRequestContext());
-  scoped_ptr<DhcpProxyScriptFetcher> fetcher(factory.Create(context.get()));
+  std::unique_ptr<TestURLRequestContext> context(new TestURLRequestContext());
+  std::unique_ptr<DhcpProxyScriptFetcher> fetcher(
+      factory.Create(context.get()));
   EXPECT_EQ("win", fetcher->GetFetcherName());
 }
 #endif  // defined(OS_WIN)
diff --git a/net/proxy/dhcp_proxy_script_fetcher_win.cc b/net/proxy/dhcp_proxy_script_fetcher_win.cc
index f9463dd..8700611 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_win.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_win.cc
@@ -4,12 +4,12 @@
 
 #include "net/proxy/dhcp_proxy_script_fetcher_win.h"
 
+#include <memory>
 #include <vector>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/memory/free_deleter.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/profiler/scoped_tracker.h"
 #include "base/threading/sequenced_worker_pool.h"
 #include "net/base/net_errors.h"
@@ -176,7 +176,7 @@
   for (std::set<std::string>::const_iterator it = adapter_names.begin();
        it != adapter_names.end();
        ++it) {
-    scoped_ptr<DhcpProxyScriptAdapterFetcher> fetcher(
+    std::unique_ptr<DhcpProxyScriptAdapterFetcher> fetcher(
         ImplCreateAdapterFetcher());
     fetcher->Fetch(
         *it, base::Bind(&DhcpProxyScriptFetcherWin::OnFetcherDone,
@@ -318,7 +318,7 @@
   // The GetAdaptersAddresses MSDN page recommends using a size of 15000 to
   // avoid reallocation.
   ULONG adapters_size = 15000;
-  scoped_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> adapters;
+  std::unique_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> adapters;
   ULONG error = ERROR_SUCCESS;
   int num_tries = 0;
 
diff --git a/net/proxy/dhcp_proxy_script_fetcher_win.h b/net/proxy/dhcp_proxy_script_fetcher_win.h
index 2620fc5f..1bca063 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_win.h
+++ b/net/proxy/dhcp_proxy_script_fetcher_win.h
@@ -5,13 +5,13 @@
 #ifndef NET_PROXY_DHCP_PROXY_SCRIPT_FETCHER_WIN_H_
 #define NET_PROXY_DHCP_PROXY_SCRIPT_FETCHER_WIN_H_
 
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
@@ -144,7 +144,8 @@
   // Vector, in Windows' network adapter preference order, of
   // DhcpProxyScriptAdapterFetcher objects that are or were attempting
   // to fetch a PAC file based on DHCP configuration.
-  using FetcherVector = std::vector<scoped_ptr<DhcpProxyScriptAdapterFetcher>>;
+  using FetcherVector =
+      std::vector<std::unique_ptr<DhcpProxyScriptAdapterFetcher>>;
   FetcherVector fetchers_;
 
   // Number of fetchers we are waiting for.
diff --git a/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc b/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
index a1a2382..0f1f252 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
@@ -108,8 +108,8 @@
     base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(30));
   }
 
-  scoped_ptr<URLRequestContext> context_;
-  scoped_ptr<DhcpProxyScriptFetcherWin> fetcher_;
+  std::unique_ptr<URLRequestContext> context_;
+  std::unique_ptr<DhcpProxyScriptFetcherWin> fetcher_;
   bool finished_;
   base::string16 pac_text_;
   base::OneShotTimer timeout_;
@@ -308,7 +308,7 @@
                                    int result,
                                    base::string16 pac_script,
                                    base::TimeDelta fetch_delay) {
-    scoped_ptr<DummyDhcpProxyScriptAdapterFetcher> adapter_fetcher(
+    std::unique_ptr<DummyDhcpProxyScriptAdapterFetcher> adapter_fetcher(
         new DummyDhcpProxyScriptAdapterFetcher(url_request_context(),
                                                GetTaskRunner()));
     adapter_fetcher->Configure(
@@ -416,7 +416,7 @@
     return fetcher_.GetTaskRunner();
   }
 
-  scoped_ptr<URLRequestContext> context_;
+  std::unique_ptr<URLRequestContext> context_;
   MockDhcpProxyScriptFetcherWin fetcher_;
   bool finished_;
   int result_;
@@ -427,7 +427,7 @@
 // the ReuseFetcher test at the bottom.
 void TestNormalCaseURLConfiguredOneAdapter(FetcherClient* client) {
   TestURLRequestContext context;
-  scoped_ptr<DummyDhcpProxyScriptAdapterFetcher> adapter_fetcher(
+  std::unique_ptr<DummyDhcpProxyScriptAdapterFetcher> adapter_fetcher(
       new DummyDhcpProxyScriptAdapterFetcher(&context,
                                              client->GetTaskRunner()));
   adapter_fetcher->Configure(true, OK, L"bingo", 1);
@@ -588,7 +588,7 @@
 
 void TestImmediateCancel(FetcherClient* client) {
   TestURLRequestContext context;
-  scoped_ptr<DummyDhcpProxyScriptAdapterFetcher> adapter_fetcher(
+  std::unique_ptr<DummyDhcpProxyScriptAdapterFetcher> adapter_fetcher(
       new DummyDhcpProxyScriptAdapterFetcher(&context,
                                              client->GetTaskRunner()));
   adapter_fetcher->Configure(true, OK, L"bingo", 1);
diff --git a/net/proxy/in_process_mojo_proxy_resolver_factory.cc b/net/proxy/in_process_mojo_proxy_resolver_factory.cc
index 5e1574b..ff9dd85 100644
--- a/net/proxy/in_process_mojo_proxy_resolver_factory.cc
+++ b/net/proxy/in_process_mojo_proxy_resolver_factory.cc
@@ -27,7 +27,7 @@
 InProcessMojoProxyResolverFactory::~InProcessMojoProxyResolverFactory() =
     default;
 
-scoped_ptr<base::ScopedClosureRunner>
+std::unique_ptr<base::ScopedClosureRunner>
 InProcessMojoProxyResolverFactory::CreateResolver(
     const mojo::String& pac_script,
     mojo::InterfaceRequest<interfaces::ProxyResolver> req,
diff --git a/net/proxy/in_process_mojo_proxy_resolver_factory.h b/net/proxy/in_process_mojo_proxy_resolver_factory.h
index c6ee223..b5ccb10 100644
--- a/net/proxy/in_process_mojo_proxy_resolver_factory.h
+++ b/net/proxy/in_process_mojo_proxy_resolver_factory.h
@@ -23,7 +23,7 @@
   static InProcessMojoProxyResolverFactory* GetInstance();
 
   // Overridden from MojoProxyResolverFactory:
-  scoped_ptr<base::ScopedClosureRunner> CreateResolver(
+  std::unique_ptr<base::ScopedClosureRunner> CreateResolver(
       const mojo::String& pac_script,
       mojo::InterfaceRequest<interfaces::ProxyResolver> req,
       interfaces::ProxyResolverFactoryRequestClientPtr client) override;
diff --git a/net/proxy/mock_proxy_resolver.cc b/net/proxy/mock_proxy_resolver.cc
index 21cac00..2a77245 100644
--- a/net/proxy/mock_proxy_resolver.cc
+++ b/net/proxy/mock_proxy_resolver.cc
@@ -7,6 +7,7 @@
 #include <utility>
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 
 namespace net {
@@ -74,20 +75,19 @@
 MockAsyncProxyResolverFactory::Request::Request(
     MockAsyncProxyResolverFactory* factory,
     const scoped_refptr<ProxyResolverScriptData>& script_data,
-    scoped_ptr<ProxyResolver>* resolver,
+    std::unique_ptr<ProxyResolver>* resolver,
     const CompletionCallback& callback)
     : factory_(factory),
       script_data_(script_data),
       resolver_(resolver),
-      callback_(callback) {
-}
+      callback_(callback) {}
 
 MockAsyncProxyResolverFactory::Request::~Request() {
 }
 
 void MockAsyncProxyResolverFactory::Request::CompleteNow(
     int rv,
-    scoped_ptr<ProxyResolver> resolver) {
+    std::unique_ptr<ProxyResolver> resolver) {
   *resolver_ = std::move(resolver);
 
   // RemovePendingRequest may remove the last external reference to |this|.
@@ -101,7 +101,7 @@
     int rv,
     ProxyResolver* resolver) {
   DCHECK(resolver);
-  CompleteNow(rv, make_scoped_ptr(new ForwardingProxyResolver(resolver)));
+  CompleteNow(rv, base::WrapUnique(new ForwardingProxyResolver(resolver)));
 }
 
 void MockAsyncProxyResolverFactory::Request::FactoryDestroyed() {
@@ -132,9 +132,9 @@
 
 int MockAsyncProxyResolverFactory::CreateProxyResolver(
     const scoped_refptr<ProxyResolverScriptData>& pac_script,
-    scoped_ptr<ProxyResolver>* resolver,
+    std::unique_ptr<ProxyResolver>* resolver,
     const net::CompletionCallback& callback,
-    scoped_ptr<ProxyResolverFactory::Request>* request_handle) {
+    std::unique_ptr<ProxyResolverFactory::Request>* request_handle) {
   scoped_refptr<Request> request =
       new Request(this, pac_script, resolver, callback);
   pending_requests_.push_back(request);
diff --git a/net/proxy/mock_proxy_resolver.h b/net/proxy/mock_proxy_resolver.h
index 9ed3348..a50607b 100644
--- a/net/proxy/mock_proxy_resolver.h
+++ b/net/proxy/mock_proxy_resolver.h
@@ -5,10 +5,10 @@
 #ifndef NET_PROXY_MOCK_PROXY_RESOLVER_H_
 #define NET_PROXY_MOCK_PROXY_RESOLVER_H_
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_errors.h"
 #include "net/proxy/proxy_resolver.h"
 #include "net/proxy/proxy_resolver_factory.h"
@@ -90,9 +90,9 @@
 
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const CompletionCallback& callback,
-      scoped_ptr<ProxyResolverFactory::Request>* request) override;
+      std::unique_ptr<ProxyResolverFactory::Request>* request) override;
 
   const RequestsList& pending_requests() const { return pending_requests_; }
 
@@ -111,7 +111,7 @@
  public:
   Request(MockAsyncProxyResolverFactory* factory,
           const scoped_refptr<ProxyResolverScriptData>& script_data,
-          scoped_ptr<ProxyResolver>* resolver,
+          std::unique_ptr<ProxyResolver>* resolver,
           const CompletionCallback& callback);
 
   const scoped_refptr<ProxyResolverScriptData>& script_data() const {
@@ -124,7 +124,7 @@
   // remains in use.
   void CompleteNowWithForwarder(int rv, ProxyResolver* resolver);
 
-  void CompleteNow(int rv, scoped_ptr<ProxyResolver> resolver);
+  void CompleteNow(int rv, std::unique_ptr<ProxyResolver> resolver);
 
  private:
   friend class base::RefCounted<Request>;
@@ -137,7 +137,7 @@
 
   MockAsyncProxyResolverFactory* factory_;
   const scoped_refptr<ProxyResolverScriptData> script_data_;
-  scoped_ptr<ProxyResolver>* resolver_;
+  std::unique_ptr<ProxyResolver>* resolver_;
   CompletionCallback callback_;
 };
 
diff --git a/net/proxy/mojo_proxy_resolver_factory.h b/net/proxy/mojo_proxy_resolver_factory.h
index 98cb347..255ba09 100644
--- a/net/proxy/mojo_proxy_resolver_factory.h
+++ b/net/proxy/mojo_proxy_resolver_factory.h
@@ -5,8 +5,9 @@
 #ifndef NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_
 #define NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_
 
+#include <memory>
+
 #include "base/callback_helpers.h"
-#include "base/memory/scoped_ptr.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "net/interfaces/host_resolver_service.mojom.h"
 #include "net/interfaces/proxy_resolver_service.mojom.h"
@@ -20,7 +21,7 @@
   // |host_resolver| as the DNS resolver. The return value should be released
   // when the connection to |req| is no longer needed.
   // Note: The connection request |req| may be resolved asynchronously.
-  virtual scoped_ptr<base::ScopedClosureRunner> CreateResolver(
+  virtual std::unique_ptr<base::ScopedClosureRunner> CreateResolver(
       const mojo::String& pac_script,
       mojo::InterfaceRequest<interfaces::ProxyResolver> req,
       interfaces::ProxyResolverFactoryRequestClientPtr client) = 0;
diff --git a/net/proxy/mojo_proxy_resolver_factory_impl.cc b/net/proxy/mojo_proxy_resolver_factory_impl.cc
index 49b23ea2..65b6a48 100644
--- a/net/proxy/mojo_proxy_resolver_factory_impl.cc
+++ b/net/proxy/mojo_proxy_resolver_factory_impl.cc
@@ -8,6 +8,7 @@
 #include <utility>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "net/base/net_errors.h"
 #include "net/proxy/mojo_proxy_resolver_impl.h"
@@ -23,7 +24,7 @@
 class MojoProxyResolverHolder {
  public:
   MojoProxyResolverHolder(
-      scoped_ptr<ProxyResolverV8Tracing> proxy_resolver_impl,
+      std::unique_ptr<ProxyResolverV8Tracing> proxy_resolver_impl,
       mojo::InterfaceRequest<interfaces::ProxyResolver> request);
 
  private:
@@ -37,7 +38,7 @@
 };
 
 MojoProxyResolverHolder::MojoProxyResolverHolder(
-    scoped_ptr<ProxyResolverV8Tracing> proxy_resolver_impl,
+    std::unique_ptr<ProxyResolverV8Tracing> proxy_resolver_impl,
     mojo::InterfaceRequest<interfaces::ProxyResolver> request)
     : mojo_proxy_resolver_(std::move(proxy_resolver_impl)),
       binding_(&mojo_proxy_resolver_, std::move(request)) {
@@ -67,10 +68,10 @@
   void OnProxyResolverCreated(int error);
 
   MojoProxyResolverFactoryImpl* const parent_;
-  scoped_ptr<ProxyResolverV8Tracing> proxy_resolver_impl_;
+  std::unique_ptr<ProxyResolverV8Tracing> proxy_resolver_impl_;
   mojo::InterfaceRequest<interfaces::ProxyResolver> proxy_request_;
   ProxyResolverV8TracingFactory* factory_;
-  scoped_ptr<net::ProxyResolverFactory::Request> request_;
+  std::unique_ptr<net::ProxyResolverFactory::Request> request_;
   interfaces::ProxyResolverFactoryRequestClientPtr client_ptr_;
 
   DISALLOW_COPY_AND_ASSIGN(Job);
@@ -91,8 +92,8 @@
                  base::Unretained(this)));
   factory_->CreateProxyResolverV8Tracing(
       pac_script,
-      make_scoped_ptr(new MojoProxyResolverV8TracingBindings<
-                      interfaces::ProxyResolverFactoryRequestClient>(
+      base::WrapUnique(new MojoProxyResolverV8TracingBindings<
+                       interfaces::ProxyResolverFactoryRequestClient>(
           client_ptr_.get())),
       &proxy_resolver_impl_,
       base::Bind(&MojoProxyResolverFactoryImpl::Job::OnProxyResolverCreated,
@@ -119,7 +120,7 @@
 }
 
 MojoProxyResolverFactoryImpl::MojoProxyResolverFactoryImpl(
-    scoped_ptr<ProxyResolverV8TracingFactory> proxy_resolver_factory,
+    std::unique_ptr<ProxyResolverV8TracingFactory> proxy_resolver_factory,
     mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request)
     : proxy_resolver_impl_factory_(std::move(proxy_resolver_factory)),
       binding_(this, std::move(request)) {}
diff --git a/net/proxy/mojo_proxy_resolver_factory_impl.h b/net/proxy/mojo_proxy_resolver_factory_impl.h
index 44646e7..e305e47 100644
--- a/net/proxy/mojo_proxy_resolver_factory_impl.h
+++ b/net/proxy/mojo_proxy_resolver_factory_impl.h
@@ -22,7 +22,7 @@
   explicit MojoProxyResolverFactoryImpl(
       mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request);
   MojoProxyResolverFactoryImpl(
-      scoped_ptr<ProxyResolverV8TracingFactory> proxy_resolver_factory,
+      std::unique_ptr<ProxyResolverV8TracingFactory> proxy_resolver_factory,
       mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request);
 
   ~MojoProxyResolverFactoryImpl() override;
@@ -38,7 +38,8 @@
 
   void RemoveJob(Job* job);
 
-  const scoped_ptr<ProxyResolverV8TracingFactory> proxy_resolver_impl_factory_;
+  const std::unique_ptr<ProxyResolverV8TracingFactory>
+      proxy_resolver_impl_factory_;
   mojo::StrongBinding<interfaces::ProxyResolverFactory> binding_;
 
   std::set<Job*> jobs_;
diff --git a/net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc b/net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc
index c7fb51bc..a3c6216 100644
--- a/net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc
+++ b/net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <utility>
 
+#include "base/memory/ptr_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "net/base/test_completion_callback.h"
@@ -32,7 +33,7 @@
                       ProxyInfo* results,
                       const CompletionCallback& callback,
                       ProxyResolver::RequestHandle* request,
-                      scoped_ptr<Bindings> bindings) override {}
+                      std::unique_ptr<Bindings> bindings) override {}
 
   void CancelRequest(ProxyResolver::RequestHandle request) override {}
 
@@ -53,7 +54,7 @@
 class TestProxyResolverFactory : public ProxyResolverV8TracingFactory {
  public:
   struct PendingRequest {
-    scoped_ptr<ProxyResolverV8Tracing>* resolver;
+    std::unique_ptr<ProxyResolverV8Tracing>* resolver;
     CompletionCallback callback;
   };
 
@@ -62,10 +63,10 @@
 
   void CreateProxyResolverV8Tracing(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings,
-      scoped_ptr<ProxyResolverV8Tracing>* resolver,
+      std::unique_ptr<ProxyResolverV8Tracing::Bindings> bindings,
+      std::unique_ptr<ProxyResolverV8Tracing>* resolver,
       const CompletionCallback& callback,
-      scoped_ptr<ProxyResolverFactory::Request>* request) override {
+      std::unique_ptr<ProxyResolverFactory::Request>* request) override {
     requests_handled_++;
     waiter_->NotifyEvent(RESOLVER_CREATED);
     EXPECT_EQ(base::ASCIIToUTF16(kScriptData), pac_script->utf16());
@@ -87,7 +88,7 @@
  private:
   EventWaiter<Event>* waiter_;
   size_t requests_handled_ = 0;
-  scoped_ptr<PendingRequest> pending_request_;
+  std::unique_ptr<PendingRequest> pending_request_;
 };
 
 }  // namespace
@@ -98,7 +99,7 @@
  public:
   void SetUp() override {
     mock_factory_ = new TestProxyResolverFactory(&waiter_);
-    new MojoProxyResolverFactoryImpl(make_scoped_ptr(mock_factory_),
+    new MojoProxyResolverFactoryImpl(base::WrapUnique(mock_factory_),
                                      mojo::GetProxy(&factory_));
   }
 
@@ -119,7 +120,7 @@
                   interfaces::HostResolverRequestClientPtr client) override {}
 
  protected:
-  scoped_ptr<TestProxyResolverFactory> mock_factory_owner_;
+  std::unique_ptr<TestProxyResolverFactory> mock_factory_owner_;
   TestProxyResolverFactory* mock_factory_;
   interfaces::ProxyResolverFactoryPtr factory_;
 
diff --git a/net/proxy/mojo_proxy_resolver_impl.cc b/net/proxy/mojo_proxy_resolver_impl.cc
index bbac2e72..06afee4 100644
--- a/net/proxy/mojo_proxy_resolver_impl.cc
+++ b/net/proxy/mojo_proxy_resolver_impl.cc
@@ -7,6 +7,7 @@
 #include <utility>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "mojo/common/url_type_converters.h"
 #include "net/base/net_errors.h"
@@ -47,7 +48,7 @@
 };
 
 MojoProxyResolverImpl::MojoProxyResolverImpl(
-    scoped_ptr<ProxyResolverV8Tracing> resolver)
+    std::unique_ptr<ProxyResolverV8Tracing> resolver)
     : resolver_(std::move(resolver)) {}
 
 MojoProxyResolverImpl::~MojoProxyResolverImpl() {
@@ -89,8 +90,8 @@
   resolver_->resolver_->GetProxyForURL(
       url_, &result_, base::Bind(&Job::GetProxyDone, base::Unretained(this)),
       &request_handle_,
-      make_scoped_ptr(new MojoProxyResolverV8TracingBindings<
-                      interfaces::ProxyResolverRequestClient>(client_.get())));
+      base::WrapUnique(new MojoProxyResolverV8TracingBindings<
+                       interfaces::ProxyResolverRequestClient>(client_.get())));
   client_.set_connection_error_handler(base::Bind(
       &MojoProxyResolverImpl::Job::OnConnectionError, base::Unretained(this)));
 }
diff --git a/net/proxy/mojo_proxy_resolver_impl.h b/net/proxy/mojo_proxy_resolver_impl.h
index 7528004..3b46651 100644
--- a/net/proxy/mojo_proxy_resolver_impl.h
+++ b/net/proxy/mojo_proxy_resolver_impl.h
@@ -6,12 +6,12 @@
 #define NET_PROXY_MOJO_PROXY_RESOLVER_IMPL_H_
 
 #include <map>
+#include <memory>
 #include <queue>
 #include <set>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/interfaces/proxy_resolver_service.mojom.h"
 #include "net/proxy/proxy_resolver.h"
 
@@ -20,7 +20,8 @@
 
 class MojoProxyResolverImpl : public interfaces::ProxyResolver {
  public:
-  explicit MojoProxyResolverImpl(scoped_ptr<ProxyResolverV8Tracing> resolver);
+  explicit MojoProxyResolverImpl(
+      std::unique_ptr<ProxyResolverV8Tracing> resolver);
 
   ~MojoProxyResolverImpl() override;
 
@@ -34,7 +35,7 @@
 
   void DeleteJob(Job* job);
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver_;
+  std::unique_ptr<ProxyResolverV8Tracing> resolver_;
   std::set<Job*> resolve_jobs_;
 
   DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverImpl);
diff --git a/net/proxy/mojo_proxy_resolver_impl_unittest.cc b/net/proxy/mojo_proxy_resolver_impl_unittest.cc
index b045b27..04c4416 100644
--- a/net/proxy/mojo_proxy_resolver_impl_unittest.cc
+++ b/net/proxy/mojo_proxy_resolver_impl_unittest.cc
@@ -115,7 +115,7 @@
                       ProxyInfo* results,
                       const CompletionCallback& callback,
                       ProxyResolver::RequestHandle* request,
-                      scoped_ptr<Bindings> bindings) override;
+                      std::unique_ptr<Bindings> bindings) override;
   void CancelRequest(ProxyResolver::RequestHandle request_handle) override;
   LoadState GetLoadState(ProxyResolver::RequestHandle request) const override;
 
@@ -134,7 +134,7 @@
     ProxyInfo* results,
     const CompletionCallback& callback,
     ProxyResolver::RequestHandle* request,
-    scoped_ptr<Bindings> bindings) {
+    std::unique_ptr<Bindings> bindings) {
   pending_requests_.push_back(Request());
   auto& pending_request = pending_requests_.back();
   pending_request.url = url;
@@ -175,7 +175,7 @@
 class MojoProxyResolverImplTest : public testing::Test {
  protected:
   void SetUp() override {
-    scoped_ptr<MockProxyResolverV8Tracing> mock_resolver(
+    std::unique_ptr<MockProxyResolverV8Tracing> mock_resolver(
         new MockProxyResolverV8Tracing);
     mock_proxy_resolver_ = mock_resolver.get();
     resolver_impl_.reset(new MojoProxyResolverImpl(std::move(mock_resolver)));
@@ -184,7 +184,7 @@
 
   MockProxyResolverV8Tracing* mock_proxy_resolver_;
 
-  scoped_ptr<MojoProxyResolverImpl> resolver_impl_;
+  std::unique_ptr<MojoProxyResolverImpl> resolver_impl_;
   interfaces::ProxyResolver* resolver_;
 };
 
@@ -296,7 +296,7 @@
 
 TEST_F(MojoProxyResolverImplTest, DestroyClient) {
   interfaces::ProxyResolverRequestClientPtr client_ptr;
-  scoped_ptr<TestRequestClient> client(
+  std::unique_ptr<TestRequestClient> client(
       new TestRequestClient(mojo::GetProxy(&client_ptr)));
 
   resolver_->GetProxyForUrl("http://example.com", std::move(client_ptr));
diff --git a/net/proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc b/net/proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc
index 60058a7..47d12486 100644
--- a/net/proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc
+++ b/net/proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc
@@ -35,8 +35,9 @@
                   interfaces::HostResolverRequestClientPtr client) {}
 
  protected:
-  scoped_ptr<MojoProxyResolverV8TracingBindings<
-      MojoProxyResolverV8TracingBindingsTest>> bindings_;
+  std::unique_ptr<MojoProxyResolverV8TracingBindings<
+      MojoProxyResolverV8TracingBindingsTest>>
+      bindings_;
 
   std::vector<std::string> alerts_;
   std::vector<std::pair<int, std::string>> errors_;
diff --git a/net/proxy/multi_threaded_proxy_resolver.cc b/net/proxy/multi_threaded_proxy_resolver.cc
index 5eae4f7..6d93d0c 100644
--- a/net/proxy/multi_threaded_proxy_resolver.cc
+++ b/net/proxy/multi_threaded_proxy_resolver.cc
@@ -64,7 +64,7 @@
 
   int thread_number() const { return thread_number_; }
 
-  void set_resolver(scoped_ptr<ProxyResolver> resolver) {
+  void set_resolver(std::unique_ptr<ProxyResolver> resolver) {
     resolver_ = std::move(resolver);
   }
 
@@ -86,13 +86,13 @@
   scoped_refptr<Job> outstanding_job_;
 
   // The synchronous resolver implementation.
-  scoped_ptr<ProxyResolver> resolver_;
+  std::unique_ptr<ProxyResolver> resolver_;
 
   // The thread where |resolver_| is run on.
   // Note that declaration ordering is important here. |thread_| needs to be
   // destroyed *before* |resolver_|, in case |resolver_| is currently
   // executing on |thread_|.
-  scoped_ptr<base::Thread> thread_;
+  std::unique_ptr<base::Thread> thread_;
 };
 
 class MultiThreadedProxyResolver : public ProxyResolver,
@@ -106,7 +106,7 @@
   // will be provisioned using |resolver_factory|. All methods on these
   // ProxyResolvers will be called on the one thread.
   MultiThreadedProxyResolver(
-      scoped_ptr<ProxyResolverFactory> resolver_factory,
+      std::unique_ptr<ProxyResolverFactory> resolver_factory,
       size_t max_num_threads,
       const scoped_refptr<ProxyResolverScriptData>& script_data,
       scoped_refptr<Executor> executor);
@@ -139,7 +139,7 @@
   // Starts the next job from |pending_jobs_| if possible.
   void OnExecutorReady(Executor* executor) override;
 
-  const scoped_ptr<ProxyResolverFactory> resolver_factory_;
+  const std::unique_ptr<ProxyResolverFactory> resolver_factory_;
   const size_t max_num_threads_;
   PendingJobsQueue pending_jobs_;
   ExecutorList executors_;
@@ -244,7 +244,7 @@
 
   // Runs on the worker thread.
   void Run(scoped_refptr<base::SingleThreadTaskRunner> origin_runner) override {
-    scoped_ptr<ProxyResolverFactory::Request> request;
+    std::unique_ptr<ProxyResolverFactory::Request> request;
     int rv = factory_->CreateProxyResolver(script_data_, &resolver_,
                                            CompletionCallback(), &request);
 
@@ -269,7 +269,7 @@
 
   const scoped_refptr<ProxyResolverScriptData> script_data_;
   ProxyResolverFactory* factory_;
-  scoped_ptr<ProxyResolver> resolver_;
+  std::unique_ptr<ProxyResolver> resolver_;
 };
 
 // MultiThreadedProxyResolver::GetProxyForURLJob ------------------------------
@@ -419,7 +419,7 @@
 // MultiThreadedProxyResolver --------------------------------------------------
 
 MultiThreadedProxyResolver::MultiThreadedProxyResolver(
-    scoped_ptr<ProxyResolverFactory> resolver_factory,
+    std::unique_ptr<ProxyResolverFactory> resolver_factory,
     size_t max_num_threads,
     const scoped_refptr<ProxyResolverScriptData>& script_data,
     scoped_refptr<Executor> executor)
@@ -544,8 +544,8 @@
  public:
   Job(MultiThreadedProxyResolverFactory* factory,
       const scoped_refptr<ProxyResolverScriptData>& script_data,
-      scoped_ptr<ProxyResolver>* resolver,
-      scoped_ptr<ProxyResolverFactory> resolver_factory,
+      std::unique_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolverFactory> resolver_factory,
       size_t max_num_threads,
       const CompletionCallback& callback)
       : factory_(factory),
@@ -589,8 +589,8 @@
   }
 
   MultiThreadedProxyResolverFactory* factory_;
-  scoped_ptr<ProxyResolver>* const resolver_out_;
-  scoped_ptr<ProxyResolverFactory> resolver_factory_;
+  std::unique_ptr<ProxyResolver>* const resolver_out_;
+  std::unique_ptr<ProxyResolverFactory> resolver_factory_;
   const size_t max_num_threads_;
   scoped_refptr<ProxyResolverScriptData> script_data_;
   scoped_refptr<Executor> executor_;
@@ -613,12 +613,12 @@
 
 int MultiThreadedProxyResolverFactory::CreateProxyResolver(
     const scoped_refptr<ProxyResolverScriptData>& pac_script,
-    scoped_ptr<ProxyResolver>* resolver,
+    std::unique_ptr<ProxyResolver>* resolver,
     const CompletionCallback& callback,
-    scoped_ptr<Request>* request) {
-  scoped_ptr<Job> job(new Job(this, pac_script, resolver,
-                              CreateProxyResolverFactory(), max_num_threads_,
-                              callback));
+    std::unique_ptr<Request>* request) {
+  std::unique_ptr<Job> job(new Job(this, pac_script, resolver,
+                                   CreateProxyResolverFactory(),
+                                   max_num_threads_, callback));
   jobs_.insert(job.get());
   *request = std::move(job);
   return ERR_IO_PENDING;
diff --git a/net/proxy/multi_threaded_proxy_resolver.h b/net/proxy/multi_threaded_proxy_resolver.h
index f00249f..9ac59dc 100644
--- a/net/proxy/multi_threaded_proxy_resolver.h
+++ b/net/proxy/multi_threaded_proxy_resolver.h
@@ -7,10 +7,10 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <set>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/proxy/proxy_resolver_factory.h"
 
@@ -57,16 +57,17 @@
 
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const CompletionCallback& callback,
-      scoped_ptr<Request>* request) override;
+      std::unique_ptr<Request>* request) override;
 
  private:
   class Job;
 
   // Invoked to create a ProxyResolverFactory instance to pass to a
   // MultiThreadedProxyResolver instance.
-  virtual scoped_ptr<ProxyResolverFactory> CreateProxyResolverFactory() = 0;
+  virtual std::unique_ptr<ProxyResolverFactory>
+  CreateProxyResolverFactory() = 0;
 
   void RemoveJob(Job* job);
 
diff --git a/net/proxy/multi_threaded_proxy_resolver_unittest.cc b/net/proxy/multi_threaded_proxy_resolver_unittest.cc
index 5c29864..cfe1baf 100644
--- a/net/proxy/multi_threaded_proxy_resolver_unittest.cc
+++ b/net/proxy/multi_threaded_proxy_resolver_unittest.cc
@@ -7,6 +7,7 @@
 #include <utility>
 #include <vector>
 
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/stl_util.h"
@@ -146,9 +147,9 @@
 
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& script_data,
-      scoped_ptr<ProxyResolver>* result,
+      std::unique_ptr<ProxyResolver>* result,
       const CompletionCallback& callback,
-      scoped_ptr<Request>* request) override {
+      std::unique_ptr<Request>* request) override {
     BlockableProxyResolver* resolver = new BlockableProxyResolver;
     result->reset(resolver);
     base::AutoLock l(lock_);
@@ -178,29 +179,29 @@
  public:
   SingleShotMultiThreadedProxyResolverFactory(
       size_t max_num_threads,
-      scoped_ptr<ProxyResolverFactory> factory)
+      std::unique_ptr<ProxyResolverFactory> factory)
       : MultiThreadedProxyResolverFactory(max_num_threads, false),
         factory_(std::move(factory)) {}
 
-  scoped_ptr<ProxyResolverFactory> CreateProxyResolverFactory() override {
+  std::unique_ptr<ProxyResolverFactory> CreateProxyResolverFactory() override {
     DCHECK(factory_);
     return std::move(factory_);
   }
 
  private:
-  scoped_ptr<ProxyResolverFactory> factory_;
+  std::unique_ptr<ProxyResolverFactory> factory_;
 };
 
 class MultiThreadedProxyResolverTest : public testing::Test {
  public:
   void Init(size_t num_threads) {
-    scoped_ptr<BlockableProxyResolverFactory> factory_owner(
+    std::unique_ptr<BlockableProxyResolverFactory> factory_owner(
         new BlockableProxyResolverFactory);
     factory_ = factory_owner.get();
     resolver_factory_.reset(new SingleShotMultiThreadedProxyResolverFactory(
         num_threads, std::move(factory_owner)));
     TestCompletionCallback ready_callback;
-    scoped_ptr<ProxyResolverFactory::Request> request;
+    std::unique_ptr<ProxyResolverFactory::Request> request;
     resolver_factory_->CreateProxyResolver(
         ProxyResolverScriptData::FromUTF8("pac script bytes"), &resolver_,
         ready_callback.callback(), &request);
@@ -226,9 +227,9 @@
 
  private:
   BlockableProxyResolverFactory* factory_ = nullptr;
-  scoped_ptr<ProxyResolverFactory> factory_owner_;
-  scoped_ptr<MultiThreadedProxyResolverFactory> resolver_factory_;
-  scoped_ptr<ProxyResolver> resolver_;
+  std::unique_ptr<ProxyResolverFactory> factory_owner_;
+  std::unique_ptr<MultiThreadedProxyResolverFactory> resolver_factory_;
+  std::unique_ptr<ProxyResolver> resolver_;
 };
 
 TEST_F(MultiThreadedProxyResolverTest, SingleThread_Basic) {
@@ -681,9 +682,9 @@
   // ProxyResolverFactory override.
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& script_data,
-      scoped_ptr<ProxyResolver>* result,
+      std::unique_ptr<ProxyResolver>* result,
       const CompletionCallback& callback,
-      scoped_ptr<Request>* request) override {
+      std::unique_ptr<Request>* request) override {
     return ERR_PAC_SCRIPT_FAILED;
   }
 };
@@ -693,10 +694,10 @@
 TEST_F(MultiThreadedProxyResolverTest, ProxyResolverFactoryError) {
   const size_t kNumThreads = 1u;
   SingleShotMultiThreadedProxyResolverFactory resolver_factory(
-      kNumThreads, make_scoped_ptr(new FailingProxyResolverFactory));
+      kNumThreads, base::WrapUnique(new FailingProxyResolverFactory));
   TestCompletionCallback ready_callback;
-  scoped_ptr<ProxyResolverFactory::Request> request;
-  scoped_ptr<ProxyResolver> resolver;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolver> resolver;
   EXPECT_EQ(ERR_IO_PENDING,
             resolver_factory.CreateProxyResolver(
                 ProxyResolverScriptData::FromUTF8("pac script bytes"),
@@ -715,9 +716,9 @@
   const size_t kNumThreads = 1u;
   {
     SingleShotMultiThreadedProxyResolverFactory resolver_factory(
-        kNumThreads, make_scoped_ptr(new BlockableProxyResolverFactory));
-    scoped_ptr<ProxyResolverFactory::Request> request;
-    scoped_ptr<ProxyResolver> resolver;
+        kNumThreads, base::WrapUnique(new BlockableProxyResolverFactory));
+    std::unique_ptr<ProxyResolverFactory::Request> request;
+    std::unique_ptr<ProxyResolver> resolver;
     EXPECT_EQ(ERR_IO_PENDING,
               resolver_factory.CreateProxyResolver(
                   ProxyResolverScriptData::FromUTF8("pac script bytes"),
@@ -732,7 +733,7 @@
 }
 
 void DeleteRequest(const CompletionCallback& callback,
-                   scoped_ptr<ProxyResolverFactory::Request>* request,
+                   std::unique_ptr<ProxyResolverFactory::Request>* request,
                    int result) {
   callback.Run(result);
   request->reset();
@@ -742,9 +743,9 @@
 TEST_F(MultiThreadedProxyResolverTest, DeleteRequestInFactoryCallback) {
   const size_t kNumThreads = 1u;
   SingleShotMultiThreadedProxyResolverFactory resolver_factory(
-      kNumThreads, make_scoped_ptr(new BlockableProxyResolverFactory));
-  scoped_ptr<ProxyResolverFactory::Request> request;
-  scoped_ptr<ProxyResolver> resolver;
+      kNumThreads, base::WrapUnique(new BlockableProxyResolverFactory));
+  std::unique_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolver> resolver;
   TestCompletionCallback callback;
   EXPECT_EQ(ERR_IO_PENDING,
             resolver_factory.CreateProxyResolver(
@@ -759,11 +760,11 @@
 // Test that deleting the factory with a request in-progress works correctly.
 TEST_F(MultiThreadedProxyResolverTest, DestroyFactoryWithRequestsInProgress) {
   const size_t kNumThreads = 1u;
-  scoped_ptr<ProxyResolverFactory::Request> request;
-  scoped_ptr<ProxyResolver> resolver;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolver> resolver;
   {
     SingleShotMultiThreadedProxyResolverFactory resolver_factory(
-        kNumThreads, make_scoped_ptr(new BlockableProxyResolverFactory));
+        kNumThreads, base::WrapUnique(new BlockableProxyResolverFactory));
     EXPECT_EQ(ERR_IO_PENDING,
               resolver_factory.CreateProxyResolver(
                   ProxyResolverScriptData::FromUTF8("pac script bytes"),
diff --git a/net/proxy/network_delegate_error_observer.cc b/net/proxy/network_delegate_error_observer.cc
index b5d85c4..befa952 100644
--- a/net/proxy/network_delegate_error_observer.cc
+++ b/net/proxy/network_delegate_error_observer.cc
@@ -7,6 +7,7 @@
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "net/base/net_errors.h"
 #include "net/base/network_delegate.h"
@@ -76,10 +77,11 @@
 }
 
 // static
-scoped_ptr<ProxyResolverErrorObserver> NetworkDelegateErrorObserver::Create(
+std::unique_ptr<ProxyResolverErrorObserver>
+NetworkDelegateErrorObserver::Create(
     NetworkDelegate* network_delegate,
     const scoped_refptr<base::SingleThreadTaskRunner>& origin_runner) {
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new NetworkDelegateErrorObserver(network_delegate, origin_runner.get()));
 }
 
diff --git a/net/proxy/network_delegate_error_observer.h b/net/proxy/network_delegate_error_observer.h
index 50a3f64..1b68ceabd 100644
--- a/net/proxy/network_delegate_error_observer.h
+++ b/net/proxy/network_delegate_error_observer.h
@@ -5,10 +5,11 @@
 #ifndef NET_PROXY_NETWORK_DELEGATE_ERROR_OBSERVER_H_
 #define NET_PROXY_NETWORK_DELEGATE_ERROR_OBSERVER_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/proxy/proxy_resolver_error_observer.h"
 
 namespace base {
@@ -28,7 +29,7 @@
                                base::SingleThreadTaskRunner* origin_runner);
   ~NetworkDelegateErrorObserver() override;
 
-  static scoped_ptr<ProxyResolverErrorObserver> Create(
+  static std::unique_ptr<ProxyResolverErrorObserver> Create(
       NetworkDelegate* network_delegate,
       const scoped_refptr<base::SingleThreadTaskRunner>& origin_runner);
 
diff --git a/net/proxy/polling_proxy_config_service.cc b/net/proxy/polling_proxy_config_service.cc
index 4044e1b..a743764 100644
--- a/net/proxy/polling_proxy_config_service.cc
+++ b/net/proxy/polling_proxy_config_service.cc
@@ -4,9 +4,10 @@
 
 #include "net/proxy/polling_proxy_config_service.h"
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/location.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/lock.h"
diff --git a/net/proxy/proxy_config.cc b/net/proxy/proxy_config.cc
index ff05b63..1ca9ee4 100644
--- a/net/proxy/proxy_config.cc
+++ b/net/proxy/proxy_config.cc
@@ -235,8 +235,8 @@
   pac_url_ = GURL();
 }
 
-scoped_ptr<base::DictionaryValue> ProxyConfig::ToValue() const {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+std::unique_ptr<base::DictionaryValue> ProxyConfig::ToValue() const {
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   // Output the automatic settings.
   if (auto_detect_)
@@ -255,7 +255,8 @@
                             dict.get());
         break;
       case ProxyRules::TYPE_PROXY_PER_SCHEME: {
-        scoped_ptr<base::DictionaryValue> dict2(new base::DictionaryValue());
+        std::unique_ptr<base::DictionaryValue> dict2(
+            new base::DictionaryValue());
         AddProxyListToValue("http", proxy_rules_.proxies_for_http, dict2.get());
         AddProxyListToValue("https", proxy_rules_.proxies_for_https,
                             dict2.get());
diff --git a/net/proxy/proxy_config.h b/net/proxy/proxy_config.h
index 68deafdf..4ebd60a 100644
--- a/net/proxy/proxy_config.h
+++ b/net/proxy/proxy_config.h
@@ -176,7 +176,7 @@
   void ClearAutomaticSettings();
 
   // Creates a Value dump of this configuration.
-  scoped_ptr<base::DictionaryValue> ToValue() const;
+  std::unique_ptr<base::DictionaryValue> ToValue() const;
 
   ProxyRules& proxy_rules() {
     return proxy_rules_;
diff --git a/net/proxy/proxy_config_service_android_unittest.cc b/net/proxy/proxy_config_service_android_unittest.cc
index 9257486..ecc3185 100644
--- a/net/proxy/proxy_config_service_android_unittest.cc
+++ b/net/proxy/proxy_config_service_android_unittest.cc
@@ -2,15 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "net/proxy/proxy_config_service_android.h"
+
 #include <map>
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
 #include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "net/proxy/proxy_config.h"
-#include "net/proxy/proxy_config_service_android.h"
 #include "net/proxy/proxy_info.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/net/proxy/proxy_config_service_linux.cc b/net/proxy/proxy_config_service_linux.cc
index 17747d9..ac2c42d3 100644
--- a/net/proxy/proxy_config_service_linux.cc
+++ b/net/proxy/proxy_config_service_linux.cc
@@ -504,7 +504,7 @@
   guint system_http_proxy_id_;
 
   ProxyConfigServiceLinux::Delegate* notify_delegate_;
-  scoped_ptr<base::OneShotTimer> debounce_timer_;
+  std::unique_ptr<base::OneShotTimer> debounce_timer_;
 
   // Task runner for the thread that we make gconf calls on. It should
   // be the UI thread and all our methods should be called on this
@@ -774,7 +774,7 @@
   GSettings* ftp_client_;
   GSettings* socks_client_;
   ProxyConfigServiceLinux::Delegate* notify_delegate_;
-  scoped_ptr<base::OneShotTimer> debounce_timer_;
+  std::unique_ptr<base::OneShotTimer> debounce_timer_;
 
   // Task runner for the thread that we make gsettings calls on. It should
   // be the UI thread and all our methods should be called on this
@@ -1334,7 +1334,7 @@
   int inotify_fd_;
   base::MessagePumpLibevent::FileDescriptorWatcher inotify_watcher_;
   ProxyConfigServiceLinux::Delegate* notify_delegate_;
-  scoped_ptr<base::OneShotTimer> debounce_timer_;
+  std::unique_ptr<base::OneShotTimer> debounce_timer_;
   base::FilePath kde_config_dir_;
   bool indirect_manual_;
   bool auto_no_pac_;
@@ -1538,12 +1538,12 @@
     case base::nix::DESKTOP_ENVIRONMENT_UNITY:
 #if defined(USE_GIO)
       {
-        scoped_ptr<SettingGetterImplGSettings> gs_getter(
-            new SettingGetterImplGSettings());
-        // We have to load symbols and check the GNOME version in use to decide
-        // if we should use the gsettings getter. See LoadAndCheckVersion().
-        if (gs_getter->LoadAndCheckVersion(env_var_getter))
-          setting_getter_.reset(gs_getter.release());
+      std::unique_ptr<SettingGetterImplGSettings> gs_getter(
+          new SettingGetterImplGSettings());
+      // We have to load symbols and check the GNOME version in use to decide
+      // if we should use the gsettings getter. See LoadAndCheckVersion().
+      if (gs_getter->LoadAndCheckVersion(env_var_getter))
+        setting_getter_.reset(gs_getter.release());
       }
 #endif
 #if defined(USE_GCONF)
diff --git a/net/proxy/proxy_config_service_linux.h b/net/proxy/proxy_config_service_linux.h
index d6faab0..1425372 100644
--- a/net/proxy/proxy_config_service_linux.h
+++ b/net/proxy/proxy_config_service_linux.h
@@ -7,6 +7,7 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -14,7 +15,6 @@
 #include "base/environment.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "net/base/net_export.h"
 #include "net/proxy/proxy_config.h"
@@ -241,8 +241,8 @@
     // This method is run on the getter's notification thread.
     void SetUpNotifications();
 
-    scoped_ptr<base::Environment> env_var_getter_;
-    scoped_ptr<SettingGetter> setting_getter_;
+    std::unique_ptr<base::Environment> env_var_getter_;
+    std::unique_ptr<SettingGetter> setting_getter_;
 
     // Cached proxy configuration, to be returned by
     // GetLatestProxyConfig. Initially populated from the UI thread, but
diff --git a/net/proxy/proxy_config_service_mac.h b/net/proxy/proxy_config_service_mac.h
index b81ffa0..1ee40d9 100644
--- a/net/proxy/proxy_config_service_mac.h
+++ b/net/proxy/proxy_config_service_mac.h
@@ -5,10 +5,11 @@
 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_MAC_H_
 #define NET_PROXY_PROXY_CONFIG_SERVICE_MAC_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "net/base/network_config_watcher_mac.h"
 #include "net/proxy/proxy_config.h"
@@ -63,7 +64,7 @@
   void OnProxyConfigChanged(const ProxyConfig& new_config);
 
   Forwarder forwarder_;
-  scoped_ptr<const NetworkConfigWatcherMac> config_watcher_;
+  std::unique_ptr<const NetworkConfigWatcherMac> config_watcher_;
 
   base::ObserverList<Observer> observers_;
 
diff --git a/net/proxy/proxy_config_service_win.cc b/net/proxy/proxy_config_service_win.cc
index ef23711..e819bf4 100644
--- a/net/proxy/proxy_config_service_win.cc
+++ b/net/proxy/proxy_config_service_win.cc
@@ -7,10 +7,11 @@
 #include <windows.h>
 #include <winhttp.h>
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "base/strings/string_tokenizer.h"
 #include "base/strings/string_util.h"
@@ -95,7 +96,7 @@
 
 bool ProxyConfigServiceWin::AddKeyToWatchList(HKEY rootkey,
                                               const wchar_t* subkey) {
-  scoped_ptr<base::win::RegKey> key(new base::win::RegKey);
+  std::unique_ptr<base::win::RegKey> key(new base::win::RegKey);
   if (key->Create(rootkey, subkey, KEY_NOTIFY) != ERROR_SUCCESS)
     return false;
 
diff --git a/net/proxy/proxy_list.cc b/net/proxy/proxy_list.cc
index 5f627e0c..236baa1 100644
--- a/net/proxy/proxy_list.cc
+++ b/net/proxy/proxy_list.cc
@@ -144,8 +144,8 @@
   return proxy_list.empty() ? std::string() : proxy_list;
 }
 
-scoped_ptr<base::ListValue> ProxyList::ToValue() const {
-  scoped_ptr<base::ListValue> list(new base::ListValue());
+std::unique_ptr<base::ListValue> ProxyList::ToValue() const {
+  std::unique_ptr<base::ListValue> list(new base::ListValue());
   for (size_t i = 0; i < proxies_.size(); ++i)
     list->AppendString(proxies_[i].ToURI());
   return list;
diff --git a/net/proxy/proxy_list.h b/net/proxy/proxy_list.h
index d128e18..36cf938 100644
--- a/net/proxy/proxy_list.h
+++ b/net/proxy/proxy_list.h
@@ -82,7 +82,7 @@
   std::string ToPacString() const;
 
   // Returns a serialized value for the list.
-  scoped_ptr<base::ListValue> ToValue() const;
+  std::unique_ptr<base::ListValue> ToValue() const;
 
   // Marks the current proxy server as bad and deletes it from the list. The
   // list of known bad proxies is given by |proxy_retry_info|. |net_error|
diff --git a/net/proxy/proxy_resolver_factory.h b/net/proxy/proxy_resolver_factory.h
index 0cc98df..94ca29a 100644
--- a/net/proxy/proxy_resolver_factory.h
+++ b/net/proxy/proxy_resolver_factory.h
@@ -5,11 +5,11 @@
 #ifndef NET_PROXY_PROXY_RESOLVER_FACTORY_H_
 #define NET_PROXY_PROXY_RESOLVER_FACTORY_H_
 
+#include <memory>
 #include <set>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
 #include "net/proxy/proxy_resolver_script_data.h"
@@ -40,9 +40,9 @@
   // the ProxyResolverFactory is deleted.
   virtual int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const net::CompletionCallback& callback,
-      scoped_ptr<Request>* request) = 0;
+      std::unique_ptr<Request>* request) = 0;
 
   // The PAC script backend can be specified to the ProxyResolverFactory either
   // via URL, or via the javascript text itself. If |expects_pac_bytes| is true,
diff --git a/net/proxy/proxy_resolver_factory_mojo.cc b/net/proxy/proxy_resolver_factory_mojo.cc
index 2070cf9..e79db623 100644
--- a/net/proxy/proxy_resolver_factory_mojo.cc
+++ b/net/proxy/proxy_resolver_factory_mojo.cc
@@ -31,11 +31,11 @@
 namespace net {
 namespace {
 
-scoped_ptr<base::Value> NetLogErrorCallback(
+std::unique_ptr<base::Value> NetLogErrorCallback(
     int line_number,
     const base::string16* message,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("line_number", line_number);
   dict->SetString("message", *message);
   return std::move(dict);
@@ -109,8 +109,8 @@
   ProxyResolverMojo(
       interfaces::ProxyResolverPtr resolver_ptr,
       HostResolver* host_resolver,
-      scoped_ptr<base::ScopedClosureRunner> on_delete_callback_runner,
-      scoped_ptr<ProxyResolverErrorObserver> error_observer,
+      std::unique_ptr<base::ScopedClosureRunner> on_delete_callback_runner,
+      std::unique_ptr<ProxyResolverErrorObserver> error_observer,
       NetLog* net_log);
   ~ProxyResolverMojo() override;
 
@@ -136,7 +136,7 @@
 
   HostResolver* host_resolver_;
 
-  scoped_ptr<ProxyResolverErrorObserver> error_observer_;
+  std::unique_ptr<ProxyResolverErrorObserver> error_observer_;
 
   NetLog* net_log_;
 
@@ -144,7 +144,7 @@
 
   base::ThreadChecker thread_checker_;
 
-  scoped_ptr<base::ScopedClosureRunner> on_delete_callback_runner_;
+  std::unique_ptr<base::ScopedClosureRunner> on_delete_callback_runner_;
 
   DISALLOW_COPY_AND_ASSIGN(ProxyResolverMojo);
 };
@@ -247,8 +247,8 @@
 ProxyResolverMojo::ProxyResolverMojo(
     interfaces::ProxyResolverPtr resolver_ptr,
     HostResolver* host_resolver,
-    scoped_ptr<base::ScopedClosureRunner> on_delete_callback_runner,
-    scoped_ptr<ProxyResolverErrorObserver> error_observer,
+    std::unique_ptr<base::ScopedClosureRunner> on_delete_callback_runner,
+    std::unique_ptr<ProxyResolverErrorObserver> error_observer,
     NetLog* net_log)
     : mojo_proxy_resolver_ptr_(std::move(resolver_ptr)),
       host_resolver_(host_resolver),
@@ -325,9 +325,9 @@
  public:
   Job(ProxyResolverFactoryMojo* factory,
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const CompletionCallback& callback,
-      scoped_ptr<ProxyResolverErrorObserver> error_observer)
+      std::unique_ptr<ProxyResolverErrorObserver> error_observer)
       : ClientMixin<interfaces::ProxyResolverFactoryRequestClient>(
             factory->host_resolver_,
             error_observer.get(),
@@ -366,34 +366,33 @@
   }
 
   ProxyResolverFactoryMojo* const factory_;
-  scoped_ptr<ProxyResolver>* resolver_;
+  std::unique_ptr<ProxyResolver>* resolver_;
   const CompletionCallback callback_;
   interfaces::ProxyResolverPtr resolver_ptr_;
   mojo::Binding<interfaces::ProxyResolverFactoryRequestClient> binding_;
-  scoped_ptr<base::ScopedClosureRunner> on_delete_callback_runner_;
-  scoped_ptr<ProxyResolverErrorObserver> error_observer_;
+  std::unique_ptr<base::ScopedClosureRunner> on_delete_callback_runner_;
+  std::unique_ptr<ProxyResolverErrorObserver> error_observer_;
 };
 
 ProxyResolverFactoryMojo::ProxyResolverFactoryMojo(
     MojoProxyResolverFactory* mojo_proxy_factory,
     HostResolver* host_resolver,
-    const base::Callback<scoped_ptr<ProxyResolverErrorObserver>()>&
+    const base::Callback<std::unique_ptr<ProxyResolverErrorObserver>()>&
         error_observer_factory,
     NetLog* net_log)
     : ProxyResolverFactory(true),
       mojo_proxy_factory_(mojo_proxy_factory),
       host_resolver_(host_resolver),
       error_observer_factory_(error_observer_factory),
-      net_log_(net_log) {
-}
+      net_log_(net_log) {}
 
 ProxyResolverFactoryMojo::~ProxyResolverFactoryMojo() = default;
 
 int ProxyResolverFactoryMojo::CreateProxyResolver(
     const scoped_refptr<ProxyResolverScriptData>& pac_script,
-    scoped_ptr<ProxyResolver>* resolver,
+    std::unique_ptr<ProxyResolver>* resolver,
     const CompletionCallback& callback,
-    scoped_ptr<ProxyResolverFactory::Request>* request) {
+    std::unique_ptr<ProxyResolverFactory::Request>* request) {
   DCHECK(resolver);
   DCHECK(request);
   if (pac_script->type() != ProxyResolverScriptData::TYPE_SCRIPT_CONTENTS ||
diff --git a/net/proxy/proxy_resolver_factory_mojo.h b/net/proxy/proxy_resolver_factory_mojo.h
index f3e8483..f50d0e6d 100644
--- a/net/proxy/proxy_resolver_factory_mojo.h
+++ b/net/proxy/proxy_resolver_factory_mojo.h
@@ -5,9 +5,10 @@
 #ifndef NET_PROXY_PROXY_RESOLVER_FACTORY_MOJO_H_
 #define NET_PROXY_PROXY_RESOLVER_FACTORY_MOJO_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "net/base/completion_callback.h"
 #include "net/proxy/proxy_resolver_factory.h"
@@ -26,7 +27,7 @@
   ProxyResolverFactoryMojo(
       MojoProxyResolverFactory* mojo_proxy_factory,
       HostResolver* host_resolver,
-      const base::Callback<scoped_ptr<ProxyResolverErrorObserver>()>&
+      const base::Callback<std::unique_ptr<ProxyResolverErrorObserver>()>&
           error_observer_factory,
       NetLog* net_log);
   ~ProxyResolverFactoryMojo() override;
@@ -34,16 +35,16 @@
   // ProxyResolverFactory override.
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const CompletionCallback& callback,
-      scoped_ptr<Request>* request) override;
+      std::unique_ptr<Request>* request) override;
 
  private:
   class Job;
 
   MojoProxyResolverFactory* const mojo_proxy_factory_;
   HostResolver* const host_resolver_;
-  const base::Callback<scoped_ptr<ProxyResolverErrorObserver>()>
+  const base::Callback<std::unique_ptr<ProxyResolverErrorObserver>()>
       error_observer_factory_;
   NetLog* const net_log_;
 
diff --git a/net/proxy/proxy_resolver_factory_mojo_unittest.cc b/net/proxy/proxy_resolver_factory_mojo_unittest.cc
index 9fa4ef5..a3d610b 100644
--- a/net/proxy/proxy_resolver_factory_mojo_unittest.cc
+++ b/net/proxy/proxy_resolver_factory_mojo_unittest.cc
@@ -6,13 +6,14 @@
 
 #include <list>
 #include <map>
+#include <memory>
 #include <queue>
 #include <string>
 #include <utility>
 #include <vector>
 
 #include "base/bind.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/stl_util.h"
 #include "base/values.h"
@@ -202,7 +203,7 @@
 
   base::Closure quit_closure_;
 
-  std::vector<scoped_ptr<interfaces::ProxyResolverRequestClientPtr>>
+  std::vector<std::unique_ptr<interfaces::ProxyResolverRequestClientPtr>>
       blocked_clients_;
   mojo::Binding<interfaces::ProxyResolver> binding_;
 };
@@ -277,7 +278,7 @@
       interfaces::HostResolverRequestClientPtr dns_client;
       mojo::GetProxy(&dns_client);
       client->ResolveDns(std::move(request), std::move(dns_client));
-      blocked_clients_.push_back(make_scoped_ptr(
+      blocked_clients_.push_back(base::WrapUnique(
           new interfaces::ProxyResolverRequestClientPtr(std::move(client))));
       break;
     }
@@ -353,9 +354,10 @@
 
   base::Closure quit_closure_;
 
-  std::vector<scoped_ptr<interfaces::ProxyResolverFactoryRequestClientPtr>>
+  std::vector<std::unique_ptr<interfaces::ProxyResolverFactoryRequestClientPtr>>
       blocked_clients_;
-  std::vector<scoped_ptr<mojo::InterfaceRequest<interfaces::ProxyResolver>>>
+  std::vector<
+      std::unique_ptr<mojo::InterfaceRequest<interfaces::ProxyResolver>>>
       blocked_resolver_requests_;
   mojo::Binding<interfaces::ProxyResolverFactory> binding_;
 };
@@ -411,15 +413,15 @@
     }
     case CreateProxyResolverAction::DROP_CLIENT: {
       // Save |request| so its pipe isn't closed.
-      blocked_resolver_requests_.push_back(
-          make_scoped_ptr(new mojo::InterfaceRequest<interfaces::ProxyResolver>(
+      blocked_resolver_requests_.push_back(base::WrapUnique(
+          new mojo::InterfaceRequest<interfaces::ProxyResolver>(
               std::move(request))));
       break;
     }
     case CreateProxyResolverAction::DROP_RESOLVER: {
       // Save |client| so its pipe isn't closed.
       blocked_clients_.push_back(
-          make_scoped_ptr(new interfaces::ProxyResolverFactoryRequestClientPtr(
+          base::WrapUnique(new interfaces::ProxyResolverFactoryRequestClientPtr(
               std::move(client))));
       break;
     }
@@ -440,7 +442,7 @@
       mojo::GetProxy(&dns_client);
       client->ResolveDns(std::move(request), std::move(dns_client));
       blocked_clients_.push_back(
-          make_scoped_ptr(new interfaces::ProxyResolverFactoryRequestClientPtr(
+          base::WrapUnique(new interfaces::ProxyResolverFactoryRequestClientPtr(
               std::move(client))));
       break;
     }
@@ -449,7 +451,7 @@
 }
 
 void DeleteResolverFactoryRequestCallback(
-    scoped_ptr<ProxyResolverFactory::Request>* request,
+    std::unique_ptr<ProxyResolverFactory::Request>* request,
     const CompletionCallback& callback,
     int result) {
   ASSERT_TRUE(request);
@@ -515,19 +517,20 @@
         &mock_proxy_resolver_, mojo::GetProxy(&factory_ptr_)));
     proxy_resolver_factory_mojo_.reset(new ProxyResolverFactoryMojo(
         this, &host_resolver_,
-        base::Callback<scoped_ptr<ProxyResolverErrorObserver>()>(), &net_log_));
+        base::Callback<std::unique_ptr<ProxyResolverErrorObserver>()>(),
+        &net_log_));
   }
 
-  scoped_ptr<Request> MakeRequest(const GURL& url) {
-    return make_scoped_ptr(new Request(proxy_resolver_mojo_.get(), url));
+  std::unique_ptr<Request> MakeRequest(const GURL& url) {
+    return base::WrapUnique(new Request(proxy_resolver_mojo_.get(), url));
   }
 
-  scoped_ptr<base::ScopedClosureRunner> CreateResolver(
+  std::unique_ptr<base::ScopedClosureRunner> CreateResolver(
       const mojo::String& pac_script,
       mojo::InterfaceRequest<interfaces::ProxyResolver> req,
       interfaces::ProxyResolverFactoryRequestClientPtr client) override {
     factory_ptr_->CreateResolver(pac_script, std::move(req), std::move(client));
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new base::ScopedClosureRunner(on_delete_callback_.closure()));
   }
 
@@ -546,7 +549,7 @@
     TestCompletionCallback callback;
     scoped_refptr<ProxyResolverScriptData> pac_script(
         ProxyResolverScriptData::FromUTF8(kScriptData));
-    scoped_ptr<ProxyResolverFactory::Request> request;
+    std::unique_ptr<ProxyResolverFactory::Request> request;
     ASSERT_EQ(
         OK,
         callback.GetResult(proxy_resolver_factory_mojo_->CreateProxyResolver(
@@ -563,13 +566,13 @@
 
   MockHostResolver host_resolver_;
   TestNetLog net_log_;
-  scoped_ptr<MockMojoProxyResolverFactory> mock_proxy_resolver_factory_;
+  std::unique_ptr<MockMojoProxyResolverFactory> mock_proxy_resolver_factory_;
   interfaces::ProxyResolverFactoryPtr factory_ptr_;
-  scoped_ptr<ProxyResolverFactory> proxy_resolver_factory_mojo_;
+  std::unique_ptr<ProxyResolverFactory> proxy_resolver_factory_mojo_;
 
   MockMojoProxyResolver mock_proxy_resolver_;
   TestClosure on_delete_callback_;
-  scoped_ptr<ProxyResolver> proxy_resolver_mojo_;
+  std::unique_ptr<ProxyResolver> proxy_resolver_mojo_;
 };
 
 TEST_F(ProxyResolverFactoryMojoTest, CreateProxyResolver) {
@@ -583,7 +586,7 @@
   TestCompletionCallback callback;
   scoped_refptr<ProxyResolverScriptData> pac_script(
       ProxyResolverScriptData::FromUTF8(""));
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   EXPECT_EQ(
       ERR_PAC_SCRIPT_FAILED,
       callback.GetResult(proxy_resolver_factory_mojo_->CreateProxyResolver(
@@ -595,7 +598,7 @@
   TestCompletionCallback callback;
   scoped_refptr<ProxyResolverScriptData> pac_script(
       ProxyResolverScriptData::FromURL(GURL(kExampleUrl)));
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   EXPECT_EQ(
       ERR_PAC_SCRIPT_FAILED,
       callback.GetResult(proxy_resolver_factory_mojo_->CreateProxyResolver(
@@ -611,7 +614,7 @@
   TestCompletionCallback callback;
   scoped_refptr<ProxyResolverScriptData> pac_script(
       ProxyResolverScriptData::FromUTF8(kScriptData));
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   EXPECT_EQ(
       ERR_PAC_STATUS_NOT_OK,
       callback.GetResult(proxy_resolver_factory_mojo_->CreateProxyResolver(
@@ -629,7 +632,7 @@
 
   scoped_refptr<ProxyResolverScriptData> pac_script(
       ProxyResolverScriptData::FromUTF8(kScriptData));
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   TestCompletionCallback callback;
   EXPECT_EQ(
       ERR_PAC_SCRIPT_TERMINATED,
@@ -644,7 +647,7 @@
 
   scoped_refptr<ProxyResolverScriptData> pac_script(
       ProxyResolverScriptData::FromUTF8(kScriptData));
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   TestCompletionCallback callback;
   EXPECT_EQ(
       ERR_PAC_SCRIPT_TERMINATED,
@@ -659,7 +662,7 @@
 
   scoped_refptr<ProxyResolverScriptData> pac_script(
       ProxyResolverScriptData::FromUTF8(kScriptData));
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   TestCompletionCallback callback;
   EXPECT_EQ(
       ERR_PAC_SCRIPT_TERMINATED,
@@ -676,7 +679,7 @@
 
   scoped_refptr<ProxyResolverScriptData> pac_script(
       ProxyResolverScriptData::FromUTF8(kScriptData));
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   TestCompletionCallback callback;
   EXPECT_EQ(
       ERR_PAC_SCRIPT_TERMINATED,
@@ -694,7 +697,7 @@
 
   scoped_refptr<ProxyResolverScriptData> pac_script(
       ProxyResolverScriptData::FromUTF8(kScriptData));
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   TestCompletionCallback callback;
   EXPECT_EQ(ERR_IO_PENDING, proxy_resolver_factory_mojo_->CreateProxyResolver(
                                 pac_script, &proxy_resolver_mojo_,
@@ -713,7 +716,7 @@
 
   scoped_refptr<ProxyResolverScriptData> pac_script(
       ProxyResolverScriptData::FromUTF8(kScriptData));
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   TestCompletionCallback callback;
   EXPECT_EQ(ERR_IO_PENDING, proxy_resolver_factory_mojo_->CreateProxyResolver(
                                 pac_script, &proxy_resolver_mojo_,
@@ -731,7 +734,7 @@
   CreateProxyResolver();
   net_log_.Clear();
 
-  scoped_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
+  std::unique_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
   EXPECT_EQ(ERR_IO_PENDING, request->Resolve());
   EXPECT_EQ(OK, request->WaitForResult());
 
@@ -753,7 +756,7 @@
       GURL(kExampleUrl), ProxyServersFromPacString(kPacString)));
   CreateProxyResolver();
 
-  scoped_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
+  std::unique_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
   EXPECT_EQ(ERR_IO_PENDING, request->Resolve());
   EXPECT_EQ(OK, request->WaitForResult());
 
@@ -765,7 +768,7 @@
       GetProxyForUrlAction::ReturnError(GURL(kExampleUrl), ERR_UNEXPECTED));
   CreateProxyResolver();
 
-  scoped_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
+  std::unique_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
   EXPECT_EQ(ERR_IO_PENDING, request->Resolve());
   EXPECT_EQ(ERR_UNEXPECTED, request->WaitForResult());
 
@@ -777,7 +780,7 @@
       GetProxyForUrlAction::WaitForClientDisconnect(GURL(kExampleUrl)));
   CreateProxyResolver();
 
-  scoped_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
+  std::unique_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
   EXPECT_EQ(ERR_IO_PENDING, request->Resolve());
   request->Cancel();
 
@@ -793,9 +796,10 @@
       ProxyServersFromPacString("HTTPS foo:443")));
   CreateProxyResolver();
 
-  scoped_ptr<Request> request1(MakeRequest(GURL(kExampleUrl)));
+  std::unique_ptr<Request> request1(MakeRequest(GURL(kExampleUrl)));
   EXPECT_EQ(ERR_IO_PENDING, request1->Resolve());
-  scoped_ptr<Request> request2(MakeRequest(GURL("https://www.chromium.org")));
+  std::unique_ptr<Request> request2(
+      MakeRequest(GURL("https://www.chromium.org")));
   EXPECT_EQ(ERR_IO_PENDING, request2->Resolve());
 
   EXPECT_EQ(OK, request1->WaitForResult());
@@ -810,7 +814,7 @@
       GetProxyForUrlAction::Disconnect(GURL(kExampleUrl)));
   CreateProxyResolver();
   {
-    scoped_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
+    std::unique_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
     EXPECT_EQ(ERR_IO_PENDING, request->Resolve());
     EXPECT_EQ(ERR_PAC_SCRIPT_TERMINATED, request->WaitForResult());
     EXPECT_TRUE(request->results().is_empty());
@@ -818,7 +822,7 @@
 
   {
     // Calling GetProxyForURL after a disconnect should fail.
-    scoped_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
+    std::unique_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
     EXPECT_EQ(ERR_PAC_SCRIPT_TERMINATED, request->Resolve());
   }
 }
@@ -828,7 +832,7 @@
       GetProxyForUrlAction::DropRequest(GURL(kExampleUrl)));
   CreateProxyResolver();
 
-  scoped_ptr<Request> request1(MakeRequest(GURL(kExampleUrl)));
+  std::unique_ptr<Request> request1(MakeRequest(GURL(kExampleUrl)));
   EXPECT_EQ(ERR_IO_PENDING, request1->Resolve());
 
   EXPECT_EQ(ERR_PAC_SCRIPT_TERMINATED, request1->WaitForResult());
@@ -878,7 +882,7 @@
       GetProxyForUrlAction::MakeDnsRequest(GURL(kExampleUrl)));
   CreateProxyResolver();
 
-  scoped_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
+  std::unique_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
   EXPECT_EQ(ERR_IO_PENDING, request->Resolve());
   EXPECT_EQ(LOAD_STATE_RESOLVING_PROXY_FOR_URL, request->load_state());
 
diff --git a/net/proxy/proxy_resolver_mac.cc b/net/proxy/proxy_resolver_mac.cc
index d4f4119..cd4873c 100644
--- a/net/proxy/proxy_resolver_mac.cc
+++ b/net/proxy/proxy_resolver_mac.cc
@@ -220,9 +220,9 @@
 
 int ProxyResolverFactoryMac::CreateProxyResolver(
     const scoped_refptr<ProxyResolverScriptData>& pac_script,
-    scoped_ptr<ProxyResolver>* resolver,
+    std::unique_ptr<ProxyResolver>* resolver,
     const CompletionCallback& callback,
-    scoped_ptr<Request>* request) {
+    std::unique_ptr<Request>* request) {
   resolver->reset(new ProxyResolverMac(pac_script));
   return OK;
 }
diff --git a/net/proxy/proxy_resolver_mac.h b/net/proxy/proxy_resolver_mac.h
index f865021..9cea9b4 100644
--- a/net/proxy/proxy_resolver_mac.h
+++ b/net/proxy/proxy_resolver_mac.h
@@ -21,9 +21,9 @@
 
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const CompletionCallback& callback,
-      scoped_ptr<Request>* request) override;
+      std::unique_ptr<Request>* request) override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(ProxyResolverFactoryMac);
diff --git a/net/proxy/proxy_resolver_perftest.cc b/net/proxy/proxy_resolver_perftest.cc
index 7aae5b2..2f35236 100644
--- a/net/proxy/proxy_resolver_perftest.cc
+++ b/net/proxy/proxy_resolver_perftest.cc
@@ -112,7 +112,7 @@
   void RunTest(const std::string& script_name,
                const PacQuery* queries,
                int queries_len) {
-    scoped_ptr<ProxyResolver> resolver;
+    std::unique_ptr<ProxyResolver> resolver;
     if (!factory_->expects_pac_bytes()) {
       GURL pac_url = test_server_.GetURL(std::string("/") + script_name);
       int rv = factory_->CreateProxyResolver(
@@ -160,7 +160,7 @@
   }
 
   // Read the PAC script from disk and initialize the proxy resolver with it.
-  scoped_ptr<ProxyResolver> LoadPacScriptAndCreateResolver(
+  std::unique_ptr<ProxyResolver> LoadPacScriptAndCreateResolver(
       const std::string& script_name) {
     base::FilePath path;
     PathService::Get(base::DIR_SOURCE_ROOT, &path);
@@ -179,7 +179,7 @@
       return nullptr;
 
     // Load the PAC script into the ProxyResolver.
-    scoped_ptr<ProxyResolver> resolver;
+    std::unique_ptr<ProxyResolver> resolver;
     int rv = factory_->CreateProxyResolver(
         ProxyResolverScriptData::FromUTF8(file_contents), &resolver,
         CompletionCallback(), nullptr);
@@ -227,8 +227,8 @@
 
 class ProxyResolverV8Wrapper : public ProxyResolver {
  public:
-  ProxyResolverV8Wrapper(scoped_ptr<ProxyResolverV8> resolver,
-                         scoped_ptr<MockJSBindings> bindings)
+  ProxyResolverV8Wrapper(std::unique_ptr<ProxyResolverV8> resolver,
+                         std::unique_ptr<MockJSBindings> bindings)
       : resolver_(std::move(resolver)), bindings_(std::move(bindings)) {}
 
   int GetProxyForURL(const GURL& url,
@@ -247,8 +247,8 @@
   }
 
  private:
-  scoped_ptr<ProxyResolverV8> resolver_;
-  scoped_ptr<MockJSBindings> bindings_;
+  std::unique_ptr<ProxyResolverV8> resolver_;
+  std::unique_ptr<MockJSBindings> bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8Wrapper);
 };
@@ -258,11 +258,11 @@
   ProxyResolverV8Factory() : ProxyResolverFactory(true) {}
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const net::CompletionCallback& callback,
-      scoped_ptr<Request>* request) override {
-    scoped_ptr<ProxyResolverV8> v8_resolver;
-    scoped_ptr<MockJSBindings> js_bindings_(new MockJSBindings);
+      std::unique_ptr<Request>* request) override {
+    std::unique_ptr<ProxyResolverV8> v8_resolver;
+    std::unique_ptr<MockJSBindings> js_bindings_(new MockJSBindings);
     int result =
         ProxyResolverV8::Create(pac_script, js_bindings_.get(), &v8_resolver);
     if (result == OK) {
diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc
index a0c9717..3c9233d 100644
--- a/net/proxy/proxy_resolver_v8.cc
+++ b/net/proxy/proxy_resolver_v8.cc
@@ -404,7 +404,7 @@
 
  private:
   base::Lock lock_;
-  scoped_ptr<gin::IsolateHolder> holder_;
+  std::unique_ptr<gin::IsolateHolder> holder_;
   bool has_initialized_v8_;
 
   DISALLOW_COPY_AND_ASSIGN(SharedIsolateFactory);
@@ -836,7 +836,7 @@
 
 // ProxyResolverV8 ------------------------------------------------------------
 
-ProxyResolverV8::ProxyResolverV8(scoped_ptr<Context> context)
+ProxyResolverV8::ProxyResolverV8(std::unique_ptr<Context> context)
     : context_(std::move(context)) {
   DCHECK(context_);
 }
@@ -853,7 +853,7 @@
 int ProxyResolverV8::Create(
     const scoped_refptr<ProxyResolverScriptData>& script_data,
     ProxyResolverV8::JSBindings* js_bindings,
-    scoped_ptr<ProxyResolverV8>* resolver) {
+    std::unique_ptr<ProxyResolverV8>* resolver) {
   DCHECK(script_data.get());
   DCHECK(js_bindings);
 
@@ -861,7 +861,7 @@
     return ERR_PAC_SCRIPT_FAILED;
 
   // Try parsing the PAC script.
-  scoped_ptr<Context> context(
+  std::unique_ptr<Context> context(
       new Context(g_isolate_factory.Get().GetSharedIsolate()));
   int rv = context->InitV8(script_data, js_bindings);
   if (rv == OK)
diff --git a/net/proxy/proxy_resolver_v8.h b/net/proxy/proxy_resolver_v8.h
index abd2e94..ce22407 100644
--- a/net/proxy/proxy_resolver_v8.h
+++ b/net/proxy/proxy_resolver_v8.h
@@ -7,10 +7,11 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "net/base/net_export.h"
 
@@ -58,7 +59,7 @@
   // Constructs a ProxyResolverV8.
   static int Create(const scoped_refptr<ProxyResolverScriptData>& script_data,
                     JSBindings* bindings,
-                    scoped_ptr<ProxyResolverV8>* resolver);
+                    std::unique_ptr<ProxyResolverV8>* resolver);
 
   ~ProxyResolverV8();
 
@@ -73,9 +74,9 @@
   // Context holds the Javascript state for the PAC script.
   class Context;
 
-  explicit ProxyResolverV8(scoped_ptr<Context> context);
+  explicit ProxyResolverV8(std::unique_ptr<Context> context);
 
-  scoped_ptr<Context> context_;
+  std::unique_ptr<Context> context_;
 
   DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8);
 };
diff --git a/net/proxy/proxy_resolver_v8_tracing.cc b/net/proxy/proxy_resolver_v8_tracing.cc
index 230c4f9..0708593 100644
--- a/net/proxy/proxy_resolver_v8_tracing.cc
+++ b/net/proxy/proxy_resolver_v8_tracing.cc
@@ -12,6 +12,7 @@
 #include "base/auto_reset.h"
 #include "base/bind.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/stringprintf.h"
@@ -114,12 +115,12 @@
   // |params| is non-owned. It contains the parameters for this Job, and must
   // outlive it.
   Job(const Params* params,
-      scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings);
+      std::unique_ptr<ProxyResolverV8Tracing::Bindings> bindings);
 
   // Called from origin thread.
   void StartCreateV8Resolver(
       const scoped_refptr<ProxyResolverScriptData>& script_data,
-      scoped_ptr<ProxyResolverV8>* resolver,
+      std::unique_ptr<ProxyResolverV8>* resolver,
       const CompletionCallback& callback);
 
   // Called from origin thread.
@@ -233,7 +234,7 @@
   // Initialized on origin thread and then accessed from both threads.
   const Params* const params_;
 
-  scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings_;
+  std::unique_ptr<ProxyResolverV8Tracing::Bindings> bindings_;
 
   // The callback to run (on the origin thread) when the Job finishes.
   // Should only be accessed from origin thread.
@@ -268,7 +269,7 @@
   // -------------------------------------------------------
 
   scoped_refptr<ProxyResolverScriptData> script_data_;
-  scoped_ptr<ProxyResolverV8>* resolver_out_;
+  std::unique_ptr<ProxyResolverV8>* resolver_out_;
 
   // -------------------------------------------------------
   // State specific to GET_PROXY_FOR_URL.
@@ -329,9 +330,9 @@
 class ProxyResolverV8TracingImpl : public ProxyResolverV8Tracing,
                                    public base::NonThreadSafe {
  public:
-  ProxyResolverV8TracingImpl(scoped_ptr<base::Thread> thread,
-                             scoped_ptr<ProxyResolverV8> resolver,
-                             scoped_ptr<Job::Params> job_params);
+  ProxyResolverV8TracingImpl(std::unique_ptr<base::Thread> thread,
+                             std::unique_ptr<ProxyResolverV8> resolver,
+                             std::unique_ptr<Job::Params> job_params);
 
   ~ProxyResolverV8TracingImpl() override;
 
@@ -340,16 +341,16 @@
                       ProxyInfo* results,
                       const CompletionCallback& callback,
                       ProxyResolver::RequestHandle* request,
-                      scoped_ptr<Bindings> bindings) override;
+                      std::unique_ptr<Bindings> bindings) override;
   void CancelRequest(ProxyResolver::RequestHandle request) override;
   LoadState GetLoadState(ProxyResolver::RequestHandle request) const override;
 
  private:
   // The worker thread on which the ProxyResolverV8 will be run.
-  scoped_ptr<base::Thread> thread_;
-  scoped_ptr<ProxyResolverV8> v8_resolver_;
+  std::unique_ptr<base::Thread> thread_;
+  std::unique_ptr<ProxyResolverV8> v8_resolver_;
 
-  scoped_ptr<Job::Params> job_params_;
+  std::unique_ptr<Job::Params> job_params_;
 
   // The number of outstanding (non-cancelled) jobs.
   int num_outstanding_callbacks_;
@@ -358,7 +359,7 @@
 };
 
 Job::Job(const Job::Params* params,
-         scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings)
+         std::unique_ptr<ProxyResolverV8Tracing::Bindings> bindings)
     : origin_runner_(base::ThreadTaskRunnerHandle::Get()),
       params_(params),
       bindings_(std::move(bindings)),
@@ -370,7 +371,7 @@
 
 void Job::StartCreateV8Resolver(
     const scoped_refptr<ProxyResolverScriptData>& script_data,
-    scoped_ptr<ProxyResolverV8>* resolver,
+    std::unique_ptr<ProxyResolverV8>* resolver,
     const CompletionCallback& callback) {
   CheckIsOnOriginThread();
 
@@ -584,7 +585,7 @@
 
   switch (operation_) {
     case CREATE_V8_RESOLVER: {
-      scoped_ptr<ProxyResolverV8> resolver;
+      std::unique_ptr<ProxyResolverV8> resolver;
       result = ProxyResolverV8::Create(script_data_, this, &resolver);
       if (result == OK)
         *resolver_out_ = std::move(resolver);
@@ -1057,9 +1058,9 @@
 }
 
 ProxyResolverV8TracingImpl::ProxyResolverV8TracingImpl(
-    scoped_ptr<base::Thread> thread,
-    scoped_ptr<ProxyResolverV8> resolver,
-    scoped_ptr<Job::Params> job_params)
+    std::unique_ptr<base::Thread> thread,
+    std::unique_ptr<ProxyResolverV8> resolver,
+    std::unique_ptr<Job::Params> job_params)
     : thread_(std::move(thread)),
       v8_resolver_(std::move(resolver)),
       job_params_(std::move(job_params)),
@@ -1081,7 +1082,7 @@
     ProxyInfo* results,
     const CompletionCallback& callback,
     ProxyResolver::RequestHandle* request,
-    scoped_ptr<Bindings> bindings) {
+    std::unique_ptr<Bindings> bindings) {
   DCHECK(CalledOnValidThread());
   DCHECK(!callback.is_null());
 
@@ -1112,10 +1113,10 @@
 
   void CreateProxyResolverV8Tracing(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings,
-      scoped_ptr<ProxyResolverV8Tracing>* resolver,
+      std::unique_ptr<ProxyResolverV8Tracing::Bindings> bindings,
+      std::unique_ptr<ProxyResolverV8Tracing>* resolver,
       const CompletionCallback& callback,
-      scoped_ptr<ProxyResolverFactory::Request>* request) override;
+      std::unique_ptr<ProxyResolverFactory::Request>* request) override;
 
  private:
   class CreateJob;
@@ -1131,9 +1132,9 @@
     : public ProxyResolverFactory::Request {
  public:
   CreateJob(ProxyResolverV8TracingFactoryImpl* factory,
-            scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings,
+            std::unique_ptr<ProxyResolverV8Tracing::Bindings> bindings,
             const scoped_refptr<ProxyResolverScriptData>& pac_script,
-            scoped_ptr<ProxyResolverV8Tracing>* resolver_out,
+            std::unique_ptr<ProxyResolverV8Tracing>* resolver_out,
             const CompletionCallback& callback)
       : factory_(factory),
         thread_(new base::Thread("Proxy Resolver")),
@@ -1195,11 +1196,11 @@
   }
 
   ProxyResolverV8TracingFactoryImpl* factory_;
-  scoped_ptr<base::Thread> thread_;
-  scoped_ptr<Job::Params> job_params_;
+  std::unique_ptr<base::Thread> thread_;
+  std::unique_ptr<Job::Params> job_params_;
   scoped_refptr<Job> create_resolver_job_;
-  scoped_ptr<ProxyResolverV8> v8_resolver_;
-  scoped_ptr<ProxyResolverV8Tracing>* resolver_out_;
+  std::unique_ptr<ProxyResolverV8> v8_resolver_;
+  std::unique_ptr<ProxyResolverV8Tracing>* resolver_out_;
   const CompletionCallback callback_;
   int num_outstanding_callbacks_;
 
@@ -1217,11 +1218,11 @@
 
 void ProxyResolverV8TracingFactoryImpl::CreateProxyResolverV8Tracing(
     const scoped_refptr<ProxyResolverScriptData>& pac_script,
-    scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings,
-    scoped_ptr<ProxyResolverV8Tracing>* resolver,
+    std::unique_ptr<ProxyResolverV8Tracing::Bindings> bindings,
+    std::unique_ptr<ProxyResolverV8Tracing>* resolver,
     const CompletionCallback& callback,
-    scoped_ptr<ProxyResolverFactory::Request>* request) {
-  scoped_ptr<CreateJob> job(
+    std::unique_ptr<ProxyResolverFactory::Request>* request) {
+  std::unique_ptr<CreateJob> job(
       new CreateJob(this, std::move(bindings), pac_script, resolver, callback));
   jobs_.insert(job.get());
   *request = std::move(job);
@@ -1236,9 +1237,9 @@
 }  // namespace
 
 // static
-scoped_ptr<ProxyResolverV8TracingFactory>
+std::unique_ptr<ProxyResolverV8TracingFactory>
 ProxyResolverV8TracingFactory::Create() {
-  return make_scoped_ptr(new ProxyResolverV8TracingFactoryImpl());
+  return base::WrapUnique(new ProxyResolverV8TracingFactoryImpl());
 }
 
 const char kHistogramPacResultForStrippedUrl[] = "Net.PacResultForStrippedUrl";
diff --git a/net/proxy/proxy_resolver_v8_tracing.h b/net/proxy/proxy_resolver_v8_tracing.h
index 4ca3c82..c81df87 100644
--- a/net/proxy/proxy_resolver_v8_tracing.h
+++ b/net/proxy/proxy_resolver_v8_tracing.h
@@ -5,9 +5,10 @@
 #ifndef NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_
 #define NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/proxy/proxy_resolver.h"
 #include "net/proxy/proxy_resolver_factory.h"
@@ -56,7 +57,7 @@
                               ProxyInfo* results,
                               const CompletionCallback& callback,
                               ProxyResolver::RequestHandle* request,
-                              scoped_ptr<Bindings> bindings) = 0;
+                              std::unique_ptr<Bindings> bindings) = 0;
 
   // Cancels |request|.
   virtual void CancelRequest(ProxyResolver::RequestHandle request) = 0;
@@ -78,12 +79,12 @@
 
   virtual void CreateProxyResolverV8Tracing(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings,
-      scoped_ptr<ProxyResolverV8Tracing>* resolver,
+      std::unique_ptr<ProxyResolverV8Tracing::Bindings> bindings,
+      std::unique_ptr<ProxyResolverV8Tracing>* resolver,
       const CompletionCallback& callback,
-      scoped_ptr<ProxyResolverFactory::Request>* request) = 0;
+      std::unique_ptr<ProxyResolverFactory::Request>* request) = 0;
 
-  static scoped_ptr<ProxyResolverV8TracingFactory> Create();
+  static std::unique_ptr<ProxyResolverV8TracingFactory> Create();
 
  private:
   DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8TracingFactory);
diff --git a/net/proxy/proxy_resolver_v8_tracing_unittest.cc b/net/proxy/proxy_resolver_v8_tracing_unittest.cc
index 4d2b296..79534eb 100644
--- a/net/proxy/proxy_resolver_v8_tracing_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_tracing_unittest.cc
@@ -8,6 +8,7 @@
 #include <utility>
 
 #include "base/files/file_util.h"
+#include "base/memory/ptr_util.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
@@ -106,8 +107,8 @@
     waiter_.WaitForEvent(EVENT_ERROR);
   }
 
-  scoped_ptr<ProxyResolverV8Tracing::Bindings> CreateBindings() {
-    return make_scoped_ptr(new ForwardingBindings(this));
+  std::unique_ptr<ProxyResolverV8Tracing::Bindings> CreateBindings() {
+    return base::WrapUnique(new ForwardingBindings(this));
   }
 
  private:
@@ -152,14 +153,14 @@
   EventWaiter<Event> waiter_;
 };
 
-scoped_ptr<ProxyResolverV8Tracing> CreateResolver(
-    scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings,
+std::unique_ptr<ProxyResolverV8Tracing> CreateResolver(
+    std::unique_ptr<ProxyResolverV8Tracing::Bindings> bindings,
     const char* filename) {
-  scoped_ptr<ProxyResolverV8Tracing> resolver;
-  scoped_ptr<ProxyResolverV8TracingFactory> factory(
+  std::unique_ptr<ProxyResolverV8Tracing> resolver;
+  std::unique_ptr<ProxyResolverV8TracingFactory> factory(
       ProxyResolverV8TracingFactory::Create());
   TestCompletionCallback callback;
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   factory->CreateProxyResolverV8Tracing(LoadScriptData(filename),
                                         std::move(bindings), &resolver,
                                         callback.callback(), &request);
@@ -172,7 +173,7 @@
   MockCachingHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "simple.js");
 
   TestCompletionCallback callback;
@@ -200,7 +201,7 @@
   MockCachingHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "alert_url.js");
 
   TestCompletionCallback callback;
@@ -230,7 +231,7 @@
   MockCachingHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "error.js");
 
   TestCompletionCallback callback;
@@ -259,7 +260,7 @@
   MockCachingHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "too_many_alerts.js");
 
   TestCompletionCallback callback;
@@ -299,7 +300,7 @@
   MockCachingHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver = CreateResolver(
+  std::unique_ptr<ProxyResolverV8Tracing> resolver = CreateResolver(
       mock_bindings.CreateBindings(), "too_many_empty_alerts.js");
 
   TestCompletionCallback callback;
@@ -349,7 +350,7 @@
       "*", ADDRESS_FAMILY_IPV4, "122.133.144.155");
   host_resolver.rules()->AddRule("*", "133.122.100.200");
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "dns.js");
 
   TestCompletionCallback callback;
@@ -403,7 +404,7 @@
   host_resolver.rules()->AddRule("foopy", "166.155.144.11");
   host_resolver.rules()->AddRule("*", "122.133.144.155");
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "simple_dns.js");
 
   TestCompletionCallback callback1;
@@ -464,7 +465,7 @@
   host_resolver.rules()->AddRule("crazy4", "133.199.111.4");
   host_resolver.rules()->AddRule("*", "122.133.144.155");
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "global_sideffects1.js");
 
   TestCompletionCallback callback;
@@ -507,7 +508,7 @@
   host_resolver.rules()->AddRule("host4", "166.155.144.44");
   host_resolver.rules()->AddRule("*", "122.133.144.155");
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "global_sideffects2.js");
 
   TestCompletionCallback callback;
@@ -542,7 +543,7 @@
   host_resolver.rules()->AddRule("host*", "166.155.144.11");
   host_resolver.rules()->AddRule("*", "122.133.144.155");
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "global_sideffects3.js");
 
   TestCompletionCallback callback;
@@ -585,7 +586,7 @@
   host_resolver.rules()->AddRule("host*", "166.155.144.11");
   host_resolver.rules()->AddRule("*", "122.133.144.155");
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "global_sideffects4.js");
 
   TestCompletionCallback callback;
@@ -615,7 +616,7 @@
   MockCachingHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "return_url_as_proxy.js");
 
   TestCompletionCallback callback;
@@ -644,7 +645,7 @@
   MockCachingHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver = CreateResolver(
+  std::unique_ptr<ProxyResolverV8Tracing> resolver = CreateResolver(
       mock_bindings.CreateBindings(), "error_depending_on_url.js");
 
   TestCompletionCallback callback;
@@ -677,7 +678,7 @@
   // Catch-all that will be used for myIpAddress().
   host_resolver.rules()->AddRule("*", "133.122.100.200");
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "dns_depending_on_url.js");
 
   TestCompletionCallback callback;
@@ -707,7 +708,7 @@
   host_resolver.rules()->AddRule("host1", "91.13.12.1");
   host_resolver.rules()->AddRule("host2", "91.13.12.2");
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "dns_during_init.js");
 
   // Initialization did 2 dnsResolves.
@@ -763,7 +764,7 @@
 
   host_resolver.rules()->AddSimulatedFailure("*");
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "dns.js");
 
   const size_t kNumRequests = 5;
@@ -790,7 +791,7 @@
 
   host_resolver.rules()->AddSimulatedFailure("*");
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "dns.js");
 
   ProxyInfo proxy_info1;
@@ -819,7 +820,7 @@
 
   host_resolver.rules()->AddSimulatedFailure("*");
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "error.js");
 
   ProxyInfo proxy_info1;
@@ -922,7 +923,7 @@
   BlockableHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "dns.js");
 
   ProxyInfo proxy_info1;
@@ -969,7 +970,7 @@
   BlockableHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "dns.js");
 
   ProxyInfo proxy_info;
@@ -991,7 +992,7 @@
   MockCachingHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "dns.js");
 
   ProxyInfo proxy_info;
@@ -1015,10 +1016,10 @@
   BlockableHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8TracingFactory> factory(
+  std::unique_ptr<ProxyResolverV8TracingFactory> factory(
       ProxyResolverV8TracingFactory::Create());
-  scoped_ptr<ProxyResolverV8Tracing> resolver;
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverV8Tracing> resolver;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   factory->CreateProxyResolverV8Tracing(
       LoadScriptData("dns_during_init.js"), mock_bindings.CreateBindings(),
       &resolver, base::Bind(&CrashCallback), &request);
@@ -1033,10 +1034,10 @@
   BlockableHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver;
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverV8Tracing> resolver;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   {
-    scoped_ptr<ProxyResolverV8TracingFactory> factory(
+    std::unique_ptr<ProxyResolverV8TracingFactory> factory(
         ProxyResolverV8TracingFactory::Create());
 
     factory->CreateProxyResolverV8Tracing(
@@ -1051,10 +1052,10 @@
   BlockableHostResolver host_resolver;
   MockBindings mock_bindings(&host_resolver);
 
-  scoped_ptr<ProxyResolverV8TracingFactory> factory(
+  std::unique_ptr<ProxyResolverV8TracingFactory> factory(
       ProxyResolverV8TracingFactory::Create());
-  scoped_ptr<ProxyResolverV8Tracing> resolver;
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverV8Tracing> resolver;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   TestCompletionCallback callback;
   factory->CreateProxyResolverV8Tracing(
       LoadScriptData("error_on_load.js"), mock_bindings.CreateBindings(),
@@ -1073,7 +1074,7 @@
   host_resolver.rules()->AddRule("host1", "182.111.0.222");
   host_resolver.rules()->AddRule("host2", "111.33.44.55");
 
-  scoped_ptr<ProxyResolverV8Tracing> resolver =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver =
       CreateResolver(mock_bindings.CreateBindings(), "terminate.js");
 
   TestCompletionCallback callback;
@@ -1115,19 +1116,19 @@
   host_resolver0.rules()->AddRuleForAddressFamily(
       "*", ADDRESS_FAMILY_IPV4, "122.133.144.155");
   host_resolver0.rules()->AddRule("*", "133.122.100.200");
-  scoped_ptr<ProxyResolverV8Tracing> resolver0 =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver0 =
       CreateResolver(mock_bindings0.CreateBindings(), "dns.js");
 
   // ------------------------
   // Setup resolver1
   // ------------------------
-  scoped_ptr<ProxyResolverV8Tracing> resolver1 =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver1 =
       CreateResolver(mock_bindings0.CreateBindings(), "dns.js");
 
   // ------------------------
   // Setup resolver2
   // ------------------------
-  scoped_ptr<ProxyResolverV8Tracing> resolver2 =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver2 =
       CreateResolver(mock_bindings0.CreateBindings(), "simple.js");
 
   // ------------------------
@@ -1136,7 +1137,7 @@
   MockHostResolver host_resolver3;
   MockBindings mock_bindings3(&host_resolver3);
   host_resolver3.rules()->AddRule("foo", "166.155.144.33");
-  scoped_ptr<ProxyResolverV8Tracing> resolver3 =
+  std::unique_ptr<ProxyResolverV8Tracing> resolver3 =
       CreateResolver(mock_bindings3.CreateBindings(), "simple_dns.js");
 
   // ------------------------
diff --git a/net/proxy/proxy_resolver_v8_tracing_wrapper.cc b/net/proxy/proxy_resolver_v8_tracing_wrapper.cc
index 25144b6..8c23cab 100644
--- a/net/proxy/proxy_resolver_v8_tracing_wrapper.cc
+++ b/net/proxy/proxy_resolver_v8_tracing_wrapper.cc
@@ -9,6 +9,7 @@
 
 #include "base/bind.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/values.h"
 #include "net/base/net_errors.h"
 #include "net/log/net_log.h"
@@ -18,11 +19,11 @@
 namespace {
 
 // Returns event parameters for a PAC error message (line number + message).
-scoped_ptr<base::Value> NetLogErrorCallback(
+std::unique_ptr<base::Value> NetLogErrorCallback(
     int line_number,
     const base::string16* message,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("line_number", line_number);
   dict->SetString("message", *message);
   return std::move(dict);
@@ -80,10 +81,10 @@
 class ProxyResolverV8TracingWrapper : public ProxyResolver {
  public:
   ProxyResolverV8TracingWrapper(
-      scoped_ptr<ProxyResolverV8Tracing> resolver_impl,
+      std::unique_ptr<ProxyResolverV8Tracing> resolver_impl,
       NetLog* net_log,
       HostResolver* host_resolver,
-      scoped_ptr<ProxyResolverErrorObserver> error_observer);
+      std::unique_ptr<ProxyResolverErrorObserver> error_observer);
 
   int GetProxyForURL(const GURL& url,
                      ProxyInfo* results,
@@ -96,19 +97,19 @@
   LoadState GetLoadState(RequestHandle request) const override;
 
  private:
-  scoped_ptr<ProxyResolverV8Tracing> resolver_impl_;
+  std::unique_ptr<ProxyResolverV8Tracing> resolver_impl_;
   NetLog* net_log_;
   HostResolver* host_resolver_;
-  scoped_ptr<ProxyResolverErrorObserver> error_observer_;
+  std::unique_ptr<ProxyResolverErrorObserver> error_observer_;
 
   DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8TracingWrapper);
 };
 
 ProxyResolverV8TracingWrapper::ProxyResolverV8TracingWrapper(
-    scoped_ptr<ProxyResolverV8Tracing> resolver_impl,
+    std::unique_ptr<ProxyResolverV8Tracing> resolver_impl,
     NetLog* net_log,
     HostResolver* host_resolver,
-    scoped_ptr<ProxyResolverErrorObserver> error_observer)
+    std::unique_ptr<ProxyResolverErrorObserver> error_observer)
     : resolver_impl_(std::move(resolver_impl)),
       net_log_(net_log),
       host_resolver_(host_resolver),
@@ -122,8 +123,8 @@
     const BoundNetLog& net_log) {
   resolver_impl_->GetProxyForURL(
       url, results, callback, request,
-      make_scoped_ptr(new BindingsImpl(error_observer_.get(), host_resolver_,
-                                       net_log_, net_log)));
+      base::WrapUnique(new BindingsImpl(error_observer_.get(), host_resolver_,
+                                        net_log_, net_log)));
   return ERR_IO_PENDING;
 }
 
@@ -141,35 +142,35 @@
 ProxyResolverFactoryV8TracingWrapper::ProxyResolverFactoryV8TracingWrapper(
     HostResolver* host_resolver,
     NetLog* net_log,
-    const base::Callback<scoped_ptr<ProxyResolverErrorObserver>()>&
+    const base::Callback<std::unique_ptr<ProxyResolverErrorObserver>()>&
         error_observer_factory)
     : ProxyResolverFactory(true),
       factory_impl_(ProxyResolverV8TracingFactory::Create()),
       host_resolver_(host_resolver),
       net_log_(net_log),
-      error_observer_factory_(error_observer_factory) {
-}
+      error_observer_factory_(error_observer_factory) {}
 
 ProxyResolverFactoryV8TracingWrapper::~ProxyResolverFactoryV8TracingWrapper() =
     default;
 
 int ProxyResolverFactoryV8TracingWrapper::CreateProxyResolver(
     const scoped_refptr<ProxyResolverScriptData>& pac_script,
-    scoped_ptr<ProxyResolver>* resolver,
+    std::unique_ptr<ProxyResolver>* resolver,
     const CompletionCallback& callback,
-    scoped_ptr<Request>* request) {
-  scoped_ptr<scoped_ptr<ProxyResolverV8Tracing>> v8_resolver(
-      new scoped_ptr<ProxyResolverV8Tracing>);
-  scoped_ptr<ProxyResolverErrorObserver> error_observer =
+    std::unique_ptr<Request>* request) {
+  std::unique_ptr<std::unique_ptr<ProxyResolverV8Tracing>> v8_resolver(
+      new std::unique_ptr<ProxyResolverV8Tracing>);
+  std::unique_ptr<ProxyResolverErrorObserver> error_observer =
       error_observer_factory_.Run();
   // Note: Argument evaluation order is unspecified, so make copies before
   // passing |v8_resolver| and |error_observer|.
-  scoped_ptr<ProxyResolverV8Tracing>* v8_resolver_local = v8_resolver.get();
+  std::unique_ptr<ProxyResolverV8Tracing>* v8_resolver_local =
+      v8_resolver.get();
   ProxyResolverErrorObserver* error_observer_local = error_observer.get();
   factory_impl_->CreateProxyResolverV8Tracing(
       pac_script,
-      make_scoped_ptr(new BindingsImpl(error_observer_local, host_resolver_,
-                                       net_log_, BoundNetLog())),
+      base::WrapUnique(new BindingsImpl(error_observer_local, host_resolver_,
+                                        net_log_, BoundNetLog())),
       v8_resolver_local,
       base::Bind(&ProxyResolverFactoryV8TracingWrapper::OnProxyResolverCreated,
                  base::Unretained(this), base::Passed(&v8_resolver), resolver,
@@ -179,10 +180,10 @@
 }
 
 void ProxyResolverFactoryV8TracingWrapper::OnProxyResolverCreated(
-    scoped_ptr<scoped_ptr<ProxyResolverV8Tracing>> v8_resolver,
-    scoped_ptr<ProxyResolver>* resolver,
+    std::unique_ptr<std::unique_ptr<ProxyResolverV8Tracing>> v8_resolver,
+    std::unique_ptr<ProxyResolver>* resolver,
     const CompletionCallback& callback,
-    scoped_ptr<ProxyResolverErrorObserver> error_observer,
+    std::unique_ptr<ProxyResolverErrorObserver> error_observer,
     int error) {
   if (error == OK) {
     resolver->reset(new ProxyResolverV8TracingWrapper(
diff --git a/net/proxy/proxy_resolver_v8_tracing_wrapper.h b/net/proxy/proxy_resolver_v8_tracing_wrapper.h
index 000f94d..d05f4af6 100644
--- a/net/proxy/proxy_resolver_v8_tracing_wrapper.h
+++ b/net/proxy/proxy_resolver_v8_tracing_wrapper.h
@@ -5,9 +5,10 @@
 #ifndef NET_PROXY_PROXY_RESOLVER_V8_TRACING_WRAPPER_H_
 #define NET_PROXY_PROXY_RESOLVER_V8_TRACING_WRAPPER_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/proxy/proxy_resolver.h"
 #include "net/proxy/proxy_resolver_factory.h"
@@ -32,29 +33,29 @@
   ProxyResolverFactoryV8TracingWrapper(
       HostResolver* host_resolver,
       NetLog* net_log,
-      const base::Callback<scoped_ptr<ProxyResolverErrorObserver>()>&
+      const base::Callback<std::unique_ptr<ProxyResolverErrorObserver>()>&
           error_observer_factory);
   ~ProxyResolverFactoryV8TracingWrapper() override;
 
   // ProxyResolverFactory override.
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const CompletionCallback& callback,
-      scoped_ptr<Request>* request) override;
+      std::unique_ptr<Request>* request) override;
 
  private:
   void OnProxyResolverCreated(
-      scoped_ptr<scoped_ptr<ProxyResolverV8Tracing>> v8_resolver,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<std::unique_ptr<ProxyResolverV8Tracing>> v8_resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const CompletionCallback& callback,
-      scoped_ptr<ProxyResolverErrorObserver> error_observer,
+      std::unique_ptr<ProxyResolverErrorObserver> error_observer,
       int error);
 
-  scoped_ptr<ProxyResolverV8TracingFactory> factory_impl_;
+  std::unique_ptr<ProxyResolverV8TracingFactory> factory_impl_;
   HostResolver* const host_resolver_;
   NetLog* const net_log_;
-  const base::Callback<scoped_ptr<ProxyResolverErrorObserver>()>
+  const base::Callback<std::unique_ptr<ProxyResolverErrorObserver>()>
       error_observer_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(ProxyResolverFactoryV8TracingWrapper);
diff --git a/net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc b/net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc
index 946d4bf..6dcc828 100644
--- a/net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc
@@ -7,6 +7,7 @@
 #include <string>
 
 #include "base/files/file_util.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/path_service.h"
 #include "base/stl_util.h"
@@ -63,22 +64,22 @@
   return ProxyResolverScriptData::FromUTF8(file_contents);
 }
 
-scoped_ptr<ProxyResolverErrorObserver> ReturnErrorObserver(
-    scoped_ptr<ProxyResolverErrorObserver> error_observer) {
+std::unique_ptr<ProxyResolverErrorObserver> ReturnErrorObserver(
+    std::unique_ptr<ProxyResolverErrorObserver> error_observer) {
   return error_observer;
 }
 
-scoped_ptr<ProxyResolver> CreateResolver(
+std::unique_ptr<ProxyResolver> CreateResolver(
     NetLog* net_log,
     HostResolver* host_resolver,
-    scoped_ptr<ProxyResolverErrorObserver> error_observer,
+    std::unique_ptr<ProxyResolverErrorObserver> error_observer,
     const char* filename) {
-  scoped_ptr<ProxyResolver> resolver;
+  std::unique_ptr<ProxyResolver> resolver;
   ProxyResolverFactoryV8TracingWrapper factory(
       host_resolver, net_log,
       base::Bind(&ReturnErrorObserver, base::Passed(&error_observer)));
   TestCompletionCallback callback;
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   int rv = factory.CreateProxyResolver(LoadScriptData(filename), &resolver,
                                        callback.callback(), &request);
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -122,8 +123,8 @@
   MockCachingHostResolver host_resolver;
   MockErrorObserver* error_observer = new MockErrorObserver;
 
-  scoped_ptr<ProxyResolver> resolver = CreateResolver(
-      &log, &host_resolver, make_scoped_ptr(error_observer), "simple.js");
+  std::unique_ptr<ProxyResolver> resolver = CreateResolver(
+      &log, &host_resolver, base::WrapUnique(error_observer), "simple.js");
 
   TestCompletionCallback callback;
   ProxyInfo proxy_info;
@@ -153,8 +154,8 @@
   MockCachingHostResolver host_resolver;
   MockErrorObserver* error_observer = new MockErrorObserver;
 
-  scoped_ptr<ProxyResolver> resolver = CreateResolver(
-      &log, &host_resolver, make_scoped_ptr(error_observer), "error.js");
+  std::unique_ptr<ProxyResolver> resolver = CreateResolver(
+      &log, &host_resolver, base::WrapUnique(error_observer), "error.js");
 
   TestCompletionCallback callback;
   ProxyInfo proxy_info;
@@ -201,8 +202,8 @@
   MockCachingHostResolver host_resolver;
   MockErrorObserver* error_observer = new MockErrorObserver;
 
-  scoped_ptr<ProxyResolver> resolver =
-      CreateResolver(&log, &host_resolver, make_scoped_ptr(error_observer),
+  std::unique_ptr<ProxyResolver> resolver =
+      CreateResolver(&log, &host_resolver, base::WrapUnique(error_observer),
                      "too_many_alerts.js");
 
   TestCompletionCallback callback;
@@ -249,8 +250,8 @@
   MockCachingHostResolver host_resolver;
   MockErrorObserver* error_observer = new MockErrorObserver;
 
-  scoped_ptr<ProxyResolver> resolver =
-      CreateResolver(&log, &host_resolver, make_scoped_ptr(error_observer),
+  std::unique_ptr<ProxyResolver> resolver =
+      CreateResolver(&log, &host_resolver, base::WrapUnique(error_observer),
                      "too_many_empty_alerts.js");
 
   TestCompletionCallback callback;
@@ -307,8 +308,8 @@
                                                  "122.133.144.155");
   host_resolver.rules()->AddRule("*", "133.122.100.200");
 
-  scoped_ptr<ProxyResolver> resolver = CreateResolver(
-      &log, &host_resolver, make_scoped_ptr(error_observer), "dns.js");
+  std::unique_ptr<ProxyResolver> resolver = CreateResolver(
+      &log, &host_resolver, base::WrapUnique(error_observer), "dns.js");
 
   TestCompletionCallback callback;
   ProxyInfo proxy_info;
@@ -371,8 +372,8 @@
   host_resolver.rules()->AddRule("foopy", "166.155.144.11");
   host_resolver.rules()->AddRule("*", "122.133.144.155");
 
-  scoped_ptr<ProxyResolver> resolver = CreateResolver(
-      &log, &host_resolver, make_scoped_ptr(error_observer), "simple_dns.js");
+  std::unique_ptr<ProxyResolver> resolver = CreateResolver(
+      &log, &host_resolver, base::WrapUnique(error_observer), "simple_dns.js");
 
   TestCompletionCallback callback1;
   TestCompletionCallback callback2;
@@ -423,8 +424,8 @@
   host_resolver.rules()->AddRule("crazy4", "133.199.111.4");
   host_resolver.rules()->AddRule("*", "122.133.144.155");
 
-  scoped_ptr<ProxyResolver> resolver =
-      CreateResolver(&log, &host_resolver, make_scoped_ptr(error_observer),
+  std::unique_ptr<ProxyResolver> resolver =
+      CreateResolver(&log, &host_resolver, base::WrapUnique(error_observer),
                      "global_sideffects1.js");
 
   TestCompletionCallback callback;
@@ -477,8 +478,8 @@
   host_resolver.rules()->AddRule("host4", "166.155.144.44");
   host_resolver.rules()->AddRule("*", "122.133.144.155");
 
-  scoped_ptr<ProxyResolver> resolver =
-      CreateResolver(&log, &host_resolver, make_scoped_ptr(error_observer),
+  std::unique_ptr<ProxyResolver> resolver =
+      CreateResolver(&log, &host_resolver, base::WrapUnique(error_observer),
                      "global_sideffects2.js");
 
   TestCompletionCallback callback;
@@ -515,8 +516,8 @@
   host_resolver.rules()->AddRule("host*", "166.155.144.11");
   host_resolver.rules()->AddRule("*", "122.133.144.155");
 
-  scoped_ptr<ProxyResolver> resolver =
-      CreateResolver(&log, &host_resolver, make_scoped_ptr(error_observer),
+  std::unique_ptr<ProxyResolver> resolver =
+      CreateResolver(&log, &host_resolver, base::WrapUnique(error_observer),
                      "global_sideffects3.js");
 
   TestCompletionCallback callback;
@@ -560,8 +561,8 @@
   host_resolver.rules()->AddRule("host*", "166.155.144.11");
   host_resolver.rules()->AddRule("*", "122.133.144.155");
 
-  scoped_ptr<ProxyResolver> resolver =
-      CreateResolver(&log, &host_resolver, make_scoped_ptr(error_observer),
+  std::unique_ptr<ProxyResolver> resolver =
+      CreateResolver(&log, &host_resolver, base::WrapUnique(error_observer),
                      "global_sideffects4.js");
 
   TestCompletionCallback callback;
@@ -595,8 +596,8 @@
   host_resolver.rules()->AddRule("host1", "91.13.12.1");
   host_resolver.rules()->AddRule("host2", "91.13.12.2");
 
-  scoped_ptr<ProxyResolver> resolver =
-      CreateResolver(&log, &host_resolver, make_scoped_ptr(error_observer),
+  std::unique_ptr<ProxyResolver> resolver =
+      CreateResolver(&log, &host_resolver, base::WrapUnique(error_observer),
                      "dns_during_init.js");
 
   // Initialization did 2 dnsResolves.
@@ -662,8 +663,8 @@
 
   host_resolver.rules()->AddSimulatedFailure("*");
 
-  scoped_ptr<ProxyResolver> resolver = CreateResolver(
-      nullptr, &host_resolver, make_scoped_ptr(error_observer), "dns.js");
+  std::unique_ptr<ProxyResolver> resolver = CreateResolver(
+      nullptr, &host_resolver, base::WrapUnique(error_observer), "dns.js");
 
   const size_t kNumRequests = 5;
   ProxyInfo proxy_info[kNumRequests];
@@ -690,8 +691,8 @@
 
   host_resolver.rules()->AddSimulatedFailure("*");
 
-  scoped_ptr<ProxyResolver> resolver = CreateResolver(
-      nullptr, &host_resolver, make_scoped_ptr(error_observer), "dns.js");
+  std::unique_ptr<ProxyResolver> resolver = CreateResolver(
+      nullptr, &host_resolver, base::WrapUnique(error_observer), "dns.js");
 
   ProxyInfo proxy_info1;
   ProxyInfo proxy_info2;
@@ -721,8 +722,8 @@
 
   host_resolver.rules()->AddSimulatedFailure("*");
 
-  scoped_ptr<ProxyResolver> resolver = CreateResolver(
-      nullptr, &host_resolver, make_scoped_ptr(error_observer), "error.js");
+  std::unique_ptr<ProxyResolver> resolver = CreateResolver(
+      nullptr, &host_resolver, base::WrapUnique(error_observer), "error.js");
 
   ProxyInfo proxy_info1;
   ProxyInfo proxy_info2;
@@ -823,8 +824,8 @@
   BlockableHostResolver host_resolver;
   MockErrorObserver* error_observer = new MockErrorObserver;
 
-  scoped_ptr<ProxyResolver> resolver = CreateResolver(
-      nullptr, &host_resolver, make_scoped_ptr(error_observer), "dns.js");
+  std::unique_ptr<ProxyResolver> resolver = CreateResolver(
+      nullptr, &host_resolver, base::WrapUnique(error_observer), "dns.js");
 
   ProxyInfo proxy_info1;
   ProxyInfo proxy_info2;
@@ -874,8 +875,8 @@
   BlockableHostResolver host_resolver;
   MockErrorObserver* error_observer = new MockErrorObserver;
 
-  scoped_ptr<ProxyResolver> resolver = CreateResolver(
-      nullptr, &host_resolver, make_scoped_ptr(error_observer), "dns.js");
+  std::unique_ptr<ProxyResolver> resolver = CreateResolver(
+      nullptr, &host_resolver, base::WrapUnique(error_observer), "dns.js");
 
   ProxyInfo proxy_info;
   ProxyResolver::RequestHandle request;
@@ -898,8 +899,8 @@
   MockCachingHostResolver host_resolver;
   MockErrorObserver* error_observer = new MockErrorObserver;
 
-  scoped_ptr<ProxyResolver> resolver = CreateResolver(
-      nullptr, &host_resolver, make_scoped_ptr(error_observer), "dns.js");
+  std::unique_ptr<ProxyResolver> resolver = CreateResolver(
+      nullptr, &host_resolver, base::WrapUnique(error_observer), "dns.js");
 
   ProxyInfo proxy_info;
   ProxyResolver::RequestHandle request;
@@ -927,10 +928,10 @@
   ProxyResolverFactoryV8TracingWrapper factory(
       &host_resolver, nullptr,
       base::Bind(&ReturnErrorObserver,
-                 base::Passed(make_scoped_ptr(error_observer))));
+                 base::Passed(base::WrapUnique(error_observer))));
 
-  scoped_ptr<ProxyResolver> resolver;
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolver> resolver;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   int rv = factory.CreateProxyResolver(LoadScriptData("dns_during_init.js"),
                                        &resolver, base::Bind(&CrashCallback),
                                        &request);
@@ -947,13 +948,13 @@
   BlockableHostResolver host_resolver;
   MockErrorObserver* error_observer = new MockErrorObserver;
 
-  scoped_ptr<ProxyResolver> resolver;
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolver> resolver;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   {
     ProxyResolverFactoryV8TracingWrapper factory(
         &host_resolver, nullptr,
         base::Bind(&ReturnErrorObserver,
-                   base::Passed(make_scoped_ptr(error_observer))));
+                   base::Passed(base::WrapUnique(error_observer))));
 
     int rv = factory.CreateProxyResolver(LoadScriptData("dns_during_init.js"),
                                          &resolver, base::Bind(&CrashCallback),
@@ -971,10 +972,10 @@
   ProxyResolverFactoryV8TracingWrapper factory(
       &host_resolver, nullptr,
       base::Bind(&ReturnErrorObserver,
-                 base::Passed(make_scoped_ptr(error_observer))));
+                 base::Passed(base::WrapUnique(error_observer))));
 
-  scoped_ptr<ProxyResolver> resolver;
-  scoped_ptr<ProxyResolverFactory::Request> request;
+  std::unique_ptr<ProxyResolver> resolver;
+  std::unique_ptr<ProxyResolverFactory::Request> request;
   TestCompletionCallback callback;
   int rv =
       factory.CreateProxyResolver(LoadScriptData("error_on_load.js"), &resolver,
@@ -995,8 +996,8 @@
   host_resolver.rules()->AddRule("host1", "182.111.0.222");
   host_resolver.rules()->AddRule("host2", "111.33.44.55");
 
-  scoped_ptr<ProxyResolver> resolver = CreateResolver(
-      &log, &host_resolver, make_scoped_ptr(error_observer), "terminate.js");
+  std::unique_ptr<ProxyResolver> resolver = CreateResolver(
+      &log, &host_resolver, base::WrapUnique(error_observer), "terminate.js");
 
   TestCompletionCallback callback;
   ProxyInfo proxy_info;
@@ -1041,32 +1042,32 @@
   host_resolver0.rules()->AddRuleForAddressFamily("*", ADDRESS_FAMILY_IPV4,
                                                   "122.133.144.155");
   host_resolver0.rules()->AddRule("*", "133.122.100.200");
-  scoped_ptr<ProxyResolver> resolver0 =
+  std::unique_ptr<ProxyResolver> resolver0 =
       CreateResolver(nullptr, &host_resolver0,
-                     make_scoped_ptr(new MockErrorObserver), "dns.js");
+                     base::WrapUnique(new MockErrorObserver), "dns.js");
 
   // ------------------------
   // Setup resolver1
   // ------------------------
-  scoped_ptr<ProxyResolver> resolver1 =
+  std::unique_ptr<ProxyResolver> resolver1 =
       CreateResolver(nullptr, &host_resolver0,
-                     make_scoped_ptr(new MockErrorObserver), "dns.js");
+                     base::WrapUnique(new MockErrorObserver), "dns.js");
 
   // ------------------------
   // Setup resolver2
   // ------------------------
-  scoped_ptr<ProxyResolver> resolver2 =
+  std::unique_ptr<ProxyResolver> resolver2 =
       CreateResolver(nullptr, &host_resolver0,
-                     make_scoped_ptr(new MockErrorObserver), "simple.js");
+                     base::WrapUnique(new MockErrorObserver), "simple.js");
 
   // ------------------------
   // Setup resolver3
   // ------------------------
   MockHostResolver host_resolver3;
   host_resolver3.rules()->AddRule("foo", "166.155.144.33");
-  scoped_ptr<ProxyResolver> resolver3 =
+  std::unique_ptr<ProxyResolver> resolver3 =
       CreateResolver(nullptr, &host_resolver3,
-                     make_scoped_ptr(new MockErrorObserver), "simple_dns.js");
+                     base::WrapUnique(new MockErrorObserver), "simple_dns.js");
 
   // ------------------------
   // Queue up work for each resolver (which will be running in parallel).
diff --git a/net/proxy/proxy_resolver_v8_unittest.cc b/net/proxy/proxy_resolver_v8_unittest.cc
index 983a1b03..93243e6 100644
--- a/net/proxy/proxy_resolver_v8_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_unittest.cc
@@ -132,7 +132,7 @@
 
  private:
   MockJSBindings js_bindings_;
-  scoped_ptr<ProxyResolverV8> resolver_;
+  std::unique_ptr<ProxyResolverV8> resolver_;
 };
 
 // Doesn't really matter what these values are for many of the tests.
diff --git a/net/proxy/proxy_resolver_winhttp.cc b/net/proxy/proxy_resolver_winhttp.cc
index ee16ef8..b1d3ce35 100644
--- a/net/proxy/proxy_resolver_winhttp.cc
+++ b/net/proxy/proxy_resolver_winhttp.cc
@@ -218,9 +218,9 @@
 
 int ProxyResolverFactoryWinHttp::CreateProxyResolver(
     const scoped_refptr<ProxyResolverScriptData>& pac_script,
-    scoped_ptr<ProxyResolver>* resolver,
+    std::unique_ptr<ProxyResolver>* resolver,
     const CompletionCallback& callback,
-    scoped_ptr<Request>* request) {
+    std::unique_ptr<Request>* request) {
   resolver->reset(new ProxyResolverWinHttp(pac_script));
   return OK;
 }
diff --git a/net/proxy/proxy_resolver_winhttp.h b/net/proxy/proxy_resolver_winhttp.h
index c6e8ac5..89c8b13 100644
--- a/net/proxy/proxy_resolver_winhttp.h
+++ b/net/proxy/proxy_resolver_winhttp.h
@@ -22,9 +22,9 @@
 
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const CompletionCallback& callback,
-      scoped_ptr<Request>* request) override;
+      std::unique_ptr<Request>* request) override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(ProxyResolverFactoryWinHttp);
diff --git a/net/proxy/proxy_script_decider.cc b/net/proxy/proxy_script_decider.cc
index d131725..7695b4c 100644
--- a/net/proxy/proxy_script_decider.cc
+++ b/net/proxy/proxy_script_decider.cc
@@ -55,10 +55,10 @@
 const int kQuickCheckDelayMs = 1000;
 };
 
-scoped_ptr<base::Value> ProxyScriptDecider::PacSource::NetLogCallback(
+std::unique_ptr<base::Value> ProxyScriptDecider::PacSource::NetLogCallback(
     const GURL* effective_pac_url,
     NetLogCaptureMode /* capture_mode */) const {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   std::string source;
   switch (type) {
     case PacSource::WPAD_DHCP:
diff --git a/net/proxy/proxy_script_decider.h b/net/proxy/proxy_script_decider.h
index 60cb24b..e405acf 100644
--- a/net/proxy/proxy_script_decider.h
+++ b/net/proxy/proxy_script_decider.h
@@ -103,7 +103,7 @@
     // Returns a Value representing the PacSource.  |effective_pac_url| must
     // be non-NULL and point to the URL derived from information contained in
     // |this|, if Type is not WPAD_DHCP.
-    scoped_ptr<base::Value> NetLogCallback(
+    std::unique_ptr<base::Value> NetLogCallback(
         const GURL* effective_pac_url,
         NetLogCaptureMode capture_mode) const;
 
@@ -199,7 +199,7 @@
 
   AddressList wpad_addresses_;
   base::OneShotTimer quick_check_timer_;
-  scoped_ptr<SingleRequestHostResolver> host_resolver_;
+  std::unique_ptr<SingleRequestHostResolver> host_resolver_;
   base::Time quick_check_start_time_;
 
   DISALLOW_COPY_AND_ASSIGN(ProxyScriptDecider);
diff --git a/net/proxy/proxy_script_decider_unittest.cc b/net/proxy/proxy_script_decider_unittest.cc
index 33e8aa5..8af9d121a 100644
--- a/net/proxy/proxy_script_decider_unittest.cc
+++ b/net/proxy/proxy_script_decider_unittest.cc
@@ -329,7 +329,7 @@
   }
 
  protected:
-  scoped_ptr<ProxyScriptDecider> decider_;
+  std::unique_ptr<ProxyScriptDecider> decider_;
   MockHostResolver resolver_;
   Rules rules_;
   Rules::Rule rule_;
@@ -768,7 +768,8 @@
   Rules rules;
   RuleBasedProxyScriptFetcher fetcher(&rules);
 
-  scoped_ptr<AsyncFailDhcpFetcher> dhcp_fetcher(new AsyncFailDhcpFetcher());
+  std::unique_ptr<AsyncFailDhcpFetcher> dhcp_fetcher(
+      new AsyncFailDhcpFetcher());
 
   ProxyConfig config;
   config.set_auto_detect(true);
diff --git a/net/proxy/proxy_script_fetcher_impl.h b/net/proxy/proxy_script_fetcher_impl.h
index fe0bf33..0ece5b8f 100644
--- a/net/proxy/proxy_script_fetcher_impl.h
+++ b/net/proxy/proxy_script_fetcher_impl.h
@@ -7,12 +7,12 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
 #include "base/time/time.h"
@@ -92,7 +92,7 @@
   int next_id_;
 
   // The current (in progress) request, or NULL.
-  scoped_ptr<URLRequest> cur_request_;
+  std::unique_ptr<URLRequest> cur_request_;
 
   // State for current request (only valid when |cur_request_| is not NULL):
 
diff --git a/net/proxy/proxy_script_fetcher_impl_unittest.cc b/net/proxy/proxy_script_fetcher_impl_unittest.cc
index a230ab3..9154798 100644
--- a/net/proxy/proxy_script_fetcher_impl_unittest.cc
+++ b/net/proxy/proxy_script_fetcher_impl_unittest.cc
@@ -10,6 +10,7 @@
 #include "base/compiler_specific.h"
 #include "base/files/file_path.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/path_service.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/utf_string_conversions.h"
@@ -62,14 +63,15 @@
  public:
   RequestContext() : storage_(this) {
     ProxyConfig no_proxy;
-    storage_.set_host_resolver(scoped_ptr<HostResolver>(new MockHostResolver));
-    storage_.set_cert_verifier(make_scoped_ptr(new MockCertVerifier));
+    storage_.set_host_resolver(
+        std::unique_ptr<HostResolver>(new MockHostResolver));
+    storage_.set_cert_verifier(base::WrapUnique(new MockCertVerifier));
     storage_.set_transport_security_state(
-        make_scoped_ptr(new TransportSecurityState));
+        base::WrapUnique(new TransportSecurityState));
     storage_.set_proxy_service(ProxyService::CreateFixed(no_proxy));
     storage_.set_ssl_config_service(new SSLConfigServiceDefaults);
     storage_.set_http_server_properties(
-        scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
+        std::unique_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
 
     HttpNetworkSession::Params params;
     params.host_resolver = host_resolver();
@@ -79,15 +81,15 @@
     params.ssl_config_service = ssl_config_service();
     params.http_server_properties = http_server_properties();
     storage_.set_http_network_session(
-        make_scoped_ptr(new HttpNetworkSession(params)));
-    storage_.set_http_transaction_factory(make_scoped_ptr(
+        base::WrapUnique(new HttpNetworkSession(params)));
+    storage_.set_http_transaction_factory(base::WrapUnique(
         new HttpCache(storage_.http_network_session(),
                       HttpCache::DefaultBackend::InMemory(0), false)));
-    scoped_ptr<URLRequestJobFactoryImpl> job_factory =
-        make_scoped_ptr(new URLRequestJobFactoryImpl());
+    std::unique_ptr<URLRequestJobFactoryImpl> job_factory =
+        base::WrapUnique(new URLRequestJobFactoryImpl());
 #if !defined(DISABLE_FILE_SUPPORT)
     job_factory->SetProtocolHandler("file",
-                                    make_scoped_ptr(new FileProtocolHandler(
+                                    base::WrapUnique(new FileProtocolHandler(
                                         base::ThreadTaskRunnerHandle::Get())));
 #endif
     storage_.set_job_factory(std::move(job_factory));
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index 01bc3bb..ee3b967 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -14,6 +14,7 @@
 #include "base/location.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/sparse_histogram.h"
@@ -233,11 +234,11 @@
       : MultiThreadedProxyResolverFactory(max_num_threads,
                                           false /*expects_pac_bytes*/) {}
 
-  scoped_ptr<ProxyResolverFactory> CreateProxyResolverFactory() override {
+  std::unique_ptr<ProxyResolverFactory> CreateProxyResolverFactory() override {
 #if defined(OS_WIN)
-    return make_scoped_ptr(new ProxyResolverFactoryWinHttp());
+    return base::WrapUnique(new ProxyResolverFactoryWinHttp());
 #elif defined(OS_MACOSX)
-    return make_scoped_ptr(new ProxyResolverFactoryMac());
+    return base::WrapUnique(new ProxyResolverFactoryMac());
 #else
     NOTREACHED();
     return NULL;
@@ -263,9 +264,9 @@
   // ProxyResolverFactory overrides.
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const net::CompletionCallback& callback,
-      scoped_ptr<Request>* request) override {
+      std::unique_ptr<Request>* request) override {
     resolver->reset(new ProxyResolverNull());
     return OK;
   }
@@ -282,9 +283,9 @@
   // ProxyResolverFactory override.
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const net::CompletionCallback& callback,
-      scoped_ptr<Request>* request) override {
+      std::unique_ptr<Request>* request) override {
     resolver->reset(new ProxyResolverFromPacString(pac_string_));
     return OK;
   }
@@ -296,11 +297,11 @@
 };
 
 // Returns NetLog parameters describing a proxy configuration change.
-scoped_ptr<base::Value> NetLogProxyConfigChangedCallback(
+std::unique_ptr<base::Value> NetLogProxyConfigChangedCallback(
     const ProxyConfig* old_config,
     const ProxyConfig* new_config,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   // The "old_config" is optional -- the first notification will not have
   // any "previous" configuration.
   if (old_config->is_valid())
@@ -309,10 +310,10 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogBadProxyListCallback(
+std::unique_ptr<base::Value> NetLogBadProxyListCallback(
     const ProxyRetryInfoMap* retry_info,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   base::ListValue* list = new base::ListValue();
 
   for (ProxyRetryInfoMap::const_iterator iter = retry_info->begin();
@@ -324,10 +325,10 @@
 }
 
 // Returns NetLog parameters on a successfuly proxy resolution.
-scoped_ptr<base::Value> NetLogFinishedResolvingProxyCallback(
+std::unique_ptr<base::Value> NetLogFinishedResolvingProxyCallback(
     const ProxyInfo* result,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("pac_string", result->ToPacString());
   return std::move(dict);
 }
@@ -376,7 +377,7 @@
   // Begins initializing the proxy resolver; calls |callback| when done. A
   // ProxyResolver instance will be created using |proxy_resolver_factory| and
   // returned via |proxy_resolver| if the final result is OK.
-  int Start(scoped_ptr<ProxyResolver>* proxy_resolver,
+  int Start(std::unique_ptr<ProxyResolver>* proxy_resolver,
             ProxyResolverFactory* proxy_resolver_factory,
             ProxyScriptFetcher* proxy_script_fetcher,
             DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher,
@@ -404,7 +405,7 @@
   // inputs for initializing the ProxyResolver. A ProxyResolver instance will
   // be created using |proxy_resolver_factory| and returned via
   // |proxy_resolver| if the final result is OK.
-  int StartSkipDecider(scoped_ptr<ProxyResolver>* proxy_resolver,
+  int StartSkipDecider(std::unique_ptr<ProxyResolver>* proxy_resolver,
                        ProxyResolverFactory* proxy_resolver_factory,
                        const ProxyConfig& effective_config,
                        int decider_result,
@@ -541,10 +542,10 @@
   ProxyConfig effective_config_;
   scoped_refptr<ProxyResolverScriptData> script_data_;
   TimeDelta wait_delay_;
-  scoped_ptr<ProxyScriptDecider> decider_;
+  std::unique_ptr<ProxyScriptDecider> decider_;
   ProxyResolverFactory* proxy_resolver_factory_;
-  scoped_ptr<ProxyResolverFactory::Request> create_resolver_request_;
-  scoped_ptr<ProxyResolver>* proxy_resolver_;
+  std::unique_ptr<ProxyResolverFactory::Request> create_resolver_request_;
+  std::unique_ptr<ProxyResolver>* proxy_resolver_;
   CompletionCallback callback_;
   State next_state_;
   bool quick_check_enabled_;
@@ -737,7 +738,7 @@
   int last_error_;
   scoped_refptr<ProxyResolverScriptData> last_script_data_;
 
-  scoped_ptr<ProxyScriptDecider> decider_;
+  std::unique_ptr<ProxyScriptDecider> decider_;
   TimeDelta next_poll_delay_;
   PacPollPolicy::Mode next_poll_mode_;
 
@@ -926,9 +927,10 @@
 
 // ProxyService ---------------------------------------------------------------
 
-ProxyService::ProxyService(scoped_ptr<ProxyConfigService> config_service,
-                           scoped_ptr<ProxyResolverFactory> resolver_factory,
-                           NetLog* net_log)
+ProxyService::ProxyService(
+    std::unique_ptr<ProxyConfigService> config_service,
+    std::unique_ptr<ProxyResolverFactory> resolver_factory,
+    NetLog* net_log)
     : resolver_factory_(std::move(resolver_factory)),
       next_config_id_(1),
       current_state_(STATE_NONE),
@@ -942,8 +944,8 @@
 }
 
 // static
-scoped_ptr<ProxyService> ProxyService::CreateUsingSystemProxyResolver(
-    scoped_ptr<ProxyConfigService> proxy_config_service,
+std::unique_ptr<ProxyService> ProxyService::CreateUsingSystemProxyResolver(
+    std::unique_ptr<ProxyConfigService> proxy_config_service,
     size_t num_pac_threads,
     NetLog* net_log) {
   DCHECK(proxy_config_service);
@@ -956,59 +958,62 @@
   if (num_pac_threads == 0)
     num_pac_threads = kDefaultNumPacThreads;
 
-  return make_scoped_ptr(new ProxyService(
+  return base::WrapUnique(new ProxyService(
       std::move(proxy_config_service),
-      make_scoped_ptr(new ProxyResolverFactoryForSystem(num_pac_threads)),
+      base::WrapUnique(new ProxyResolverFactoryForSystem(num_pac_threads)),
       net_log));
 }
 
 // static
-scoped_ptr<ProxyService> ProxyService::CreateWithoutProxyResolver(
-    scoped_ptr<ProxyConfigService> proxy_config_service,
+std::unique_ptr<ProxyService> ProxyService::CreateWithoutProxyResolver(
+    std::unique_ptr<ProxyConfigService> proxy_config_service,
     NetLog* net_log) {
-  return make_scoped_ptr(new ProxyService(
+  return base::WrapUnique(new ProxyService(
       std::move(proxy_config_service),
-      make_scoped_ptr(new ProxyResolverFactoryForNullResolver), net_log));
+      base::WrapUnique(new ProxyResolverFactoryForNullResolver), net_log));
 }
 
 // static
-scoped_ptr<ProxyService> ProxyService::CreateFixed(const ProxyConfig& pc) {
+std::unique_ptr<ProxyService> ProxyService::CreateFixed(const ProxyConfig& pc) {
   // TODO(eroman): This isn't quite right, won't work if |pc| specifies
   //               a PAC script.
   return CreateUsingSystemProxyResolver(
-      make_scoped_ptr(new ProxyConfigServiceFixed(pc)), 0, NULL);
+      base::WrapUnique(new ProxyConfigServiceFixed(pc)), 0, NULL);
 }
 
 // static
-scoped_ptr<ProxyService> ProxyService::CreateFixed(const std::string& proxy) {
+std::unique_ptr<ProxyService> ProxyService::CreateFixed(
+    const std::string& proxy) {
   ProxyConfig proxy_config;
   proxy_config.proxy_rules().ParseFromString(proxy);
   return ProxyService::CreateFixed(proxy_config);
 }
 
 // static
-scoped_ptr<ProxyService> ProxyService::CreateDirect() {
+std::unique_ptr<ProxyService> ProxyService::CreateDirect() {
   return CreateDirectWithNetLog(NULL);
 }
 
-scoped_ptr<ProxyService> ProxyService::CreateDirectWithNetLog(NetLog* net_log) {
+std::unique_ptr<ProxyService> ProxyService::CreateDirectWithNetLog(
+    NetLog* net_log) {
   // Use direct connections.
-  return make_scoped_ptr(new ProxyService(
-      make_scoped_ptr(new ProxyConfigServiceDirect),
-      make_scoped_ptr(new ProxyResolverFactoryForNullResolver), net_log));
+  return base::WrapUnique(new ProxyService(
+      base::WrapUnique(new ProxyConfigServiceDirect),
+      base::WrapUnique(new ProxyResolverFactoryForNullResolver), net_log));
 }
 
 // static
-scoped_ptr<ProxyService> ProxyService::CreateFixedFromPacResult(
+std::unique_ptr<ProxyService> ProxyService::CreateFixedFromPacResult(
     const std::string& pac_string) {
   // We need the settings to contain an "automatic" setting, otherwise the
   // ProxyResolver dependency we give it will never be used.
-  scoped_ptr<ProxyConfigService> proxy_config_service(
+  std::unique_ptr<ProxyConfigService> proxy_config_service(
       new ProxyConfigServiceFixed(ProxyConfig::CreateAutoDetect()));
 
-  return make_scoped_ptr(new ProxyService(
+  return base::WrapUnique(new ProxyService(
       std::move(proxy_config_service),
-      make_scoped_ptr(new ProxyResolverFactoryForPacResult(pac_string)), NULL));
+      base::WrapUnique(new ProxyResolverFactoryForPacResult(pac_string)),
+      NULL));
 }
 
 int ProxyService::ResolveProxy(const GURL& raw_url,
@@ -1443,7 +1448,7 @@
 
 void ProxyService::SetProxyScriptFetchers(
     ProxyScriptFetcher* proxy_script_fetcher,
-    scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher) {
+    std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher) {
   DCHECK(CalledOnValidThread());
   State previous_state = ResetProxyConfig(false);
   proxy_script_fetcher_.reset(proxy_script_fetcher);
@@ -1476,7 +1481,7 @@
 }
 
 void ProxyService::ResetConfigService(
-    scoped_ptr<ProxyConfigService> new_proxy_config_service) {
+    std::unique_ptr<ProxyConfigService> new_proxy_config_service) {
   DCHECK(CalledOnValidThread());
   State previous_state = ResetProxyConfig(true);
 
@@ -1499,22 +1504,23 @@
 }
 
 // static
-scoped_ptr<ProxyConfigService> ProxyService::CreateSystemProxyConfigService(
+std::unique_ptr<ProxyConfigService>
+ProxyService::CreateSystemProxyConfigService(
     const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
     const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner) {
 #if defined(OS_WIN)
-  return make_scoped_ptr(new ProxyConfigServiceWin());
+  return base::WrapUnique(new ProxyConfigServiceWin());
 #elif defined(OS_IOS)
-  return make_scoped_ptr(new ProxyConfigServiceIOS());
+  return base::WrapUnique(new ProxyConfigServiceIOS());
 #elif defined(OS_MACOSX)
-  return make_scoped_ptr(new ProxyConfigServiceMac(io_task_runner));
+  return base::WrapUnique(new ProxyConfigServiceMac(io_task_runner));
 #elif defined(OS_CHROMEOS)
   LOG(ERROR) << "ProxyConfigService for ChromeOS should be created in "
              << "profile_io_data.cc::CreateProxyConfigService and this should "
              << "be used only for examples.";
-  return make_scoped_ptr(new UnsetProxyConfigService);
+  return base::WrapUnique(new UnsetProxyConfigService);
 #elif defined(OS_LINUX)
-  scoped_ptr<ProxyConfigServiceLinux> linux_config_service(
+  std::unique_ptr<ProxyConfigServiceLinux> linux_config_service(
       new ProxyConfigServiceLinux());
 
   // Assume we got called on the thread that runs the default glib
@@ -1532,12 +1538,12 @@
 
   return std::move(linux_config_service);
 #elif defined(OS_ANDROID)
-  return make_scoped_ptr(new ProxyConfigServiceAndroid(
+  return base::WrapUnique(new ProxyConfigServiceAndroid(
       io_task_runner, base::ThreadTaskRunnerHandle::Get()));
 #else
   LOG(WARNING) << "Failed to choose a system proxy settings fetcher "
                   "for this platform.";
-  return make_scoped_ptr(new ProxyConfigServiceDirect());
+  return base::WrapUnique(new ProxyConfigServiceDirect());
 #endif
 }
 
@@ -1548,9 +1554,9 @@
 }
 
 // static
-scoped_ptr<ProxyService::PacPollPolicy>
-  ProxyService::CreateDefaultPacPollPolicy() {
-  return scoped_ptr<PacPollPolicy>(new DefaultPollPolicy());
+std::unique_ptr<ProxyService::PacPollPolicy>
+ProxyService::CreateDefaultPacPollPolicy() {
+  return std::unique_ptr<PacPollPolicy>(new DefaultPollPolicy());
 }
 
 void ProxyService::OnProxyConfigChanged(
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index 8cd7071..635d26d 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -7,6 +7,7 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
@@ -14,7 +15,6 @@
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/synchronization/waitable_event.h"
 #include "base/threading/non_thread_safe.h"
 #include "net/base/completion_callback.h"
@@ -97,8 +97,8 @@
 
   // |net_log| is a possibly NULL destination to send log events to. It must
   // remain alive for the lifetime of this ProxyService.
-  ProxyService(scoped_ptr<ProxyConfigService> config_service,
-               scoped_ptr<ProxyResolverFactory> resolver_factory,
+  ProxyService(std::unique_ptr<ProxyConfigService> config_service,
+               std::unique_ptr<ProxyResolverFactory> resolver_factory,
                NetLog* net_log);
 
   ~ProxyService() override;
@@ -206,7 +206,7 @@
   // ProxyService takes ownership of proxy_script_fetcher.
   void SetProxyScriptFetchers(
       ProxyScriptFetcher* proxy_script_fetcher,
-      scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher);
+      std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher);
   ProxyScriptFetcher* GetProxyScriptFetcher() const;
 
   // Tells this ProxyService to start using a new ProxyConfigService to
@@ -214,7 +214,7 @@
   // be queried for new config info which will be used for all subsequent
   // ResolveProxy calls.
   void ResetConfigService(
-      scoped_ptr<ProxyConfigService> new_proxy_config_service);
+      std::unique_ptr<ProxyConfigService> new_proxy_config_service);
 
   // Returns the last configuration fetched from ProxyConfigService.
   const ProxyConfig& fetched_config() {
@@ -244,37 +244,37 @@
   // Same as CreateProxyServiceUsingV8ProxyResolver, except it uses system
   // libraries for evaluating the PAC script if available, otherwise skips
   // proxy autoconfig.
-  static scoped_ptr<ProxyService> CreateUsingSystemProxyResolver(
-      scoped_ptr<ProxyConfigService> proxy_config_service,
+  static std::unique_ptr<ProxyService> CreateUsingSystemProxyResolver(
+      std::unique_ptr<ProxyConfigService> proxy_config_service,
       size_t num_pac_threads,
       NetLog* net_log);
 
   // Creates a ProxyService without support for proxy autoconfig.
-  static scoped_ptr<ProxyService> CreateWithoutProxyResolver(
-      scoped_ptr<ProxyConfigService> proxy_config_service,
+  static std::unique_ptr<ProxyService> CreateWithoutProxyResolver(
+      std::unique_ptr<ProxyConfigService> proxy_config_service,
       NetLog* net_log);
 
   // Convenience methods that creates a proxy service using the
   // specified fixed settings.
-  static scoped_ptr<ProxyService> CreateFixed(const ProxyConfig& pc);
-  static scoped_ptr<ProxyService> CreateFixed(const std::string& proxy);
+  static std::unique_ptr<ProxyService> CreateFixed(const ProxyConfig& pc);
+  static std::unique_ptr<ProxyService> CreateFixed(const std::string& proxy);
 
   // Creates a proxy service that uses a DIRECT connection for all requests.
-  static scoped_ptr<ProxyService> CreateDirect();
+  static std::unique_ptr<ProxyService> CreateDirect();
   // |net_log|'s lifetime must exceed ProxyService.
-  static scoped_ptr<ProxyService> CreateDirectWithNetLog(NetLog* net_log);
+  static std::unique_ptr<ProxyService> CreateDirectWithNetLog(NetLog* net_log);
 
   // This method is used by tests to create a ProxyService that returns a
   // hardcoded proxy fallback list (|pac_string|) for every URL.
   //
   // |pac_string| is a list of proxy servers, in the format that a PAC script
   // would return it. For example, "PROXY foobar:99; SOCKS fml:2; DIRECT"
-  static scoped_ptr<ProxyService> CreateFixedFromPacResult(
+  static std::unique_ptr<ProxyService> CreateFixedFromPacResult(
       const std::string& pac_string);
 
   // Creates a config service appropriate for this platform that fetches the
   // system proxy settings.
-  static scoped_ptr<ProxyConfigService> CreateSystemProxyConfigService(
+  static std::unique_ptr<ProxyConfigService> CreateSystemProxyConfigService(
       const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
       const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner);
 
@@ -290,7 +290,7 @@
 
   // This method should only be used by unit tests. Creates an instance
   // of the default internal PacPollPolicy used by ProxyService.
-  static scoped_ptr<PacPollPolicy> CreateDefaultPacPollPolicy();
+  static std::unique_ptr<PacPollPolicy> CreateDefaultPacPollPolicy();
 
   void set_quick_check_enabled(bool value) {
     quick_check_enabled_ = value;
@@ -397,9 +397,9 @@
       const ProxyConfig& config,
       ProxyConfigService::ConfigAvailability availability) override;
 
-  scoped_ptr<ProxyConfigService> config_service_;
-  scoped_ptr<ProxyResolverFactory> resolver_factory_;
-  scoped_ptr<ProxyResolver> resolver_;
+  std::unique_ptr<ProxyConfigService> config_service_;
+  std::unique_ptr<ProxyResolverFactory> resolver_factory_;
+  std::unique_ptr<ProxyResolver> resolver_;
 
   // We store the proxy configuration that was last fetched from the
   // ProxyConfigService, as well as the resulting "effective" configuration.
@@ -424,21 +424,21 @@
   // The fetcher to use when downloading PAC scripts for the ProxyResolver.
   // This dependency can be NULL if our ProxyResolver has no need for
   // external PAC script fetching.
-  scoped_ptr<ProxyScriptFetcher> proxy_script_fetcher_;
+  std::unique_ptr<ProxyScriptFetcher> proxy_script_fetcher_;
 
   // The fetcher to use when attempting to download the most appropriate PAC
   // script configured in DHCP, if any. Can be NULL if the ProxyResolver has
   // no need for DHCP PAC script fetching.
-  scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher_;
+  std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher_;
 
   // Helper to download the PAC script (wpad + custom) and apply fallback rules.
   //
   // Note that the declaration is important here: |proxy_script_fetcher_| and
   // |proxy_resolver_| must outlive |init_proxy_resolver_|.
-  scoped_ptr<InitProxyResolver> init_proxy_resolver_;
+  std::unique_ptr<InitProxyResolver> init_proxy_resolver_;
 
   // Helper to poll the PAC script for changes.
-  scoped_ptr<ProxyScriptDeciderPoller> script_poller_;
+  std::unique_ptr<ProxyScriptDeciderPoller> script_poller_;
 
   State current_state_;
 
diff --git a/net/proxy/proxy_service_mojo.cc b/net/proxy/proxy_service_mojo.cc
index 41bbc3c2..135b9d4 100644
--- a/net/proxy/proxy_service_mojo.cc
+++ b/net/proxy/proxy_service_mojo.cc
@@ -4,10 +4,11 @@
 
 #include "net/proxy/proxy_service_mojo.h"
 
+#include <memory>
 #include <utility>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "net/dns/mojo_host_resolver_impl.h"
 #include "net/interfaces/proxy_resolver_service.mojom.h"
@@ -22,11 +23,11 @@
 
 namespace net {
 
-scoped_ptr<ProxyService> CreateProxyServiceUsingMojoFactory(
+std::unique_ptr<ProxyService> CreateProxyServiceUsingMojoFactory(
     MojoProxyResolverFactory* mojo_proxy_factory,
-    scoped_ptr<ProxyConfigService> proxy_config_service,
+    std::unique_ptr<ProxyConfigService> proxy_config_service,
     ProxyScriptFetcher* proxy_script_fetcher,
-    scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
+    std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
     HostResolver* host_resolver,
     NetLog* net_log,
     NetworkDelegate* network_delegate) {
@@ -35,9 +36,9 @@
   DCHECK(dhcp_proxy_script_fetcher);
   DCHECK(host_resolver);
 
-  scoped_ptr<ProxyService> proxy_service(new ProxyService(
+  std::unique_ptr<ProxyService> proxy_service(new ProxyService(
       std::move(proxy_config_service),
-      make_scoped_ptr(new ProxyResolverFactoryMojo(
+      base::WrapUnique(new ProxyResolverFactoryMojo(
           mojo_proxy_factory, host_resolver,
           base::Bind(&NetworkDelegateErrorObserver::Create, network_delegate,
                      base::ThreadTaskRunnerHandle::Get()),
@@ -51,10 +52,10 @@
   return proxy_service;
 }
 
-scoped_ptr<ProxyService> CreateProxyServiceUsingMojoInProcess(
-    scoped_ptr<ProxyConfigService> proxy_config_service,
+std::unique_ptr<ProxyService> CreateProxyServiceUsingMojoInProcess(
+    std::unique_ptr<ProxyConfigService> proxy_config_service,
     ProxyScriptFetcher* proxy_script_fetcher,
-    scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
+    std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
     HostResolver* host_resolver,
     NetLog* net_log,
     NetworkDelegate* network_delegate) {
diff --git a/net/proxy/proxy_service_mojo.h b/net/proxy/proxy_service_mojo.h
index a728337..32a0873 100644
--- a/net/proxy/proxy_service_mojo.h
+++ b/net/proxy/proxy_service_mojo.h
@@ -5,7 +5,8 @@
 #ifndef NET_PROXY_PROXY_SERVICE_MOJO_H_
 #define NET_PROXY_PROXY_SERVICE_MOJO_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/proxy/dhcp_proxy_script_fetcher.h"
 
 namespace net {
@@ -34,11 +35,11 @@
 // |host_resolver| points to the host resolving dependency the PAC script
 // should use for any DNS queries. It must remain valid throughout the
 // lifetime of the ProxyService.
-scoped_ptr<ProxyService> CreateProxyServiceUsingMojoFactory(
+std::unique_ptr<ProxyService> CreateProxyServiceUsingMojoFactory(
     MojoProxyResolverFactory* mojo_proxy_factory,
-    scoped_ptr<ProxyConfigService> proxy_config_service,
+    std::unique_ptr<ProxyConfigService> proxy_config_service,
     ProxyScriptFetcher* proxy_script_fetcher,
-    scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
+    std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
     HostResolver* host_resolver,
     NetLog* net_log,
     NetworkDelegate* network_delegate);
@@ -51,10 +52,10 @@
 // # multi-threading model. In order for this to be safe to use, *ALL* the
 // # other V8's running in the process must use v8::Locker.
 // ##########################################################################
-scoped_ptr<ProxyService> CreateProxyServiceUsingMojoInProcess(
-    scoped_ptr<ProxyConfigService> proxy_config_service,
+std::unique_ptr<ProxyService> CreateProxyServiceUsingMojoInProcess(
+    std::unique_ptr<ProxyConfigService> proxy_config_service,
     ProxyScriptFetcher* proxy_script_fetcher,
-    scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
+    std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
     HostResolver* host_resolver,
     NetLog* net_log,
     NetworkDelegate* network_delegate);
diff --git a/net/proxy/proxy_service_mojo_unittest.cc b/net/proxy/proxy_service_mojo_unittest.cc
index 6881a196..d49c7d1 100644
--- a/net/proxy/proxy_service_mojo_unittest.cc
+++ b/net/proxy/proxy_service_mojo_unittest.cc
@@ -5,11 +5,12 @@
 #include "net/proxy/proxy_service_mojo.h"
 
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/callback_helpers.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
 #include "net/base/load_flags.h"
@@ -128,19 +129,19 @@
 
     fetcher_ = new MockProxyScriptFetcher;
     proxy_service_ = CreateProxyServiceUsingMojoFactory(
-        this, make_scoped_ptr(new ProxyConfigServiceFixed(
+        this, base::WrapUnique(new ProxyConfigServiceFixed(
                   ProxyConfig::CreateFromCustomPacURL(GURL(kPacUrl)))),
-        fetcher_, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()),
+        fetcher_, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()),
         &mock_host_resolver_, &net_log_, &network_delegate_);
   }
 
-  scoped_ptr<base::ScopedClosureRunner> CreateResolver(
+  std::unique_ptr<base::ScopedClosureRunner> CreateResolver(
       const mojo::String& pac_script,
       mojo::InterfaceRequest<interfaces::ProxyResolver> req,
       interfaces::ProxyResolverFactoryRequestClientPtr client) override {
     InProcessMojoProxyResolverFactory::GetInstance()->CreateResolver(
         pac_script, std::move(req), std::move(client));
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new base::ScopedClosureRunner(on_delete_closure_.closure()));
   }
 
@@ -149,7 +150,7 @@
   MockProxyScriptFetcher* fetcher_;  // Owned by |proxy_service_|.
   TestNetLog net_log_;
   TestClosure on_delete_closure_;
-  scoped_ptr<ProxyService> proxy_service_;
+  std::unique_ptr<ProxyService> proxy_service_;
 };
 
 TEST_F(ProxyServiceMojoTest, Basic) {
diff --git a/net/proxy/proxy_service_unittest.cc b/net/proxy/proxy_service_unittest.cc
index c595f456..a0db685 100644
--- a/net/proxy/proxy_service_unittest.cc
+++ b/net/proxy/proxy_service_unittest.cc
@@ -11,6 +11,7 @@
 #include "base/format_macros.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "net/base/load_flags.h"
@@ -353,8 +354,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
   ProxyService service(
-      make_scoped_ptr(new MockProxyConfigService(ProxyConfig::CreateDirect())),
-      make_scoped_ptr(factory), nullptr);
+      base::WrapUnique(new MockProxyConfigService(ProxyConfig::CreateDirect())),
+      base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
 
@@ -391,7 +392,7 @@
   config.set_auto_detect(false);
   config.proxy_rules().bypass_rules.ParseFromString("*.org");
 
-  ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+  ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                        nullptr, nullptr);
 
   GURL url("http://www.google.com/");
@@ -449,7 +450,7 @@
   config.set_auto_detect(false);
   config.proxy_rules().bypass_rules.ParseFromString("*.org");
 
-  ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+  ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                        nullptr, nullptr);
 
   GURL url("http://www.google.com/");
@@ -495,8 +496,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
 
@@ -558,8 +559,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://username:password@www.google.com/?ref#hash#hash");
 
@@ -590,8 +591,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
 
@@ -645,8 +646,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://this-causes-js-error/");
 
@@ -704,8 +705,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
 
@@ -781,8 +782,8 @@
   MockAsyncProxyResolver resolver;
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   // Resolve something.
   GURL url("http://www.google.com/");
@@ -820,8 +821,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   // Start first resolve request.
   GURL url("http://www.google.com/");
@@ -884,8 +885,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   // Start first resolve request.
   GURL url("http://www.google.com/");
@@ -956,8 +957,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   // Start two resolve requests.
   GURL url1("http://www.google.com/");
@@ -1028,8 +1029,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   // Start first resolve request.
   GURL url("http://www.google.com/");
@@ -1075,12 +1076,12 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start resolve request.
   GURL url("http://www.google.com/");
@@ -1126,8 +1127,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   // Start first resolve request.
   GURL url("http://www.google.com/");
@@ -1186,8 +1187,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
 
@@ -1339,8 +1340,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
 
@@ -1413,8 +1414,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
 
@@ -1517,8 +1518,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
 
@@ -1617,8 +1618,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
 
@@ -1711,7 +1712,7 @@
   config.set_auto_detect(false);
   config.proxy_rules().bypass_rules.ParseFromString("*.org");
 
-  ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+  ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                        nullptr, nullptr);
 
   int rv;
@@ -1752,7 +1753,7 @@
 
   EXPECT_EQ(3u, additional_bad_proxies.size());
 
-  ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+  ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                        nullptr, nullptr);
   ProxyInfo proxy_info;
   proxy_info.UseProxyList(proxy_list);
@@ -1773,7 +1774,7 @@
   config.proxy_rules().ParseFromString("http=foopy1:8080;https=foopy2:8080");
   config.set_auto_detect(false);
   {
-    ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+    ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                          nullptr, nullptr);
     GURL test_url("http://www.msn.com");
     ProxyInfo info;
@@ -1786,7 +1787,7 @@
     EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
   }
   {
-    ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+    ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                          nullptr, nullptr);
     GURL test_url("ftp://ftp.google.com");
     ProxyInfo info;
@@ -1799,7 +1800,7 @@
     EXPECT_EQ("direct://", info.proxy_server().ToURI());
   }
   {
-    ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+    ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                          nullptr, nullptr);
     GURL test_url("https://webbranch.techcu.com");
     ProxyInfo info;
@@ -1813,7 +1814,7 @@
   }
   {
     config.proxy_rules().ParseFromString("foopy1:8080");
-    ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+    ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                          nullptr, nullptr);
     GURL test_url("http://www.microsoft.com");
     ProxyInfo info;
@@ -1835,7 +1836,7 @@
     ProxyConfig config;
     config.set_source(PROXY_CONFIG_SOURCE_TEST);
     config.proxy_rules().ParseFromString("https=foopy2:8080");
-    ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+    ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                          nullptr, nullptr);
     GURL test_url("http://www.google.com");
     ProxyInfo info;
@@ -1851,7 +1852,7 @@
     ProxyConfig config;
     config.set_source(PROXY_CONFIG_SOURCE_TEST);
     config.proxy_rules().ParseFromString("https=foopy2:8080");
-    ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+    ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                          nullptr, nullptr);
     GURL test_url("https://www.google.com");
     ProxyInfo info;
@@ -1866,7 +1867,7 @@
   {
     ProxyConfig config;
     config.set_source(PROXY_CONFIG_SOURCE_TEST);
-    ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+    ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                          nullptr, nullptr);
     GURL test_url("http://www.google.com");
     ProxyInfo info;
@@ -1890,7 +1891,7 @@
             config.proxy_rules().type);
 
   {
-    ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+    ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                          nullptr, nullptr);
     GURL test_url("http://www.msn.com");
     ProxyInfo info;
@@ -1903,7 +1904,7 @@
     EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
   }
   {
-    ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+    ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                          nullptr, nullptr);
     GURL test_url("ftp://ftp.google.com");
     ProxyInfo info;
@@ -1916,7 +1917,7 @@
     EXPECT_EQ("socks4://foopy2:1080", info.proxy_server().ToURI());
   }
   {
-    ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+    ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                          nullptr, nullptr);
     GURL test_url("https://webbranch.techcu.com");
     ProxyInfo info;
@@ -1929,7 +1930,7 @@
     EXPECT_EQ("socks4://foopy2:1080", info.proxy_server().ToURI());
   }
   {
-    ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
+    ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
                          nullptr, nullptr);
     GURL test_url("unknown://www.microsoft.com");
     ProxyInfo info;
@@ -1955,8 +1956,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   // Start 3 requests.
 
@@ -2028,12 +2029,12 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 3 requests.
 
@@ -2134,12 +2135,12 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 2 requests.
 
@@ -2170,7 +2171,7 @@
 
   fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Nothing has been sent to the factory yet.
   EXPECT_TRUE(factory->pending_requests().empty());
@@ -2195,12 +2196,12 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 3 requests.
   ProxyInfo info1;
@@ -2294,12 +2295,12 @@
   MockAsyncProxyResolver resolver;
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 2 requests.
 
@@ -2375,12 +2376,12 @@
   MockAsyncProxyResolver resolver;
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 2 requests.
 
@@ -2449,12 +2450,12 @@
   MockProxyConfigService* config_service = new MockProxyConfigService(config);
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 2 requests.
 
@@ -2511,12 +2512,12 @@
   MockAsyncProxyResolver resolver;
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 1 requests.
 
@@ -2582,12 +2583,12 @@
   MockProxyConfigService* config_service = new MockProxyConfigService(config);
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 1 request.
 
@@ -2618,8 +2619,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
 
@@ -2638,7 +2639,7 @@
   ProxyConfig config1;
   config1.proxy_rules().ParseFromString("foopy1:8080");
   config1.set_auto_detect(false);
-  ProxyService service(make_scoped_ptr(new MockProxyConfigService(config1)),
+  ProxyService service(base::WrapUnique(new MockProxyConfigService(config1)),
                        nullptr, nullptr);
 
   ProxyInfo info;
@@ -2653,7 +2654,7 @@
   config2.proxy_rules().ParseFromString("foopy2:8080");
   config2.set_auto_detect(false);
   service.ResetConfigService(
-      make_scoped_ptr(new MockProxyConfigService(config2)));
+      base::WrapUnique(new MockProxyConfigService(config2)));
   TestCompletionCallback callback2;
   rv = service.ResolveProxy(GURL("http://request2"), std::string(), LOAD_NORMAL,
                             &info, callback2.callback(), nullptr, nullptr,
@@ -2671,8 +2672,8 @@
   MockAsyncProxyResolver resolver;
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   // Start 1 request.
 
@@ -2725,12 +2726,12 @@
 
   TestNetLog log;
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), &log);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), &log);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Disable the "wait after IP address changes" hack, so this unit-test can
   // complete quickly.
@@ -2847,12 +2848,12 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 1 request.
 
@@ -2954,12 +2955,12 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 1 request.
 
@@ -3067,12 +3068,12 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 1 request.
 
@@ -3177,12 +3178,12 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 1 request.
 
@@ -3260,7 +3261,7 @@
 // script follows the expected policy.
 TEST_F(ProxyServiceTest, PACScriptPollingPolicy) {
   // Retrieve the internal polling policy implementation used by ProxyService.
-  scoped_ptr<ProxyService::PacPollPolicy> policy =
+  std::unique_ptr<ProxyService::PacPollPolicy> policy =
       ProxyService::CreateDefaultPacPollPolicy();
 
   int error;
@@ -3332,12 +3333,12 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(true);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()));
+      fetcher, base::WrapUnique(new DoNothingDhcpProxyScriptFetcher()));
 
   // Start 1 request.
 
@@ -3434,8 +3435,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(config_service),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(config_service),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
 
@@ -3461,8 +3462,8 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
 
-  ProxyService service(make_scoped_ptr(new MockProxyConfigService(config)),
-                       make_scoped_ptr(factory), nullptr);
+  ProxyService service(base::WrapUnique(new MockProxyConfigService(config)),
+                       base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
 
diff --git a/net/proxy/proxy_service_v8.cc b/net/proxy/proxy_service_v8.cc
index 4c34492..43bfd9a 100644
--- a/net/proxy/proxy_service_v8.cc
+++ b/net/proxy/proxy_service_v8.cc
@@ -4,10 +4,11 @@
 
 #include "net/proxy/proxy_service_v8.h"
 
+#include <memory>
 #include <utility>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/threading/thread_checker.h"
 #include "net/proxy/network_delegate_error_observer.h"
@@ -19,10 +20,10 @@
 namespace net {
 
 // static
-scoped_ptr<ProxyService> CreateProxyServiceUsingV8ProxyResolver(
-    scoped_ptr<ProxyConfigService> proxy_config_service,
+std::unique_ptr<ProxyService> CreateProxyServiceUsingV8ProxyResolver(
+    std::unique_ptr<ProxyConfigService> proxy_config_service,
     ProxyScriptFetcher* proxy_script_fetcher,
-    scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
+    std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
     HostResolver* host_resolver,
     NetLog* net_log,
     NetworkDelegate* network_delegate) {
@@ -31,9 +32,9 @@
   DCHECK(dhcp_proxy_script_fetcher);
   DCHECK(host_resolver);
 
-  scoped_ptr<ProxyService> proxy_service(new ProxyService(
+  std::unique_ptr<ProxyService> proxy_service(new ProxyService(
       std::move(proxy_config_service),
-      make_scoped_ptr(new ProxyResolverFactoryV8TracingWrapper(
+      base::WrapUnique(new ProxyResolverFactoryV8TracingWrapper(
           host_resolver, net_log,
           base::Bind(&NetworkDelegateErrorObserver::Create, network_delegate,
                      base::ThreadTaskRunnerHandle::Get()))),
diff --git a/net/proxy/proxy_service_v8.h b/net/proxy/proxy_service_v8.h
index 2919553..fb4d82c6 100644
--- a/net/proxy/proxy_service_v8.h
+++ b/net/proxy/proxy_service_v8.h
@@ -5,7 +5,8 @@
 #ifndef NET_PROXY_PROXY_SERVICE_V8_H_
 #define NET_PROXY_PROXY_SERVICE_V8_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/base/net_export.h"
 #include "net/proxy/dhcp_proxy_script_fetcher.h"
 
@@ -36,10 +37,10 @@
 // # multi-threading model. In order for this to be safe to use, *ALL* the
 // # other V8's running in the process must use v8::Locker.
 // ##########################################################################
-NET_EXPORT scoped_ptr<ProxyService> CreateProxyServiceUsingV8ProxyResolver(
-    scoped_ptr<ProxyConfigService> proxy_config_service,
+NET_EXPORT std::unique_ptr<ProxyService> CreateProxyServiceUsingV8ProxyResolver(
+    std::unique_ptr<ProxyConfigService> proxy_config_service,
     ProxyScriptFetcher* proxy_script_fetcher,
-    scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
+    std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
     HostResolver* host_resolver,
     NetLog* net_log,
     NetworkDelegate* network_delegate);
diff --git a/net/quic/bidirectional_stream_quic_impl.cc b/net/quic/bidirectional_stream_quic_impl.cc
index 6e56032..9e4a75e 100644
--- a/net/quic/bidirectional_stream_quic_impl.cc
+++ b/net/quic/bidirectional_stream_quic_impl.cc
@@ -46,7 +46,7 @@
     const BidirectionalStreamRequestInfo* request_info,
     const BoundNetLog& net_log,
     BidirectionalStreamImpl::Delegate* delegate,
-    scoped_ptr<base::Timer> /* timer */) {
+    std::unique_ptr<base::Timer> /* timer */) {
   DCHECK(!stream_);
 
   if (!session_) {
diff --git a/net/quic/bidirectional_stream_quic_impl.h b/net/quic/bidirectional_stream_quic_impl.h
index b75c3894..2b1f25c 100644
--- a/net/quic/bidirectional_stream_quic_impl.h
+++ b/net/quic/bidirectional_stream_quic_impl.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "net/http/bidirectional_stream_impl.h"
 #include "net/quic/quic_chromium_client_session.h"
@@ -39,7 +40,7 @@
   void Start(const BidirectionalStreamRequestInfo* request_info,
              const BoundNetLog& net_log,
              BidirectionalStreamImpl::Delegate* delegate,
-             scoped_ptr<base::Timer> timer) override;
+             std::unique_ptr<base::Timer> timer) override;
   int ReadData(IOBuffer* buffer, int buffer_len) override;
   void SendData(IOBuffer* data, int length, bool end_stream) override;
   void Cancel() override;
diff --git a/net/quic/bidirectional_stream_quic_impl_unittest.cc b/net/quic/bidirectional_stream_quic_impl_unittest.cc
index 3afdb47..9f90d926 100644
--- a/net/quic/bidirectional_stream_quic_impl_unittest.cc
+++ b/net/quic/bidirectional_stream_quic_impl_unittest.cc
@@ -5,10 +5,12 @@
 #include "net/quic/bidirectional_stream_quic_impl.h"
 
 #include <stdint.h>
+
+#include <memory>
 #include <vector>
 
 #include "base/callback_helpers.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/string_number_conversions.h"
@@ -59,11 +61,11 @@
   TestDelegateBase(IOBuffer* read_buf, int read_buf_len)
       : TestDelegateBase(read_buf,
                          read_buf_len,
-                         make_scoped_ptr(new base::Timer(false, false))) {}
+                         base::WrapUnique(new base::Timer(false, false))) {}
 
   TestDelegateBase(IOBuffer* read_buf,
                    int read_buf_len,
-                   scoped_ptr<base::Timer> timer)
+                   std::unique_ptr<base::Timer> timer)
       : read_buf_(read_buf),
         read_buf_len_(read_buf_len),
         timer_(std::move(timer)),
@@ -180,12 +182,12 @@
   void DeleteStream() { stream_job_.reset(); }
 
  private:
-  scoped_ptr<BidirectionalStreamQuicImpl> stream_job_;
+  std::unique_ptr<BidirectionalStreamQuicImpl> stream_job_;
   scoped_refptr<IOBuffer> read_buf_;
   int read_buf_len_;
-  scoped_ptr<base::Timer> timer_;
+  std::unique_ptr<base::Timer> timer_;
   std::string data_received_;
-  scoped_ptr<base::RunLoop> loop_;
+  std::unique_ptr<base::RunLoop> loop_;
   SpdyHeaderBlock response_headers_;
   SpdyHeaderBlock trailers_;
   int error_;
@@ -300,11 +302,11 @@
   }
 
   // Adds a packet to the list of expected writes.
-  void AddWrite(scoped_ptr<QuicReceivedPacket> packet) {
+  void AddWrite(std::unique_ptr<QuicReceivedPacket> packet) {
     writes_.push_back(PacketToWrite(SYNCHRONOUS, packet.release()));
   }
 
-  void ProcessPacket(scoped_ptr<QuicReceivedPacket> packet) {
+  void ProcessPacket(std::unique_ptr<QuicReceivedPacket> packet) {
     connection_->ProcessUdpPacket(self_addr_, peer_addr_, *packet);
   }
 
@@ -323,7 +325,7 @@
     socket_data_.reset(new StaticSocketDataProvider(
         nullptr, 0, mock_writes_.get(), writes_.size()));
 
-    scoped_ptr<MockUDPClientSocket> socket(new MockUDPClientSocket(
+    std::unique_ptr<MockUDPClientSocket> socket(new MockUDPClientSocket(
         socket_data_.get(), net_log().bound().net_log()));
     socket->Connect(peer_addr_);
     runner_ = new TestTaskRunner(&clock_);
@@ -337,7 +339,7 @@
     session_.reset(new QuicChromiumClientSession(
         connection_, std::move(socket),
         /*stream_factory=*/nullptr, &crypto_client_stream_factory_, &clock_,
-        &transport_security_state_, make_scoped_ptr((QuicServerInfo*)nullptr),
+        &transport_security_state_, base::WrapUnique((QuicServerInfo*)nullptr),
         QuicServerId(kDefaultServerHostName, kDefaultServerPort,
                      PRIVACY_MODE_DISABLED),
         kQuicYieldAfterPacketsRead,
@@ -361,20 +363,20 @@
     return maker_.GetResponseHeaders(response_code);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructDataPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructDataPacket(
       QuicPacketNumber packet_number,
       bool should_include_version,
       bool fin,
       QuicStreamOffset offset,
       base::StringPiece data) {
-    scoped_ptr<QuicReceivedPacket> packet(maker_.MakeDataPacket(
+    std::unique_ptr<QuicReceivedPacket> packet(maker_.MakeDataPacket(
         packet_number, stream_id_, should_include_version, fin, offset, data));
     DVLOG(2) << "packet(" << packet_number << "): " << std::endl
              << QuicUtils::StringToHexASCIIDump(packet->AsStringPiece());
     return packet;
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructRequestHeadersPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructRequestHeadersPacket(
       QuicPacketNumber packet_number,
       bool fin,
       RequestPriority request_priority,
@@ -386,7 +388,7 @@
         request_headers_, spdy_headers_frame_length);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructResponseHeadersPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructResponseHeadersPacket(
       QuicPacketNumber packet_number,
       bool fin,
       const SpdyHeaderBlock& response_headers,
@@ -397,7 +399,7 @@
         spdy_headers_frame_length, offset);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructResponseTrailersPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructResponseTrailersPacket(
       QuicPacketNumber packet_number,
       bool fin,
       const SpdyHeaderBlock& trailers,
@@ -408,15 +410,15 @@
                                             spdy_headers_frame_length, offset);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructRstStreamPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructRstStreamPacket(
       QuicPacketNumber packet_number) {
     return ConstructRstStreamCancelledPacket(packet_number, 0);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructRstStreamCancelledPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructRstStreamCancelledPacket(
       QuicPacketNumber packet_number,
       size_t bytes_written) {
-    scoped_ptr<QuicReceivedPacket> packet(
+    std::unique_ptr<QuicReceivedPacket> packet(
         maker_.MakeRstPacket(packet_number, !kIncludeVersion, stream_id_,
                              QUIC_STREAM_CANCELLED, bytes_written));
     DVLOG(2) << "packet(" << packet_number << "): " << std::endl
@@ -424,7 +426,7 @@
     return packet;
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructAckAndRstStreamPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructAckAndRstStreamPacket(
       QuicPacketNumber packet_number,
       QuicPacketNumber largest_received,
       QuicPacketNumber ack_least_unacked,
@@ -435,7 +437,7 @@
         !kIncludeCongestionFeedback);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructAckAndDataPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructAckAndDataPacket(
       QuicPacketNumber packet_number,
       bool should_include_version,
       QuicPacketNumber largest_received,
@@ -443,7 +445,7 @@
       bool fin,
       QuicStreamOffset offset,
       base::StringPiece data) {
-    scoped_ptr<QuicReceivedPacket> packet(maker_.MakeAckAndDataPacket(
+    std::unique_ptr<QuicReceivedPacket> packet(maker_.MakeAckAndDataPacket(
         packet_number, should_include_version, stream_id_, largest_received,
         least_unacked, fin, offset, data));
     DVLOG(2) << "packet(" << packet_number << "): " << std::endl
@@ -451,7 +453,7 @@
     return packet;
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructAckPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructAckPacket(
       QuicPacketNumber packet_number,
       QuicPacketNumber largest_received,
       QuicPacketNumber least_unacked) {
@@ -466,12 +468,12 @@
  private:
   BoundTestNetLog net_log_;
   scoped_refptr<TestTaskRunner> runner_;
-  scoped_ptr<MockWrite[]> mock_writes_;
+  std::unique_ptr<MockWrite[]> mock_writes_;
   MockClock clock_;
   QuicConnection* connection_;
-  scoped_ptr<QuicChromiumConnectionHelper> helper_;
+  std::unique_ptr<QuicChromiumConnectionHelper> helper_;
   TransportSecurityState transport_security_state_;
-  scoped_ptr<QuicChromiumClientSession> session_;
+  std::unique_ptr<QuicChromiumClientSession> session_;
   QuicCryptoClientConfig crypto_config_;
   HttpRequestHeaders headers_;
   HttpResponseInfo response_;
@@ -484,7 +486,7 @@
   IPEndPoint peer_addr_;
   MockRandom random_generator_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
-  scoped_ptr<StaticSocketDataProvider> socket_data_;
+  std::unique_ptr<StaticSocketDataProvider> socket_data_;
   std::vector<PacketToWrite> writes_;
   QuicClientPushPromiseIndex push_promise_index_;
 };
@@ -509,7 +511,7 @@
   request.priority = DEFAULT_PRIORITY;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<TestDelegateBase> delegate(
+  std::unique_ptr<TestDelegateBase> delegate(
       new TestDelegateBase(read_buffer.get(), kReadBufferSize));
   delegate->Start(&request, net_log().bound(), session()->GetWeakPtr());
   delegate->WaitUntilNextCallback();  // OnHeadersSent
@@ -600,7 +602,7 @@
   request.priority = DEFAULT_PRIORITY;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<TestDelegateBase> delegate(
+  std::unique_ptr<TestDelegateBase> delegate(
       new TestDelegateBase(read_buffer.get(), kReadBufferSize));
   delegate->Start(&request, net_log().bound(), session()->GetWeakPtr());
   delegate->WaitUntilNextCallback();  // OnHeadersSent
@@ -677,7 +679,7 @@
   request.priority = DEFAULT_PRIORITY;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<TestDelegateBase> delegate(
+  std::unique_ptr<TestDelegateBase> delegate(
       new TestDelegateBase(read_buffer.get(), kReadBufferSize));
   delegate->Start(&request, net_log().bound(), session()->GetWeakPtr());
   delegate->WaitUntilNextCallback();  // OnHeadersSent
@@ -754,7 +756,7 @@
   request.priority = DEFAULT_PRIORITY;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<TestDelegateBase> delegate(
+  std::unique_ptr<TestDelegateBase> delegate(
       new TestDelegateBase(read_buffer.get(), kReadBufferSize));
   delegate->Start(&request, net_log().bound(), session()->GetWeakPtr());
   delegate->WaitUntilNextCallback();  // OnHeadersSent
@@ -793,7 +795,7 @@
   request.priority = DEFAULT_PRIORITY;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<TestDelegateBase> delegate(
+  std::unique_ptr<TestDelegateBase> delegate(
       new TestDelegateBase(read_buffer.get(), kReadBufferSize));
   delegate->Start(&request, net_log().bound(), session()->GetWeakPtr());
   delegate->WaitUntilNextCallback();  // OnHeadersSent
@@ -850,7 +852,7 @@
   request.priority = DEFAULT_PRIORITY;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<TestDelegateBase> delegate(
+  std::unique_ptr<TestDelegateBase> delegate(
       new TestDelegateBase(read_buffer.get(), kReadBufferSize));
   delegate->Start(&request, net_log().bound(), session()->GetWeakPtr());
   delegate->WaitUntilNextCallback();  // OnHeadersSent
@@ -900,7 +902,7 @@
   request.priority = DEFAULT_PRIORITY;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<TestDelegateBase> delegate(
+  std::unique_ptr<TestDelegateBase> delegate(
       new TestDelegateBase(read_buffer.get(), kReadBufferSize));
   delegate->Start(&request, net_log().bound(), session()->GetWeakPtr());
   delegate->WaitUntilNextCallback();  // OnHeadersSent
@@ -954,7 +956,7 @@
   request.priority = DEFAULT_PRIORITY;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<TestDelegateBase> delegate(
+  std::unique_ptr<TestDelegateBase> delegate(
       new TestDelegateBase(read_buffer.get(), kReadBufferSize));
   delegate->Start(&request, net_log().bound(), session()->GetWeakPtr());
   delegate->WaitUntilNextCallback();  // OnHeadersSent
@@ -1003,7 +1005,7 @@
   request.priority = DEFAULT_PRIORITY;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<DeleteStreamDelegate> delegate(new DeleteStreamDelegate(
+  std::unique_ptr<DeleteStreamDelegate> delegate(new DeleteStreamDelegate(
       read_buffer.get(), kReadBufferSize,
       DeleteStreamDelegate::ON_HEADERS_RECEIVED, true));
   delegate->Start(&request, net_log().bound(), session()->GetWeakPtr());
@@ -1046,7 +1048,7 @@
   request.priority = DEFAULT_PRIORITY;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<DeleteStreamDelegate> delegate(
+  std::unique_ptr<DeleteStreamDelegate> delegate(
       new DeleteStreamDelegate(read_buffer.get(), kReadBufferSize,
                                DeleteStreamDelegate::ON_DATA_READ, true));
   delegate->Start(&request, net_log().bound(), session()->GetWeakPtr());
@@ -1098,7 +1100,7 @@
   request.priority = DEFAULT_PRIORITY;
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  scoped_ptr<DeleteStreamDelegate> delegate(new DeleteStreamDelegate(
+  std::unique_ptr<DeleteStreamDelegate> delegate(new DeleteStreamDelegate(
       read_buffer.get(), kReadBufferSize,
       DeleteStreamDelegate::ON_TRAILERS_RECEIVED, true));
   delegate->Start(&request, net_log().bound(), session()->GetWeakPtr());
diff --git a/net/quic/congestion_control/hybrid_slow_start_test.cc b/net/quic/congestion_control/hybrid_slow_start_test.cc
index d3d0fda..0e8c934 100644
--- a/net/quic/congestion_control/hybrid_slow_start_test.cc
+++ b/net/quic/congestion_control/hybrid_slow_start_test.cc
@@ -4,8 +4,9 @@
 
 #include "net/quic/congestion_control/hybrid_slow_start.h"
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace net {
@@ -19,7 +20,7 @@
   void SetUp() override { slow_start_.reset(new HybridSlowStart()); }
   const QuicTime::Delta one_ms_;
   const QuicTime::Delta rtt_;
-  scoped_ptr<HybridSlowStart> slow_start_;
+  std::unique_ptr<HybridSlowStart> slow_start_;
 };
 
 TEST_F(HybridSlowStartTest, Simple) {
diff --git a/net/quic/congestion_control/pacing_sender.h b/net/quic/congestion_control/pacing_sender.h
index 3aeedd29..5c48320 100644
--- a/net/quic/congestion_control/pacing_sender.h
+++ b/net/quic/congestion_control/pacing_sender.h
@@ -14,9 +14,9 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/quic/congestion_control/send_algorithm_interface.h"
 #include "net/quic/quic_bandwidth.h"
 #include "net/quic/quic_config.h"
@@ -68,7 +68,7 @@
   // End implementation of SendAlgorithmInterface.
 
  private:
-  scoped_ptr<SendAlgorithmInterface> sender_;  // Underlying sender.
+  std::unique_ptr<SendAlgorithmInterface> sender_;  // Underlying sender.
   // The estimated system alarm granularity.
   const QuicTime::Delta alarm_granularity_;
   // Configured maximum size of the burst coming out of quiescence.  The burst
diff --git a/net/quic/congestion_control/pacing_sender_test.cc b/net/quic/congestion_control/pacing_sender_test.cc
index fbbcfec..e6dfcb6 100644
--- a/net/quic/congestion_control/pacing_sender_test.cc
+++ b/net/quic/congestion_control/pacing_sender_test.cc
@@ -4,8 +4,9 @@
 
 #include "net/quic/congestion_control/pacing_sender.h"
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/quic/quic_protocol.h"
 #include "net/quic/test_tools/mock_clock.h"
 #include "net/quic/test_tools/quic_test_utils.h"
@@ -100,7 +101,7 @@
   MockClock clock_;
   QuicPacketNumber packet_number_;
   StrictMock<MockSendAlgorithm>* mock_sender_;
-  scoped_ptr<PacingSender> pacing_sender_;
+  std::unique_ptr<PacingSender> pacing_sender_;
 };
 
 TEST_F(PacingSenderTest, NoSend) {
diff --git a/net/quic/congestion_control/tcp_cubic_sender_bytes_test.cc b/net/quic/congestion_control/tcp_cubic_sender_bytes_test.cc
index eaacb5b..1bedee8 100644
--- a/net/quic/congestion_control/tcp_cubic_sender_bytes_test.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender_bytes_test.cc
@@ -5,9 +5,9 @@
 #include "net/quic/congestion_control/tcp_cubic_sender_bytes.h"
 
 #include <algorithm>
+#include <memory>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/quic/congestion_control/rtt_stats.h"
 #include "net/quic/crypto/crypto_protocol.h"
 #include "net/quic/proto/cached_network_parameters.pb.h"
@@ -123,7 +123,7 @@
 
   const QuicTime::Delta one_ms_;
   MockClock clock_;
-  scoped_ptr<TcpCubicSenderBytesPeer> sender_;
+  std::unique_ptr<TcpCubicSenderBytesPeer> sender_;
   QuicPacketNumber packet_number_;
   QuicPacketNumber acked_packet_number_;
   QuicByteCount bytes_in_flight_;
diff --git a/net/quic/congestion_control/tcp_cubic_sender_packets_test.cc b/net/quic/congestion_control/tcp_cubic_sender_packets_test.cc
index f4a4227..18359b1 100644
--- a/net/quic/congestion_control/tcp_cubic_sender_packets_test.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender_packets_test.cc
@@ -5,9 +5,9 @@
 #include "net/quic/congestion_control/tcp_cubic_sender_packets.h"
 
 #include <algorithm>
+#include <memory>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/quic/congestion_control/rtt_stats.h"
 #include "net/quic/crypto/crypto_protocol.h"
 #include "net/quic/proto/cached_network_parameters.pb.h"
@@ -132,7 +132,7 @@
 
   const QuicTime::Delta one_ms_;
   MockClock clock_;
-  scoped_ptr<TcpCubicSenderPacketsPeer> sender_;
+  std::unique_ptr<TcpCubicSenderPacketsPeer> sender_;
   QuicPacketNumber packet_number_;
   QuicPacketNumber acked_packet_number_;
   QuicByteCount bytes_in_flight_;
diff --git a/net/quic/crypto/aead_base_decrypter_nss.cc b/net/quic/crypto/aead_base_decrypter_nss.cc
index 4787860..30865e4 100644
--- a/net/quic/crypto/aead_base_decrypter_nss.cc
+++ b/net/quic/crypto/aead_base_decrypter_nss.cc
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "net/quic/crypto/aead_base_decrypter.h"
-
 #include <pk11pub.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "crypto/scoped_nss_types.h"
+#include "net/quic/crypto/aead_base_decrypter.h"
 #include "net/quic/quic_flags.h"
 #include "net/quic/quic_utils.h"
 
diff --git a/net/quic/crypto/aead_base_decrypter_openssl.cc b/net/quic/crypto/aead_base_decrypter_openssl.cc
index cb91a69..aa62a45f 100644
--- a/net/quic/crypto/aead_base_decrypter_openssl.cc
+++ b/net/quic/crypto/aead_base_decrypter_openssl.cc
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "net/quic/crypto/aead_base_decrypter.h"
-
 #include <openssl/err.h>
 #include <openssl/evp.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "net/quic/crypto/aead_base_decrypter.h"
 #include "net/quic/quic_flags.h"
 #include "net/quic/quic_utils.h"
 
diff --git a/net/quic/crypto/aead_base_encrypter_nss.cc b/net/quic/crypto/aead_base_encrypter_nss.cc
index 4fb1349d..cfb6e79e 100644
--- a/net/quic/crypto/aead_base_encrypter_nss.cc
+++ b/net/quic/crypto/aead_base_encrypter_nss.cc
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "net/quic/crypto/aead_base_encrypter.h"
-
 #include <pk11pub.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "crypto/scoped_nss_types.h"
+#include "net/quic/crypto/aead_base_encrypter.h"
 #include "net/quic/quic_flags.h"
 #include "net/quic/quic_utils.h"
 
diff --git a/net/quic/crypto/aead_base_encrypter_openssl.cc b/net/quic/crypto/aead_base_encrypter_openssl.cc
index 92856a6c0..108df58 100644
--- a/net/quic/crypto/aead_base_encrypter_openssl.cc
+++ b/net/quic/crypto/aead_base_encrypter_openssl.cc
@@ -2,13 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "net/quic/crypto/aead_base_encrypter.h"
-
 #include <openssl/err.h>
 #include <openssl/evp.h>
 #include <string.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "net/quic/crypto/aead_base_encrypter.h"
 #include "net/quic/quic_flags.h"
 #include "net/quic/quic_utils.h"
 
diff --git a/net/quic/crypto/aes_128_gcm_12_decrypter_test.cc b/net/quic/crypto/aes_128_gcm_12_decrypter_test.cc
index d0e5304..f045afa0 100644
--- a/net/quic/crypto/aes_128_gcm_12_decrypter_test.cc
+++ b/net/quic/crypto/aes_128_gcm_12_decrypter_test.cc
@@ -209,7 +209,7 @@
   path_id = static_cast<QuicPathId>(
       packet_number >> 8 * (sizeof(packet_number) - sizeof(path_id)));
   packet_number &= UINT64_C(0x00FFFFFFFFFFFFFF);
-  scoped_ptr<char[]> output(new char[ciphertext.length()]);
+  std::unique_ptr<char[]> output(new char[ciphertext.length()]);
   size_t output_length = 0;
   const bool success = decrypter->DecryptPacket(
       path_id, packet_number, associated_data, ciphertext, output.get(),
@@ -266,7 +266,7 @@
       Aes128Gcm12Decrypter decrypter;
       ASSERT_TRUE(decrypter.SetKey(key));
 
-      scoped_ptr<QuicData> decrypted(DecryptWithNonce(
+      std::unique_ptr<QuicData> decrypted(DecryptWithNonce(
           &decrypter, iv,
           // This deliberately tests that the decrypter can handle an AAD that
           // is set to nullptr, as opposed to a zero-length, non-nullptr
diff --git a/net/quic/crypto/aes_128_gcm_12_encrypter_test.cc b/net/quic/crypto/aes_128_gcm_12_encrypter_test.cc
index 82539a2..7b61962 100644
--- a/net/quic/crypto/aes_128_gcm_12_encrypter_test.cc
+++ b/net/quic/crypto/aes_128_gcm_12_encrypter_test.cc
@@ -158,7 +158,7 @@
                            StringPiece associated_data,
                            StringPiece plaintext) {
   size_t ciphertext_size = encrypter->GetCiphertextSize(plaintext.length());
-  scoped_ptr<char[]> ciphertext(new char[ciphertext_size]);
+  std::unique_ptr<char[]> ciphertext(new char[ciphertext_size]);
 
   if (!encrypter->Encrypt(nonce, associated_data, plaintext,
                           reinterpret_cast<unsigned char*>(ciphertext.get()))) {
@@ -199,7 +199,7 @@
 
       Aes128Gcm12Encrypter encrypter;
       ASSERT_TRUE(encrypter.SetKey(key));
-      scoped_ptr<QuicData> encrypted(EncryptWithNonce(
+      std::unique_ptr<QuicData> encrypted(EncryptWithNonce(
           &encrypter, iv,
           // This deliberately tests that the encrypter can handle an AAD that
           // is set to nullptr, as opposed to a zero-length, non-nullptr
diff --git a/net/quic/crypto/cert_compressor.cc b/net/quic/crypto/cert_compressor.cc
index 5851bd9..0f1075d 100644
--- a/net/quic/crypto/cert_compressor.cc
+++ b/net/quic/crypto/cert_compressor.cc
@@ -4,8 +4,9 @@
 
 #include "net/quic/crypto/cert_compressor.h"
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/quic/quic_utils.h"
 #include "third_party/zlib/zlib.h"
 
@@ -564,7 +565,7 @@
   }
   DCHECK_EQ(entries.size(), out_certs->size());
 
-  scoped_ptr<uint8_t[]> uncompressed_data;
+  std::unique_ptr<uint8_t[]> uncompressed_data;
   StringPiece uncompressed;
 
   if (!in.empty()) {
diff --git a/net/quic/crypto/cert_compressor_test.cc b/net/quic/crypto/cert_compressor_test.cc
index baefae5..251313b 100644
--- a/net/quic/crypto/cert_compressor_test.cc
+++ b/net/quic/crypto/cert_compressor_test.cc
@@ -47,7 +47,7 @@
   vector<string> chain;
   chain.push_back("testcert");
   static const uint64_t set_hash = 42;
-  scoped_ptr<CommonCertSets> common_sets(
+  std::unique_ptr<CommonCertSets> common_sets(
       CryptoTestUtils::MockCommonCertSets(chain[0], set_hash, 1));
   const string compressed = CertCompressor::CompressChain(
       chain,
@@ -127,7 +127,7 @@
                       without_a_common_cert_set.size()),
       cached_certs, nullptr, &chain));
 
-  scoped_ptr<CommonCertSets> common_sets(
+  std::unique_ptr<CommonCertSets> common_sets(
       CryptoTestUtils::MockCommonCertSets("foo", 42, 1));
 
   /* incorrect hash and index */
diff --git a/net/quic/crypto/chacha20_poly1305_rfc7539_decrypter_test.cc b/net/quic/crypto/chacha20_poly1305_rfc7539_decrypter_test.cc
index 3acc1fc..ca80202 100644
--- a/net/quic/crypto/chacha20_poly1305_rfc7539_decrypter_test.cc
+++ b/net/quic/crypto/chacha20_poly1305_rfc7539_decrypter_test.cc
@@ -123,7 +123,7 @@
   path_id = static_cast<QuicPathId>(
       packet_number >> 8 * (sizeof(packet_number) - sizeof(path_id)));
   packet_number &= UINT64_C(0x00FFFFFFFFFFFFFF);
-  scoped_ptr<char[]> output(new char[ciphertext.length()]);
+  std::unique_ptr<char[]> output(new char[ciphertext.length()]);
   size_t output_length = 0;
   const bool success = decrypter->DecryptPacket(
       path_id, packet_number, associated_data, ciphertext, output.get(),
@@ -161,7 +161,7 @@
 
     ChaCha20Poly1305Rfc7539Decrypter decrypter;
     ASSERT_TRUE(decrypter.SetKey(key));
-    scoped_ptr<QuicData> decrypted(DecryptWithNonce(
+    std::unique_ptr<QuicData> decrypted(DecryptWithNonce(
         &decrypter, fixed + iv,
         // This deliberately tests that the decrypter can handle an AAD that
         // is set to nullptr, as opposed to a zero-length, non-nullptr pointer.
diff --git a/net/quic/crypto/chacha20_poly1305_rfc7539_encrypter_test.cc b/net/quic/crypto/chacha20_poly1305_rfc7539_encrypter_test.cc
index 9e246f9..b9d9d47 100644
--- a/net/quic/crypto/chacha20_poly1305_rfc7539_encrypter_test.cc
+++ b/net/quic/crypto/chacha20_poly1305_rfc7539_encrypter_test.cc
@@ -72,7 +72,7 @@
                            StringPiece associated_data,
                            StringPiece plaintext) {
   size_t ciphertext_size = encrypter->GetCiphertextSize(plaintext.length());
-  scoped_ptr<char[]> ciphertext(new char[ciphertext_size]);
+  std::unique_ptr<char[]> ciphertext(new char[ciphertext_size]);
 
   if (!encrypter->Encrypt(nonce, associated_data, plaintext,
                           reinterpret_cast<unsigned char*>(ciphertext.get()))) {
@@ -137,7 +137,7 @@
 
     ChaCha20Poly1305Rfc7539Encrypter encrypter;
     ASSERT_TRUE(encrypter.SetKey(key));
-    scoped_ptr<QuicData> encrypted(EncryptWithNonce(
+    std::unique_ptr<QuicData> encrypted(EncryptWithNonce(
         &encrypter, fixed + iv,
         // This deliberately tests that the encrypter can handle an AAD that
         // is set to nullptr, as opposed to a zero-length, non-nullptr pointer.
diff --git a/net/quic/crypto/channel_id.h b/net/quic/crypto/channel_id.h
index 0ec1d4dd..cb2632f 100644
--- a/net/quic/crypto/channel_id.h
+++ b/net/quic/crypto/channel_id.h
@@ -5,10 +5,10 @@
 #ifndef NET_QUIC_CRYPTO_CHANNEL_ID_H_
 #define NET_QUIC_CRYPTO_CHANNEL_ID_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/net_export.h"
 #include "net/quic/quic_types.h"
@@ -40,7 +40,7 @@
   // asynchonous GetChannelIDKey operation. If |*channel_id_key| is not nullptr
   // then the channel ID lookup is successful. |Run| may take ownership of
   // |*channel_id_key| by calling |release| on it.
-  virtual void Run(scoped_ptr<ChannelIDKey>* channel_id_key) = 0;
+  virtual void Run(std::unique_ptr<ChannelIDKey>* channel_id_key) = 0;
 };
 
 // ChannelIDSource is an abstract interface by which a QUIC client can obtain
@@ -59,7 +59,7 @@
   // |callback|.
   virtual QuicAsyncStatus GetChannelIDKey(
       const std::string& hostname,
-      scoped_ptr<ChannelIDKey>* channel_id_key,
+      std::unique_ptr<ChannelIDKey>* channel_id_key,
       ChannelIDSourceCallback* callback) = 0;
 };
 
diff --git a/net/quic/crypto/channel_id_chromium.cc b/net/quic/crypto/channel_id_chromium.cc
index 1aec7e7..ac71fb023 100644
--- a/net/quic/crypto/channel_id_chromium.cc
+++ b/net/quic/crypto/channel_id_chromium.cc
@@ -19,14 +19,14 @@
 namespace net {
 
 ChannelIDKeyChromium::ChannelIDKeyChromium(
-    scoped_ptr<crypto::ECPrivateKey> ec_private_key)
+    std::unique_ptr<crypto::ECPrivateKey> ec_private_key)
     : ec_private_key_(std::move(ec_private_key)) {}
 
 ChannelIDKeyChromium::~ChannelIDKeyChromium() {}
 
 bool ChannelIDKeyChromium::Sign(base::StringPiece signed_data,
                                 std::string* out_signature) const {
-  scoped_ptr<crypto::ECSignatureCreator> sig_creator(
+  std::unique_ptr<crypto::ECSignatureCreator> sig_creator(
       crypto::ECSignatureCreator::Create(ec_private_key_.get()));
   if (!sig_creator) {
     return false;
@@ -69,7 +69,7 @@
   // Starts the channel ID lookup.  If |QUIC_PENDING| is returned, then
   // |callback| will be invoked asynchronously when the operation completes.
   QuicAsyncStatus GetChannelIDKey(const std::string& hostname,
-                                  scoped_ptr<ChannelIDKey>* channel_id_key,
+                                  std::unique_ptr<ChannelIDKey>* channel_id_key,
                                   ChannelIDSourceCallback* callback);
 
  private:
@@ -89,15 +89,15 @@
 
   ChannelIDService* const channel_id_service_;
 
-  scoped_ptr<crypto::ECPrivateKey> channel_id_crypto_key_;
+  std::unique_ptr<crypto::ECPrivateKey> channel_id_crypto_key_;
   ChannelIDService::Request channel_id_request_;
 
   // |hostname| specifies the hostname for which we need a channel ID.
   std::string hostname_;
 
-  scoped_ptr<ChannelIDSourceCallback> callback_;
+  std::unique_ptr<ChannelIDSourceCallback> callback_;
 
-  scoped_ptr<ChannelIDKey> channel_id_key_;
+  std::unique_ptr<ChannelIDKey> channel_id_key_;
 
   State next_state_;
 
@@ -112,7 +112,7 @@
 
 QuicAsyncStatus ChannelIDSourceChromium::Job::GetChannelIDKey(
     const std::string& hostname,
-    scoped_ptr<ChannelIDKey>* channel_id_key,
+    std::unique_ptr<ChannelIDKey>* channel_id_key,
     ChannelIDSourceCallback* callback) {
   DCHECK(channel_id_key);
   DCHECK(callback);
@@ -166,7 +166,7 @@
 void ChannelIDSourceChromium::Job::OnIOComplete(int result) {
   int rv = DoLoop(result);
   if (rv != ERR_IO_PENDING) {
-    scoped_ptr<ChannelIDSourceCallback> callback(callback_.release());
+    std::unique_ptr<ChannelIDSourceCallback> callback(callback_.release());
     callback->Run(&channel_id_key_);
     // Will delete |this|.
     channel_id_source_->OnJobComplete(this);
@@ -206,9 +206,9 @@
 
 QuicAsyncStatus ChannelIDSourceChromium::GetChannelIDKey(
     const std::string& hostname,
-    scoped_ptr<ChannelIDKey>* channel_id_key,
+    std::unique_ptr<ChannelIDKey>* channel_id_key,
     ChannelIDSourceCallback* callback) {
-  scoped_ptr<Job> job(new Job(this, channel_id_service_));
+  std::unique_ptr<Job> job(new Job(this, channel_id_service_));
   QuicAsyncStatus status =
       job->GetChannelIDKey(hostname, channel_id_key, callback);
   if (status == QUIC_PENDING) {
diff --git a/net/quic/crypto/channel_id_chromium.h b/net/quic/crypto/channel_id_chromium.h
index 7dfb9b5..c93000a 100644
--- a/net/quic/crypto/channel_id_chromium.h
+++ b/net/quic/crypto/channel_id_chromium.h
@@ -21,7 +21,7 @@
 class NET_EXPORT_PRIVATE ChannelIDKeyChromium : public ChannelIDKey {
  public:
   explicit ChannelIDKeyChromium(
-      scoped_ptr<crypto::ECPrivateKey> ec_private_key);
+      std::unique_ptr<crypto::ECPrivateKey> ec_private_key);
   ~ChannelIDKeyChromium() override;
 
   // ChannelIDKey interface
@@ -30,7 +30,7 @@
   std::string SerializeKey() const override;
 
  private:
-  scoped_ptr<crypto::ECPrivateKey> ec_private_key_;
+  std::unique_ptr<crypto::ECPrivateKey> ec_private_key_;
 };
 
 // ChannelIDSourceChromium implements the QUIC ChannelIDSource interface.
@@ -41,7 +41,7 @@
 
   // ChannelIDSource interface
   QuicAsyncStatus GetChannelIDKey(const std::string& hostname,
-                                  scoped_ptr<ChannelIDKey>* channel_id_key,
+                                  std::unique_ptr<ChannelIDKey>* channel_id_key,
                                   ChannelIDSourceCallback* callback) override;
 
  private:
diff --git a/net/quic/crypto/channel_id_test.cc b/net/quic/crypto/channel_id_test.cc
index 8aa2f74..1453071b 100644
--- a/net/quic/crypto/channel_id_test.cc
+++ b/net/quic/crypto/channel_id_test.cc
@@ -234,12 +234,12 @@
 }
 
 TEST(ChannelIDTest, SignAndVerify) {
-  scoped_ptr<ChannelIDSource> source(
+  std::unique_ptr<ChannelIDSource> source(
       CryptoTestUtils::ChannelIDSourceForTesting());
 
   const string signed_data = "signed data";
   const string hostname = "foo.example.com";
-  scoped_ptr<ChannelIDKey> channel_id_key;
+  std::unique_ptr<ChannelIDKey> channel_id_key;
   QuicAsyncStatus status =
       source->GetChannelIDKey(hostname, &channel_id_key, nullptr);
   ASSERT_EQ(QUIC_SUCCESS, status);
@@ -253,13 +253,13 @@
   EXPECT_FALSE(ChannelIDVerifier::Verify("a" + key, signed_data, signature));
   EXPECT_FALSE(ChannelIDVerifier::Verify(key, "a" + signed_data, signature));
 
-  scoped_ptr<char[]> bad_key(new char[key.size()]);
+  std::unique_ptr<char[]> bad_key(new char[key.size()]);
   memcpy(bad_key.get(), key.data(), key.size());
   bad_key[1] ^= 0x80;
   EXPECT_FALSE(ChannelIDVerifier::Verify(string(bad_key.get(), key.size()),
                                          signed_data, signature));
 
-  scoped_ptr<char[]> bad_signature(new char[signature.size()]);
+  std::unique_ptr<char[]> bad_signature(new char[signature.size()]);
   memcpy(bad_signature.get(), signature.data(), signature.size());
   bad_signature[1] ^= 0x80;
   EXPECT_FALSE(ChannelIDVerifier::Verify(
diff --git a/net/quic/crypto/crypto_framer.cc b/net/quic/crypto/crypto_framer.cc
index 2d80980..8e04aef 100644
--- a/net/quic/crypto/crypto_framer.cc
+++ b/net/quic/crypto/crypto_framer.cc
@@ -37,7 +37,7 @@
   CryptoHandshakeMessage* release() { return out_.release(); }
 
  private:
-  scoped_ptr<CryptoHandshakeMessage> out_;
+  std::unique_ptr<CryptoHandshakeMessage> out_;
   bool error_;
 };
 
@@ -105,7 +105,7 @@
     return nullptr;
   }
 
-  scoped_ptr<char[]> buffer(new char[len]);
+  std::unique_ptr<char[]> buffer(new char[len]);
   QuicDataWriter writer(len, buffer.get());
   if (!writer.WriteUInt32(message.tag())) {
     DCHECK(false) << "Failed to write message tag.";
diff --git a/net/quic/crypto/crypto_framer_test.cc b/net/quic/crypto/crypto_framer_test.cc
index f60380f..e39c21f 100644
--- a/net/quic/crypto/crypto_framer_test.cc
+++ b/net/quic/crypto/crypto_framer_test.cc
@@ -5,10 +5,10 @@
 #include "net/quic/crypto/crypto_framer.h"
 
 #include <map>
+#include <memory>
 #include <vector>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/quic/crypto/crypto_handshake.h"
 #include "net/quic/crypto/crypto_protocol.h"
 #include "net/quic/quic_protocol.h"
@@ -86,7 +86,7 @@
   };
 
   CryptoFramer framer;
-  scoped_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
+  std::unique_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
   ASSERT_TRUE(data.get() != nullptr);
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
                                       data->length(), AsChars(packet),
@@ -121,7 +121,7 @@
   };
 
   CryptoFramer framer;
-  scoped_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
+  std::unique_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
   ASSERT_TRUE(data.get() != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -148,7 +148,7 @@
   };
 
   CryptoFramer framer;
-  scoped_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
+  std::unique_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
   ASSERT_TRUE(data.get() != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -164,7 +164,7 @@
   }
 
   CryptoFramer framer;
-  scoped_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
+  std::unique_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
   EXPECT_TRUE(data.get() == nullptr);
 }
 
@@ -198,7 +198,7 @@
   };
 
   CryptoFramer framer;
-  scoped_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
+  std::unique_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
   ASSERT_TRUE(data.get() != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -234,7 +234,7 @@
   };
 
   CryptoFramer framer;
-  scoped_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
+  std::unique_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
   ASSERT_TRUE(data.get() != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
diff --git a/net/quic/crypto/crypto_handshake.h b/net/quic/crypto/crypto_handshake.h
index d9d51e3..dd958c2e 100644
--- a/net/quic/crypto/crypto_handshake.h
+++ b/net/quic/crypto/crypto_handshake.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/quic/quic_protocol.h"
 
@@ -94,8 +94,8 @@
 struct NET_EXPORT_PRIVATE CrypterPair {
   CrypterPair();
   ~CrypterPair();
-  scoped_ptr<QuicEncrypter> encrypter;
-  scoped_ptr<QuicDecrypter> decrypter;
+  std::unique_ptr<QuicEncrypter> encrypter;
+  std::unique_ptr<QuicDecrypter> decrypter;
 };
 
 // Parameters negotiated by the crypto handshake.
@@ -130,7 +130,7 @@
   std::vector<std::string> cached_certs;
   // client_key_exchange is used by clients to store the ephemeral KeyExchange
   // for the connection.
-  scoped_ptr<KeyExchange> client_key_exchange;
+  std::unique_ptr<KeyExchange> client_key_exchange;
   // channel_id is set by servers to a ChannelID key when the client correctly
   // proves possession of the corresponding private key. It consists of 32
   // bytes of x coordinate, followed by 32 bytes of y coordinate. Both values
diff --git a/net/quic/crypto/crypto_handshake_message.cc b/net/quic/crypto/crypto_handshake_message.cc
index 5e4e48d..05ffa67 100644
--- a/net/quic/crypto/crypto_handshake_message.cc
+++ b/net/quic/crypto/crypto_handshake_message.cc
@@ -304,7 +304,7 @@
       case kSCFG:
         // nested messages.
         if (!it->second.empty()) {
-          scoped_ptr<CryptoHandshakeMessage> msg(
+          std::unique_ptr<CryptoHandshakeMessage> msg(
               CryptoFramer::ParseMessage(it->second));
           if (msg.get()) {
             ret += "\n";
diff --git a/net/quic/crypto/crypto_handshake_message.h b/net/quic/crypto/crypto_handshake_message.h
index a3778cb7..86052f2 100644
--- a/net/quic/crypto/crypto_handshake_message.h
+++ b/net/quic/crypto/crypto_handshake_message.h
@@ -8,10 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/net_export.h"
 #include "net/quic/quic_protocol.h"
@@ -132,7 +132,7 @@
 
   // The serialized form of the handshake message. This member is constructed
   // lasily.
-  mutable scoped_ptr<QuicData> serialized_;
+  mutable std::unique_ptr<QuicData> serialized_;
 };
 
 }  // namespace net
diff --git a/net/quic/crypto/crypto_secret_boxer.cc b/net/quic/crypto/crypto_secret_boxer.cc
index 08a4317..347333f 100644
--- a/net/quic/crypto/crypto_secret_boxer.cc
+++ b/net/quic/crypto/crypto_secret_boxer.cc
@@ -4,8 +4,9 @@
 
 #include "net/quic/crypto/crypto_secret_boxer.h"
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/quic/crypto/aes_128_gcm_12_decrypter.h"
 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h"
 #include "net/quic/crypto/crypto_protocol.h"
@@ -55,7 +56,7 @@
 }
 
 string CryptoSecretBoxer::Box(QuicRandom* rand, StringPiece plaintext) const {
-  scoped_ptr<Aes128Gcm12Encrypter> encrypter(new Aes128Gcm12Encrypter());
+  std::unique_ptr<Aes128Gcm12Encrypter> encrypter(new Aes128Gcm12Encrypter());
   {
     base::AutoLock l(lock_);
     DCHECK_EQ(kKeySize, keys_[0].size());
@@ -99,7 +100,7 @@
   memcpy(&packet_number, nonce.data() + nonce_prefix.size(),
          sizeof(packet_number));
 
-  scoped_ptr<Aes128Gcm12Decrypter> decrypter(new Aes128Gcm12Decrypter());
+  std::unique_ptr<Aes128Gcm12Decrypter> decrypter(new Aes128Gcm12Decrypter());
   char plaintext[kMaxPacketSize];
   size_t plaintext_length = 0;
   bool ok = false;
diff --git a/net/quic/crypto/crypto_secret_boxer_test.cc b/net/quic/crypto/crypto_secret_boxer_test.cc
index c73c581c..6d5cad1 100644
--- a/net/quic/crypto/crypto_secret_boxer_test.cc
+++ b/net/quic/crypto/crypto_secret_boxer_test.cc
@@ -4,7 +4,8 @@
 
 #include "net/quic/crypto/crypto_secret_boxer.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/quic/crypto/quic_random.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/net/quic/crypto/crypto_server_test.cc b/net/quic/crypto/crypto_server_test.cc
index d2fd4c5..5dfcf51 100644
--- a/net/quic/crypto/crypto_server_test.cc
+++ b/net/quic/crypto/crypto_server_test.cc
@@ -43,7 +43,7 @@
 
   void Run(bool ok,
            const std::string& error_details,
-           scoped_ptr<ProofVerifyDetails>* details) override {
+           std::unique_ptr<ProofVerifyDetails>* details) override {
     // Do nothing
   }
 };
@@ -151,10 +151,10 @@
     old_config_options.id = kOldConfigId;
     delete config_.AddDefaultConfig(rand_, &clock_, old_config_options);
     clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1000));
-    scoped_ptr<QuicServerConfigProtobuf> primary_config(
+    std::unique_ptr<QuicServerConfigProtobuf> primary_config(
         config_.GenerateConfig(rand_, &clock_, config_options_));
     primary_config->set_primary_time(clock_.WallNow().ToUNIXSeconds());
-    scoped_ptr<CryptoHandshakeMessage> msg(
+    std::unique_ptr<CryptoHandshakeMessage> msg(
         config_.AddConfig(primary_config.get(), clock_.WallNow()));
 
     StringPiece orbit;
@@ -380,7 +380,7 @@
     IPAddress server_ip;
     string sig;
     string cert_sct;
-    scoped_ptr<ProofSource> proof_source(
+    std::unique_ptr<ProofSource> proof_source(
         CryptoTestUtils::ProofSourceForTesting());
     if (!proof_source->GetProof(server_ip, "", "", client_version_, "", false,
                                 &chain, &sig, &cert_sct) ||
@@ -415,7 +415,7 @@
   // These strings contain hex escaped values from the server suitable for using
   // when constructing client hello messages.
   string nonce_hex_, pub_hex_, srct_hex_, scid_hex_;
-  scoped_ptr<CryptoHandshakeMessage> server_config_;
+  std::unique_ptr<CryptoHandshakeMessage> server_config_;
 };
 
 // Run all CryptoServerTest with both values of
@@ -849,7 +849,8 @@
   EXPECT_TRUE(out_.GetStringPiece(kCertificateTag, &cert));
   EXPECT_TRUE(out_.GetStringPiece(kPROF, &proof));
   EXPECT_TRUE(out_.GetStringPiece(kSCFG, &scfg_str));
-  scoped_ptr<CryptoHandshakeMessage> scfg(CryptoFramer::ParseMessage(scfg_str));
+  std::unique_ptr<CryptoHandshakeMessage> scfg(
+      CryptoFramer::ParseMessage(scfg_str));
   StringPiece scid;
   EXPECT_TRUE(scfg->GetStringPiece(kSCID, &scid));
   EXPECT_NE(scid, kOldConfigId);
@@ -863,11 +864,11 @@
                                               common_cert_sets, &certs));
 
   // Check that the proof in the REJ message is valid.
-  scoped_ptr<ProofVerifier> proof_verifier(
+  std::unique_ptr<ProofVerifier> proof_verifier(
       CryptoTestUtils::ProofVerifierForTesting());
-  scoped_ptr<ProofVerifyContext> verify_context(
+  std::unique_ptr<ProofVerifyContext> verify_context(
       CryptoTestUtils::ProofVerifyContextForTesting());
-  scoped_ptr<ProofVerifyDetails> details;
+  std::unique_ptr<ProofVerifyDetails> details;
   string error_details;
   DummyProofVerifierCallback callback;
   string chlo_hash;
@@ -981,9 +982,9 @@
                            CryptoTestUtils::ProofSourceForTesting());
   QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b,
                            CryptoTestUtils::ProofSourceForTesting());
-  scoped_ptr<CryptoHandshakeMessage> scfg_a(
+  std::unique_ptr<CryptoHandshakeMessage> scfg_a(
       a.AddDefaultConfig(&rand_a, &clock, options));
-  scoped_ptr<CryptoHandshakeMessage> scfg_b(
+  std::unique_ptr<CryptoHandshakeMessage> scfg_b(
       b.AddDefaultConfig(&rand_b, &clock, options));
 
   ASSERT_EQ(scfg_a->DebugString(), scfg_b->DebugString());
@@ -1002,9 +1003,9 @@
   rand_b.ChangeValue();
   QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b,
                            CryptoTestUtils::ProofSourceForTesting());
-  scoped_ptr<CryptoHandshakeMessage> scfg_a(
+  std::unique_ptr<CryptoHandshakeMessage> scfg_a(
       a.AddDefaultConfig(&rand_a, &clock, options));
-  scoped_ptr<CryptoHandshakeMessage> scfg_b(
+  std::unique_ptr<CryptoHandshakeMessage> scfg_b(
       b.AddDefaultConfig(&rand_b, &clock, options));
 
   StringPiece scid_a, scid_b;
@@ -1021,7 +1022,7 @@
 
   QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a,
                            CryptoTestUtils::ProofSourceForTesting());
-  scoped_ptr<CryptoHandshakeMessage> scfg(
+  std::unique_ptr<CryptoHandshakeMessage> scfg(
       a.AddDefaultConfig(&rand_a, &clock, options));
 
   StringPiece scid;
@@ -1033,7 +1034,7 @@
   scfg->MarkDirty();
   const QuicData& serialized(scfg->GetSerialized());
 
-  scoped_ptr<crypto::SecureHash> hash(
+  std::unique_ptr<crypto::SecureHash> hash(
       crypto::SecureHash::Create(crypto::SecureHash::SHA256));
   hash->Update(serialized.data(), serialized.length());
   uint8_t digest[16];
diff --git a/net/quic/crypto/crypto_utils.cc b/net/quic/crypto/crypto_utils.cc
index 2b22acd..a052520 100644
--- a/net/quic/crypto/crypto_utils.cc
+++ b/net/quic/crypto/crypto_utils.cc
@@ -279,7 +279,7 @@
 void CryptoUtils::HashHandshakeMessage(const CryptoHandshakeMessage& message,
                                        string* output) {
   const QuicData& serialized = message.GetSerialized();
-  scoped_ptr<crypto::SecureHash> hash(
+  std::unique_ptr<crypto::SecureHash> hash(
       crypto::SecureHash::Create(crypto::SecureHash::SHA256));
   hash->Update(serialized.data(), serialized.length());
   uint8_t digest[32];
diff --git a/net/quic/crypto/curve25519_key_exchange_test.cc b/net/quic/crypto/curve25519_key_exchange_test.cc
index 93ef630..6c87d243 100644
--- a/net/quic/crypto/curve25519_key_exchange_test.cc
+++ b/net/quic/crypto/curve25519_key_exchange_test.cc
@@ -4,7 +4,8 @@
 
 #include "net/quic/crypto/curve25519_key_exchange.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/strings/string_piece.h"
 #include "net/quic/crypto/quic_random.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -24,9 +25,10 @@
     const string alice_key(Curve25519KeyExchange::NewPrivateKey(rand));
     const string bob_key(Curve25519KeyExchange::NewPrivateKey(rand));
 
-    scoped_ptr<Curve25519KeyExchange> alice(
+    std::unique_ptr<Curve25519KeyExchange> alice(
         Curve25519KeyExchange::New(alice_key));
-    scoped_ptr<Curve25519KeyExchange> bob(Curve25519KeyExchange::New(bob_key));
+    std::unique_ptr<Curve25519KeyExchange> bob(
+        Curve25519KeyExchange::New(bob_key));
 
     const StringPiece alice_public(alice->public_value());
     const StringPiece bob_public(bob->public_value());
diff --git a/net/quic/crypto/local_strike_register_client_test.cc b/net/quic/crypto/local_strike_register_client_test.cc
index 74bf095f..d72dcb1 100644
--- a/net/quic/crypto/local_strike_register_client_test.cc
+++ b/net/quic/crypto/local_strike_register_client_test.cc
@@ -7,7 +7,6 @@
 #include <memory>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "base/sys_byteorder.h"
 #include "net/quic/crypto/crypto_protocol.h"
@@ -66,7 +65,7 @@
         StrikeRegister::NO_STARTUP_PERIOD_NEEDED));
   }
 
-  scoped_ptr<LocalStrikeRegisterClient> strike_register_;
+  std::unique_ptr<LocalStrikeRegisterClient> strike_register_;
 };
 
 TEST_F(LocalStrikeRegisterClientTest, CheckOrbit) {
diff --git a/net/quic/crypto/p256_key_exchange.h b/net/quic/crypto/p256_key_exchange.h
index 197adfe5..fcdc19dd 100644
--- a/net/quic/crypto/p256_key_exchange.h
+++ b/net/quic/crypto/p256_key_exchange.h
@@ -7,10 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/net_export.h"
 #include "net/quic/crypto/key_exchange.h"
@@ -70,7 +70,7 @@
   // |public_key| consists of |kUncompressedP256PointBytes| bytes.
   P256KeyExchange(crypto::ECPrivateKey* key_pair, const uint8_t* public_key);
 
-  scoped_ptr<crypto::ECPrivateKey> key_pair_;
+  std::unique_ptr<crypto::ECPrivateKey> key_pair_;
 #endif
   // The public key stored as an uncompressed P-256 point.
   uint8_t public_key_[kUncompressedP256PointBytes];
diff --git a/net/quic/crypto/p256_key_exchange_nss.cc b/net/quic/crypto/p256_key_exchange_nss.cc
index c5529ab..8c28e53 100644
--- a/net/quic/crypto/p256_key_exchange_nss.cc
+++ b/net/quic/crypto/p256_key_exchange_nss.cc
@@ -62,7 +62,7 @@
 
   StringPiece public_piece(key);
 
-  scoped_ptr<crypto::ECPrivateKey> key_pair(
+  std::unique_ptr<crypto::ECPrivateKey> key_pair(
       crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
           kExportPassword,
           // TODO(thaidn): fix this interface to avoid copying secrets.
@@ -106,7 +106,8 @@
 
 // static
 string P256KeyExchange::NewPrivateKey() {
-  scoped_ptr<crypto::ECPrivateKey> key_pair(crypto::ECPrivateKey::Create());
+  std::unique_ptr<crypto::ECPrivateKey> key_pair(
+      crypto::ECPrivateKey::Create());
 
   if (!key_pair.get()) {
     DVLOG(1) << "Can't generate new key pair.";
diff --git a/net/quic/crypto/p256_key_exchange_openssl.cc b/net/quic/crypto/p256_key_exchange_openssl.cc
index 9703a2e9..47e68ba 100644
--- a/net/quic/crypto/p256_key_exchange_openssl.cc
+++ b/net/quic/crypto/p256_key_exchange_openssl.cc
@@ -62,7 +62,7 @@
     DVLOG(1) << "Can't convert private key to string";
     return string();
   }
-  scoped_ptr<uint8_t[]> private_key(new uint8_t[key_len]);
+  std::unique_ptr<uint8_t[]> private_key(new uint8_t[key_len]);
   uint8_t* keyp = private_key.get();
   if (!i2d_ECPrivateKey(key.get(), &keyp)) {
     DVLOG(1) << "Can't convert private key to string.";
diff --git a/net/quic/crypto/p256_key_exchange_test.cc b/net/quic/crypto/p256_key_exchange_test.cc
index 4052c2da..079eb40d 100644
--- a/net/quic/crypto/p256_key_exchange_test.cc
+++ b/net/quic/crypto/p256_key_exchange_test.cc
@@ -23,8 +23,8 @@
     ASSERT_FALSE(bob_private.empty());
     ASSERT_NE(alice_private, bob_private);
 
-    scoped_ptr<P256KeyExchange> alice(P256KeyExchange::New(alice_private));
-    scoped_ptr<P256KeyExchange> bob(P256KeyExchange::New(bob_private));
+    std::unique_ptr<P256KeyExchange> alice(P256KeyExchange::New(alice_private));
+    std::unique_ptr<P256KeyExchange> bob(P256KeyExchange::New(bob_private));
 
     ASSERT_TRUE(alice.get() != nullptr);
     ASSERT_TRUE(bob.get() != nullptr);
diff --git a/net/quic/crypto/proof_source_chromium.h b/net/quic/crypto/proof_source_chromium.h
index 70b8ea1..f84746e 100644
--- a/net/quic/crypto/proof_source_chromium.h
+++ b/net/quic/crypto/proof_source_chromium.h
@@ -44,7 +44,7 @@
                 std::string* out_leaf_cert_sct) override;
 
  private:
-  scoped_ptr<crypto::RSAPrivateKey> private_key_;
+  std::unique_ptr<crypto::RSAPrivateKey> private_key_;
   scoped_refptr<ProofSource::Chain> chain_;
   std::string signed_certificate_timestamp_;
 
diff --git a/net/quic/crypto/proof_test.cc b/net/quic/crypto/proof_test.cc
index 8042b2b..67af4127 100644
--- a/net/quic/crypto/proof_test.cc
+++ b/net/quic/crypto/proof_test.cc
@@ -39,7 +39,7 @@
 
   void Run(bool ok,
            const string& error_details,
-           scoped_ptr<ProofVerifyDetails>* details) override {
+           std::unique_ptr<ProofVerifyDetails>* details) override {
     *ok_ = ok;
     *error_details_ = error_details;
 
@@ -63,11 +63,11 @@
                      const vector<string>& certs,
                      const string& proof,
                      bool expected_ok) {
-  scoped_ptr<ProofVerifyDetails> details;
+  std::unique_ptr<ProofVerifyDetails> details;
   TestCompletionCallback comp_callback;
   bool ok;
   string error_details;
-  scoped_ptr<ProofVerifyContext> verify_context(
+  std::unique_ptr<ProofVerifyContext> verify_context(
       CryptoTestUtils::ProofVerifyContextForTesting());
   TestProofVerifierCallback* callback =
       new TestProofVerifierCallback(&comp_callback, &ok, &error_details);
@@ -117,8 +117,8 @@
 
 // TODO(rtenneti): Enable testing of ProofVerifier. See http://crbug.com/514468.
 TEST_P(ProofTest, DISABLED_Verify) {
-  scoped_ptr<ProofSource> source(CryptoTestUtils::ProofSourceForTesting());
-  scoped_ptr<ProofVerifier> verifier(
+  std::unique_ptr<ProofSource> source(CryptoTestUtils::ProofSourceForTesting());
+  std::unique_ptr<ProofVerifier> verifier(
       CryptoTestUtils::ProofVerifierForTesting());
 
   const string server_config = "server config bytes";
@@ -279,7 +279,7 @@
       0xad, 0x42, 0xe5, 0x55,
   };
 
-  scoped_ptr<ProofVerifier> verifier(
+  std::unique_ptr<ProofVerifier> verifier(
       CryptoTestUtils::RealProofVerifierForTesting());
 
   const string server_config = "server config bytes";
@@ -370,7 +370,7 @@
       0x1f, 0xce, 0x92, 0x05, 0xca, 0x29, 0xfe, 0xd2, 0x8f, 0xd9, 0x31,
   };
 
-  scoped_ptr<ProofVerifier> verifier(
+  std::unique_ptr<ProofVerifier> verifier(
       CryptoTestUtils::RealProofVerifierForTesting());
 
   const string server_config = "server config bytes";
diff --git a/net/quic/crypto/proof_verifier.h b/net/quic/crypto/proof_verifier.h
index be6f9e7..fc520aa 100644
--- a/net/quic/crypto/proof_verifier.h
+++ b/net/quic/crypto/proof_verifier.h
@@ -5,10 +5,10 @@
 #ifndef NET_QUIC_CRYPTO_PROOF_VERIFIER_H_
 #define NET_QUIC_CRYPTO_PROOF_VERIFIER_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/quic/quic_protocol.h"
 #include "net/quic/quic_types.h"
@@ -48,7 +48,7 @@
   // calling |release| on it.
   virtual void Run(bool ok,
                    const std::string& error_details,
-                   scoped_ptr<ProofVerifyDetails>* details) = 0;
+                   std::unique_ptr<ProofVerifyDetails>* details) = 0;
 };
 
 // A ProofVerifier checks the signature on a server config, and the certificate
@@ -74,18 +74,19 @@
   //
   // The signature uses SHA-256 as the hash function and PSS padding in the
   // case of RSA.
-  virtual QuicAsyncStatus VerifyProof(const std::string& hostname,
-                                      const uint16_t port,
-                                      const std::string& server_config,
-                                      QuicVersion quic_version,
-                                      base::StringPiece chlo_hash,
-                                      const std::vector<std::string>& certs,
-                                      const std::string& cert_sct,
-                                      const std::string& signature,
-                                      const ProofVerifyContext* context,
-                                      std::string* error_details,
-                                      scoped_ptr<ProofVerifyDetails>* details,
-                                      ProofVerifierCallback* callback) = 0;
+  virtual QuicAsyncStatus VerifyProof(
+      const std::string& hostname,
+      const uint16_t port,
+      const std::string& server_config,
+      QuicVersion quic_version,
+      base::StringPiece chlo_hash,
+      const std::vector<std::string>& certs,
+      const std::string& cert_sct,
+      const std::string& signature,
+      const ProofVerifyContext* context,
+      std::string* error_details,
+      std::unique_ptr<ProofVerifyDetails>* details,
+      ProofVerifierCallback* callback) = 0;
 };
 
 }  // namespace net
diff --git a/net/quic/crypto/proof_verifier_chromium.cc b/net/quic/crypto/proof_verifier_chromium.cc
index 044c694b..93d9721 100644
--- a/net/quic/crypto/proof_verifier_chromium.cc
+++ b/net/quic/crypto/proof_verifier_chromium.cc
@@ -62,17 +62,18 @@
 
   // Starts the proof verification.  If |QUIC_PENDING| is returned, then
   // |callback| will be invoked asynchronously when the verification completes.
-  QuicAsyncStatus VerifyProof(const std::string& hostname,
-                              const uint16_t port,
-                              const std::string& server_config,
-                              QuicVersion quic_version,
-                              base::StringPiece chlo_hash,
-                              const std::vector<std::string>& certs,
-                              const std::string& cert_sct,
-                              const std::string& signature,
-                              std::string* error_details,
-                              scoped_ptr<ProofVerifyDetails>* verify_details,
-                              ProofVerifierCallback* callback);
+  QuicAsyncStatus VerifyProof(
+      const std::string& hostname,
+      const uint16_t port,
+      const std::string& server_config,
+      QuicVersion quic_version,
+      base::StringPiece chlo_hash,
+      const std::vector<std::string>& certs,
+      const std::string& cert_sct,
+      const std::string& signature,
+      std::string* error_details,
+      std::unique_ptr<ProofVerifyDetails>* verify_details,
+      ProofVerifierCallback* callback);
 
  private:
   enum State {
@@ -97,7 +98,7 @@
 
   // The underlying verifier used for verifying certificates.
   CertVerifier* verifier_;
-  scoped_ptr<CertVerifier::Request> cert_verifier_request_;
+  std::unique_ptr<CertVerifier::Request> cert_verifier_request_;
 
   CTPolicyEnforcer* policy_enforcer_;
 
@@ -110,8 +111,8 @@
   // |port| specifies the target port for the connection.
   uint16_t port_;
 
-  scoped_ptr<ProofVerifierCallback> callback_;
-  scoped_ptr<ProofVerifyDetailsChromium> verify_details_;
+  std::unique_ptr<ProofVerifierCallback> callback_;
+  std::unique_ptr<ProofVerifyDetailsChromium> verify_details_;
   std::string error_details_;
 
   // X509Certificate from a chain of DER encoded certificates.
@@ -169,7 +170,7 @@
     const std::string& cert_sct,
     const string& signature,
     std::string* error_details,
-    scoped_ptr<ProofVerifyDetails>* verify_details,
+    std::unique_ptr<ProofVerifyDetails>* verify_details,
     ProofVerifierCallback* callback) {
   DCHECK(error_details);
   DCHECK(verify_details);
@@ -271,9 +272,10 @@
 void ProofVerifierChromium::Job::OnIOComplete(int result) {
   int rv = DoLoop(result);
   if (rv != ERR_IO_PENDING) {
-    scoped_ptr<ProofVerifierCallback> callback(std::move(callback_));
+    std::unique_ptr<ProofVerifierCallback> callback(std::move(callback_));
     // Callback expects ProofVerifyDetails not ProofVerifyDetailsChromium.
-    scoped_ptr<ProofVerifyDetails> verify_details(std::move(verify_details_));
+    std::unique_ptr<ProofVerifyDetails> verify_details(
+        std::move(verify_details_));
     callback->Run(rv == OK, error_details_, &verify_details);
     // Will delete |this|.
     proof_verifier_->OnJobComplete(this);
@@ -448,7 +450,7 @@
     const std::string& signature,
     const ProofVerifyContext* verify_context,
     std::string* error_details,
-    scoped_ptr<ProofVerifyDetails>* verify_details,
+    std::unique_ptr<ProofVerifyDetails>* verify_details,
     ProofVerifierCallback* callback) {
   if (!verify_context) {
     *error_details = "Missing context";
@@ -456,7 +458,7 @@
   }
   const ProofVerifyContextChromium* chromium_context =
       reinterpret_cast<const ProofVerifyContextChromium*>(verify_context);
-  scoped_ptr<Job> job(
+  std::unique_ptr<Job> job(
       new Job(this, cert_verifier_, ct_policy_enforcer_,
               transport_security_state_, cert_transparency_verifier_,
               chromium_context->cert_verify_flags, chromium_context->net_log));
diff --git a/net/quic/crypto/proof_verifier_chromium.h b/net/quic/crypto/proof_verifier_chromium.h
index eef604d2f..be50650 100644
--- a/net/quic/crypto/proof_verifier_chromium.h
+++ b/net/quic/crypto/proof_verifier_chromium.h
@@ -5,13 +5,13 @@
 #ifndef NET_QUIC_CRYPTO_PROOF_VERIFIER_CHROMIUM_H_
 #define NET_QUIC_CRYPTO_PROOF_VERIFIER_CHROMIUM_H_
 
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/cert/cert_verify_result.h"
 #include "net/cert/ct_verify_result.h"
@@ -65,18 +65,19 @@
   ~ProofVerifierChromium() override;
 
   // ProofVerifier interface
-  QuicAsyncStatus VerifyProof(const std::string& hostname,
-                              const uint16_t port,
-                              const std::string& server_config,
-                              QuicVersion quic_version,
-                              base::StringPiece chlo_hash,
-                              const std::vector<std::string>& certs,
-                              const std::string& cert_sct,
-                              const std::string& signature,
-                              const ProofVerifyContext* verify_context,
-                              std::string* error_details,
-                              scoped_ptr<ProofVerifyDetails>* verify_details,
-                              ProofVerifierCallback* callback) override;
+  QuicAsyncStatus VerifyProof(
+      const std::string& hostname,
+      const uint16_t port,
+      const std::string& server_config,
+      QuicVersion quic_version,
+      base::StringPiece chlo_hash,
+      const std::vector<std::string>& certs,
+      const std::string& cert_sct,
+      const std::string& signature,
+      const ProofVerifyContext* verify_context,
+      std::string* error_details,
+      std::unique_ptr<ProofVerifyDetails>* verify_details,
+      ProofVerifierCallback* callback) override;
 
  private:
   class Job;
diff --git a/net/quic/crypto/proof_verifier_chromium_test.cc b/net/quic/crypto/proof_verifier_chromium_test.cc
index bc2d27f..9b90b67 100644
--- a/net/quic/crypto/proof_verifier_chromium_test.cc
+++ b/net/quic/crypto/proof_verifier_chromium_test.cc
@@ -4,8 +4,9 @@
 
 #include "net/quic/crypto/proof_verifier_chromium.h"
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_errors.h"
 #include "net/base/test_data_directory.h"
 #include "net/cert/cert_status_flags.h"
@@ -44,7 +45,7 @@
              CRLSet* crl_set,
              CertVerifyResult* verify_result,
              const CompletionCallback& callback,
-             scoped_ptr<CertVerifier::Request>* out_req,
+             std::unique_ptr<CertVerifier::Request>* out_req,
              const BoundNetLog& net_log) override {
     ADD_FAILURE() << "CertVerifier::Verify() should not be called";
     return ERR_FAILED;
@@ -95,7 +96,7 @@
 
   void Run(bool ok,
            const std::string& error_details,
-           scoped_ptr<ProofVerifyDetails>* details) override {
+           std::unique_ptr<ProofVerifyDetails>* details) override {
     // Do nothing
   }
 };
@@ -205,10 +206,10 @@
   }
 
  protected:
-  scoped_ptr<MultiLogCTVerifier> ct_verifier_;
+  std::unique_ptr<MultiLogCTVerifier> ct_verifier_;
   std::vector<scoped_refptr<const CTLogVerifier>> log_verifiers_;
-  scoped_ptr<ProofVerifyContext> verify_context_;
-  scoped_ptr<ProofVerifyDetails> details_;
+  std::unique_ptr<ProofVerifyContext> verify_context_;
+  std::unique_ptr<ProofVerifyDetails> details_;
   std::string error_details_;
   std::vector<std::string> certs_;
 };
@@ -220,7 +221,7 @@
   ProofVerifierChromium proof_verifier(&dummy_verifier, nullptr, nullptr,
                                        ct_verifier_.get());
 
-  scoped_ptr<DummyProofVerifierCallback> callback(
+  std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
   QuicAsyncStatus status = proof_verifier.VerifyProof(
       kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_25, "", certs_, "",
@@ -238,7 +239,7 @@
   ProofVerifierChromium proof_verifier(&cert_verifier, nullptr, nullptr,
                                        ct_verifier_.get());
 
-  scoped_ptr<DummyProofVerifierCallback> callback(
+  std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
   QuicAsyncStatus status = proof_verifier.VerifyProof(
       kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_25, "", certs_,
@@ -257,7 +258,7 @@
   ProofVerifierChromium proof_verifier(&cert_verifier, nullptr, nullptr,
                                        ct_verifier_.get());
 
-  scoped_ptr<DummyProofVerifierCallback> callback(
+  std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
   QuicAsyncStatus status = proof_verifier.VerifyProof(
       kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_25, "", certs_,
@@ -274,7 +275,7 @@
   ProofVerifierChromium proof_verifier(&cert_verifier, nullptr, nullptr,
                                        ct_verifier_.get());
 
-  scoped_ptr<DummyProofVerifierCallback> callback(
+  std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
   QuicAsyncStatus status = proof_verifier.VerifyProof(
       kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_25, "", certs_, "",
@@ -299,7 +300,7 @@
   ProofVerifierChromium proof_verifier(&dummy_verifier, nullptr, nullptr,
                                        ct_verifier_.get());
 
-  scoped_ptr<DummyProofVerifierCallback> callback(
+  std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
   QuicAsyncStatus status = proof_verifier.VerifyProof(
       kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_25, "", certs_, "",
@@ -332,7 +333,7 @@
   ProofVerifierChromium proof_verifier(&dummy_verifier, &policy_enforcer,
                                        nullptr, ct_verifier_.get());
 
-  scoped_ptr<DummyProofVerifierCallback> callback(
+  std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
   QuicAsyncStatus status = proof_verifier.VerifyProof(
       kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_25, "", certs_, "",
@@ -365,7 +366,7 @@
   ProofVerifierChromium proof_verifier(&dummy_verifier, &policy_enforcer,
                                        nullptr, ct_verifier_.get());
 
-  scoped_ptr<DummyProofVerifierCallback> callback(
+  std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
   QuicAsyncStatus status = proof_verifier.VerifyProof(
       kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_25, "", certs_, "",
@@ -399,7 +400,7 @@
   ProofVerifierChromium proof_verifier(&dummy_verifier, &policy_enforcer,
                                        nullptr, ct_verifier_.get());
 
-  scoped_ptr<DummyProofVerifierCallback> callback(
+  std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
   QuicAsyncStatus status = proof_verifier.VerifyProof(
       kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_25, "", certs_, "",
diff --git a/net/quic/crypto/quic_crypto_client_config.cc b/net/quic/crypto/quic_crypto_client_config.cc
index a6906a7..e6dad8c1 100644
--- a/net/quic/crypto/quic_crypto_client_config.cc
+++ b/net/quic/crypto/quic_crypto_client_config.cc
@@ -147,7 +147,7 @@
 
   // Even if the new server config matches the existing one, we still wish to
   // reject it if it has expired.
-  scoped_ptr<CryptoHandshakeMessage> new_scfg_storage;
+  std::unique_ptr<CryptoHandshakeMessage> new_scfg_storage;
   const CryptoHandshakeMessage* new_scfg;
 
   if (!matches_existing) {
@@ -659,7 +659,7 @@
     const QuicData& cetv_plaintext = cetv.GetSerialized();
     const size_t encrypted_len =
         crypters.encrypter->GetCiphertextSize(cetv_plaintext.length());
-    scoped_ptr<char[]> output(new char[encrypted_len]);
+    std::unique_ptr<char[]> output(new char[encrypted_len]);
     size_t output_size = 0;
     if (!crypters.encrypter->EncryptPacket(
             kDefaultPathId /* path id */, 0 /* packet number */,
diff --git a/net/quic/crypto/quic_crypto_client_config.h b/net/quic/crypto/quic_crypto_client_config.h
index a0c3536..9401a93c 100644
--- a/net/quic/crypto/quic_crypto_client_config.h
+++ b/net/quic/crypto/quic_crypto_client_config.h
@@ -8,12 +8,12 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <queue>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/net_export.h"
 #include "net/quic/crypto/crypto_handshake.h"
@@ -180,10 +180,10 @@
     // server_config_valid_ to false.
     uint64_t generation_counter_;
 
-    scoped_ptr<ProofVerifyDetails> proof_verify_details_;
+    std::unique_ptr<ProofVerifyDetails> proof_verify_details_;
 
     // scfg contains the cached, parsed value of |server_config|.
-    mutable scoped_ptr<CryptoHandshakeMessage> scfg_;
+    mutable std::unique_ptr<CryptoHandshakeMessage> scfg_;
 
     // TODO(jokulik): Consider using a hash-set as extra book-keeping to ensure
     // that no connection-id is added twice.  Also, consider keeping the server
@@ -366,8 +366,8 @@
   // ".googlevideo.com") of canonical hostnames.
   std::vector<std::string> canonical_suffixes_;
 
-  scoped_ptr<ProofVerifier> proof_verifier_;
-  scoped_ptr<ChannelIDSource> channel_id_source_;
+  std::unique_ptr<ProofVerifier> proof_verifier_;
+  std::unique_ptr<ChannelIDSource> channel_id_source_;
 
   // True if ECDSA should be disabled.
   bool disable_ecdsa_;
diff --git a/net/quic/crypto/quic_crypto_server_config.cc b/net/quic/crypto/quic_crypto_server_config.cc
index 2d0c664..b107df3 100644
--- a/net/quic/crypto/quic_crypto_server_config.cc
+++ b/net/quic/crypto/quic_crypto_server_config.cc
@@ -235,7 +235,7 @@
   server_nonce_entropy->RandBytes(server_nonce_orbit_,
                                   sizeof(server_nonce_orbit_));
   const size_t key_size = server_nonce_boxer_.GetKeySize();
-  scoped_ptr<uint8_t[]> key_bytes(new uint8_t[key_size]);
+  std::unique_ptr<uint8_t[]> key_bytes(new uint8_t[key_size]);
   server_nonce_entropy->RandBytes(key_bytes.get(), key_size);
 
   server_nonce_boxer_.SetKeys(
@@ -255,7 +255,7 @@
 
   const string curve25519_private_key =
       Curve25519KeyExchange::NewPrivateKey(rand);
-  scoped_ptr<Curve25519KeyExchange> curve25519(
+  std::unique_ptr<Curve25519KeyExchange> curve25519(
       Curve25519KeyExchange::New(curve25519_private_key));
   StringPiece curve25519_public_value = curve25519->public_value();
 
@@ -274,7 +274,8 @@
   string p256_private_key;
   if (options.p256) {
     p256_private_key = P256KeyExchange::NewPrivateKey();
-    scoped_ptr<P256KeyExchange> p256(P256KeyExchange::New(p256_private_key));
+    std::unique_ptr<P256KeyExchange> p256(
+        P256KeyExchange::New(p256_private_key));
     StringPiece p256_public_value = p256->public_value();
 
     DCHECK_LT(p256_public_value.size(), (1U << 24));
@@ -332,9 +333,9 @@
   if (options.id.empty()) {
     // We need to ensure that the SCID changes whenever the server config does
     // thus we make it a hash of the rest of the server config.
-    scoped_ptr<QuicData> serialized(
+    std::unique_ptr<QuicData> serialized(
         CryptoFramer::ConstructHandshakeMessage(msg));
-    scoped_ptr<SecureHash> hash(SecureHash::Create(SecureHash::SHA256));
+    std::unique_ptr<SecureHash> hash(SecureHash::Create(SecureHash::SHA256));
     hash->Update(serialized->data(), serialized->length());
 
     char scid_bytes[16];
@@ -347,9 +348,11 @@
   // everything but itself and so extra tags should be added prior to the
   // preceeding if block.
 
-  scoped_ptr<QuicData> serialized(CryptoFramer::ConstructHandshakeMessage(msg));
+  std::unique_ptr<QuicData> serialized(
+      CryptoFramer::ConstructHandshakeMessage(msg));
 
-  scoped_ptr<QuicServerConfigProtobuf> config(new QuicServerConfigProtobuf);
+  std::unique_ptr<QuicServerConfigProtobuf> config(
+      new QuicServerConfigProtobuf);
   config->set_config(serialized->AsStringPiece());
   QuicServerConfigProtobuf::PrivateKey* curve25519_key = config->add_key();
   curve25519_key->set_tag(kC255);
@@ -367,7 +370,7 @@
 CryptoHandshakeMessage* QuicCryptoServerConfig::AddConfig(
     QuicServerConfigProtobuf* protobuf,
     const QuicWallTime now) {
-  scoped_ptr<CryptoHandshakeMessage> msg(
+  std::unique_ptr<CryptoHandshakeMessage> msg(
       CryptoFramer::ParseMessage(protobuf->config()));
 
   if (!msg.get()) {
@@ -403,7 +406,7 @@
     QuicRandom* rand,
     const QuicClock* clock,
     const ConfigOptions& options) {
-  scoped_ptr<QuicServerConfigProtobuf> config(
+  std::unique_ptr<QuicServerConfigProtobuf> config(
       GenerateConfig(rand, clock, options));
   return AddConfig(config.get(), clock->WallNow());
 }
@@ -691,7 +694,7 @@
   }
 
   if (!info.sni.empty()) {
-    scoped_ptr<char[]> sni_tmp(new char[info.sni.length() + 1]);
+    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());
@@ -752,7 +755,7 @@
       *error_details = "CETV decryption failure";
       return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER;
     }
-    scoped_ptr<CryptoHandshakeMessage> cetv(
+    std::unique_ptr<CryptoHandshakeMessage> cetv(
         CryptoFramer::ParseMessage(StringPiece(plaintext, plaintext_length)));
     if (!cetv.get()) {
       *error_details = "CETV parse error";
@@ -793,7 +796,7 @@
             key_exchange, rand, clock->ApproximateNow(), public_value,
             &forward_secure_public_value);
   } else {
-    scoped_ptr<KeyExchange> forward_secure_key_exchange(
+    std::unique_ptr<KeyExchange> forward_secure_key_exchange(
         key_exchange->NewKeyPair(rand));
     forward_secure_public_value =
         forward_secure_key_exchange->public_value().as_string();
@@ -1317,7 +1320,7 @@
 scoped_refptr<QuicCryptoServerConfig::Config>
 QuicCryptoServerConfig::ParseConfigProtobuf(
     QuicServerConfigProtobuf* protobuf) {
-  scoped_ptr<CryptoHandshakeMessage> msg(
+  std::unique_ptr<CryptoHandshakeMessage> msg(
       CryptoFramer::ParseMessage(protobuf->config()));
 
   if (msg->tag() != kSCFG) {
@@ -1453,7 +1456,7 @@
       return nullptr;
     }
 
-    scoped_ptr<KeyExchange> ka;
+    std::unique_ptr<KeyExchange> ka;
     switch (tag) {
       case kC255:
         ka.reset(Curve25519KeyExchange::New(private_key));
diff --git a/net/quic/crypto/quic_crypto_server_config.h b/net/quic/crypto/quic_crypto_server_config.h
index 33f088d8..a457ae2 100644
--- a/net/quic/crypto/quic_crypto_server_config.h
+++ b/net/quic/crypto/quic_crypto_server_config.h
@@ -9,12 +9,12 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "base/synchronization/lock.h"
 #include "net/base/ip_address.h"
@@ -432,7 +432,7 @@
     // Holds the override source_address_token_boxer instance if the
     // Config is not using the default source address token boxer
     // instance provided by QuicCryptoServerConfig.
-    scoped_ptr<CryptoSecretBoxer> source_address_token_boxer_storage;
+    std::unique_ptr<CryptoSecretBoxer> source_address_token_boxer_storage;
 
    private:
     friend class base::RefCounted<Config>;
@@ -599,13 +599,13 @@
   // active config will be promoted to primary.
   mutable QuicWallTime next_config_promotion_time_;
   // Callback to invoke when the primary config changes.
-  scoped_ptr<PrimaryConfigChangedCallback> primary_config_changed_cb_;
+  std::unique_ptr<PrimaryConfigChangedCallback> primary_config_changed_cb_;
 
   // Protects access to the pointer held by strike_register_client_.
   mutable base::Lock strike_register_client_lock_;
   // strike_register_ contains a data structure that keeps track of previously
   // observed client nonces in order to prevent replay attacks.
-  mutable scoped_ptr<StrikeRegisterClient> strike_register_client_;
+  mutable std::unique_ptr<StrikeRegisterClient> strike_register_client_;
 
   // Default source_address_token_boxer_ used to protect the
   // source-address tokens that are given to clients.  Individual
@@ -625,15 +625,15 @@
   // server_nonce_strike_register_ contains a data structure that keeps track of
   // previously observed server nonces from this server, in order to prevent
   // replay attacks.
-  mutable scoped_ptr<StrikeRegister> server_nonce_strike_register_;
+  mutable std::unique_ptr<StrikeRegister> server_nonce_strike_register_;
 
   // proof_source_ contains an object that can provide certificate chains and
   // signatures.
-  scoped_ptr<ProofSource> proof_source_;
+  std::unique_ptr<ProofSource> proof_source_;
 
   // ephemeral_key_source_ contains an object that caches ephemeral keys for a
   // short period of time.
-  scoped_ptr<EphemeralKeySource> ephemeral_key_source_;
+  std::unique_ptr<EphemeralKeySource> ephemeral_key_source_;
 
   // These fields store configuration values. See the comments for their
   // respective setter functions.
diff --git a/net/quic/crypto/quic_crypto_server_config_test.cc b/net/quic/crypto/quic_crypto_server_config_test.cc
index 270cd9a2..38c6d2ef 100644
--- a/net/quic/crypto/quic_crypto_server_config_test.cc
+++ b/net/quic/crypto/quic_crypto_server_config_test.cc
@@ -234,7 +234,7 @@
                                 CryptoTestUtils::ProofSourceForTesting());
   MockClock clock;
 
-  scoped_ptr<CryptoHandshakeMessage> message(server.AddDefaultConfig(
+  std::unique_ptr<CryptoHandshakeMessage> message(server.AddDefaultConfig(
       rand, &clock, QuicCryptoServerConfig::ConfigOptions()));
 
   // The default configuration should have AES-GCM and at least one ChaCha20
@@ -259,7 +259,7 @@
                                 CryptoTestUtils::ProofSourceForTesting());
   MockClock clock;
 
-  scoped_ptr<CryptoHandshakeMessage> message(server.AddDefaultConfig(
+  std::unique_ptr<CryptoHandshakeMessage> message(server.AddDefaultConfig(
       rand, &clock, QuicCryptoServerConfig::ConfigOptions()));
 
   // The default configuration should only contain AES-GCM when ChaCha20 has
@@ -282,7 +282,7 @@
   server.SetStrikeRegisterClient(strike_register);
 
   QuicCryptoServerConfig::ConfigOptions options;
-  scoped_ptr<CryptoHandshakeMessage> message(
+  std::unique_ptr<CryptoHandshakeMessage> message(
       server.AddDefaultConfig(rand, &clock, options));
   EXPECT_TRUE(strike_register->is_known_orbit_called());
 }
@@ -372,7 +372,7 @@
 
   // Compress a similar certs which only differs in common certs field.
   static const uint64_t set_hash = 42;
-  scoped_ptr<CommonCertSets> common_sets(
+  std::unique_ptr<CommonCertSets> common_sets(
       CryptoTestUtils::MockCommonCertSets(certs[0], set_hash, 1));
   StringPiece different_common_certs(reinterpret_cast<const char*>(&set_hash),
                                      sizeof(set_hash));
@@ -463,9 +463,9 @@
   QuicCryptoServerConfig server_;
   QuicCryptoServerConfigPeer peer_;
   // Stores the primary config.
-  scoped_ptr<CryptoHandshakeMessage> primary_config_;
-  scoped_ptr<QuicServerConfigProtobuf> override_config_protobuf_;
-  scoped_ptr<CryptoHandshakeMessage> override_config_;
+  std::unique_ptr<CryptoHandshakeMessage> primary_config_;
+  std::unique_ptr<QuicServerConfigProtobuf> override_config_protobuf_;
+  std::unique_ptr<CryptoHandshakeMessage> override_config_;
 };
 
 // Test basic behavior of source address tokens including being specific
@@ -572,7 +572,7 @@
 
   StringPiece message("hello world");
   const size_t key_size = CryptoSecretBoxer::GetKeySize();
-  scoped_ptr<uint8_t[]> key(new uint8_t[key_size]);
+  std::unique_ptr<uint8_t[]> key(new uint8_t[key_size]);
   memset(key.get(), 0x11, key_size);
 
   CryptoSecretBoxer boxer;
diff --git a/net/quic/crypto/strike_register.h b/net/quic/crypto/strike_register.h
index fd3f5a7..9d7431b 100644
--- a/net/quic/crypto/strike_register.h
+++ b/net/quic/crypto/strike_register.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <set>
 #include <utility>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
@@ -213,7 +213,7 @@
   // internal_nodes_ can't be a scoped_ptr because the type isn't defined in
   // this header.
   InternalNode* internal_nodes_;
-  scoped_ptr<uint8_t[]> external_nodes_;
+  std::unique_ptr<uint8_t[]> external_nodes_;
 
   DISALLOW_COPY_AND_ASSIGN(StrikeRegister);
 };
diff --git a/net/quic/crypto/strike_register_test.cc b/net/quic/crypto/strike_register_test.cc
index 2fca33fc..0f63969 100644
--- a/net/quic/crypto/strike_register_test.cc
+++ b/net/quic/crypto/strike_register_test.cc
@@ -291,10 +291,10 @@
 
   unsigned max_entries = 64;
   uint32_t current_time = 10000, window = 200;
-  scoped_ptr<StrikeRegister> s1(
+  std::unique_ptr<StrikeRegister> s1(
       new StrikeRegister(max_entries, current_time, window, kOrbit,
                          StrikeRegister::DENY_REQUESTS_AT_STARTUP));
-  scoped_ptr<SlowStrikeRegister> s2(
+  std::unique_ptr<SlowStrikeRegister> s2(
       new SlowStrikeRegister(max_entries, current_time, window, kOrbit));
 
   uint64_t i;
@@ -342,10 +342,10 @@
   srand(42);
   unsigned max_entries = 64;
   uint32_t current_time = 10000, window = 200;
-  scoped_ptr<StrikeRegister> s1(
+  std::unique_ptr<StrikeRegister> s1(
       new StrikeRegister(max_entries, current_time, window, kOrbit,
                          StrikeRegister::DENY_REQUESTS_AT_STARTUP));
-  scoped_ptr<SlowStrikeRegister> s2(
+  std::unique_ptr<SlowStrikeRegister> s2(
       new SlowStrikeRegister(max_entries, current_time, window, kOrbit));
   uint64_t i;
 
diff --git a/net/quic/iovector_test.cc b/net/quic/iovector_test.cc
index 7a1d00a..4435459 100644
--- a/net/quic/iovector_test.cc
+++ b/net/quic/iovector_test.cc
@@ -6,8 +6,9 @@
 
 #include <string.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/test/gtest_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -224,7 +225,7 @@
     ASSERT_EQ(str_len, iov2[0].iov_len);
 
     // Consume half of the first block.
-    scoped_ptr<char[]> buffer(new char[str_len]);
+    std::unique_ptr<char[]> buffer(new char[str_len]);
     size_t consumed = iov.ConsumeAndCopy(tmp, buffer.get());
     EXPECT_EQ(0, memcmp(test_data[i], buffer.get(), tmp));
     ASSERT_EQ(tmp, consumed);
@@ -262,7 +263,7 @@
   const size_t half_len = last_len / 2;
 
   const char* endp = iov.LastBlockEnd();
-  scoped_ptr<char[]> buffer(new char[length]);
+  std::unique_ptr<char[]> buffer(new char[length]);
   size_t consumed = iov.ConsumeAndCopy(length - half_len, buffer.get());
   ASSERT_EQ(length - half_len, consumed);
   const struct iovec* iov2 = iov.iovec();
@@ -292,7 +293,7 @@
   }
 
   int consumed = 0;
-  scoped_ptr<char[]> buffer(new char[length + 1]);
+  std::unique_ptr<char[]> buffer(new char[length + 1]);
   EXPECT_DFATAL({ consumed = iov.ConsumeAndCopy(length + 1, buffer.get()); },
                 "Attempting to consume 1 non-existent bytes.");
   ASSERT_EQ(length, consumed);
diff --git a/net/quic/p2p/quic_p2p_session.cc b/net/quic/p2p/quic_p2p_session.cc
index 7b411e02..94777b3 100644
--- a/net/quic/p2p/quic_p2p_session.cc
+++ b/net/quic/p2p/quic_p2p_session.cc
@@ -19,8 +19,8 @@
 
 QuicP2PSession::QuicP2PSession(const QuicConfig& config,
                                const QuicP2PCryptoConfig& crypto_config,
-                               scoped_ptr<QuicConnection> connection,
-                               scoped_ptr<Socket> socket)
+                               std::unique_ptr<QuicConnection> connection,
+                               std::unique_ptr<Socket> socket)
     : QuicSession(connection.release(), config),
       socket_(std::move(socket)),
       crypto_stream_(new QuicP2PCryptoStream(this, crypto_config)),
diff --git a/net/quic/p2p/quic_p2p_session.h b/net/quic/p2p/quic_p2p_session.h
index ce02958..dcb1db1 100644
--- a/net/quic/p2p/quic_p2p_session.h
+++ b/net/quic/p2p/quic_p2p_session.h
@@ -5,8 +5,9 @@
 #ifndef NET_QUIC_P2P_QUIC_P2P_SESSION_H_
 #define NET_QUIC_P2P_QUIC_P2P_SESSION_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/quic/p2p/quic_p2p_stream.h"
 #include "net/quic/quic_client_session_base.h"
@@ -43,8 +44,8 @@
   // shared with the peer.
   QuicP2PSession(const QuicConfig& config,
                  const QuicP2PCryptoConfig& crypto_config,
-                 scoped_ptr<QuicConnection> connection,
-                 scoped_ptr<Socket> socket);
+                 std::unique_ptr<QuicConnection> connection,
+                 std::unique_ptr<Socket> socket);
   ~QuicP2PSession() override;
 
   // QuicSession overrides.
@@ -76,8 +77,8 @@
   int DoRead();
   int DoReadComplete(int result);
 
-  scoped_ptr<Socket> socket_;
-  scoped_ptr<QuicP2PCryptoStream> crypto_stream_;
+  std::unique_ptr<Socket> socket_;
+  std::unique_ptr<QuicP2PCryptoStream> crypto_stream_;
 
   Delegate* delegate_ = nullptr;
 
diff --git a/net/quic/p2p/quic_p2p_session_test.cc b/net/quic/p2p/quic_p2p_session_test.cc
index c9f248e..02230690 100644
--- a/net/quic/p2p/quic_p2p_session_test.cc
+++ b/net/quic/p2p/quic_p2p_session_test.cc
@@ -208,8 +208,8 @@
   }
 
   void CreateSessions() {
-    scoped_ptr<FakeP2PDatagramSocket> socket1(new FakeP2PDatagramSocket());
-    scoped_ptr<FakeP2PDatagramSocket> socket2(new FakeP2PDatagramSocket());
+    std::unique_ptr<FakeP2PDatagramSocket> socket1(new FakeP2PDatagramSocket());
+    std::unique_ptr<FakeP2PDatagramSocket> socket2(new FakeP2PDatagramSocket());
     socket1->ConnectWith(socket2.get());
 
     socket1_ = socket1->GetWeakPtr();
@@ -223,17 +223,18 @@
                                  Perspective::IS_CLIENT);
   }
 
-  scoped_ptr<QuicP2PSession> CreateP2PSession(scoped_ptr<Socket> socket,
-                                              QuicP2PCryptoConfig crypto_config,
-                                              Perspective perspective) {
+  std::unique_ptr<QuicP2PSession> CreateP2PSession(
+      std::unique_ptr<Socket> socket,
+      QuicP2PCryptoConfig crypto_config,
+      Perspective perspective) {
     QuicChromiumPacketWriter* writer =
         new QuicChromiumPacketWriter(socket.get());
-    scoped_ptr<QuicConnection> quic_connection1(new QuicConnection(
+    std::unique_ptr<QuicConnection> quic_connection1(new QuicConnection(
         0, IPEndPoint(IPAddress::IPv4AllZeros(), 0), &quic_helper_, writer,
         true /* owns_writer */, perspective, QuicSupportedVersions()));
     writer->SetConnection(quic_connection1.get());
 
-    scoped_ptr<QuicP2PSession> result(
+    std::unique_ptr<QuicP2PSession> result(
         new QuicP2PSession(config_, crypto_config, std::move(quic_connection1),
                            std::move(socket)));
     result->Initialize();
@@ -249,10 +250,10 @@
   QuicConfig config_;
 
   base::WeakPtr<FakeP2PDatagramSocket> socket1_;
-  scoped_ptr<QuicP2PSession> session1_;
+  std::unique_ptr<QuicP2PSession> session1_;
 
   base::WeakPtr<FakeP2PDatagramSocket> socket2_;
-  scoped_ptr<QuicP2PSession> session2_;
+  std::unique_ptr<QuicP2PSession> session2_;
 };
 
 void QuicP2PSessionTest::OnWriteResult(int result) {
diff --git a/net/quic/quic_alarm.h b/net/quic/quic_alarm.h
index 53a823f..ed492cfe 100644
--- a/net/quic/quic_alarm.h
+++ b/net/quic/quic_alarm.h
@@ -5,8 +5,9 @@
 #ifndef NET_QUIC_QUIC_ALARM_H_
 #define NET_QUIC_QUIC_ALARM_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/quic/quic_arena_scoped_ptr.h"
 #include "net/quic/quic_time.h"
diff --git a/net/quic/quic_chromium_client_session.cc b/net/quic/quic_chromium_client_session.cc
index 32b8de5c..6b454c8e 100644
--- a/net/quic/quic_chromium_client_session.cc
+++ b/net/quic/quic_chromium_client_session.cc
@@ -8,6 +8,7 @@
 
 #include "base/callback_helpers.h"
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/sparse_histogram.h"
 #include "base/single_thread_task_runner.h"
@@ -115,12 +116,12 @@
                             NUM_HANDSHAKE_STATES);
 }
 
-scoped_ptr<base::Value> NetLogQuicClientSessionCallback(
+std::unique_ptr<base::Value> NetLogQuicClientSessionCallback(
     const QuicServerId* server_id,
     int cert_verify_flags,
     bool require_confirmation,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("host", server_id->host());
   dict->SetInteger("port", server_id->port());
   dict->SetBoolean("privacy_mode",
@@ -130,10 +131,10 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::ListValue> SpdyHeaderBlockToListValue(
+std::unique_ptr<base::ListValue> SpdyHeaderBlockToListValue(
     const SpdyHeaderBlock& headers,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::ListValue> headers_list(new base::ListValue());
+  std::unique_ptr<base::ListValue> headers_list(new base::ListValue());
   for (const auto& it : headers) {
     headers_list->AppendString(
         it.first.as_string() + ": " +
@@ -143,12 +144,12 @@
   return headers_list;
 }
 
-scoped_ptr<base::Value> NetLogQuicPushPromiseReceivedCallback(
+std::unique_ptr<base::Value> NetLogQuicPushPromiseReceivedCallback(
     const SpdyHeaderBlock* headers,
     SpdyStreamId stream_id,
     SpdyStreamId promised_stream_id,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->Set("headers", SpdyHeaderBlockToListValue(*headers, capture_mode));
   dict->SetInteger("id", stream_id);
   dict->SetInteger("promised_stream_id", promised_stream_id);
@@ -199,12 +200,12 @@
 
 QuicChromiumClientSession::QuicChromiumClientSession(
     QuicConnection* connection,
-    scoped_ptr<DatagramClientSocket> socket,
+    std::unique_ptr<DatagramClientSocket> socket,
     QuicStreamFactory* stream_factory,
     QuicCryptoClientStreamFactory* crypto_client_stream_factory,
     QuicClock* clock,
     TransportSecurityState* transport_security_state,
-    scoped_ptr<QuicServerInfo> server_info,
+    std::unique_ptr<QuicServerInfo> server_info,
     const QuicServerId& server_id,
     int yield_after_packets,
     QuicTime::Delta yield_after_duration,
@@ -215,7 +216,7 @@
     base::TimeTicks dns_resolution_end_time,
     QuicClientPushPromiseIndex* push_promise_index,
     base::TaskRunner* task_runner,
-    scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+    std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
     NetLog* net_log)
     : QuicClientSessionBase(connection, push_promise_index, config),
       server_id_(server_id),
@@ -239,12 +240,12 @@
       streams_pushed_and_claimed_count_(0),
       weak_factory_(this) {
   sockets_.push_back(std::move(socket));
-  packet_readers_.push_back(make_scoped_ptr(new QuicChromiumPacketReader(
+  packet_readers_.push_back(base::WrapUnique(new QuicChromiumPacketReader(
       sockets_.back().get(), clock, this, yield_after_packets,
       yield_after_duration, net_log_)));
   crypto_stream_.reset(
       crypto_client_stream_factory->CreateQuicCryptoClientStream(
-          server_id, this, make_scoped_ptr(new ProofVerifyContextChromium(
+          server_id, this, base::WrapUnique(new ProofVerifyContextChromium(
                                cert_verify_flags, net_log_)),
           crypto_config));
   connection->set_debug_visitor(logger_.get());
@@ -954,7 +955,7 @@
   cert_verify_result_.reset(new CertVerifyResult);
   cert_verify_result_->CopyFrom(verify_details_chromium->cert_verify_result);
   pinning_failure_log_ = verify_details_chromium->pinning_failure_log;
-  scoped_ptr<ct::CTVerifyResult> ct_verify_result_copy(
+  std::unique_ptr<ct::CTVerifyResult> ct_verify_result_copy(
       new ct::CTVerifyResult(verify_details_chromium->ct_verify_result));
   ct_verify_result_ = std::move(ct_verify_result_copy);
   logger_->OnCertificateVerified(*cert_verify_result_);
@@ -1020,12 +1021,12 @@
   }
 }
 
-scoped_ptr<base::Value> QuicChromiumClientSession::GetInfoAsValue(
+std::unique_ptr<base::Value> QuicChromiumClientSession::GetInfoAsValue(
     const std::set<HostPortPair>& aliases) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("version", QuicVersionToString(connection()->version()));
   dict->SetInteger("open_streams", GetNumOpenOutgoingStreams());
-  scoped_ptr<base::ListValue> stream_list(new base::ListValue());
+  std::unique_ptr<base::ListValue> stream_list(new base::ListValue());
   for (StreamMap::const_iterator it = dynamic_streams().begin();
        it != dynamic_streams().end(); ++it) {
     stream_list->Append(
@@ -1044,7 +1045,7 @@
   SSLInfo ssl_info;
   dict->SetBoolean("secure", GetSSLInfo(&ssl_info) && ssl_info.cert.get());
 
-  scoped_ptr<base::ListValue> alias_list(new base::ListValue());
+  std::unique_ptr<base::ListValue> alias_list(new base::ListValue());
   for (std::set<HostPortPair>::const_iterator it = aliases.begin();
        it != aliases.end(); it++) {
     alias_list->Append(new base::StringValue(it->ToString()));
@@ -1137,9 +1138,9 @@
 }
 
 bool QuicChromiumClientSession::MigrateToSocket(
-    scoped_ptr<DatagramClientSocket> socket,
-    scoped_ptr<QuicChromiumPacketReader> reader,
-    scoped_ptr<QuicPacketWriter> writer) {
+    std::unique_ptr<DatagramClientSocket> socket,
+    std::unique_ptr<QuicChromiumPacketReader> reader,
+    std::unique_ptr<QuicPacketWriter> writer) {
   DCHECK_EQ(sockets_.size(), packet_readers_.size());
   if (sockets_.size() >= kMaxReadersPerQuicSession) {
     return false;
diff --git a/net/quic/quic_chromium_client_session.h b/net/quic/quic_chromium_client_session.h
index a9e636b6..f40be75 100644
--- a/net/quic/quic_chromium_client_session.h
+++ b/net/quic/quic_chromium_client_session.h
@@ -12,11 +12,11 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 
 #include "base/containers/mru_cache.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_error_details.h"
@@ -116,12 +116,12 @@
   // TODO(rch): decouple the factory from the session via a Delegate interface.
   QuicChromiumClientSession(
       QuicConnection* connection,
-      scoped_ptr<DatagramClientSocket> socket,
+      std::unique_ptr<DatagramClientSocket> socket,
       QuicStreamFactory* stream_factory,
       QuicCryptoClientStreamFactory* crypto_client_stream_factory,
       QuicClock* clock,
       TransportSecurityState* transport_security_state,
-      scoped_ptr<QuicServerInfo> server_info,
+      std::unique_ptr<QuicServerInfo> server_info,
       const QuicServerId& server_id,
       int yield_after_packets,
       QuicTime::Delta yield_after_duration,
@@ -132,7 +132,7 @@
       base::TimeTicks dns_resolution_end_time,
       QuicClientPushPromiseIndex* push_promise_index,
       base::TaskRunner* task_runner,
-      scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+      std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
       NetLog* net_log);
   ~QuicChromiumClientSession() override;
 
@@ -218,7 +218,8 @@
   void CloseSessionOnErrorAndNotifyFactoryLater(int error,
                                                 QuicErrorCode quic_error);
 
-  scoped_ptr<base::Value> GetInfoAsValue(const std::set<HostPortPair>& aliases);
+  std::unique_ptr<base::Value> GetInfoAsValue(
+      const std::set<HostPortPair>& aliases);
 
   const BoundNetLog& net_log() const { return net_log_; }
 
@@ -244,9 +245,9 @@
   // session and the session was successfully migrated to using the new socket.
   // Returns false if number of migrations exceeds kMaxReadersPerQuicSession.
   // Takes ownership of |socket|, |reader|, and |writer|.
-  bool MigrateToSocket(scoped_ptr<DatagramClientSocket> socket,
-                       scoped_ptr<QuicChromiumPacketReader> reader,
-                       scoped_ptr<QuicPacketWriter> writer);
+  bool MigrateToSocket(std::unique_ptr<DatagramClientSocket> socket,
+                       std::unique_ptr<QuicChromiumPacketReader> reader,
+                       std::unique_ptr<QuicPacketWriter> writer);
 
   // Populates network error details for this session.
   void PopulateNetErrorDetails(NetErrorDetails* details);
@@ -319,13 +320,13 @@
 
   QuicServerId server_id_;
   bool require_confirmation_;
-  scoped_ptr<QuicCryptoClientStream> crypto_stream_;
+  std::unique_ptr<QuicCryptoClientStream> crypto_stream_;
   QuicStreamFactory* stream_factory_;
-  std::vector<scoped_ptr<DatagramClientSocket>> sockets_;
+  std::vector<std::unique_ptr<DatagramClientSocket>> sockets_;
   TransportSecurityState* transport_security_state_;
-  scoped_ptr<QuicServerInfo> server_info_;
-  scoped_ptr<CertVerifyResult> cert_verify_result_;
-  scoped_ptr<ct::CTVerifyResult> ct_verify_result_;
+  std::unique_ptr<QuicServerInfo> server_info_;
+  std::unique_ptr<CertVerifyResult> cert_verify_result_;
+  std::unique_ptr<ct::CTVerifyResult> ct_verify_result_;
   std::string pinning_failure_log_;
   ObserverSet observers_;
   StreamRequestQueue stream_requests_;
@@ -333,10 +334,10 @@
   size_t num_total_streams_;
   base::TaskRunner* task_runner_;
   BoundNetLog net_log_;
-  std::vector<scoped_ptr<QuicChromiumPacketReader>> packet_readers_;
+  std::vector<std::unique_ptr<QuicChromiumPacketReader>> packet_readers_;
   base::TimeTicks dns_resolution_end_time_;
   base::TimeTicks handshake_start_;  // Time the handshake was started.
-  scoped_ptr<QuicConnectionLogger> logger_;
+  std::unique_ptr<QuicConnectionLogger> logger_;
   // True when the session is going away, and streams may no longer be created
   // on this session. Existing stream will continue to be processed.
   bool going_away_;
diff --git a/net/quic/quic_chromium_client_session_test.cc b/net/quic/quic_chromium_client_session_test.cc
index 40f40e2..a17b663ce 100644
--- a/net/quic/quic_chromium_client_session_test.cc
+++ b/net/quic/quic_chromium_client_session_test.cc
@@ -8,6 +8,7 @@
 
 #include "base/base64.h"
 #include "base/files/file_path.h"
+#include "base/memory/ptr_util.h"
 #include "base/rand_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "net/base/socket_performance_watcher.h"
@@ -70,7 +71,7 @@
 
   void Initialize() {
     socket_factory_.AddSocketDataProvider(socket_data_.get());
-    scoped_ptr<DatagramClientSocket> socket =
+    std::unique_ptr<DatagramClientSocket> socket =
         socket_factory_.CreateDatagramClientSocket(DatagramSocket::DEFAULT_BIND,
                                                    base::Bind(&base::RandInt),
                                                    &net_log_, NetLog::Source());
@@ -84,7 +85,7 @@
     session_.reset(new QuicChromiumClientSession(
         connection, std::move(socket),
         /*stream_factory=*/nullptr, &crypto_client_stream_factory_, &clock_,
-        &transport_security_state_, make_scoped_ptr((QuicServerInfo*)nullptr),
+        &transport_security_state_, base::WrapUnique((QuicServerInfo*)nullptr),
         QuicServerId(kServerHostname, kServerPort, PRIVACY_MODE_DISABLED),
         kQuicYieldAfterPacketsRead,
         QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds),
@@ -111,7 +112,7 @@
 
   QuicPacketWriter* CreateQuicPacketWriter(DatagramClientSocket* socket,
                                            QuicConnection* connection) const {
-    scoped_ptr<QuicChromiumPacketWriter> writer(
+    std::unique_ptr<QuicChromiumPacketWriter> writer(
         new QuicChromiumPacketWriter(socket));
     writer->SetConnection(connection);
     return writer.release();
@@ -121,14 +122,14 @@
   TestNetLog net_log_;
   BoundTestNetLog bound_net_log_;
   MockClientSocketFactory socket_factory_;
-  scoped_ptr<MockRead> default_read_;
-  scoped_ptr<SequencedSocketData> socket_data_;
+  std::unique_ptr<MockRead> default_read_;
+  std::unique_ptr<SequencedSocketData> socket_data_;
   MockClock clock_;
   MockRandom random_;
   QuicChromiumConnectionHelper helper_;
   TransportSecurityState transport_security_state_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
-  scoped_ptr<QuicChromiumClientSession> session_;
+  std::unique_ptr<QuicChromiumClientSession> session_;
   QuicConnectionVisitorInterface* visitor_;
   TestCompletionCallback callback_;
   QuicTestPacketMaker maker_;
@@ -147,7 +148,7 @@
 
 TEST_P(QuicChromiumClientSessionTest, MaxNumStreams) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_RST_ACKNOWLEDGEMENT));
   MockWrite writes[] = {
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 1)};
@@ -182,7 +183,7 @@
 
 TEST_P(QuicChromiumClientSessionTest, MaxNumStreamsViaRequest) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_RST_ACKNOWLEDGEMENT));
   MockWrite writes[] = {
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 1)};
@@ -330,10 +331,11 @@
   CompleteCryptoHandshake();
 
   char data[] = "ABCD";
-  scoped_ptr<QuicEncryptedPacket> ping(
+  std::unique_ptr<QuicEncryptedPacket> ping(
       maker_.MakePingPacket(1, /*include_version=*/false));
-  scoped_ptr<QuicEncryptedPacket> ack_and_data_out(maker_.MakeAckAndDataPacket(
-      2, false, 5, 1, 1, false, 0, StringPiece(data)));
+  std::unique_ptr<QuicEncryptedPacket> ack_and_data_out(
+      maker_.MakeAckAndDataPacket(2, false, 5, 1, 1, false, 0,
+                                  StringPiece(data)));
   MockRead reads[] = {MockRead(SYNCHRONOUS, ping->data(), ping->length(), 0),
                       MockRead(SYNCHRONOUS, ERR_IO_PENDING, 1)};
   MockWrite writes[] = {MockWrite(SYNCHRONOUS, ping->data(), ping->length(), 2),
@@ -344,18 +346,20 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   // Create connected socket.
-  scoped_ptr<DatagramClientSocket> new_socket =
+  std::unique_ptr<DatagramClientSocket> new_socket =
       socket_factory_.CreateDatagramClientSocket(DatagramSocket::DEFAULT_BIND,
                                                  base::Bind(&base::RandInt),
                                                  &net_log_, NetLog::Source());
   EXPECT_EQ(OK, new_socket->Connect(kIpEndPoint));
 
   // Create reader and writer.
-  scoped_ptr<QuicChromiumPacketReader> new_reader(new QuicChromiumPacketReader(
-      new_socket.get(), &clock_, session_.get(), kQuicYieldAfterPacketsRead,
-      QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds),
-      bound_net_log_.bound()));
-  scoped_ptr<QuicPacketWriter> new_writer(
+  std::unique_ptr<QuicChromiumPacketReader> new_reader(
+      new QuicChromiumPacketReader(new_socket.get(), &clock_, session_.get(),
+                                   kQuicYieldAfterPacketsRead,
+                                   QuicTime::Delta::FromMilliseconds(
+                                       kQuicYieldAfterDurationMilliseconds),
+                                   bound_net_log_.bound()));
+  std::unique_ptr<QuicPacketWriter> new_writer(
       CreateQuicPacketWriter(new_socket.get(), session_->connection()));
 
   // Migrate session.
@@ -379,7 +383,7 @@
 
   for (size_t i = 0; i < kMaxReadersPerQuicSession; ++i) {
     MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 1)};
-    scoped_ptr<QuicEncryptedPacket> ping_out(
+    std::unique_ptr<QuicEncryptedPacket> ping_out(
         maker_.MakePingPacket(i + 1, /*include_version=*/true));
     MockWrite writes[] = {
         MockWrite(SYNCHRONOUS, ping_out->data(), ping_out->length(), i + 2)};
@@ -388,20 +392,20 @@
     socket_factory_.AddSocketDataProvider(&socket_data);
 
     // Create connected socket.
-    scoped_ptr<DatagramClientSocket> new_socket =
+    std::unique_ptr<DatagramClientSocket> new_socket =
         socket_factory_.CreateDatagramClientSocket(DatagramSocket::DEFAULT_BIND,
                                                    base::Bind(&base::RandInt),
                                                    &net_log_, NetLog::Source());
     EXPECT_EQ(OK, new_socket->Connect(kIpEndPoint));
 
     // Create reader and writer.
-    scoped_ptr<QuicChromiumPacketReader> new_reader(
+    std::unique_ptr<QuicChromiumPacketReader> new_reader(
         new QuicChromiumPacketReader(new_socket.get(), &clock_, session_.get(),
                                      kQuicYieldAfterPacketsRead,
                                      QuicTime::Delta::FromMilliseconds(
                                          kQuicYieldAfterDurationMilliseconds),
                                      bound_net_log_.bound()));
-    scoped_ptr<QuicPacketWriter> new_writer(
+    std::unique_ptr<QuicPacketWriter> new_writer(
         CreateQuicPacketWriter(new_socket.get(), session_->connection()));
 
     // Migrate session.
@@ -422,7 +426,7 @@
 }
 
 TEST_P(QuicChromiumClientSessionTest, MigrateToSocketReadError) {
-  scoped_ptr<QuicEncryptedPacket> ping(
+  std::unique_ptr<QuicEncryptedPacket> ping(
       maker_.MakePingPacket(1, /*include_version=*/true));
   MockRead old_reads[] = {
       MockRead(SYNCHRONOUS, ping->data(), ping->length(), 0),
@@ -446,18 +450,20 @@
   socket_factory_.AddSocketDataProvider(&new_socket_data);
 
   // Create connected socket.
-  scoped_ptr<DatagramClientSocket> new_socket =
+  std::unique_ptr<DatagramClientSocket> new_socket =
       socket_factory_.CreateDatagramClientSocket(DatagramSocket::DEFAULT_BIND,
                                                  base::Bind(&base::RandInt),
                                                  &net_log_, NetLog::Source());
   EXPECT_EQ(OK, new_socket->Connect(kIpEndPoint));
 
   // Create reader and writer.
-  scoped_ptr<QuicChromiumPacketReader> new_reader(new QuicChromiumPacketReader(
-      new_socket.get(), &clock_, session_.get(), kQuicYieldAfterPacketsRead,
-      QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds),
-      bound_net_log_.bound()));
-  scoped_ptr<QuicPacketWriter> new_writer(
+  std::unique_ptr<QuicChromiumPacketReader> new_reader(
+      new QuicChromiumPacketReader(new_socket.get(), &clock_, session_.get(),
+                                   kQuicYieldAfterPacketsRead,
+                                   QuicTime::Delta::FromMilliseconds(
+                                       kQuicYieldAfterDurationMilliseconds),
+                                   bound_net_log_.bound()));
+  std::unique_ptr<QuicPacketWriter> new_writer(
       CreateQuicPacketWriter(new_socket.get(), session_->connection()));
 
   // Store old socket and migrate session.
@@ -487,7 +493,7 @@
   Initialize();
   CompleteCryptoHandshake();
 
-  scoped_ptr<QuicEncryptedPacket> ping(
+  std::unique_ptr<QuicEncryptedPacket> ping(
       maker_.MakePingPacket(1, /*include_version=*/true));
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
   MockWrite writes[] = {MockWrite(SYNCHRONOUS, ping->data(), ping->length(), 1),
@@ -497,18 +503,20 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   // Create connected socket.
-  scoped_ptr<DatagramClientSocket> new_socket =
+  std::unique_ptr<DatagramClientSocket> new_socket =
       socket_factory_.CreateDatagramClientSocket(DatagramSocket::DEFAULT_BIND,
                                                  base::Bind(&base::RandInt),
                                                  &net_log_, NetLog::Source());
   EXPECT_EQ(OK, new_socket->Connect(kIpEndPoint));
 
   // Create reader and writer.
-  scoped_ptr<QuicChromiumPacketReader> new_reader(new QuicChromiumPacketReader(
-      new_socket.get(), &clock_, session_.get(), kQuicYieldAfterPacketsRead,
-      QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds),
-      bound_net_log_.bound()));
-  scoped_ptr<QuicPacketWriter> new_writer(
+  std::unique_ptr<QuicChromiumPacketReader> new_reader(
+      new QuicChromiumPacketReader(new_socket.get(), &clock_, session_.get(),
+                                   kQuicYieldAfterPacketsRead,
+                                   QuicTime::Delta::FromMilliseconds(
+                                       kQuicYieldAfterDurationMilliseconds),
+                                   bound_net_log_.bound()));
+  std::unique_ptr<QuicPacketWriter> new_writer(
       CreateQuicPacketWriter(new_socket.get(), session_->connection()));
 
   // Migrate session.
diff --git a/net/quic/quic_chromium_client_stream_test.cc b/net/quic/quic_chromium_client_stream_test.cc
index 94d20a9a..4b1d31ed 100644
--- a/net/quic/quic_chromium_client_stream_test.cc
+++ b/net/quic/quic_chromium_client_stream_test.cc
@@ -119,7 +119,7 @@
   MOCK_METHOD0(ShouldCreateOutgoingDynamicStream, bool());
 
  private:
-  scoped_ptr<QuicCryptoStream> crypto_stream_;
+  std::unique_ptr<QuicCryptoStream> crypto_stream_;
 
   DISALLOW_COPY_AND_ASSIGN(MockQuicClientSessionBase);
 };
diff --git a/net/quic/quic_chromium_connection_helper_test.cc b/net/quic/quic_chromium_connection_helper_test.cc
index 9fab8fb5..2774d17 100644
--- a/net/quic/quic_chromium_connection_helper_test.cc
+++ b/net/quic/quic_chromium_connection_helper_test.cc
@@ -48,7 +48,7 @@
 
 TEST_F(QuicChromiumConnectionHelperTest, CreateAlarm) {
   TestDelegate* delegate = new TestDelegate();
-  scoped_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate));
+  std::unique_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate));
 
   QuicTime::Delta delta = QuicTime::Delta::FromMicroseconds(1);
   alarm->Set(clock_.Now().Add(delta));
@@ -65,7 +65,7 @@
 
 TEST_F(QuicChromiumConnectionHelperTest, CreateAlarmAndCancel) {
   TestDelegate* delegate = new TestDelegate();
-  scoped_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate));
+  std::unique_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate));
 
   QuicTime::Delta delta = QuicTime::Delta::FromMicroseconds(1);
   alarm->Set(clock_.Now().Add(delta));
@@ -83,7 +83,7 @@
 
 TEST_F(QuicChromiumConnectionHelperTest, CreateAlarmAndReset) {
   TestDelegate* delegate = new TestDelegate();
-  scoped_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate));
+  std::unique_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate));
 
   QuicTime::Delta delta = QuicTime::Delta::FromMicroseconds(1);
   alarm->Set(clock_.Now().Add(delta));
@@ -110,7 +110,7 @@
 
 TEST_F(QuicChromiumConnectionHelperTest, CreateAlarmAndResetEarlier) {
   TestDelegate* delegate = new TestDelegate();
-  scoped_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate));
+  std::unique_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate));
 
   QuicTime::Delta delta = QuicTime::Delta::FromMicroseconds(3);
   alarm->Set(clock_.Now().Add(delta));
@@ -139,7 +139,7 @@
 
 TEST_F(QuicChromiumConnectionHelperTest, CreateAlarmAndUpdate) {
   TestDelegate* delegate = new TestDelegate();
-  scoped_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate));
+  std::unique_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate));
 
   const QuicClock* clock = helper_.GetClock();
   QuicTime start = clock->Now();
diff --git a/net/quic/quic_client_promised_info_test.cc b/net/quic/quic_client_promised_info_test.cc
index 1084cae..df4694c 100644
--- a/net/quic/quic_client_promised_info_test.cc
+++ b/net/quic/quic_client_promised_info_test.cc
@@ -146,9 +146,9 @@
   QuicClientPushPromiseIndex push_promise_index_;
 
   MockQuicClientSession session_;
-  scoped_ptr<QuicSpdyClientStream> stream_;
-  scoped_ptr<StreamVisitor> stream_visitor_;
-  scoped_ptr<QuicSpdyClientStream> promised_stream_;
+  std::unique_ptr<QuicSpdyClientStream> stream_;
+  std::unique_ptr<StreamVisitor> stream_visitor_;
+  std::unique_ptr<QuicSpdyClientStream> promised_stream_;
   BalsaHeaders headers_;
   string headers_string_;
   string body_;
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 7ce76a8..60f5395 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -1088,7 +1088,7 @@
   }
   DVLOG(1) << ENDPOINT << "Sending version negotiation packet: {"
            << QuicVersionVectorToString(framer_.supported_versions()) << "}";
-  scoped_ptr<QuicEncryptedPacket> version_packet(
+  std::unique_ptr<QuicEncryptedPacket> version_packet(
       packet_generator_.SerializeVersionNegotiationPacket(
           framer_.supported_versions()));
   WriteResult result = writer_->WritePacket(
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index 5baff2e..597edd5 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -22,13 +22,13 @@
 #include <deque>
 #include <list>
 #include <map>
+#include <memory>
 #include <queue>
 #include <string>
 #include <vector>
 
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/ip_address.h"
 #include "net/base/ip_endpoint.h"
@@ -909,7 +909,7 @@
   bool save_crypto_packets_as_termination_packets_;
 
   // Contains the connection close packets if the connection has been closed.
-  scoped_ptr<std::vector<QuicEncryptedPacket*>> termination_packets_;
+  std::unique_ptr<std::vector<QuicEncryptedPacket*>> termination_packets_;
 
   // Determines whether or not a connection close packet is sent to the peer
   // after idle timeout due to lack of network activity.
diff --git a/net/quic/quic_connection_logger.cc b/net/quic/quic_connection_logger.cc
index b9cb00e3..99f6991 100644
--- a/net/quic/quic_connection_logger.cc
+++ b/net/quic/quic_connection_logger.cc
@@ -38,24 +38,24 @@
 // Hence the largest sample is bounded by the sum of those numbers.
 const int kBoundingSampleInCumulativeHistogram = ((2 + 22) * 21) / 2;
 
-scoped_ptr<base::Value> NetLogQuicPacketCallback(
+std::unique_ptr<base::Value> NetLogQuicPacketCallback(
     const IPEndPoint* self_address,
     const IPEndPoint* peer_address,
     size_t packet_size,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("self_address", self_address->ToString());
   dict->SetString("peer_address", peer_address->ToString());
   dict->SetInteger("size", packet_size);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicPacketSentCallback(
+std::unique_ptr<base::Value> NetLogQuicPacketSentCallback(
     const SerializedPacket& serialized_packet,
     TransmissionType transmission_type,
     QuicTime sent_time,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("transmission_type", transmission_type);
   dict->SetString("packet_number",
                   base::Uint64ToString(serialized_packet.packet_number));
@@ -64,28 +64,28 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicPacketRetransmittedCallback(
+std::unique_ptr<base::Value> NetLogQuicPacketRetransmittedCallback(
     QuicPacketNumber old_packet_number,
     QuicPacketNumber new_packet_number,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("old_packet_number", base::Uint64ToString(old_packet_number));
   dict->SetString("new_packet_number", base::Uint64ToString(new_packet_number));
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicDuplicatePacketCallback(
+std::unique_ptr<base::Value> NetLogQuicDuplicatePacketCallback(
     QuicPacketNumber packet_number,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("packet_number", base::Uint64ToString(packet_number));
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicPacketHeaderCallback(
+std::unique_ptr<base::Value> NetLogQuicPacketHeaderCallback(
     const QuicPacketHeader* header,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("connection_id",
                   base::Uint64ToString(header->public_header.connection_id));
   dict->SetInteger("reset_flag", header->public_header.reset_flag);
@@ -97,10 +97,10 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicStreamFrameCallback(
+std::unique_ptr<base::Value> NetLogQuicStreamFrameCallback(
     const QuicStreamFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", frame->stream_id);
   dict->SetBoolean("fin", frame->fin);
   dict->SetString("offset", base::Uint64ToString(frame->offset));
@@ -108,10 +108,10 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicAckFrameCallback(
+std::unique_ptr<base::Value> NetLogQuicAckFrameCallback(
     const QuicAckFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("largest_observed",
                   base::Uint64ToString(frame->largest_observed));
   dict->SetString("delta_time_largest_observed_us",
@@ -139,55 +139,55 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicRstStreamFrameCallback(
+std::unique_ptr<base::Value> NetLogQuicRstStreamFrameCallback(
     const QuicRstStreamFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", frame->stream_id);
   dict->SetInteger("quic_rst_stream_error", frame->error_code);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicConnectionCloseFrameCallback(
+std::unique_ptr<base::Value> NetLogQuicConnectionCloseFrameCallback(
     const QuicConnectionCloseFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("quic_error", frame->error_code);
   dict->SetString("details", frame->error_details);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicWindowUpdateFrameCallback(
+std::unique_ptr<base::Value> NetLogQuicWindowUpdateFrameCallback(
     const QuicWindowUpdateFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", frame->stream_id);
   dict->SetString("byte_offset", base::Uint64ToString(frame->byte_offset));
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicBlockedFrameCallback(
+std::unique_ptr<base::Value> NetLogQuicBlockedFrameCallback(
     const QuicBlockedFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", frame->stream_id);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicGoAwayFrameCallback(
+std::unique_ptr<base::Value> NetLogQuicGoAwayFrameCallback(
     const QuicGoAwayFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("quic_error", frame->error_code);
   dict->SetInteger("last_good_stream_id", frame->last_good_stream_id);
   dict->SetString("reason_phrase", frame->reason_phrase);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicStopWaitingFrameCallback(
+std::unique_ptr<base::Value> NetLogQuicStopWaitingFrameCallback(
     const QuicStopWaitingFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   base::DictionaryValue* sent_info = new base::DictionaryValue();
   dict->Set("sent_info", sent_info);
   sent_info->SetString("least_unacked",
@@ -195,10 +195,10 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicVersionNegotiationPacketCallback(
+std::unique_ptr<base::Value> NetLogQuicVersionNegotiationPacketCallback(
     const QuicVersionNegotiationPacket* packet,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   base::ListValue* versions = new base::ListValue();
   dict->Set("versions", versions);
   for (QuicVersionVector::const_iterator it = packet->versions.begin();
@@ -208,33 +208,33 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicCryptoHandshakeMessageCallback(
+std::unique_ptr<base::Value> NetLogQuicCryptoHandshakeMessageCallback(
     const CryptoHandshakeMessage* message,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("quic_crypto_handshake_message", message->DebugString());
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicOnConnectionClosedCallback(
+std::unique_ptr<base::Value> NetLogQuicOnConnectionClosedCallback(
     QuicErrorCode error,
     ConnectionCloseSource source,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("quic_error", error);
   dict->SetBoolean("from_peer",
                    source == ConnectionCloseSource::FROM_PEER ? true : false);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogQuicCertificateVerifiedCallback(
+std::unique_ptr<base::Value> NetLogQuicCertificateVerifiedCallback(
     scoped_refptr<X509Certificate> cert,
     NetLogCaptureMode /* capture_mode */) {
   // Only the subjects are logged so that we can investigate connection pooling.
   // More fields could be logged in the future.
   std::vector<std::string> dns_names;
   cert->GetDNSNames(&dns_names);
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   base::ListValue* subjects = new base::ListValue();
   for (std::vector<std::string>::const_iterator it = dns_names.begin();
        it != dns_names.end(); it++) {
@@ -274,7 +274,7 @@
 QuicConnectionLogger::QuicConnectionLogger(
     QuicSpdySession* session,
     const char* const connection_description,
-    scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+    std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
     const BoundNetLog& net_log)
     : net_log_(net_log),
       session_(session),
diff --git a/net/quic/quic_connection_logger.h b/net/quic/quic_connection_logger.h
index ff2c917..a8f657db 100644
--- a/net/quic/quic_connection_logger.h
+++ b/net/quic/quic_connection_logger.h
@@ -35,7 +35,7 @@
   QuicConnectionLogger(
       QuicSpdySession* session,
       const char* const connection_description,
-      scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+      std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
       const BoundNetLog& net_log);
 
   ~QuicConnectionLogger() override;
@@ -185,7 +185,7 @@
   const char* const connection_description_;
   // Receives notifications regarding the performance of the underlying socket
   // for the QUIC connection. May be null.
-  const scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher_;
+  const std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher_;
 
   DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger);
 };
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index ee2ab97d..cf652af1 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -4,11 +4,11 @@
 
 #include "net/quic/quic_connection.h"
 
+#include <memory>
 #include <ostream>
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "net/base/ip_address.h"
 #include "net/base/net_errors.h"
@@ -766,7 +766,7 @@
     header.packet_number = number;
     QuicFrames frames;
     frames.push_back(frame);
-    scoped_ptr<QuicPacket> packet(ConstructPacket(header, frames));
+    std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
 
     char buffer[kMaxPacketSize];
     size_t encrypted_length = framer_.EncryptPayload(
@@ -789,7 +789,7 @@
                                   bool entropy_flag,
                                   bool has_stop_waiting,
                                   EncryptionLevel level) {
-    scoped_ptr<QuicPacket> packet(
+    std::unique_ptr<QuicPacket> packet(
         ConstructDataPacket(path_id, number, entropy_flag, has_stop_waiting));
     char buffer[kMaxPacketSize];
     size_t encrypted_length = framer_.EncryptPayload(
@@ -804,7 +804,7 @@
   }
 
   void ProcessClosePacket(QuicPathId path_id, QuicPacketNumber number) {
-    scoped_ptr<QuicPacket> packet(ConstructClosePacket(number));
+    std::unique_ptr<QuicPacket> packet(ConstructClosePacket(number));
     char buffer[kMaxPacketSize];
     size_t encrypted_length = framer_.EncryptPayload(
         ENCRYPTION_NONE, path_id, number, *packet, buffer, kMaxPacketSize);
@@ -994,9 +994,9 @@
   MockClock clock_;
   MockRandom random_generator_;
   SimpleBufferAllocator buffer_allocator_;
-  scoped_ptr<TestConnectionHelper> helper_;
+  std::unique_ptr<TestConnectionHelper> helper_;
   QuicPacketCreator peer_creator_;
-  scoped_ptr<TestPacketWriter> writer_;
+  std::unique_ptr<TestPacketWriter> writer_;
   TestConnection connection_;
   QuicPacketCreator* creator_;
   QuicPacketGenerator* generator_;
@@ -1087,7 +1087,7 @@
   QuicPaddingFrame padding;
   frames.push_back(QuicFrame(&frame1_));
   frames.push_back(QuicFrame(padding));
-  scoped_ptr<QuicPacket> packet(ConstructPacket(header, frames));
+  std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   char buffer[kMaxPacketSize];
   size_t encrypted_length = framer_.EncryptPayload(
       ENCRYPTION_NONE, kDefaultPathId, 12, *packet, buffer, kMaxPacketSize);
@@ -1121,7 +1121,7 @@
   QuicPaddingFrame padding;
   frames.push_back(QuicFrame(&frame1_));
   frames.push_back(QuicFrame(padding));
-  scoped_ptr<QuicPacket> packet(ConstructPacket(header, frames));
+  std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   char buffer[kMaxPacketSize];
   size_t encrypted_length = framer_.EncryptPayload(
       ENCRYPTION_NONE, kDefaultPathId, 12, *packet, buffer, kMaxPacketSize);
@@ -3909,9 +3909,9 @@
   header.public_header.reset_flag = true;
   header.public_header.version_flag = false;
   header.rejected_packet_number = 10101;
-  scoped_ptr<QuicEncryptedPacket> packet(
+  std::unique_ptr<QuicEncryptedPacket> packet(
       framer_.BuildPublicResetPacket(header));
-  scoped_ptr<QuicReceivedPacket> received(
+  std::unique_ptr<QuicReceivedPacket> received(
       ConstructReceivedPacket(*packet, QuicTime::Zero()));
   EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_PUBLIC_RESET, _,
                                            ConnectionCloseSource::FROM_PEER));
@@ -4062,7 +4062,7 @@
 
   QuicFrames frames;
   frames.push_back(QuicFrame(&frame1_));
-  scoped_ptr<QuicPacket> packet(ConstructPacket(header, frames));
+  std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   char buffer[kMaxPacketSize];
   size_t encrypted_length = framer_.EncryptPayload(
       ENCRYPTION_NONE, kDefaultPathId, 12, *packet, buffer, kMaxPacketSize);
@@ -4097,7 +4097,7 @@
 
   QuicFrames frames;
   frames.push_back(QuicFrame(&frame1_));
-  scoped_ptr<QuicPacket> packet(ConstructPacket(header, frames));
+  std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   char buffer[kMaxPacketSize];
   size_t encrypted_length = framer_.EncryptPayload(
       ENCRYPTION_NONE, kDefaultPathId, 12, *packet, buffer, kMaxPacketSize);
@@ -4139,7 +4139,7 @@
 
   QuicFrames frames;
   frames.push_back(QuicFrame(&frame1_));
-  scoped_ptr<QuicPacket> packet(ConstructPacket(header, frames));
+  std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   char buffer[kMaxPacketSize];
   size_t encryped_length = framer_.EncryptPayload(
       ENCRYPTION_NONE, kDefaultPathId, 12, *packet, buffer, kMaxPacketSize);
@@ -4161,10 +4161,10 @@
       ->set_version_for_tests(QUIC_VERSION_UNSUPPORTED);
 
   // Send a version negotiation packet.
-  scoped_ptr<QuicEncryptedPacket> encrypted(
+  std::unique_ptr<QuicEncryptedPacket> encrypted(
       framer_.BuildVersionNegotiationPacket(connection_id_,
                                             QuicSupportedVersions()));
-  scoped_ptr<QuicReceivedPacket> received(
+  std::unique_ptr<QuicReceivedPacket> received(
       ConstructReceivedPacket(*encrypted, QuicTime::Zero()));
   connection_.ProcessUdpPacket(kSelfAddress, kPeerAddress, *received);
 
@@ -4177,7 +4177,7 @@
   header.public_header.version_flag = false;
   QuicFrames frames;
   frames.push_back(QuicFrame(&frame1_));
-  scoped_ptr<QuicPacket> packet(ConstructPacket(header, frames));
+  std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   char buffer[kMaxPacketSize];
   size_t encrypted_length = framer_.EncryptPayload(
       ENCRYPTION_NONE, kDefaultPathId, 12, *packet, buffer, kMaxPacketSize);
@@ -4197,10 +4197,10 @@
   EXPECT_CALL(visitor_,
               OnConnectionClosed(QUIC_INVALID_VERSION_NEGOTIATION_PACKET, _,
                                  ConnectionCloseSource::FROM_SELF));
-  scoped_ptr<QuicEncryptedPacket> encrypted(
+  std::unique_ptr<QuicEncryptedPacket> encrypted(
       framer_.BuildVersionNegotiationPacket(connection_id_,
                                             QuicSupportedVersions()));
-  scoped_ptr<QuicReceivedPacket> received(
+  std::unique_ptr<QuicReceivedPacket> received(
       ConstructReceivedPacket(*encrypted, QuicTime::Zero()));
   connection_.ProcessUdpPacket(kSelfAddress, kPeerAddress, *received);
 }
@@ -4265,7 +4265,7 @@
   QuicFrames frames;
   frames.push_back(QuicFrame(&frame1_));
   frames.push_back(QuicFrame(&qccf));
-  scoped_ptr<QuicPacket> packet(ConstructPacket(header, frames));
+  std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   EXPECT_TRUE(nullptr != packet.get());
   char buffer[kMaxPacketSize];
   size_t encrypted_length = framer_.EncryptPayload(
@@ -4498,7 +4498,7 @@
 TEST_P(QuicConnectionTest, OnPacketHeaderDebugVisitor) {
   QuicPacketHeader header;
 
-  scoped_ptr<MockQuicConnectionDebugVisitor> debug_visitor(
+  std::unique_ptr<MockQuicConnectionDebugVisitor> debug_visitor(
       new MockQuicConnectionDebugVisitor());
   connection_.set_debug_visitor(debug_visitor.get());
   EXPECT_CALL(*debug_visitor, OnPacketHeader(Ref(header))).Times(1);
diff --git a/net/quic/quic_crypto_client_stream.cc b/net/quic/quic_crypto_client_stream.cc
index f91d894..55f29a0 100644
--- a/net/quic/quic_crypto_client_stream.cc
+++ b/net/quic/quic_crypto_client_stream.cc
@@ -53,7 +53,7 @@
     ~ChannelIDSourceCallbackImpl() {}
 
 void QuicCryptoClientStream::ChannelIDSourceCallbackImpl::Run(
-    scoped_ptr<ChannelIDKey>* channel_id_key) {
+    std::unique_ptr<ChannelIDKey>* channel_id_key) {
   if (stream_ == nullptr) {
     return;
   }
@@ -81,7 +81,7 @@
 void QuicCryptoClientStream::ProofVerifierCallbackImpl::Run(
     bool ok,
     const string& error_details,
-    scoped_ptr<ProofVerifyDetails>* details) {
+    std::unique_ptr<ProofVerifyDetails>* details) {
   if (stream_ == nullptr) {
     return;
   }
diff --git a/net/quic/quic_crypto_client_stream.h b/net/quic/quic_crypto_client_stream.h
index 30eb075..f9eabbb 100644
--- a/net/quic/quic_crypto_client_stream.h
+++ b/net/quic/quic_crypto_client_stream.h
@@ -108,7 +108,7 @@
     ~ChannelIDSourceCallbackImpl() override;
 
     // ChannelIDSourceCallback interface.
-    void Run(scoped_ptr<ChannelIDKey>* channel_id_key) override;
+    void Run(std::unique_ptr<ChannelIDKey>* channel_id_key) override;
 
     // Cancel causes any future callbacks to be ignored. It must be called on
     // the same thread as the callback will be made on.
@@ -129,7 +129,7 @@
     // ProofVerifierCallback interface.
     void Run(bool ok,
              const std::string& error_details,
-             scoped_ptr<ProofVerifyDetails>* details) override;
+             std::unique_ptr<ProofVerifyDetails>* details) override;
 
     // Cancel causes any future callbacks to be ignored. It must be called on
     // the same thread as the callback will be made on.
@@ -239,11 +239,11 @@
   // These members are used to store the result of an asynchronous channel ID
   // lookup. These members must not be used after
   // STATE_GET_CHANNEL_ID_COMPLETE.
-  scoped_ptr<ChannelIDKey> channel_id_key_;
+  std::unique_ptr<ChannelIDKey> channel_id_key_;
 
   // verify_context_ contains the context object that we pass to asynchronous
   // proof verifications.
-  scoped_ptr<ProofVerifyContext> verify_context_;
+  std::unique_ptr<ProofVerifyContext> verify_context_;
 
   // proof_verify_callback_ contains the callback object that we passed to an
   // asynchronous proof verification. The ProofVerifier owns this object.
@@ -257,7 +257,7 @@
   // STATE_VERIFY_PROOF_COMPLETE.
   bool verify_ok_;
   std::string verify_error_details_;
-  scoped_ptr<ProofVerifyDetails> verify_details_;
+  std::unique_ptr<ProofVerifyDetails> verify_details_;
 
   // True if the server responded to a previous CHLO with a stateless
   // reject.  Used for book-keeping between the STATE_RECV_REJ,
diff --git a/net/quic/quic_crypto_client_stream_factory.cc b/net/quic/quic_crypto_client_stream_factory.cc
index 41ca05b..8c43218 100644
--- a/net/quic/quic_crypto_client_stream_factory.cc
+++ b/net/quic/quic_crypto_client_stream_factory.cc
@@ -18,7 +18,7 @@
   QuicCryptoClientStream* CreateQuicCryptoClientStream(
       const QuicServerId& server_id,
       QuicChromiumClientSession* session,
-      scoped_ptr<ProofVerifyContext> proof_verify_context,
+      std::unique_ptr<ProofVerifyContext> proof_verify_context,
       QuicCryptoClientConfig* crypto_config) override {
     return new QuicCryptoClientStream(server_id, session,
                                       proof_verify_context.release(),
diff --git a/net/quic/quic_crypto_client_stream_factory.h b/net/quic/quic_crypto_client_stream_factory.h
index cd1d430..98460e1 100644
--- a/net/quic/quic_crypto_client_stream_factory.h
+++ b/net/quic/quic_crypto_client_stream_factory.h
@@ -5,9 +5,9 @@
 #ifndef NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_FACTORY_H_
 #define NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_FACTORY_H_
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
@@ -27,7 +27,7 @@
   virtual QuicCryptoClientStream* CreateQuicCryptoClientStream(
       const QuicServerId& server_id,
       QuicChromiumClientSession* session,
-      scoped_ptr<ProofVerifyContext> proof_verify_context,
+      std::unique_ptr<ProofVerifyContext> proof_verify_context,
       QuicCryptoClientConfig* crypto_config) = 0;
 
   static QuicCryptoClientStreamFactory* GetDefaultFactory();
diff --git a/net/quic/quic_crypto_client_stream_test.cc b/net/quic/quic_crypto_client_stream_test.cc
index 2909e37..54ecb914 100644
--- a/net/quic/quic_crypto_client_stream_test.cc
+++ b/net/quic/quic_crypto_client_stream_test.cc
@@ -4,7 +4,8 @@
 
 #include "net/quic/quic_crypto_client_stream.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h"
 #include "net/quic/crypto/quic_decrypter.h"
 #include "net/quic/crypto/quic_encrypter.h"
@@ -62,10 +63,10 @@
 
   MockConnectionHelper helper_;
   PacketSavingConnection* connection_;
-  scoped_ptr<TestQuicSpdyClientSession> session_;
+  std::unique_ptr<TestQuicSpdyClientSession> session_;
   QuicServerId server_id_;
   CryptoHandshakeMessage message_;
-  scoped_ptr<QuicData> message_data_;
+  std::unique_ptr<QuicData> message_data_;
   QuicCryptoClientConfig crypto_config_;
   CryptoTestUtils::FakeServerOptions server_options_;
 };
@@ -193,7 +194,7 @@
   server_config_update.SetValue(kSourceAddressTokenTag, stk);
   server_config_update.SetValue(kSCFG, scfg);
 
-  scoped_ptr<QuicData> data(
+  std::unique_ptr<QuicData> data(
       CryptoFramer::ConstructHandshakeMessage(server_config_update));
   stream()->OnStreamFrame(QuicStreamFrame(kCryptoStreamId, /*fin=*/false,
                                           /*offset=*/0, data->AsStringPiece()));
@@ -213,7 +214,7 @@
       CloseConnection(QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE, _, _));
   CryptoHandshakeMessage server_config_update;
   server_config_update.set_tag(kSCUP);
-  scoped_ptr<QuicData> data(
+  std::unique_ptr<QuicData> data(
       CryptoFramer::ConstructHandshakeMessage(server_config_update));
   stream()->OnStreamFrame(QuicStreamFrame(kCryptoStreamId, /*fin=*/false,
                                           /*offset=*/0, data->AsStringPiece()));
@@ -306,12 +307,12 @@
 
   // Client crypto stream state
   PacketSavingConnection* client_connection_;
-  scoped_ptr<TestQuicSpdyClientSession> client_session_;
+  std::unique_ptr<TestQuicSpdyClientSession> client_session_;
   QuicCryptoClientConfig client_crypto_config_;
 
   // Server crypto stream state
   PacketSavingConnection* server_connection_;
-  scoped_ptr<TestQuicSpdyServerSession> server_session_;
+  std::unique_ptr<TestQuicSpdyServerSession> server_session_;
   QuicCryptoServerConfig server_crypto_config_;
   QuicCompressedCertsCache server_compressed_certs_cache_;
   QuicServerId server_id_;
diff --git a/net/quic/quic_crypto_server_stream.cc b/net/quic/quic_crypto_server_stream.cc
index 7671c06f..cee73caa 100644
--- a/net/quic/quic_crypto_server_stream.cc
+++ b/net/quic/quic_crypto_server_stream.cc
@@ -289,7 +289,7 @@
   }
 
   const string& channel_id(crypto_negotiated_params_.channel_id);
-  scoped_ptr<crypto::SecureHash> hash(
+  std::unique_ptr<crypto::SecureHash> hash(
       crypto::SecureHash::Create(crypto::SecureHash::SHA256));
   hash->Update(channel_id.data(), channel_id.size());
   uint8_t digest[32];
diff --git a/net/quic/quic_crypto_server_stream.h b/net/quic/quic_crypto_server_stream.h
index b78e888..65e8f04c3 100644
--- a/net/quic/quic_crypto_server_stream.h
+++ b/net/quic/quic_crypto_server_stream.h
@@ -195,7 +195,7 @@
   // If the client provides CachedNetworkParameters in the STK in the CHLO, then
   // store here, and send back in future STKs if we have no better bandwidth
   // estimate to send.
-  scoped_ptr<CachedNetworkParameters> previous_cached_network_params_;
+  std::unique_ptr<CachedNetworkParameters> previous_cached_network_params_;
 
   // Contains any source address tokens which were present in the CHLO.
   SourceAddressTokens previous_source_address_tokens_;
diff --git a/net/quic/quic_crypto_server_stream_test.cc b/net/quic/quic_crypto_server_stream_test.cc
index da3eba0..b82e0c1 100644
--- a/net/quic/quic_crypto_server_stream_test.cc
+++ b/net/quic/quic_crypto_server_stream_test.cc
@@ -5,9 +5,9 @@
 #include "net/quic/quic_crypto_server_stream.h"
 
 #include <map>
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h"
 #include "net/quic/crypto/crypto_framer.h"
@@ -185,7 +185,7 @@
 
   // Server state
   PacketSavingConnection* server_connection_;
-  scoped_ptr<TestQuicSpdyServerSession> server_session_;
+  std::unique_ptr<TestQuicSpdyServerSession> server_session_;
   QuicCryptoServerConfig server_crypto_config_;
   QuicCompressedCertsCache server_compressed_certs_cache_;
   QuicServerId server_id_;
@@ -193,10 +193,10 @@
   // Client state
   PacketSavingConnection* client_connection_;
   QuicCryptoClientConfig client_crypto_config_;
-  scoped_ptr<TestQuicSpdyClientSession> client_session_;
+  std::unique_ptr<TestQuicSpdyClientSession> client_session_;
 
   CryptoHandshakeMessage message_;
-  scoped_ptr<QuicData> message_data_;
+  std::unique_ptr<QuicData> message_data_;
   CryptoTestUtils::FakeClientOptions client_options_;
   DelayedVerifyStrikeRegisterClient* strike_register_client_;
 
diff --git a/net/quic/quic_crypto_stream_test.cc b/net/quic/quic_crypto_stream_test.cc
index 69d09d2..e7cc92a 100644
--- a/net/quic/quic_crypto_stream_test.cc
+++ b/net/quic/quic_crypto_stream_test.cc
@@ -4,11 +4,11 @@
 
 #include "net/quic/quic_crypto_stream.h"
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/quic/crypto/crypto_handshake.h"
 #include "net/quic/crypto/crypto_protocol.h"
 #include "net/quic/test_tools/crypto_test_utils.h"
@@ -64,7 +64,7 @@
   MockQuicSpdySession session_;
   MockQuicCryptoStream stream_;
   CryptoHandshakeMessage message_;
-  scoped_ptr<QuicData> message_data_;
+  std::unique_ptr<QuicData> message_data_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(QuicCryptoStreamTest);
diff --git a/net/quic/quic_data_writer_test.cc b/net/quic/quic_data_writer_test.cc
index b3d6e77..f3d2bbb 100644
--- a/net/quic/quic_data_writer_test.cc
+++ b/net/quic/quic_data_writer_test.cc
@@ -6,7 +6,8 @@
 
 #include <stdint.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/quic/quic_data_reader.h"
 #include "net/test/gtest_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/net/quic/quic_end_to_end_unittest.cc b/net/quic/quic_end_to_end_unittest.cc
index 7441c7f..612e48d6 100644
--- a/net/quic/quic_end_to_end_unittest.cc
+++ b/net/quic/quic_end_to_end_unittest.cc
@@ -2,12 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include <ostream>
 #include <utility>
 #include <vector>
 
 #include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "net/base/elements_upload_data_stream.h"
@@ -62,7 +63,7 @@
 
   // HttpTransactionFactory methods
   int CreateTransaction(RequestPriority priority,
-                        scoped_ptr<HttpTransaction>* trans) override {
+                        std::unique_ptr<HttpTransaction>* trans) override {
     trans->reset(new HttpNetworkTransaction(priority, session_.get()));
     return OK;
   }
@@ -72,7 +73,7 @@
   HttpNetworkSession* GetSession() override { return session_.get(); };
 
  private:
-  scoped_ptr<HttpNetworkSession> session_;
+  std::unique_ptr<HttpNetworkSession> session_;
 };
 
 struct TestParams {
@@ -223,8 +224,8 @@
   // Initializes |request_| for a post of |length| bytes.
   void InitializePostRequest(size_t length) {
     GenerateBody(length);
-    std::vector<scoped_ptr<UploadElementReader>> element_readers;
-    element_readers.push_back(make_scoped_ptr(new UploadBytesElementReader(
+    std::vector<std::unique_ptr<UploadElementReader>> element_readers;
+    element_readers.push_back(base::WrapUnique(new UploadBytesElementReader(
         request_body_.data(), request_body_.length())));
     upload_data_stream_.reset(
         new ElementsUploadDataStream(std::move(element_readers), 0));
@@ -244,22 +245,22 @@
     EXPECT_EQ(body, consumer.content());
   }
 
-  scoped_ptr<MockHostResolver> host_resolver_impl_;
+  std::unique_ptr<MockHostResolver> host_resolver_impl_;
   MappedHostResolver host_resolver_;
   MockCertVerifier cert_verifier_;
-  scoped_ptr<ChannelIDService> channel_id_service_;
+  std::unique_ptr<ChannelIDService> channel_id_service_;
   TransportSecurityState transport_security_state_;
-  scoped_ptr<CTVerifier> cert_transparency_verifier_;
+  std::unique_ptr<CTVerifier> cert_transparency_verifier_;
   scoped_refptr<SSLConfigServiceDefaults> ssl_config_service_;
-  scoped_ptr<ProxyService> proxy_service_;
-  scoped_ptr<HttpAuthHandlerFactory> auth_handler_factory_;
+  std::unique_ptr<ProxyService> proxy_service_;
+  std::unique_ptr<HttpAuthHandlerFactory> auth_handler_factory_;
   HttpServerPropertiesImpl http_server_properties;
   HttpNetworkSession::Params params_;
-  scoped_ptr<TestTransactionFactory> transaction_factory_;
+  std::unique_ptr<TestTransactionFactory> transaction_factory_;
   HttpRequestInfo request_;
   std::string request_body_;
-  scoped_ptr<UploadDataStream> upload_data_stream_;
-  scoped_ptr<ServerThread> server_thread_;
+  std::unique_ptr<UploadDataStream> upload_data_stream_;
+  std::unique_ptr<ServerThread> server_thread_;
   IPEndPoint server_address_;
   std::string server_hostname_;
   QuicConfig server_config_;
diff --git a/net/quic/quic_fec_group_test.cc b/net/quic/quic_fec_group_test.cc
index 5f5358d..50c4c55 100644
--- a/net/quic/quic_fec_group_test.cc
+++ b/net/quic/quic_fec_group_test.cc
@@ -5,10 +5,10 @@
 #include "net/quic/quic_fec_group.h"
 
 #include <algorithm>
+#include <memory>
 #include <vector>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
 using ::testing::_;
@@ -46,7 +46,7 @@
     // kData[] and kEntropyFlag[] are indexed by packet numbers, which
     // start at 1.
     DCHECK_GE(arraysize(kData), num_packets);
-    scoped_ptr<char[]> redundancy(new char[kDataMaxLen]);
+    std::unique_ptr<char[]> redundancy(new char[kDataMaxLen]);
     for (size_t i = 0; i < kDataMaxLen; i++) {
       redundancy[i] = 0x00;
     }
@@ -278,7 +278,7 @@
   char* buffer_;
   size_t size_;
 
-  scoped_ptr<char[]> allocation_;
+  std::unique_ptr<char[]> allocation_;
 };
 
 MisalignedBuffer::MisalignedBuffer(const string& original, size_t offset) {
diff --git a/net/quic/quic_flow_controller_test.cc b/net/quic/quic_flow_controller_test.cc
index dbe7477..b189a408 100644
--- a/net/quic/quic_flow_controller_test.cc
+++ b/net/quic/quic_flow_controller_test.cc
@@ -41,7 +41,7 @@
   QuicStreamId stream_id_;
   QuicByteCount send_window_;
   QuicByteCount receive_window_;
-  scoped_ptr<QuicFlowController> flow_controller_;
+  std::unique_ptr<QuicFlowController> flow_controller_;
   MockConnectionHelper helper_;
   MockConnection connection_;
 };
diff --git a/net/quic/quic_framer.cc b/net/quic/quic_framer.cc
index 3d3e36f2..da91cfc 100644
--- a/net/quic/quic_framer.cc
+++ b/net/quic/quic_framer.cc
@@ -436,7 +436,7 @@
 
   size_t len =
       kPublicFlagsSize + PACKET_8BYTE_CONNECTION_ID + reset_serialized.length();
-  scoped_ptr<char[]> buffer(new char[len]);
+  std::unique_ptr<char[]> buffer(new char[len]);
   QuicDataWriter writer(len, buffer.get());
 
   uint8_t flags = static_cast<uint8_t>(PACKET_PUBLIC_FLAGS_RST |
@@ -462,7 +462,7 @@
     const QuicVersionVector& versions) {
   DCHECK(!versions.empty());
   size_t len = GetVersionNegotiationPacketSize(versions.size());
-  scoped_ptr<char[]> buffer(new char[len]);
+  std::unique_ptr<char[]> buffer(new char[len]);
   QuicDataWriter writer(len, buffer.get());
 
   uint8_t flags = static_cast<uint8_t>(PACKET_PUBLIC_FLAGS_VERSION |
@@ -524,7 +524,7 @@
     rv = ProcessDataPacket(&reader, public_header, packet, buffer,
                            kMaxPacketSize);
   } else {
-    scoped_ptr<char[]> large_buffer(new char[packet.length()]);
+    std::unique_ptr<char[]> large_buffer(new char[packet.length()]);
     rv = ProcessDataPacket(&reader, public_header, packet, large_buffer.get(),
                            packet.length());
     QUIC_BUG_IF(rv) << "QUIC should never successfully process packets larger"
@@ -604,7 +604,7 @@
     const QuicPacketPublicHeader& public_header) {
   QuicPublicResetPacket packet(public_header);
 
-  scoped_ptr<CryptoHandshakeMessage> reset(
+  std::unique_ptr<CryptoHandshakeMessage> reset(
       CryptoFramer::ParseMessage(reader->ReadRemainingPayload()));
   if (!reset.get()) {
     set_detailed_error("Unable to read reset message.");
diff --git a/net/quic/quic_framer.h b/net/quic/quic_framer.h
index a0a0db1..5960e613 100644
--- a/net/quic/quic_framer.h
+++ b/net/quic/quic_framer.h
@@ -8,6 +8,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <unordered_map>
 #include <unordered_set>
@@ -15,7 +16,6 @@
 
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/net_export.h"
 #include "net/quic/quic_protocol.h"
@@ -530,9 +530,9 @@
   // skipped as necessary).
   QuicVersionVector supported_versions_;
   // Primary decrypter used to decrypt packets during parsing.
-  scoped_ptr<QuicDecrypter> decrypter_;
+  std::unique_ptr<QuicDecrypter> decrypter_;
   // Alternative decrypter that can also be used to decrypt packets.
-  scoped_ptr<QuicDecrypter> alternative_decrypter_;
+  std::unique_ptr<QuicDecrypter> alternative_decrypter_;
   // The encryption level of |decrypter_|.
   EncryptionLevel decrypter_level_;
   // The encryption level of |alternative_decrypter_|.
@@ -542,7 +542,7 @@
   // decrypter.
   bool alternative_decrypter_latch_;
   // Encrypters used to encrypt packets via EncryptPayload().
-  scoped_ptr<QuicEncrypter> encrypter_[NUM_ENCRYPTION_LEVELS];
+  std::unique_ptr<QuicEncrypter> encrypter_[NUM_ENCRYPTION_LEVELS];
   // Tracks if the framer is being used by the entity that received the
   // connection or the entity that initiated it.
   Perspective perspective_;
diff --git a/net/quic/quic_framer_test.cc b/net/quic/quic_framer_test.cc
index 07ad276..16a2159d 100644
--- a/net/quic/quic_framer_test.cc
+++ b/net/quic/quic_framer_test.cc
@@ -5,13 +5,14 @@
 #include "net/quic/quic_framer.h"
 
 #include <stdint.h>
+
 #include <algorithm>
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "net/quic/crypto/quic_decrypter.h"
 #include "net/quic/crypto/quic_encrypter.h"
@@ -311,10 +312,10 @@
   bool accept_packet_;
   bool accept_public_header_;
 
-  scoped_ptr<QuicPacketHeader> header_;
-  scoped_ptr<QuicPacketPublicHeader> public_header_;
-  scoped_ptr<QuicPublicResetPacket> public_reset_packet_;
-  scoped_ptr<QuicVersionNegotiationPacket> version_negotiation_packet_;
+  std::unique_ptr<QuicPacketHeader> header_;
+  std::unique_ptr<QuicPacketPublicHeader> public_header_;
+  std::unique_ptr<QuicPublicResetPacket> public_reset_packet_;
+  std::unique_ptr<QuicVersionNegotiationPacket> version_negotiation_packet_;
   vector<QuicStreamFrame*> stream_frames_;
   vector<QuicAckFrame*> ack_frames_;
   vector<QuicStopWaitingFrame*> stop_waiting_frames_;
@@ -2535,7 +2536,7 @@
   // Verify that the packet re-serializes identically.
   QuicFrames frames;
   frames.push_back(QuicFrame(frame));
-  scoped_ptr<QuicPacket> data(BuildDataPacket(*visitor_.header_, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(*visitor_.header_, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -2606,7 +2607,7 @@
   // Verify that the packet re-serializes identically.
   QuicFrames frames;
   frames.push_back(QuicFrame(frame));
-  scoped_ptr<QuicPacket> data(BuildDataPacket(*visitor_.header_, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(*visitor_.header_, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -2675,7 +2676,7 @@
   // Verify that the packet re-serializes identically.
   QuicFrames frames;
   frames.push_back(QuicFrame(frame));
-  scoped_ptr<QuicPacket> data(BuildDataPacket(*visitor_.header_, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(*visitor_.header_, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -3372,7 +3373,7 @@
                           !kIncludePathId, PACKET_6BYTE_PACKET_NUMBER);
   memset(packet + header_size + 1, 0x00, kMaxPacketSize - header_size - 1);
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -3419,7 +3420,7 @@
                           !kIncludePathId, PACKET_4BYTE_PACKET_NUMBER);
   memset(packet + header_size + 1, 0x00, kMaxPacketSize - header_size - 1);
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -3466,7 +3467,7 @@
                           !kIncludePathId, PACKET_2BYTE_PACKET_NUMBER);
   memset(packet + header_size + 1, 0x00, kMaxPacketSize - header_size - 1);
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -3513,7 +3514,7 @@
                           !kIncludePathId, PACKET_1BYTE_PACKET_NUMBER);
   memset(packet + header_size + 1, 0x00, kMaxPacketSize - header_size - 1);
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -3564,7 +3565,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -3613,7 +3614,7 @@
   // clang-format on
 
   QuicFramerPeer::SetPerspective(&framer_, Perspective::IS_CLIENT);
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -3668,7 +3669,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -3726,7 +3727,7 @@
   // clang-format on
 
   QuicFramerPeer::SetPerspective(&framer_, Perspective::IS_CLIENT);
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -3747,8 +3748,9 @@
   // clang-format on
 
   QuicConnectionId connection_id = kConnectionId;
-  scoped_ptr<QuicEncryptedPacket> data(framer_.BuildVersionNegotiationPacket(
-      connection_id, SupportedVersions(GetParam())));
+  std::unique_ptr<QuicEncryptedPacket> data(
+      framer_.BuildVersionNegotiationPacket(connection_id,
+                                            SupportedVersions(GetParam())));
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
                                       data->length(), AsChars(packet),
                                       arraysize(packet));
@@ -3837,7 +3839,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   if (framer_.version() <= QUIC_VERSION_31) {
@@ -4033,7 +4035,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   if (framer_.version() <= QUIC_VERSION_31) {
@@ -4134,7 +4136,7 @@
   // clang-format on
 
   if (framer_.version() <= QUIC_VERSION_31) {
-    scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames, 37u));
+    std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames, 37u));
     ASSERT_TRUE(data != nullptr);
     // Expect 1 byte unused since at least 2 bytes are needed to fit more nacks.
     EXPECT_EQ(36u, data->length());
@@ -4142,7 +4144,7 @@
                                         data->length(), AsChars(packet),
                                         arraysize(packet));
   } else {
-    scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames, 36u));
+    std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames, 36u));
     ASSERT_TRUE(data != nullptr);
     // Expect 1 byte unused since at least 2 bytes are needed to fit more nacks.
     EXPECT_EQ(35u, data->length());
@@ -4191,7 +4193,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -4242,7 +4244,7 @@
   QuicFrames frames;
   frames.push_back(QuicFrame(&rst_frame));
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -4294,7 +4296,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -4349,7 +4351,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -4397,7 +4399,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -4441,7 +4443,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -4482,7 +4484,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -4527,7 +4529,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -4569,7 +4571,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> data(BuildDataPacket(header, frames));
   ASSERT_TRUE(data != nullptr);
 
   test::CompareCharArraysWithHexError("constructed packet", data->data(),
@@ -4613,7 +4615,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicEncryptedPacket> data(
+  std::unique_ptr<QuicEncryptedPacket> data(
       framer_.BuildPublicResetPacket(reset_packet));
   ASSERT_TRUE(data != nullptr);
 
@@ -4667,7 +4669,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicEncryptedPacket> data(
+  std::unique_ptr<QuicEncryptedPacket> data(
       framer_.BuildPublicResetPacket(reset_packet));
   ASSERT_TRUE(data != nullptr);
 
@@ -4699,7 +4701,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> raw(new QuicPacket(
+  std::unique_ptr<QuicPacket> raw(new QuicPacket(
       AsChars(packet), arraysize(packet), false, PACKET_8BYTE_CONNECTION_ID,
       !kIncludeVersion, !kIncludePathId, PACKET_6BYTE_PACKET_NUMBER));
   char buffer[kMaxPacketSize];
@@ -4736,7 +4738,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> raw(new QuicPacket(
+  std::unique_ptr<QuicPacket> raw(new QuicPacket(
       AsChars(packet), arraysize(packet), false, PACKET_8BYTE_CONNECTION_ID,
       kIncludeVersion, !kIncludePathId, PACKET_6BYTE_PACKET_NUMBER));
   char buffer[kMaxPacketSize];
@@ -4773,7 +4775,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> raw(new QuicPacket(
+  std::unique_ptr<QuicPacket> raw(new QuicPacket(
       AsChars(packet), arraysize(packet), false, PACKET_8BYTE_CONNECTION_ID,
       !kIncludeVersion, kIncludePathId, PACKET_6BYTE_PACKET_NUMBER));
   char buffer[kMaxPacketSize];
@@ -4811,7 +4813,7 @@
   };
   // clang-format on
 
-  scoped_ptr<QuicPacket> raw(new QuicPacket(
+  std::unique_ptr<QuicPacket> raw(new QuicPacket(
       AsChars(packet), arraysize(packet), false, PACKET_8BYTE_CONNECTION_ID,
       kIncludeVersion, kIncludePathId, PACKET_6BYTE_PACKET_NUMBER));
   char buffer[kMaxPacketSize];
@@ -4841,7 +4843,7 @@
   frames.push_back(frame);
 
   // Build an ack packet with truncation due to limit in number of nack ranges.
-  scoped_ptr<QuicPacket> raw_ack_packet(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> raw_ack_packet(BuildDataPacket(header, frames));
   ASSERT_TRUE(raw_ack_packet != nullptr);
   char buffer[kMaxPacketSize];
   size_t encrypted_length = framer_.EncryptPayload(
@@ -4879,7 +4881,8 @@
   frames.push_back(frame);
 
   // Build an ack packet with truncation due to limit in number of nack ranges.
-  scoped_ptr<QuicPacket> raw_ack_packet(BuildDataPacket(header, frames, 500));
+  std::unique_ptr<QuicPacket> raw_ack_packet(
+      BuildDataPacket(header, frames, 500));
   ASSERT_TRUE(raw_ack_packet != nullptr);
   char buffer[kMaxPacketSize];
   size_t encrypted_length = framer_.EncryptPayload(
@@ -4919,7 +4922,7 @@
   QuicFrames frames;
   frames.push_back(frame);
 
-  scoped_ptr<QuicPacket> raw_ack_packet(BuildDataPacket(header, frames));
+  std::unique_ptr<QuicPacket> raw_ack_packet(BuildDataPacket(header, frames));
   ASSERT_TRUE(raw_ack_packet != nullptr);
 
   char buffer[kMaxPacketSize];
@@ -5065,7 +5068,7 @@
   framer_.SetDecrypter(ENCRYPTION_NONE, QuicDecrypter::Create(kNULL));
   framer_.SetEncrypter(ENCRYPTION_NONE, QuicEncrypter::Create(kNULL));
 
-  scoped_ptr<QuicEncryptedPacket> packet(ConstructEncryptedPacket(
+  std::unique_ptr<QuicEncryptedPacket> packet(ConstructEncryptedPacket(
       42, false, false, false, kDefaultPathId, kTestQuicStreamId, kTestString,
       PACKET_8BYTE_CONNECTION_ID, PACKET_6BYTE_PACKET_NUMBER));
 
@@ -5098,7 +5101,7 @@
   framer_.SetDecrypter(ENCRYPTION_NONE, QuicDecrypter::Create(kNULL));
   framer_.SetEncrypter(ENCRYPTION_NONE, QuicEncrypter::Create(kNULL));
 
-  scoped_ptr<QuicEncryptedPacket> packet(ConstructMisFramedEncryptedPacket(
+  std::unique_ptr<QuicEncryptedPacket> packet(ConstructMisFramedEncryptedPacket(
       42, false, false, false, kDefaultPathId, kTestQuicStreamId, kTestString,
       PACKET_8BYTE_CONNECTION_ID, PACKET_6BYTE_PACKET_NUMBER, nullptr));
 
diff --git a/net/quic/quic_headers_stream.h b/net/quic/quic_headers_stream.h
index ba95180..e216794 100644
--- a/net/quic/quic_headers_stream.h
+++ b/net/quic/quic_headers_stream.h
@@ -7,8 +7,9 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/quic/quic_header_list.h"
 #include "net/quic/quic_protocol.h"
@@ -112,7 +113,7 @@
   QuicTime prev_max_timestamp_;
 
   SpdyFramer spdy_framer_;
-  scoped_ptr<SpdyFramerVisitor> spdy_framer_visitor_;
+  std::unique_ptr<SpdyFramerVisitor> spdy_framer_visitor_;
 
   // Either empty, or contains the complete list of headers.
   QuicHeaderList header_list_;
diff --git a/net/quic/quic_http_stream.cc b/net/quic/quic_http_stream.cc
index 591f3ce..f31e2d0 100644
--- a/net/quic/quic_http_stream.cc
+++ b/net/quic/quic_http_stream.cc
@@ -29,11 +29,11 @@
 
 namespace {
 
-scoped_ptr<base::Value> NetLogQuicPushStreamCallback(
+std::unique_ptr<base::Value> NetLogQuicPushStreamCallback(
     QuicStreamId stream_id,
     const GURL* url,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", stream_id);
   dict->SetString("url", url->spec());
   return std::move(dict);
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc
index afd0f95..4774365 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -6,9 +6,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/thread_task_runner_handle.h"
 #include "net/base/chunked_upload_data_stream.h"
@@ -162,7 +163,7 @@
   }
 
   // Adds a packet to the list of expected writes.
-  void AddWrite(scoped_ptr<QuicReceivedPacket> packet) {
+  void AddWrite(std::unique_ptr<QuicReceivedPacket> packet) {
     writes_.push_back(PacketToWrite(SYNCHRONOUS, packet.release()));
   }
 
@@ -178,7 +179,7 @@
            socket_data_->AllWriteDataConsumed();
   }
 
-  void ProcessPacket(scoped_ptr<QuicReceivedPacket> packet) {
+  void ProcessPacket(std::unique_ptr<QuicReceivedPacket> packet) {
     connection_->ProcessUdpPacket(self_addr_, peer_addr_, *packet);
   }
 
@@ -197,7 +198,7 @@
     socket_data_.reset(new StaticSocketDataProvider(
         nullptr, 0, mock_writes_.get(), writes_.size()));
 
-    scoped_ptr<MockUDPClientSocket> socket(new MockUDPClientSocket(
+    std::unique_ptr<MockUDPClientSocket> socket(new MockUDPClientSocket(
         socket_data_.get(), net_log_.bound().net_log()));
     socket->Connect(peer_addr_);
     runner_ = new TestTaskRunner(&clock_);
@@ -238,7 +239,7 @@
         connection_, std::move(socket),
         /*stream_factory=*/nullptr, &crypto_client_stream_factory_, &clock_,
         &transport_security_state_,
-        make_scoped_ptr(static_cast<QuicServerInfo*>(nullptr)),
+        base::WrapUnique(static_cast<QuicServerInfo*>(nullptr)),
         QuicServerId(kDefaultServerHostName, kDefaultServerPort,
                      PRIVACY_MODE_DISABLED),
         kQuicYieldAfterPacketsRead,
@@ -285,7 +286,7 @@
     response_data_ = body;
   }
 
-  scoped_ptr<QuicReceivedPacket> InnerConstructDataPacket(
+  std::unique_ptr<QuicReceivedPacket> InnerConstructDataPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -296,7 +297,7 @@
                                  should_include_version, fin, offset, data);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructDataPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructDataPacket(
       QuicPacketNumber packet_number,
       bool should_include_version,
       bool fin,
@@ -306,7 +307,7 @@
                                     should_include_version, fin, offset, data);
   }
 
-  scoped_ptr<QuicReceivedPacket> InnerConstructRequestHeadersPacket(
+  std::unique_ptr<QuicReceivedPacket> InnerConstructRequestHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -320,7 +321,7 @@
         request_headers_, spdy_headers_frame_length);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructRequestHeadersPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructRequestHeadersPacket(
       QuicPacketNumber packet_number,
       bool fin,
       RequestPriority request_priority,
@@ -330,7 +331,7 @@
         spdy_headers_frame_length);
   }
 
-  scoped_ptr<QuicReceivedPacket> InnerConstructResponseHeadersPacket(
+  std::unique_ptr<QuicReceivedPacket> InnerConstructResponseHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool fin,
@@ -340,7 +341,7 @@
         spdy_headers_frame_length, &response_offset_);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructResponseHeadersPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructResponseHeadersPacket(
       QuicPacketNumber packet_number,
       bool fin,
       size_t* spdy_headers_frame_length) {
@@ -348,7 +349,7 @@
                                                spdy_headers_frame_length);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructResponseHeadersPacketWithOffset(
+  std::unique_ptr<QuicReceivedPacket> ConstructResponseHeadersPacketWithOffset(
       QuicPacketNumber packet_number,
       bool fin,
       size_t* spdy_headers_frame_length,
@@ -358,7 +359,7 @@
         spdy_headers_frame_length, offset);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructResponseTrailersPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructResponseTrailersPacket(
       QuicPacketNumber packet_number,
       bool fin,
       const SpdyHeaderBlock& trailers,
@@ -369,26 +370,26 @@
                                             spdy_headers_frame_length, offset);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructRstStreamPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructRstStreamPacket(
       QuicPacketNumber packet_number) {
     return maker_.MakeRstPacket(
         packet_number, true, stream_id_,
         AdjustErrorForVersion(QUIC_RST_ACKNOWLEDGEMENT, GetParam()));
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructRstStreamCancelledPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructRstStreamCancelledPacket(
       QuicPacketNumber packet_number) {
     return maker_.MakeRstPacket(packet_number, !kIncludeVersion, stream_id_,
                                 QUIC_STREAM_CANCELLED);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructRstStreamVaryMismatchPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructRstStreamVaryMismatchPacket(
       QuicPacketNumber packet_number) {
     return maker_.MakeRstPacket(packet_number, !kIncludeVersion, promise_id_,
                                 QUIC_PROMISE_VARY_MISMATCH);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructAckAndRstStreamPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructAckAndRstStreamPacket(
       QuicPacketNumber packet_number,
       QuicPacketNumber largest_received,
       QuicPacketNumber ack_least_unacked,
@@ -399,12 +400,12 @@
         !kIncludeCongestionFeedback);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructAckAndRstStreamPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructAckAndRstStreamPacket(
       QuicPacketNumber packet_number) {
     return ConstructAckAndRstStreamPacket(packet_number, 2, 1, 1);
   }
 
-  scoped_ptr<QuicReceivedPacket> ConstructAckPacket(
+  std::unique_ptr<QuicReceivedPacket> ConstructAckPacket(
       QuicPacketNumber packet_number,
       QuicPacketNumber largest_received,
       QuicPacketNumber least_unacked) {
@@ -424,14 +425,14 @@
   bool use_closing_stream_;
   MockSendAlgorithm* send_algorithm_;
   scoped_refptr<TestTaskRunner> runner_;
-  scoped_ptr<MockWrite[]> mock_writes_;
+  std::unique_ptr<MockWrite[]> mock_writes_;
   MockClock clock_;
   TestQuicConnection* connection_;
-  scoped_ptr<QuicChromiumConnectionHelper> helper_;
+  std::unique_ptr<QuicChromiumConnectionHelper> helper_;
   testing::StrictMock<MockConnectionVisitor> visitor_;
-  scoped_ptr<QuicHttpStream> stream_;
+  std::unique_ptr<QuicHttpStream> stream_;
   TransportSecurityState transport_security_state_;
-  scoped_ptr<QuicChromiumClientSession> session_;
+  std::unique_ptr<QuicChromiumClientSession> session_;
   QuicCryptoClientConfig crypto_config_;
   TestCompletionCallback callback_;
   HttpRequestInfo request_;
@@ -445,7 +446,7 @@
   QuicClientPushPromiseIndex push_promise_index_;
 
   // For server push testing
-  scoped_ptr<QuicHttpStream> promised_stream_;
+  std::unique_ptr<QuicHttpStream> promised_stream_;
   SpdyHeaderBlock push_promise_;
   SpdyHeaderBlock promised_response_;
   const QuicStreamId promise_id_;
@@ -461,7 +462,7 @@
   MockRandom random_generator_;
   ProofVerifyDetailsChromium verify_details_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
-  scoped_ptr<StaticSocketDataProvider> socket_data_;
+  std::unique_ptr<StaticSocketDataProvider> socket_data_;
   std::vector<PacketToWrite> writes_;
   QuicStreamOffset response_offset_;
 };
@@ -840,8 +841,8 @@
 
   Initialize();
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
-  element_readers.push_back(make_scoped_ptr(
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
+  element_readers.push_back(base::WrapUnique(
       new UploadBytesElementReader(kUploadData, strlen(kUploadData))));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
   request_.method = "POST";
diff --git a/net/quic/quic_http_utils.cc b/net/quic/quic_http_utils.cc
index 6091c08..c6dd505 100644
--- a/net/quic/quic_http_utils.cc
+++ b/net/quic/quic_http_utils.cc
@@ -22,13 +22,14 @@
                          : static_cast<RequestPriority>(HIGHEST - priority);
 }
 
-scoped_ptr<base::Value> QuicRequestNetLogCallback(
+std::unique_ptr<base::Value> QuicRequestNetLogCallback(
     QuicStreamId stream_id,
     const SpdyHeaderBlock* headers,
     SpdyPriority priority,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(static_cast<base::DictionaryValue*>(
-      SpdyHeaderBlockNetLogCallback(headers, capture_mode).release()));
+  std::unique_ptr<base::DictionaryValue> dict(
+      static_cast<base::DictionaryValue*>(
+          SpdyHeaderBlockNetLogCallback(headers, capture_mode).release()));
   dict->SetInteger("quic_priority", static_cast<int>(priority));
   dict->SetInteger("quic_stream_id", static_cast<int>(stream_id));
   return std::move(dict);
diff --git a/net/quic/quic_http_utils.h b/net/quic/quic_http_utils.h
index 1bde98a..ce5dd2f 100644
--- a/net/quic/quic_http_utils.h
+++ b/net/quic/quic_http_utils.h
@@ -21,7 +21,7 @@
 ConvertQuicPriorityToRequestPriority(SpdyPriority priority);
 
 // Converts a SpdyHeaderBlock and priority into NetLog event parameters.
-NET_EXPORT scoped_ptr<base::Value> QuicRequestNetLogCallback(
+NET_EXPORT std::unique_ptr<base::Value> QuicRequestNetLogCallback(
     QuicStreamId stream_id,
     const SpdyHeaderBlock* headers,
     SpdyPriority priority,
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc
index 4774b5bf..f937857 100644
--- a/net/quic/quic_network_transaction_unittest.cc
+++ b/net/quic/quic_network_transaction_unittest.cc
@@ -2,11 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/stl_util.h"
 #include "base/strings/stringprintf.h"
@@ -84,13 +84,13 @@
 
   ~MockQuicData() { STLDeleteElements(&packets_); }
 
-  void AddSynchronousRead(scoped_ptr<QuicEncryptedPacket> packet) {
+  void AddSynchronousRead(std::unique_ptr<QuicEncryptedPacket> packet) {
     reads_.push_back(MockRead(SYNCHRONOUS, packet->data(), packet->length(),
                               packet_number_++));
     packets_.push_back(packet.release());
   }
 
-  void AddRead(scoped_ptr<QuicEncryptedPacket> packet) {
+  void AddRead(std::unique_ptr<QuicEncryptedPacket> packet) {
     reads_.push_back(
         MockRead(ASYNC, packet->data(), packet->length(), packet_number_++));
     packets_.push_back(packet.release());
@@ -100,7 +100,7 @@
     reads_.push_back(MockRead(mode, rv, packet_number_++));
   }
 
-  void AddWrite(scoped_ptr<QuicEncryptedPacket> packet) {
+  void AddWrite(std::unique_ptr<QuicEncryptedPacket> packet) {
     writes_.push_back(MockWrite(SYNCHRONOUS, packet->data(), packet->length(),
                                 packet_number_++));
     packets_.push_back(packet.release());
@@ -121,7 +121,7 @@
   std::vector<MockWrite> writes_;
   std::vector<MockRead> reads_;
   size_t packet_number_;
-  scoped_ptr<SequencedSocketData> socket_data_;
+  std::unique_ptr<SequencedSocketData> socket_data_;
 };
 
 class ProxyHeadersHandler {
@@ -167,13 +167,13 @@
   ~TestSocketPerformanceWatcherFactory() override {}
 
   // SocketPerformanceWatcherFactory implementation:
-  scoped_ptr<SocketPerformanceWatcher> CreateSocketPerformanceWatcher(
+  std::unique_ptr<SocketPerformanceWatcher> CreateSocketPerformanceWatcher(
       const Protocol protocol) override {
     if (protocol != PROTOCOL_QUIC) {
       return nullptr;
     }
     ++watcher_count_;
-    return scoped_ptr<SocketPerformanceWatcher>(
+    return std::unique_ptr<SocketPerformanceWatcher>(
         new TestSocketPerformanceWatcher(&rtt_notification_received_));
   }
 
@@ -233,26 +233,26 @@
     base::MessageLoop::current()->RunUntilIdle();
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructConnectionClosePacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructConnectionClosePacket(
       QuicPacketNumber num) {
     return maker_.MakeConnectionClosePacket(num);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructGoAwayPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructGoAwayPacket(
       QuicPacketNumber num,
       QuicErrorCode error_code,
       std::string reason_phrase) {
     return maker_.MakeGoAwayPacket(num, error_code, reason_phrase);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructAckPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructAckPacket(
       QuicPacketNumber largest_received,
       QuicPacketNumber least_unacked) {
     return maker_.MakeAckPacket(2, largest_received, least_unacked,
                                 least_unacked, true);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructAckAndRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructAckAndRstPacket(
       QuicPacketNumber num,
       QuicStreamId stream_id,
       QuicRstStreamErrorCode error_code,
@@ -264,7 +264,7 @@
                                       stop_least_unacked, true);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructAckPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructAckPacket(
       QuicPacketNumber largest_received,
       QuicPacketNumber least_unacked,
       QuicTestPacketMaker* maker) {
@@ -272,7 +272,7 @@
                                 least_unacked, true);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructAckAndConnectionClosePacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructAckAndConnectionClosePacket(
       QuicPacketNumber packet_number,
       QuicPacketNumber largest_received,
       QuicPacketNumber ack_least_unacked,
@@ -281,7 +281,7 @@
                                 ack_least_unacked, stop_least_unacked, true);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructAckAndConnectionClosePacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructAckAndConnectionClosePacket(
       QuicPacketNumber num,
       QuicTime::Delta delta_time_largest_observed,
       QuicPacketNumber largest_received,
@@ -293,7 +293,7 @@
         least_unacked, quic_error, quic_error_details);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructRstPacket(
       QuicPacketNumber num,
       bool include_version,
       QuicStreamId stream_id,
@@ -326,7 +326,7 @@
     return maker_.GetResponseHeaders(status, alt_svc);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructDataPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructDataPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -337,7 +337,7 @@
                                  should_include_version, fin, offset, data);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructRequestHeadersPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructRequestHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -351,7 +351,7 @@
         headers, offset);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructRequestHeadersPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructRequestHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -366,7 +366,7 @@
         headers, offset);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructRequestHeadersPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructRequestHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -376,7 +376,7 @@
                                          should_include_version, fin, headers,
                                          nullptr, &maker_);
   }
-  scoped_ptr<QuicEncryptedPacket> ConstructRequestHeadersPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructRequestHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -388,7 +388,7 @@
                                          nullptr, maker);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructResponseHeadersPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructResponseHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -399,7 +399,7 @@
                                           nullptr, &maker_);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructResponseHeadersPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructResponseHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -411,7 +411,7 @@
                                           nullptr, maker);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructResponseHeadersPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructResponseHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -422,7 +422,7 @@
         packet_number, stream_id, should_include_version, fin, headers, offset);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructResponseHeadersPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructResponseHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -466,7 +466,8 @@
               session_->quic_stream_factory()->socket_receive_buffer_size());
   }
 
-  void CheckWasQuicResponse(const scoped_ptr<HttpNetworkTransaction>& trans) {
+  void CheckWasQuicResponse(
+      const std::unique_ptr<HttpNetworkTransaction>& trans) {
     const HttpResponseInfo* response = trans->GetResponseInfo();
     ASSERT_TRUE(response != nullptr);
     ASSERT_TRUE(response->headers.get() != nullptr);
@@ -477,14 +478,15 @@
               response->connection_info);
   }
 
-  void CheckResponsePort(const scoped_ptr<HttpNetworkTransaction>& trans,
+  void CheckResponsePort(const std::unique_ptr<HttpNetworkTransaction>& trans,
                          uint16_t port) {
     const HttpResponseInfo* response = trans->GetResponseInfo();
     ASSERT_TRUE(response != nullptr);
     EXPECT_EQ(port, response->socket_address.port());
   }
 
-  void CheckWasHttpResponse(const scoped_ptr<HttpNetworkTransaction>& trans) {
+  void CheckWasHttpResponse(
+      const std::unique_ptr<HttpNetworkTransaction>& trans) {
     const HttpResponseInfo* response = trans->GetResponseInfo();
     ASSERT_TRUE(response != nullptr);
     ASSERT_TRUE(response->headers.get() != nullptr);
@@ -495,14 +497,14 @@
               response->connection_info);
   }
 
-  void CheckResponseData(const scoped_ptr<HttpNetworkTransaction>& trans,
+  void CheckResponseData(const std::unique_ptr<HttpNetworkTransaction>& trans,
                          const std::string& expected) {
     std::string response_data;
     ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data));
     EXPECT_EQ(expected, response_data);
   }
 
-  void RunTransaction(const scoped_ptr<HttpNetworkTransaction>& trans) {
+  void RunTransaction(const std::unique_ptr<HttpNetworkTransaction>& trans) {
     TestCompletionCallback callback;
     int rv = trans->Start(&request_, callback.callback(), net_log_.bound());
     EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -510,7 +512,7 @@
   }
 
   void SendRequestAndExpectHttpResponse(const std::string& expected) {
-    scoped_ptr<HttpNetworkTransaction> trans(
+    std::unique_ptr<HttpNetworkTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get()));
     RunTransaction(trans);
     CheckWasHttpResponse(trans);
@@ -572,7 +574,7 @@
   }
 
   void AddHangingNonAlternateProtocolSocketData() {
-    scoped_ptr<StaticSocketDataProvider> hanging_data;
+    std::unique_ptr<StaticSocketDataProvider> hanging_data;
     hanging_data.reset(new StaticSocketDataProvider());
     MockConnect hanging_connect(SYNCHRONOUS, ERR_IO_PENDING);
     hanging_data->set_connect_data(hanging_connect);
@@ -583,24 +585,24 @@
 
   MockClock* clock_;  // Owned by QuicStreamFactory after CreateSession.
   QuicTestPacketMaker maker_;
-  scoped_ptr<HttpNetworkSession> session_;
+  std::unique_ptr<HttpNetworkSession> session_;
   MockClientSocketFactory socket_factory_;
   ProofVerifyDetailsChromium verify_details_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
   MockHostResolver host_resolver_;
   MockCertVerifier cert_verifier_;
   TransportSecurityState transport_security_state_;
-  scoped_ptr<CTVerifier> cert_transparency_verifier_;
+  std::unique_ptr<CTVerifier> cert_transparency_verifier_;
   TestSocketPerformanceWatcherFactory test_socket_performance_watcher_factory_;
   scoped_refptr<SSLConfigServiceDefaults> ssl_config_service_;
-  scoped_ptr<ProxyService> proxy_service_;
-  scoped_ptr<HttpAuthHandlerFactory> auth_handler_factory_;
+  std::unique_ptr<ProxyService> proxy_service_;
+  std::unique_ptr<HttpAuthHandlerFactory> auth_handler_factory_;
   MockRandom random_generator_;
   HttpServerPropertiesImpl http_server_properties_;
   HttpNetworkSession::Params params_;
   HttpRequestInfo request_;
   BoundTestNetLog net_log_;
-  std::vector<scoped_ptr<StaticSocketDataProvider>> hanging_data_;
+  std::vector<std::unique_ptr<StaticSocketDataProvider>> hanging_data_;
   SSLSocketDataProvider ssl_data_;
 
  private:
@@ -608,7 +610,7 @@
       const std::string& expected,
       bool used_proxy,
       uint16_t port) {
-    scoped_ptr<HttpNetworkTransaction> trans(
+    std::unique_ptr<HttpNetworkTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get()));
     ProxyHeadersHandler proxy_headers_handler;
     trans->SetBeforeProxyHeadersSentCallback(
@@ -839,7 +841,7 @@
 
   EXPECT_EQ(0U, test_socket_performance_watcher_factory_.watcher_count());
   for (size_t i = 0; i < 2; ++i) {
-    scoped_ptr<HttpNetworkTransaction> trans(
+    std::unique_ptr<HttpNetworkTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get()));
     TestCompletionCallback callback;
     int rv = trans->Start(&request_, callback.callback(), net_log_.bound());
@@ -1018,7 +1020,7 @@
   session_->quic_stream_factory()->set_require_confirmation(true);
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
 
-  scoped_ptr<HttpNetworkTransaction> trans(
+  std::unique_ptr<HttpNetworkTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get()));
   TestCompletionCallback callback;
   int rv = trans->Start(&request_, callback.callback(), net_log_.bound());
@@ -1756,7 +1758,7 @@
     base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
     session_->http_server_properties()->SetAlternativeService(
         origin, alternative_service, expiration);
-    scoped_ptr<HttpNetworkTransaction> trans(
+    std::unique_ptr<HttpNetworkTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get()));
     TestCompletionCallback callback;
     int rv = trans->Start(&request_, callback.callback(), net_log_.bound());
@@ -1964,7 +1966,7 @@
   session_->quic_stream_factory()->set_require_confirmation(true);
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
 
-  scoped_ptr<HttpNetworkTransaction> trans(
+  std::unique_ptr<HttpNetworkTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get()));
   TestCompletionCallback callback;
   int rv = trans->Start(&request_, callback.callback(), net_log_.bound());
@@ -2010,7 +2012,7 @@
   session_->quic_stream_factory()->set_require_confirmation(true);
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
 
-  scoped_ptr<HttpNetworkTransaction> trans(
+  std::unique_ptr<HttpNetworkTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get()));
   TestCompletionCallback callback;
   int rv = trans->Start(&request_, callback.callback(), net_log_.bound());
@@ -2065,7 +2067,7 @@
   session_->quic_stream_factory()->set_require_confirmation(true);
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
 
-  scoped_ptr<HttpNetworkTransaction> trans(
+  std::unique_ptr<HttpNetworkTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get()));
   TestCompletionCallback callback;
   int rv = trans->Start(&request_, callback.callback(), net_log_.bound());
@@ -2083,7 +2085,7 @@
 
 TEST_P(QuicNetworkTransactionTest, BrokenAlternateProtocol) {
   // Alternate-protocol job
-  scoped_ptr<QuicEncryptedPacket> close(ConstructConnectionClosePacket(1));
+  std::unique_ptr<QuicEncryptedPacket> close(ConstructConnectionClosePacket(1));
   MockRead quic_reads[] = {
       MockRead(ASYNC, close->data(), close->length()),
       MockRead(ASYNC, ERR_IO_PENDING),  // No more data to read
@@ -2160,7 +2162,7 @@
   CreateSession();
 
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::COLD_START);
-  scoped_ptr<HttpNetworkTransaction> trans(
+  std::unique_ptr<HttpNetworkTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get()));
   TestCompletionCallback callback;
   int rv = trans->Start(&request_, callback.callback(), net_log_.bound());
@@ -2344,7 +2346,7 @@
 
   request_.upload_data_stream = &upload_data;
 
-  scoped_ptr<HttpNetworkTransaction> trans(
+  std::unique_ptr<HttpNetworkTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get()));
   TestCompletionCallback callback;
   int rv = trans->Start(&request_, callback.callback(), net_log_.bound());
diff --git a/net/quic/quic_packet_creator.h b/net/quic/quic_packet_creator.h
index f74244f..b279d51 100644
--- a/net/quic/quic_packet_creator.h
+++ b/net/quic/quic_packet_creator.h
@@ -12,13 +12,13 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 #include <unordered_map>
 #include <utility>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/quic/quic_framer.h"
 #include "net/quic/quic_protocol.h"
@@ -267,7 +267,7 @@
   DebugDelegate* debug_delegate_;
   QuicFramer* framer_;
 
-  scoped_ptr<QuicRandomBoolSource> random_bool_source_;
+  std::unique_ptr<QuicRandomBoolSource> random_bool_source_;
   QuicBufferAllocator* const buffer_allocator_;
 
   // Controls whether version should be included while serializing the packet.
diff --git a/net/quic/quic_packet_creator_test.cc b/net/quic/quic_packet_creator_test.cc
index fc649ba..a3e3c2a1 100644
--- a/net/quic/quic_packet_creator_test.cc
+++ b/net/quic/quic_packet_creator_test.cc
@@ -719,7 +719,7 @@
   QuicFramerPeer::SetPerspective(&client_framer_, Perspective::IS_SERVER);
   QuicVersionVector versions;
   versions.push_back(test::QuicVersionMax());
-  scoped_ptr<QuicEncryptedPacket> encrypted(
+  std::unique_ptr<QuicEncryptedPacket> encrypted(
       creator_.SerializeVersionNegotiationPacket(versions));
 
   {
diff --git a/net/quic/quic_packet_generator_test.cc b/net/quic/quic_packet_generator_test.cc
index 0adbfe9..d913672 100644
--- a/net/quic/quic_packet_generator_test.cc
+++ b/net/quic/quic_packet_generator_test.cc
@@ -216,7 +216,7 @@
   QuicAckFrame ack_frame_;
 
  private:
-  scoped_ptr<char[]> data_array_;
+  std::unique_ptr<char[]> data_array_;
   struct iovec iov_;
 };
 
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index 44bcbac..d39e36da 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -11,6 +11,7 @@
 #include <limits>
 #include <list>
 #include <map>
+#include <memory>
 #include <ostream>
 #include <set>
 #include <string>
@@ -20,7 +21,6 @@
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/int128.h"
 #include "net/base/iovec.h"
diff --git a/net/quic/quic_sent_packet_manager.h b/net/quic/quic_sent_packet_manager.h
index 6d4241e..7fa3743 100644
--- a/net/quic/quic_sent_packet_manager.h
+++ b/net/quic/quic_sent_packet_manager.h
@@ -8,12 +8,12 @@
 #include <stddef.h>
 
 #include <map>
+#include <memory>
 #include <set>
 #include <utility>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/linked_hash_map.h"
 #include "net/quic/congestion_control/loss_detection_interface.h"
 #include "net/quic/congestion_control/rtt_stats.h"
@@ -404,8 +404,8 @@
   NetworkChangeVisitor* network_change_visitor_;
   const QuicPacketCount initial_congestion_window_;
   RttStats rtt_stats_;
-  scoped_ptr<SendAlgorithmInterface> send_algorithm_;
-  scoped_ptr<LossDetectionInterface> loss_algorithm_;
+  std::unique_ptr<SendAlgorithmInterface> send_algorithm_;
+  std::unique_ptr<LossDetectionInterface> loss_algorithm_;
   bool n_connection_simulation_;
 
   // Receiver side buffer in bytes.
diff --git a/net/quic/quic_sent_packet_manager_test.cc b/net/quic/quic_sent_packet_manager_test.cc
index 5098261..7465e56 100644
--- a/net/quic/quic_sent_packet_manager_test.cc
+++ b/net/quic/quic_sent_packet_manager_test.cc
@@ -260,7 +260,7 @@
   MockClock clock_;
   QuicConnectionStats stats_;
   MockSendAlgorithm* send_algorithm_;
-  scoped_ptr<MockNetworkChangeVisitor> network_change_visitor_;
+  std::unique_ptr<MockNetworkChangeVisitor> network_change_visitor_;
   bool saved_FLAGS_quic_disable_pacing_;
 };
 
diff --git a/net/quic/quic_session.h b/net/quic/quic_session.h
index fd13d5ee..148b8f7 100644
--- a/net/quic/quic_session.h
+++ b/net/quic/quic_session.h
@@ -10,6 +10,7 @@
 #include <stddef.h>
 
 #include <map>
+#include <memory>
 #include <string>
 #include <unordered_map>
 #include <unordered_set>
@@ -17,7 +18,6 @@
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/ip_endpoint.h"
 #include "net/quic/quic_connection.h"
@@ -340,7 +340,7 @@
   std::map<QuicStreamId, QuicStreamOffset>
       locally_closed_streams_highest_offset_;
 
-  scoped_ptr<QuicConnection> connection_;
+  std::unique_ptr<QuicConnection> connection_;
 
   std::vector<ReliableQuicStream*> closed_streams_;
 
diff --git a/net/quic/quic_spdy_session.h b/net/quic/quic_spdy_session.h
index e63fc08..f3a164e 100644
--- a/net/quic/quic_spdy_session.h
+++ b/net/quic/quic_spdy_session.h
@@ -117,7 +117,7 @@
  private:
   friend class test::QuicSpdySessionPeer;
 
-  scoped_ptr<QuicHeadersStream> headers_stream_;
+  std::unique_ptr<QuicHeadersStream> headers_stream_;
 
   DISALLOW_COPY_AND_ASSIGN(QuicSpdySession);
 };
diff --git a/net/quic/quic_spdy_stream_test.cc b/net/quic/quic_spdy_stream_test.cc
index 3338175c..d01a2cd2 100644
--- a/net/quic/quic_spdy_stream_test.cc
+++ b/net/quic/quic_spdy_stream_test.cc
@@ -110,7 +110,7 @@
  protected:
   MockConnectionHelper helper_;
   MockConnection* connection_;
-  scoped_ptr<MockQuicSpdySession> session_;
+  std::unique_ptr<MockQuicSpdySession> session_;
 
   // Owned by the |session_|.
   TestStream* stream_;
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 8db6c69..ee04541e 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -10,6 +10,7 @@
 
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/sparse_histogram.h"
@@ -196,7 +197,7 @@
   bool server_and_origin_have_same_host_;
   bool is_post_;
   bool was_alternative_service_recently_broken_;
-  scoped_ptr<QuicServerInfo> server_info_;
+  std::unique_ptr<QuicServerInfo> server_info_;
   bool started_another_job_;
   const BoundNetLog net_log_;
   int num_sent_client_hellos_;
@@ -554,17 +555,17 @@
       QuicServerId(host_port_pair_, privacy_mode_));
 }
 
-scoped_ptr<QuicHttpStream> QuicStreamRequest::CreateStream() {
+std::unique_ptr<QuicHttpStream> QuicStreamRequest::CreateStream() {
   if (!session_)
     return nullptr;
-  return make_scoped_ptr(new QuicHttpStream(session_));
+  return base::WrapUnique(new QuicHttpStream(session_));
 }
 
-scoped_ptr<BidirectionalStreamImpl>
+std::unique_ptr<BidirectionalStreamImpl>
 QuicStreamRequest::CreateBidirectionalStreamImpl() {
   if (!session_)
     return nullptr;
-  return make_scoped_ptr(new BidirectionalStreamQuicImpl(session_));
+  return base::WrapUnique(new BidirectionalStreamQuicImpl(session_));
 }
 
 QuicStreamFactory::QuicStreamFactory(
@@ -843,7 +844,7 @@
   }
 
   bool server_and_origin_have_same_host = host_port_pair.host() == url.host();
-  scoped_ptr<Job> job(
+  std::unique_ptr<Job> job(
       new Job(this, host_resolver_, server_id, server_and_origin_have_same_host,
               WasQuicRecentlyBroken(server_id), cert_verify_flags,
               method == "POST" /* is_post */, quic_server_info, net_log));
@@ -971,9 +972,10 @@
   job_requests_map_.erase(server_id);
 }
 
-scoped_ptr<QuicHttpStream> QuicStreamFactory::CreateFromSession(
+std::unique_ptr<QuicHttpStream> QuicStreamFactory::CreateFromSession(
     QuicChromiumClientSession* session) {
-  return scoped_ptr<QuicHttpStream>(new QuicHttpStream(session->GetWeakPtr()));
+  return std::unique_ptr<QuicHttpStream>(
+      new QuicHttpStream(session->GetWeakPtr()));
 }
 
 QuicChromiumClientSession::QuicDisabledReason
@@ -1248,9 +1250,9 @@
   DCHECK(all_sessions_.empty());
 }
 
-scoped_ptr<base::Value> QuicStreamFactory::QuicStreamFactoryInfoToValue()
+std::unique_ptr<base::Value> QuicStreamFactory::QuicStreamFactoryInfoToValue()
     const {
-  scoped_ptr<base::ListValue> list(new base::ListValue());
+  std::unique_ptr<base::ListValue> list(new base::ListValue());
 
   for (SessionMap::const_iterator it = active_sessions_.begin();
        it != active_sessions_.end(); ++it) {
@@ -1395,7 +1397,7 @@
   // Use OS-specified port for socket (DEFAULT_BIND) instead of
   // using the PortSuggester since the connection is being migrated
   // and not being newly created.
-  scoped_ptr<DatagramClientSocket> socket(
+  std::unique_ptr<DatagramClientSocket> socket(
       client_socket_factory_->CreateDatagramClientSocket(
           DatagramSocket::DEFAULT_BIND, RandIntCallback(),
           session->net_log().net_log(), session->net_log().source()));
@@ -1406,10 +1408,11 @@
     HistogramMigrationStatus(MIGRATION_STATUS_INTERNAL_ERROR);
     return;
   }
-  scoped_ptr<QuicChromiumPacketReader> new_reader(new QuicChromiumPacketReader(
-      socket.get(), clock_.get(), session, yield_after_packets_,
-      yield_after_duration_, session->net_log()));
-  scoped_ptr<QuicPacketWriter> new_writer(
+  std::unique_ptr<QuicChromiumPacketReader> new_reader(
+      new QuicChromiumPacketReader(socket.get(), clock_.get(), session,
+                                   yield_after_packets_, yield_after_duration_,
+                                   session->net_log()));
+  std::unique_ptr<QuicPacketWriter> new_writer(
       new QuicChromiumPacketWriter(socket.get()));
 
   if (!session->MigrateToSocket(std::move(socket), std::move(new_reader),
@@ -1508,13 +1511,14 @@
   return OK;
 }
 
-int QuicStreamFactory::CreateSession(const QuicServerId& server_id,
-                                     int cert_verify_flags,
-                                     scoped_ptr<QuicServerInfo> server_info,
-                                     const AddressList& address_list,
-                                     base::TimeTicks dns_resolution_end_time,
-                                     const BoundNetLog& net_log,
-                                     QuicChromiumClientSession** session) {
+int QuicStreamFactory::CreateSession(
+    const QuicServerId& server_id,
+    int cert_verify_flags,
+    std::unique_ptr<QuicServerInfo> server_info,
+    const AddressList& address_list,
+    base::TimeTicks dns_resolution_end_time,
+    const BoundNetLog& net_log,
+    QuicChromiumClientSession** session) {
   TRACE_EVENT0("net", "QuicStreamFactory::CreateSession");
   IPEndPoint addr = *address_list.begin();
   bool enable_port_selection = enable_port_selection_;
@@ -1532,7 +1536,7 @@
                             :            // Use our callback.
           DatagramSocket::DEFAULT_BIND;  // Use OS to randomize.
 
-  scoped_ptr<DatagramClientSocket> socket(
+  std::unique_ptr<DatagramClientSocket> socket(
       client_socket_factory_->CreateDatagramClientSocket(
           bind_type, base::Bind(&PortSuggester::SuggestPort, port_suggester),
           net_log.net_log(), net_log.source()));
@@ -1588,7 +1592,7 @@
 
   // Use the factory to create a new socket performance watcher, and pass the
   // ownership to QuicChromiumClientSession.
-  scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher;
+  std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher;
   if (socket_performance_watcher_factory_) {
     socket_performance_watcher =
         socket_performance_watcher_factory_->CreateSocketPerformanceWatcher(
@@ -1657,7 +1661,7 @@
 
 void QuicStreamFactory::InitializeCachedStateInCryptoConfig(
     const QuicServerId& server_id,
-    const scoped_ptr<QuicServerInfo>& server_info,
+    const std::unique_ptr<QuicServerInfo>& server_info,
     QuicConnectionId* connection_id) {
   QuicCryptoClientConfig::CachedState* cached =
       crypto_config_.LookupOrCreate(server_id);
@@ -1712,7 +1716,7 @@
     return;
   // Create a temporary QuicServerInfo object to deserialize and to populate the
   // in-memory crypto server config cache in the MRU order.
-  scoped_ptr<QuicServerInfo> server_info;
+  std::unique_ptr<QuicServerInfo> server_info;
   CompletionCallback callback;
   // Get the list of servers to be deserialized first because WaitForDataReady
   // touches quic_server_info_map.
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
index c2dbfbcf8..c7f10d1 100644
--- a/net/quic/quic_stream_factory.h
+++ b/net/quic/quic_stream_factory.h
@@ -91,9 +91,9 @@
   // returns the amount of time waiting job should be delayed.
   base::TimeDelta GetTimeDelayForWaitingJob() const;
 
-  scoped_ptr<QuicHttpStream> CreateStream();
+  std::unique_ptr<QuicHttpStream> CreateStream();
 
-  scoped_ptr<BidirectionalStreamImpl> CreateBidirectionalStreamImpl();
+  std::unique_ptr<BidirectionalStreamImpl> CreateBidirectionalStreamImpl();
 
   // Sets |session_|.
   void SetSession(QuicChromiumClientSession* session);
@@ -229,7 +229,7 @@
   // Closes all current sessions with specified network and QUIC error codes.
   void CloseAllSessions(int error, QuicErrorCode quic_error);
 
-  scoped_ptr<base::Value> QuicStreamFactoryInfoToValue() const;
+  std::unique_ptr<base::Value> QuicStreamFactoryInfoToValue() const;
 
   // Delete all cached state objects in |crypto_config_|.
   void ClearCachedStatesInCryptoConfig();
@@ -358,7 +358,7 @@
                          const BoundNetLog& net_log);
 
   // Returns a newly created QuicHttpStream owned by the caller.
-  scoped_ptr<QuicHttpStream> CreateFromSession(
+  std::unique_ptr<QuicHttpStream> CreateFromSession(
       QuicChromiumClientSession* session);
 
   bool OnResolution(const QuicServerId& server_id,
@@ -368,7 +368,7 @@
   bool HasActiveJob(const QuicServerId& server_id) const;
   int CreateSession(const QuicServerId& server_id,
                     int cert_verify_flags,
-                    scoped_ptr<QuicServerInfo> quic_server_info,
+                    std::unique_ptr<QuicServerInfo> quic_server_info,
                     const AddressList& address_list,
                     base::TimeTicks dns_resolution_end_time,
                     const BoundNetLog& net_log,
@@ -393,7 +393,7 @@
   // if any, and otherwise leaves it unchanged.
   void InitializeCachedStateInCryptoConfig(
       const QuicServerId& server_id,
-      const scoped_ptr<QuicServerInfo>& server_info,
+      const std::unique_ptr<QuicServerInfo>& server_info,
       QuicConnectionId* connection_id);
 
   // Initialize |quic_supported_servers_at_startup_| with the list of servers
@@ -416,10 +416,10 @@
   base::WeakPtr<HttpServerProperties> http_server_properties_;
   TransportSecurityState* transport_security_state_;
   CTVerifier* cert_transparency_verifier_;
-  scoped_ptr<QuicServerInfoFactory> quic_server_info_factory_;
+  std::unique_ptr<QuicServerInfoFactory> quic_server_info_factory_;
   QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory_;
   QuicRandom* random_generator_;
-  scoped_ptr<QuicClock> clock_;
+  std::unique_ptr<QuicClock> clock_;
   const size_t max_packet_length_;
 
   // Factory which is used to create socket performance watcher. A new watcher
@@ -428,7 +428,7 @@
   SocketPerformanceWatcherFactory* socket_performance_watcher_factory_;
 
   // The helper used for all connections.
-  scoped_ptr<QuicChromiumConnectionHelper> helper_;
+  std::unique_ptr<QuicChromiumConnectionHelper> helper_;
 
   // Contains owning pointers to all sessions that currently exist.
   SessionIdMap all_sessions_;
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc
index e6fffab..794e40af21 100644
--- a/net/quic/quic_stream_factory_test.cc
+++ b/net/quic/quic_stream_factory_test.cc
@@ -187,9 +187,9 @@
   }
 
  private:
-  scoped_ptr<NetworkChangeNotifier::DisableForTest>
+  std::unique_ptr<NetworkChangeNotifier::DisableForTest>
       disable_network_change_notifier_for_tests_;
-  scoped_ptr<MockNetworkChangeNotifier> mock_network_change_notifier_;
+  std::unique_ptr<MockNetworkChangeNotifier> mock_network_change_notifier_;
 };
 
 class QuicStreamFactoryTest : public ::testing::TestWithParam<TestParams> {
@@ -280,7 +280,7 @@
                                                    host_port_pair);
   }
 
-  scoped_ptr<QuicHttpStream> CreateFromSession(
+  std::unique_ptr<QuicHttpStream> CreateFromSession(
       const HostPortPair& host_port_pair) {
     QuicChromiumClientSession* session =
         QuicStreamFactoryPeer::GetActiveSession(factory_.get(), host_port_pair);
@@ -313,7 +313,7 @@
                               callback_.callback()));
 
     EXPECT_EQ(OK, callback_.WaitForResult());
-    scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+    std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
     EXPECT_TRUE(stream.get());
     stream.reset();
 
@@ -337,12 +337,12 @@
     return socket_factory_.udp_client_socket_ports()[socket_count];
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructConnectionClosePacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructConnectionClosePacket(
       QuicPacketNumber num) {
     return maker_.MakeConnectionClosePacket(num);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructRstPacket() {
+  std::unique_ptr<QuicEncryptedPacket> ConstructRstPacket() {
     QuicStreamId stream_id = kClientDataStreamId1;
     return maker_.MakeRstPacket(
         1, true, stream_id,
@@ -366,7 +366,7 @@
     base::MessageLoop::current()->RunUntilIdle();
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructGetRequestPacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructGetRequestPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -380,7 +380,7 @@
         headers, &spdy_headers_frame_len);
   }
 
-  scoped_ptr<QuicEncryptedPacket> ConstructOkResponsePacket(
+  std::unique_ptr<QuicEncryptedPacket> ConstructOkResponsePacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -401,13 +401,13 @@
   scoped_refptr<TestTaskRunner> runner_;
   QuicTestPacketMaker maker_;
   HttpServerPropertiesImpl http_server_properties_;
-  scoped_ptr<CertVerifier> cert_verifier_;
-  scoped_ptr<ChannelIDService> channel_id_service_;
+  std::unique_ptr<CertVerifier> cert_verifier_;
+  std::unique_ptr<ChannelIDService> channel_id_service_;
   TransportSecurityState transport_security_state_;
-  scoped_ptr<CTVerifier> cert_transparency_verifier_;
-  scoped_ptr<ScopedMockNetworkChangeNotifier>
+  std::unique_ptr<CTVerifier> cert_transparency_verifier_;
+  std::unique_ptr<ScopedMockNetworkChangeNotifier>
       scoped_mock_network_change_notifier_;
-  scoped_ptr<QuicStreamFactory> factory_;
+  std::unique_ptr<QuicStreamFactory> factory_;
   HostPortPair host_port_pair_;
   GURL url_;
   GURL url2_;
@@ -461,7 +461,7 @@
                             callback_.callback()));
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Will reset stream 3.
@@ -501,7 +501,7 @@
                                 /*cert_verify_flags=*/0, url_, "GET", net_log_,
                                 callback_.callback()));
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
@@ -534,7 +534,7 @@
       QuicSession::HANDSHAKE_CONFIRMED);
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
@@ -567,7 +567,7 @@
       QuicSession::HANDSHAKE_CONFIRMED);
   EXPECT_EQ(OK, callback_.WaitForResult());
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
@@ -589,7 +589,7 @@
                             callback_.callback()));
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   QuicChromiumClientSession* session =
@@ -620,7 +620,7 @@
                             callback_.callback()));
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   QuicChromiumClientSession* session =
@@ -663,7 +663,7 @@
   EXPECT_EQ(OK, request.Request(host_port_pair_, privacy_mode_,
                                 /*cert_verify_flags=*/0, url_, "GET", net_log_,
                                 callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   TestCompletionCallback callback;
@@ -671,7 +671,7 @@
   EXPECT_EQ(OK, request2.Request(server2, privacy_mode_,
                                  /*cert_verify_flags=*/0, url2_, "GET",
                                  net_log_, callback.callback()));
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   EXPECT_EQ(
@@ -705,7 +705,7 @@
   EXPECT_EQ(OK, request.Request(host_port_pair_, privacy_mode_,
                                 /*cert_verify_flags=*/0, url_, "GET", net_log_,
                                 callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   TestCompletionCallback callback;
@@ -713,7 +713,7 @@
   EXPECT_EQ(OK, request2.Request(server2, privacy_mode_,
                                  /*cert_verify_flags=*/0, url2_, "GET",
                                  net_log_, callback.callback()));
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   EXPECT_NE(
@@ -748,7 +748,7 @@
   EXPECT_EQ(OK, request.Request(host_port_pair_, privacy_mode_,
                                 /*cert_verify_flags=*/0, url_, "GET", net_log_,
                                 callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   TestCompletionCallback callback;
@@ -756,7 +756,7 @@
   EXPECT_EQ(OK, request2.Request(server2, privacy_mode_,
                                  /*cert_verify_flags=*/0, url2_, "GET",
                                  net_log_, callback.callback()));
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   factory_->OnSessionGoingAway(
@@ -771,7 +771,7 @@
   EXPECT_EQ(OK, request3.Request(server2, privacy_mode_,
                                  /*cert_verify_flags=*/0, url2_, "GET",
                                  net_log_, callback3.callback()));
-  scoped_ptr<QuicHttpStream> stream3 = request3.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream3 = request3.CreateStream();
   EXPECT_TRUE(stream3.get());
 
   EXPECT_TRUE(QuicStreamFactoryPeer::HasActiveSession(factory_.get(), server2));
@@ -803,7 +803,7 @@
   EXPECT_EQ(OK, request.Request(server1, privacy_mode_,
                                 /*cert_verify_flags=*/0, url_, "GET", net_log_,
                                 callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   TestCompletionCallback callback;
@@ -811,7 +811,7 @@
   EXPECT_EQ(OK, request2.Request(server2, privacy_mode_,
                                  /*cert_verify_flags=*/0, url2_, "GET",
                                  net_log_, callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   EXPECT_EQ(QuicStreamFactoryPeer::GetActiveSession(factory_.get(), server1),
@@ -846,7 +846,7 @@
   EXPECT_EQ(OK, request.Request(server1, privacy_mode_,
                                 /*cert_verify_flags=*/0, url_, "GET", net_log_,
                                 callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   TestCompletionCallback callback;
@@ -854,7 +854,7 @@
   EXPECT_EQ(OK, request2.Request(server2, privacy_mode_,
                                  /*cert_verify_flags=*/0, url2_, "GET",
                                  net_log_, callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   EXPECT_NE(QuicStreamFactoryPeer::GetActiveSession(factory_.get(), server1),
@@ -899,7 +899,7 @@
     EXPECT_EQ(OK, request1.Request(alternative, privacy_mode_,
                                    /*cert_verify_flags=*/0, url_, "GET",
                                    net_log_, callback_.callback()));
-    scoped_ptr<QuicHttpStream> stream1 = request1.CreateStream();
+    std::unique_ptr<QuicHttpStream> stream1 = request1.CreateStream();
     EXPECT_TRUE(stream1.get());
 
     QuicStreamRequest request2(factory_.get());
@@ -912,7 +912,7 @@
       // SocketDataProvider is set up, the second request succeeding means that
       // it pooled to the session opened by the first one.
       EXPECT_EQ(OK, rv);
-      scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+      std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
       EXPECT_TRUE(stream2.get());
     } else {
       EXPECT_EQ(ERR_ALTERNATIVE_CERT_NOT_VALID_FOR_ORIGIN, rv);
@@ -963,7 +963,7 @@
   EXPECT_EQ(OK, request.Request(server1, privacy_mode_,
                                 /*cert_verify_flags=*/0, url_, "GET", net_log_,
                                 callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   TestCompletionCallback callback;
@@ -971,7 +971,7 @@
   EXPECT_EQ(OK, request2.Request(server2, privacy_mode_,
                                  /*cert_verify_flags=*/0, url2_, "GET",
                                  net_log_, callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   EXPECT_EQ(QuicStreamFactoryPeer::GetActiveSession(factory_.get(), server1),
@@ -1012,7 +1012,7 @@
   EXPECT_EQ(OK, request.Request(server1, privacy_mode_,
                                 /*cert_verify_flags=*/0, url_, "GET", net_log_,
                                 callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   TestCompletionCallback callback;
@@ -1020,7 +1020,7 @@
   EXPECT_EQ(OK, request2.Request(server2, privacy_mode_,
                                  /*cert_verify_flags=*/0, url2_, "GET",
                                  net_log_, callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   EXPECT_NE(QuicStreamFactoryPeer::GetActiveSession(factory_.get(), server1),
@@ -1066,7 +1066,7 @@
   EXPECT_EQ(OK, request.Request(server1, privacy_mode_,
                                 /*cert_verify_flags=*/0, url_, "GET", net_log_,
                                 callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   TestCompletionCallback callback;
@@ -1074,7 +1074,7 @@
   EXPECT_EQ(OK, request2.Request(server2, privacy_mode_,
                                  /*cert_verify_flags=*/0, url2_, "GET",
                                  net_log_, callback_.callback()));
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   EXPECT_NE(QuicStreamFactoryPeer::GetActiveSession(factory_.get(), server1),
@@ -1105,7 +1105,7 @@
                             callback_.callback()));
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Mark the session as going away.  Ensure that while it is still alive
@@ -1127,7 +1127,7 @@
                              /*cert_verify_flags=*/0, url_, "GET", net_log_,
                              callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   EXPECT_TRUE(
@@ -1152,12 +1152,12 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   QuicStreamId stream_id = kClientDataStreamId1;
-  scoped_ptr<QuicEncryptedPacket> client_rst(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(
       maker_.MakeRstPacket(1, true, stream_id, QUIC_STREAM_CANCELLED));
   MockWrite writes[] = {
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 0),
   };
-  scoped_ptr<QuicEncryptedPacket> server_rst(
+  std::unique_ptr<QuicEncryptedPacket> server_rst(
       maker_.MakeRstPacket(1, false, stream_id, QUIC_STREAM_CANCELLED));
   MockRead reads[] = {
       MockRead(ASYNC, server_rst->data(), server_rst->length(), 1),
@@ -1181,7 +1181,7 @@
     } else {
       EXPECT_EQ(OK, rv);
     }
-    scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+    std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
     EXPECT_TRUE(stream);
     EXPECT_EQ(OK, stream->InitializeStream(&request_info, DEFAULT_PRIORITY,
                                            net_log_, CompletionCallback()));
@@ -1192,7 +1192,7 @@
   EXPECT_EQ(OK, request.Request(host_port_pair_, privacy_mode_,
                                 /*cert_verify_flags=*/0, url_, "GET", net_log_,
                                 CompletionCallback()));
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream);
   EXPECT_EQ(ERR_IO_PENDING,
             stream->InitializeStream(&request_info, DEFAULT_PRIORITY, net_log_,
@@ -1271,7 +1271,7 @@
 
   base::RunLoop().RunUntilIdle();
 
-  scoped_ptr<QuicHttpStream> stream(CreateFromSession(host_port_pair_));
+  std::unique_ptr<QuicHttpStream> stream(CreateFromSession(host_port_pair_));
   EXPECT_TRUE(stream.get());
   stream.reset();
 
@@ -1321,7 +1321,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> rst(ConstructRstPacket());
+  std::unique_ptr<QuicEncryptedPacket> rst(ConstructRstPacket());
   std::vector<MockWrite> writes;
   writes.push_back(MockWrite(ASYNC, rst->data(), rst->length(), 1));
   SequencedSocketData socket_data(reads, arraysize(reads),
@@ -1340,7 +1340,7 @@
                             callback_.callback()));
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   HttpRequestInfo request_info;
   EXPECT_EQ(OK, stream->InitializeStream(&request_info, DEFAULT_PRIORITY,
                                          net_log_, CompletionCallback()));
@@ -1377,7 +1377,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> rst(ConstructRstPacket());
+  std::unique_ptr<QuicEncryptedPacket> rst(ConstructRstPacket());
   std::vector<MockWrite> writes;
   writes.push_back(MockWrite(ASYNC, rst->data(), rst->length(), 1));
   SequencedSocketData socket_data(reads, arraysize(reads),
@@ -1396,7 +1396,7 @@
                             callback_.callback()));
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   HttpRequestInfo request_info;
   EXPECT_EQ(OK, stream->InitializeStream(&request_info, DEFAULT_PRIORITY,
                                          net_log_, CompletionCallback()));
@@ -1434,7 +1434,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> request_packet(
+  std::unique_ptr<QuicEncryptedPacket> request_packet(
       ConstructGetRequestPacket(1, kClientDataStreamId1, true, true));
   MockWrite writes[] = {MockWrite(SYNCHRONOUS, request_packet->data(),
                                   request_packet->length(), 1)};
@@ -1449,7 +1449,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created.
@@ -1473,11 +1473,11 @@
 
   // Set up second socket data provider that is used after migration.
   // The response to the earlier request is read on this new socket.
-  scoped_ptr<QuicEncryptedPacket> ping(
+  std::unique_ptr<QuicEncryptedPacket> ping(
       maker_.MakePingPacket(2, /*include_version=*/true));
   MockWrite writes1[] = {
       MockWrite(SYNCHRONOUS, ping->data(), ping->length(), 0)};
-  scoped_ptr<QuicEncryptedPacket> response_headers_packet(
+  std::unique_ptr<QuicEncryptedPacket> response_headers_packet(
       ConstructOkResponsePacket(1, kClientDataStreamId1, false, false));
   MockRead reads1[] = {MockRead(ASYNC, response_headers_packet->data(),
                                 response_headers_packet->length(), 1),
@@ -1514,7 +1514,7 @@
                              /*cert_verify_flags=*/0, url_, "GET", net_log_,
                              callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   EXPECT_TRUE(
@@ -1549,7 +1549,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> request_packet(
+  std::unique_ptr<QuicEncryptedPacket> request_packet(
       ConstructGetRequestPacket(1, kClientDataStreamId1, true, true));
   MockWrite writes[] = {MockWrite(SYNCHRONOUS, request_packet->data(),
                                   request_packet->length(), 1)};
@@ -1564,7 +1564,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created.
@@ -1587,13 +1587,13 @@
                                     callback_.callback()));
 
   // Set up second socket data provider that is used after migration.
-  scoped_ptr<QuicEncryptedPacket> ping(
+  std::unique_ptr<QuicEncryptedPacket> ping(
       maker_.MakePingPacket(2, /*include_version=*/true));
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       3, true, kClientDataStreamId1, QUIC_STREAM_CANCELLED));
   MockWrite writes1[] = {
       MockWrite(SYNCHRONOUS, ping->data(), ping->length(), 0)};
-  scoped_ptr<QuicEncryptedPacket> response_packet(
+  std::unique_ptr<QuicEncryptedPacket> response_packet(
       ConstructOkResponsePacket(1, kClientDataStreamId1, false, false));
   MockRead reads1[] = {
       MockRead(ASYNC, response_packet->data(), response_packet->length(), 1),
@@ -1625,7 +1625,7 @@
                              /*cert_verify_flags=*/0, url_, "GET", net_log_,
                              callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   EXPECT_TRUE(
@@ -1650,7 +1650,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_STREAM_CANCELLED));
   MockWrite writes[] = {
       MockWrite(SYNCHRONOUS, client_rst->data(), client_rst->length(), 1),
@@ -1666,7 +1666,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created.
@@ -1704,7 +1704,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_RST_ACKNOWLEDGEMENT));
   MockWrite writes[] = {
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 1),
@@ -1720,7 +1720,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created.
@@ -1753,7 +1753,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_STREAM_CANCELLED));
   MockWrite writes[] = {
       MockWrite(SYNCHRONOUS, client_rst->data(), client_rst->length(), 1),
@@ -1769,7 +1769,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created.
@@ -1805,7 +1805,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_RST_ACKNOWLEDGEMENT));
   MockWrite writes[] = {
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 1),
@@ -1821,7 +1821,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created.
@@ -1856,7 +1856,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_STREAM_CANCELLED));
   MockWrite writes[] = {
       MockWrite(SYNCHRONOUS, client_rst->data(), client_rst->length(), 1),
@@ -1872,7 +1872,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created, but marked as non-migratable.
@@ -1910,7 +1910,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_STREAM_CANCELLED));
   MockWrite writes[] = {
       MockWrite(SYNCHRONOUS, client_rst->data(), client_rst->length(), 1),
@@ -1926,7 +1926,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created.
@@ -1966,7 +1966,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_RST_ACKNOWLEDGEMENT));
   MockWrite writes[] = {
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 1),
@@ -1982,7 +1982,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created, but marked as non-migratable.
@@ -2018,7 +2018,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_RST_ACKNOWLEDGEMENT));
   MockWrite writes[] = {
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 1),
@@ -2034,7 +2034,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created.
@@ -2082,7 +2082,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Ensure that session is alive and active.
@@ -2120,7 +2120,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Ensure that session is alive and active.
@@ -2149,7 +2149,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> request_packet(
+  std::unique_ptr<QuicEncryptedPacket> request_packet(
       ConstructGetRequestPacket(1, kClientDataStreamId1, true, true));
   MockWrite writes[] = {MockWrite(SYNCHRONOUS, request_packet->data(),
                                   request_packet->length(), 1)};
@@ -2164,7 +2164,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created.
@@ -2188,11 +2188,11 @@
 
   // Set up second socket data provider that is used after migration.
   // The response to the earlier request is read on this new socket.
-  scoped_ptr<QuicEncryptedPacket> ping(
+  std::unique_ptr<QuicEncryptedPacket> ping(
       maker_.MakePingPacket(2, /*include_version=*/true));
   MockWrite writes1[] = {
       MockWrite(SYNCHRONOUS, ping->data(), ping->length(), 0)};
-  scoped_ptr<QuicEncryptedPacket> response_headers_packet(
+  std::unique_ptr<QuicEncryptedPacket> response_headers_packet(
       ConstructOkResponsePacket(1, kClientDataStreamId1, false, false));
   MockRead reads1[] = {MockRead(ASYNC, response_headers_packet->data(),
                                 response_headers_packet->length(), 1),
@@ -2232,7 +2232,7 @@
                              /*cert_verify_flags=*/0, url_, "GET", net_log_,
                              callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   EXPECT_TRUE(
@@ -2271,7 +2271,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_STREAM_CANCELLED));
   MockWrite writes[] = {
       MockWrite(SYNCHRONOUS, client_rst->data(), client_rst->length(), 1),
@@ -2287,7 +2287,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created.
@@ -2327,7 +2327,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_STREAM_CANCELLED));
   MockWrite writes[] = {
       MockWrite(SYNCHRONOUS, client_rst->data(), client_rst->length(), 1),
@@ -2343,7 +2343,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created, but marked as non-migratable.
@@ -2383,7 +2383,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kClientDataStreamId1, QUIC_STREAM_CANCELLED));
   MockWrite writes[] = {
       MockWrite(SYNCHRONOUS, client_rst->data(), client_rst->length(), 1),
@@ -2399,7 +2399,7 @@
                             /*cert_verify_flags=*/0, url_, "GET", net_log_,
                             callback_.callback()));
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   // Cause QUIC stream to be created.
@@ -2442,7 +2442,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> rst(ConstructRstPacket());
+  std::unique_ptr<QuicEncryptedPacket> rst(ConstructRstPacket());
   std::vector<MockWrite> writes;
   writes.push_back(MockWrite(ASYNC, rst->data(), rst->length(), 1));
   SequencedSocketData socket_data(reads, arraysize(reads),
@@ -2461,7 +2461,7 @@
                             callback_.callback()));
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   HttpRequestInfo request_info;
   EXPECT_EQ(OK, stream->InitializeStream(&request_info, DEFAULT_PRIORITY,
                                          net_log_, CompletionCallback()));
@@ -2497,7 +2497,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> rst(ConstructRstPacket());
+  std::unique_ptr<QuicEncryptedPacket> rst(ConstructRstPacket());
   std::vector<MockWrite> writes;
   writes.push_back(MockWrite(ASYNC, rst->data(), rst->length(), 1));
   SequencedSocketData socket_data(reads, arraysize(reads),
@@ -2516,7 +2516,7 @@
                             callback_.callback()));
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   HttpRequestInfo request_info;
   EXPECT_EQ(OK, stream->InitializeStream(&request_info, DEFAULT_PRIORITY,
                                          net_log_, CompletionCallback()));
@@ -2553,7 +2553,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  scoped_ptr<QuicEncryptedPacket> rst(ConstructRstPacket());
+  std::unique_ptr<QuicEncryptedPacket> rst(ConstructRstPacket());
   std::vector<MockWrite> writes;
   writes.push_back(MockWrite(ASYNC, rst->data(), rst->length(), 1));
   SequencedSocketData socket_data(reads, arraysize(reads),
@@ -2572,7 +2572,7 @@
                             callback_.callback()));
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   HttpRequestInfo request_info;
   EXPECT_EQ(OK, stream->InitializeStream(&request_info, DEFAULT_PRIORITY,
                                          net_log_, CompletionCallback()));
@@ -2720,7 +2720,7 @@
 
   runner_->RunNextTask();
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
@@ -2755,7 +2755,7 @@
   // the CancelWaitForDataReady task hasn't been posted.
   ASSERT_EQ(0u, runner_->GetPostedTasks().size());
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
@@ -2916,13 +2916,13 @@
       QuicStreamFactoryPeer::HasActiveSession(factory_.get(), server4));
   EXPECT_FALSE(HasActiveSession(server4));
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
-  scoped_ptr<QuicHttpStream> stream3 = request3.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream3 = request3.CreateStream();
   EXPECT_TRUE(stream3.get());
-  scoped_ptr<QuicHttpStream> stream4 = request4.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream4 = request4.CreateStream();
   EXPECT_TRUE(stream4.get());
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
@@ -3009,9 +3009,9 @@
       QuicChromiumClientSession::QUIC_DISABLED_PUBLIC_RESET_POST_HANDSHAKE,
       factory_->QuicDisabledReason(host_port_pair_.port()));
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_FALSE(stream.get());  // Session is already closed.
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_FALSE(stream2.get());  // Session is already closed.
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
@@ -3057,7 +3057,7 @@
   QuicChromiumClientSession* session =
       QuicStreamFactoryPeer::GetActiveSession(factory_.get(), host_port_pair_);
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
   HttpRequestInfo request_info;
   EXPECT_EQ(OK, stream->InitializeStream(&request_info, DEFAULT_PRIORITY,
@@ -3087,7 +3087,7 @@
   QuicChromiumClientSession* session2 =
       QuicStreamFactoryPeer::GetActiveSession(factory_.get(), server2);
 
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
   EXPECT_EQ(OK, stream2->InitializeStream(&request_info, DEFAULT_PRIORITY,
                                           net_log_, CompletionCallback()));
@@ -3219,11 +3219,11 @@
       QuicChromiumClientSession::QUIC_DISABLED_PUBLIC_RESET_POST_HANDSHAKE,
       factory_->QuicDisabledReason(host_port_pair_.port()));
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_FALSE(stream.get());  // Session is already closed.
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_FALSE(stream2.get());  // Session is already closed.
-  scoped_ptr<QuicHttpStream> stream3 = request3.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream3 = request3.CreateStream();
   EXPECT_FALSE(stream3.get());  // Session is already closed.
 
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
@@ -3280,7 +3280,7 @@
   QuicChromiumClientSession* session =
       QuicStreamFactoryPeer::GetActiveSession(factory_.get(), host_port_pair_);
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
   HttpRequestInfo request_info;
   EXPECT_EQ(OK, stream->InitializeStream(&request_info, DEFAULT_PRIORITY,
@@ -3332,7 +3332,7 @@
   QuicChromiumClientSession* session3 =
       QuicStreamFactoryPeer::GetActiveSession(factory_.get(), server3);
 
-  scoped_ptr<QuicHttpStream> stream3 = request3.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream3 = request3.CreateStream();
   EXPECT_TRUE(stream3.get());
   EXPECT_EQ(OK, stream3->InitializeStream(&request_info, DEFAULT_PRIORITY,
                                           net_log_, CompletionCallback()));
@@ -3349,7 +3349,7 @@
   EXPECT_EQ(QuicChromiumClientSession::QUIC_DISABLED_TIMEOUT_WITH_OPEN_STREAMS,
             factory_->QuicDisabledReason(host_port_pair_.port()));
 
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_FALSE(stream2.get());  // Session is already closed.
 
   // Verify that QUIC is un-disabled after a network change.
@@ -3399,7 +3399,7 @@
   QuicChromiumClientSession* session =
       QuicStreamFactoryPeer::GetActiveSession(factory_.get(), host_port_pair_);
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
   HttpRequestInfo request_info;
   EXPECT_EQ(OK, stream->InitializeStream(&request_info, DEFAULT_PRIORITY,
@@ -3561,13 +3561,13 @@
   EXPECT_FALSE(QuicStreamFactoryPeer::IsQuicDisabled(factory_.get(),
                                                      host_port_pair_.port()));
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_FALSE(stream.get());  // Session is already closed.
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_FALSE(stream2.get());  // Session is already closed.
-  scoped_ptr<QuicHttpStream> stream3 = request3.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream3 = request3.CreateStream();
   EXPECT_FALSE(stream3.get());  // Session is already closed.
-  scoped_ptr<QuicHttpStream> stream4 = request4.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream4 = request4.CreateStream();
   EXPECT_FALSE(stream4.get());  // Session is already closed.
 
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
@@ -3632,7 +3632,7 @@
   QuicChromiumClientSession* session =
       QuicStreamFactoryPeer::GetActiveSession(factory_.get(), host_port_pair_);
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
   HttpRequestInfo request_info;
   EXPECT_EQ(OK, stream->InitializeStream(&request_info, DEFAULT_PRIORITY,
@@ -3702,7 +3702,7 @@
   QuicChromiumClientSession* session4 =
       QuicStreamFactoryPeer::GetActiveSession(factory_.get(), server4);
 
-  scoped_ptr<QuicHttpStream> stream4 = request4.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream4 = request4.CreateStream();
   EXPECT_TRUE(stream4.get());
   EXPECT_EQ(OK, stream4->InitializeStream(&request_info, DEFAULT_PRIORITY,
                                           net_log_, CompletionCallback()));
@@ -3717,9 +3717,9 @@
   EXPECT_FALSE(QuicStreamFactoryPeer::IsQuicDisabled(factory_.get(),
                                                      host_port_pair_.port()));
 
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_FALSE(stream2.get());  // Session is already closed.
-  scoped_ptr<QuicHttpStream> stream3 = request3.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream3 = request3.CreateStream();
   EXPECT_FALSE(stream3.get());  // Session is already closed.
 
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
@@ -3775,7 +3775,7 @@
 
   EXPECT_EQ(OK, callback_.WaitForResult());
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
@@ -3821,7 +3821,7 @@
           http_server_properties_.GetWeakPtr());
   factory_->set_quic_server_info_factory(quic_server_info_factory);
 
-  scoped_ptr<QuicServerInfo> quic_server_info(
+  std::unique_ptr<QuicServerInfo> quic_server_info(
       quic_server_info_factory->GetForServer(quic_server_id));
 
   // Update quic_server_info's server_config and persist it.
@@ -3859,7 +3859,7 @@
   quic_server_info->Persist();
 
   QuicServerId quic_server_id2(kServer2HostName, 80, PRIVACY_MODE_DISABLED);
-  scoped_ptr<QuicServerInfo> quic_server_info2(
+  std::unique_ptr<QuicServerInfo> quic_server_info2(
       quic_server_info_factory->GetForServer(quic_server_id2));
 
   // Update quic_server_info2's server_config and persist it.
@@ -3966,7 +3966,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
   QuicStreamFactoryPeer::SetYieldAfterPackets(factory_.get(), 0);
 
-  scoped_ptr<QuicEncryptedPacket> close_packet(
+  std::unique_ptr<QuicEncryptedPacket> close_packet(
       ConstructConnectionClosePacket(0));
   vector<MockRead> reads;
   reads.push_back(
@@ -4002,7 +4002,7 @@
   // yielded the read.
   EXPECT_EQ(1u, observer.executed_count());
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_FALSE(stream.get());  // Session is already closed.
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
@@ -4015,7 +4015,7 @@
   QuicStreamFactoryPeer::SetYieldAfterDuration(
       factory_.get(), QuicTime::Delta::FromMilliseconds(-1));
 
-  scoped_ptr<QuicEncryptedPacket> close_packet(
+  std::unique_ptr<QuicEncryptedPacket> close_packet(
       ConstructConnectionClosePacket(0));
   vector<MockRead> reads;
   reads.push_back(
@@ -4051,7 +4051,7 @@
   // yielded the read.
   EXPECT_EQ(1u, observer.executed_count());
 
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_FALSE(stream.get());  // Session is already closed.
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
@@ -4073,7 +4073,7 @@
                             callback_.callback()));
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   EXPECT_EQ(0, QuicStreamFactoryPeer::GetNumPushStreamsCreated(factory_.get()));
@@ -4103,7 +4103,7 @@
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
 
-  scoped_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
+  std::unique_ptr<QuicEncryptedPacket> client_rst(maker_.MakeRstPacket(
       1, true, kServerDataStreamId1, QUIC_STREAM_CANCELLED));
   MockWrite writes[] = {
       MockWrite(SYNCHRONOUS, client_rst->data(), client_rst->length(), 1),
@@ -4123,7 +4123,7 @@
                             callback_.callback()));
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream = request.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream = request.CreateStream();
   EXPECT_TRUE(stream.get());
 
   EXPECT_EQ(0, QuicStreamFactoryPeer::GetNumPushStreamsCreated(factory_.get()));
@@ -4152,7 +4152,7 @@
   EXPECT_EQ(index->GetPromised(url), nullptr);
 
   EXPECT_EQ(OK, callback_.WaitForResult());
-  scoped_ptr<QuicHttpStream> stream2 = request2.CreateStream();
+  std::unique_ptr<QuicHttpStream> stream2 = request2.CreateStream();
   EXPECT_TRUE(stream2.get());
 
   EXPECT_TRUE(socket_data1.AllReadDataConsumed());
diff --git a/net/quic/quic_stream_sequencer_test.cc b/net/quic/quic_stream_sequencer_test.cc
index b66bf1d..ed55119 100644
--- a/net/quic/quic_stream_sequencer_test.cc
+++ b/net/quic/quic_stream_sequencer_test.cc
@@ -150,7 +150,7 @@
   MockClock clock_;
   MockQuicSpdySession session_;
   testing::StrictMock<MockStream> stream_;
-  scoped_ptr<QuicStreamSequencer> sequencer_;
+  std::unique_ptr<QuicStreamSequencer> sequencer_;
 };
 
 // TODO(rch): reorder these tests so they build on each other.
diff --git a/net/quic/reliable_quic_stream_test.cc b/net/quic/reliable_quic_stream_test.cc
index 58a99d38..a4bd67d8 100644
--- a/net/quic/reliable_quic_stream_test.cc
+++ b/net/quic/reliable_quic_stream_test.cc
@@ -149,7 +149,7 @@
  protected:
   MockConnectionHelper helper_;
   MockConnection* connection_;
-  scoped_ptr<MockQuicSpdySession> session_;
+  std::unique_ptr<MockQuicSpdySession> session_;
   TestStream* stream_;
   SpdyHeaderBlock headers_;
   QuicWriteBlockedList* write_blocked_list_;
diff --git a/net/quic/spdy_utils.cc b/net/quic/spdy_utils.cc
index 68dadb57..7343ccea 100644
--- a/net/quic/spdy_utils.cc
+++ b/net/quic/spdy_utils.cc
@@ -4,9 +4,9 @@
 
 #include "net/quic/spdy_utils.h"
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_split.h"
diff --git a/net/quic/test_tools/crypto_test_utils.cc b/net/quic/test_tools/crypto_test_utils.cc
index 67092d8..fc13ff35 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -84,7 +84,7 @@
 
   // ChannelIDSource implementation.
   QuicAsyncStatus GetChannelIDKey(const string& hostname,
-                                  scoped_ptr<ChannelIDKey>* channel_id_key,
+                                  std::unique_ptr<ChannelIDKey>* channel_id_key,
                                   ChannelIDSourceCallback* callback) override {
     // Synchronous mode.
     if (!callback) {
@@ -110,9 +110,9 @@
   }
 
  private:
-  scoped_ptr<ChannelIDSource> sync_source_;
-  scoped_ptr<ChannelIDSourceCallback> callback_;
-  scoped_ptr<ChannelIDKey> channel_id_key_;
+  std::unique_ptr<ChannelIDSource> sync_source_;
+  std::unique_ptr<ChannelIDSourceCallback> callback_;
+  std::unique_ptr<ChannelIDKey> channel_id_key_;
 };
 
 }  // anonymous namespace
@@ -197,7 +197,7 @@
   CompareClientAndServerKeys(client_session.GetCryptoStream(), server);
 
   if (options.channel_id_enabled) {
-    scoped_ptr<ChannelIDKey> channel_id_key;
+    std::unique_ptr<ChannelIDKey> channel_id_key;
     QuicAsyncStatus status = crypto_config.channel_id_source()->GetChannelIDKey(
         server_id.host(), &channel_id_key, nullptr);
     EXPECT_EQ(QUIC_SUCCESS, status);
@@ -221,7 +221,7 @@
   QuicCryptoServerConfig::ConfigOptions options;
   options.channel_id_enabled = true;
   options.token_binding_enabled = fake_options.token_binding_enabled;
-  scoped_ptr<CryptoHandshakeMessage> scfg(
+  std::unique_ptr<CryptoHandshakeMessage> scfg(
       crypto_config->AddDefaultConfig(rand, clock, options));
 }
 
@@ -575,7 +575,7 @@
       len--;
 
       CHECK_EQ(0u, len % 2);
-      scoped_ptr<uint8_t[]> buf(new uint8_t[len / 2]);
+      std::unique_ptr<uint8_t[]> buf(new uint8_t[len / 2]);
 
       for (size_t i = 0; i < len / 2; i++) {
         uint8_t v = 0;
@@ -595,8 +595,8 @@
 
   // The CryptoHandshakeMessage needs to be serialized and parsed to ensure
   // that any padding is included.
-  scoped_ptr<QuicData> bytes(CryptoFramer::ConstructHandshakeMessage(msg));
-  scoped_ptr<CryptoHandshakeMessage> parsed(
+  std::unique_ptr<QuicData> bytes(CryptoFramer::ConstructHandshakeMessage(msg));
+  std::unique_ptr<CryptoHandshakeMessage> parsed(
       CryptoFramer::ParseMessage(bytes->AsStringPiece()));
   CHECK(parsed.get());
 
diff --git a/net/quic/test_tools/crypto_test_utils_chromium.cc b/net/quic/test_tools/crypto_test_utils_chromium.cc
index 3932f31..d78df969 100644
--- a/net/quic/test_tools/crypto_test_utils_chromium.cc
+++ b/net/quic/test_tools/crypto_test_utils_chromium.cc
@@ -2,15 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "net/quic/test_tools/crypto_test_utils.h"
-
+#include <memory>
 #include <utility>
 
 #include "base/callback_helpers.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "base/strings/stringprintf.h"
 #include "net/base/net_errors.h"
@@ -30,6 +29,7 @@
 #include "net/quic/crypto/crypto_utils.h"
 #include "net/quic/crypto/proof_source_chromium.h"
 #include "net/quic/crypto/proof_verifier_chromium.h"
+#include "net/quic/test_tools/crypto_test_utils.h"
 #include "net/ssl/ssl_config_service.h"
 #include "net/test/cert_test_util.h"
 
@@ -47,9 +47,9 @@
 class TestProofVerifierChromium : public ProofVerifierChromium {
  public:
   TestProofVerifierChromium(
-      scoped_ptr<CertVerifier> cert_verifier,
-      scoped_ptr<TransportSecurityState> transport_security_state,
-      scoped_ptr<CTVerifier> cert_transparency_verifier,
+      std::unique_ptr<CertVerifier> cert_verifier,
+      std::unique_ptr<TransportSecurityState> transport_security_state,
+      std::unique_ptr<CTVerifier> cert_transparency_verifier,
       const std::string& cert_file)
       : ProofVerifierChromium(cert_verifier.get(),
                               nullptr,
@@ -70,9 +70,9 @@
 
  private:
   ScopedTestRoot scoped_root_;
-  scoped_ptr<CertVerifier> cert_verifier_;
-  scoped_ptr<TransportSecurityState> transport_security_state_;
-  scoped_ptr<CTVerifier> cert_transparency_verifier_;
+  std::unique_ptr<CertVerifier> cert_verifier_;
+  std::unique_ptr<TransportSecurityState> transport_security_state_;
+  std::unique_ptr<CTVerifier> cert_transparency_verifier_;
 };
 
 const char kSignature[] = "signature";
@@ -138,10 +138,11 @@
 
 class FakeProofVerifier : public TestProofVerifierChromium {
  public:
-  FakeProofVerifier(scoped_ptr<CertVerifier> cert_verifier,
-                    scoped_ptr<TransportSecurityState> transport_security_state,
-                    scoped_ptr<CTVerifier> cert_transparency_verifier,
-                    const std::string& cert_file)
+  FakeProofVerifier(
+      std::unique_ptr<CertVerifier> cert_verifier,
+      std::unique_ptr<TransportSecurityState> transport_security_state,
+      std::unique_ptr<CTVerifier> cert_transparency_verifier,
+      const std::string& cert_file)
       : TestProofVerifierChromium(std::move(cert_verifier),
                                   std::move(transport_security_state),
                                   std::move(cert_transparency_verifier),
@@ -149,20 +150,21 @@
   ~FakeProofVerifier() override {}
 
   // ProofVerifier interface
-  QuicAsyncStatus VerifyProof(const std::string& hostname,
-                              const uint16_t port,
-                              const std::string& server_config,
-                              QuicVersion quic_version,
-                              StringPiece chlo_hash,
-                              const std::vector<std::string>& certs,
-                              const std::string& cert_sct,
-                              const std::string& signature,
-                              const ProofVerifyContext* verify_context,
-                              std::string* error_details,
-                              scoped_ptr<ProofVerifyDetails>* verify_details,
-                              ProofVerifierCallback* callback) override {
+  QuicAsyncStatus VerifyProof(
+      const std::string& hostname,
+      const uint16_t port,
+      const std::string& server_config,
+      QuicVersion quic_version,
+      StringPiece chlo_hash,
+      const std::vector<std::string>& certs,
+      const std::string& cert_sct,
+      const std::string& signature,
+      const ProofVerifyContext* verify_context,
+      std::string* error_details,
+      std::unique_ptr<ProofVerifyDetails>* verify_details,
+      ProofVerifierCallback* callback) override {
     error_details->clear();
-    scoped_ptr<ProofVerifyDetailsChromium> verify_details_chromium(
+    std::unique_ptr<ProofVerifyDetailsChromium> verify_details_chromium(
         new ProofVerifyDetailsChromium);
     DCHECK(!certs.empty());
     // Convert certs to X509Certificate.
@@ -183,7 +185,7 @@
 
     const ProofVerifyContextChromium* chromium_context =
         reinterpret_cast<const ProofVerifyContextChromium*>(verify_context);
-    scoped_ptr<CertVerifier::Request> cert_verifier_request_;
+    std::unique_ptr<CertVerifier::Request> cert_verifier_request_;
     TestCompletionCallback test_callback;
     int result = cert_verifier()->Verify(
         x509_cert.get(), hostname, std::string(),
@@ -235,7 +237,7 @@
 // static
 ProofVerifier* ProofVerifierForTestingInternal(bool use_real_proof_verifier) {
   // TODO(rch): use a real cert verifier?
-  scoped_ptr<MockCertVerifier> cert_verifier(new MockCertVerifier());
+  std::unique_ptr<MockCertVerifier> cert_verifier(new MockCertVerifier());
   net::CertVerifyResult verify_result;
   verify_result.verified_cert =
       ImportCertFromFile(GetTestCertsDirectory(), "quic_test.example.com.crt");
@@ -247,17 +249,17 @@
                                          "test.example.com", verify_result, OK);
   if (use_real_proof_verifier) {
     return new TestProofVerifierChromium(
-        std::move(cert_verifier), make_scoped_ptr(new TransportSecurityState),
-        make_scoped_ptr(new MultiLogCTVerifier), "quic_root.crt");
+        std::move(cert_verifier), base::WrapUnique(new TransportSecurityState),
+        base::WrapUnique(new MultiLogCTVerifier), "quic_root.crt");
   }
 #if defined(USE_OPENSSL)
   return new TestProofVerifierChromium(
-      std::move(cert_verifier), make_scoped_ptr(new TransportSecurityState),
-      make_scoped_ptr(new MultiLogCTVerifier), "quic_root.crt");
+      std::move(cert_verifier), base::WrapUnique(new TransportSecurityState),
+      base::WrapUnique(new MultiLogCTVerifier), "quic_root.crt");
 #else
   return new FakeProofVerifier(
-      std::move(cert_verifier), make_scoped_ptr(new TransportSecurityState),
-      make_scoped_ptr(new MultiLogCTVerifier), "quic_root.crt");
+      std::move(cert_verifier), base::WrapUnique(new TransportSecurityState),
+      base::WrapUnique(new MultiLogCTVerifier), "quic_root.crt");
 #endif
 }
 
diff --git a/net/quic/test_tools/crypto_test_utils_nss.cc b/net/quic/test_tools/crypto_test_utils_nss.cc
index 946b0531..c34dc01 100644
--- a/net/quic/test_tools/crypto_test_utils_nss.cc
+++ b/net/quic/test_tools/crypto_test_utils_nss.cc
@@ -2,14 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "net/quic/test_tools/crypto_test_utils.h"
-
+#include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
 #include "crypto/ec_private_key.h"
 #include "crypto/ec_signature_creator.h"
 #include "net/quic/crypto/channel_id.h"
 #include "net/quic/crypto/channel_id_chromium.h"
+#include "net/quic/test_tools/crypto_test_utils.h"
 
 using base::StringPiece;
 using std::string;
@@ -26,7 +26,7 @@
 
   QuicAsyncStatus GetChannelIDKey(
       const string& hostname,
-      scoped_ptr<ChannelIDKey>* channel_id_key,
+      std::unique_ptr<ChannelIDKey>* channel_id_key,
       ChannelIDSourceCallback* /*callback*/) override {
     channel_id_key->reset(new ChannelIDKeyChromium(HostnameToKey(hostname)));
     return QUIC_SUCCESS;
@@ -35,10 +35,10 @@
  private:
   typedef std::map<string, crypto::ECPrivateKey*> HostnameToKeyMap;
 
-  scoped_ptr<crypto::ECPrivateKey> HostnameToKey(const string& hostname) {
+  std::unique_ptr<crypto::ECPrivateKey> HostnameToKey(const string& hostname) {
     HostnameToKeyMap::const_iterator it = hostname_to_key_.find(hostname);
     if (it != hostname_to_key_.end()) {
-      return make_scoped_ptr(it->second->Copy());
+      return base::WrapUnique(it->second->Copy());
     }
 
     crypto::ECPrivateKey* keypair = crypto::ECPrivateKey::Create();
@@ -46,7 +46,7 @@
       return nullptr;
     }
     hostname_to_key_[hostname] = keypair;
-    return make_scoped_ptr(keypair->Copy());
+    return base::WrapUnique(keypair->Copy());
   }
 
   HostnameToKeyMap hostname_to_key_;
diff --git a/net/quic/test_tools/crypto_test_utils_openssl.cc b/net/quic/test_tools/crypto_test_utils_openssl.cc
index 80228ee..2c39122 100644
--- a/net/quic/test_tools/crypto_test_utils_openssl.cc
+++ b/net/quic/test_tools/crypto_test_utils_openssl.cc
@@ -49,7 +49,7 @@
       return false;
     }
 
-    scoped_ptr<uint8_t[]> der_sig(new uint8_t[sig_len]);
+    std::unique_ptr<uint8_t[]> der_sig(new uint8_t[sig_len]);
     if (!EVP_DigestSignFinal(md_ctx.get(), der_sig.get(), &sig_len)) {
       return false;
     }
@@ -63,7 +63,7 @@
 
     // The signature consists of a pair of 32-byte numbers.
     static const size_t kSignatureLength = 32 * 2;
-    scoped_ptr<uint8_t[]> signature(new uint8_t[kSignatureLength]);
+    std::unique_ptr<uint8_t[]> signature(new uint8_t[kSignatureLength]);
     if (!BN_bn2bin_padded(&signature[0], 32, sig->r) ||
         !BN_bn2bin_padded(&signature[32], 32, sig->s)) {
       return false;
@@ -105,7 +105,7 @@
 
   QuicAsyncStatus GetChannelIDKey(
       const string& hostname,
-      scoped_ptr<ChannelIDKey>* channel_id_key,
+      std::unique_ptr<ChannelIDKey>* channel_id_key,
       ChannelIDSourceCallback* /*callback*/) override {
     channel_id_key->reset(new TestChannelIDKey(HostnameToKey(hostname)));
     return QUIC_SUCCESS;
diff --git a/net/quic/test_tools/mock_crypto_client_stream_factory.cc b/net/quic/test_tools/mock_crypto_client_stream_factory.cc
index 52501788b..eb35bfd0 100644
--- a/net/quic/test_tools/mock_crypto_client_stream_factory.cc
+++ b/net/quic/test_tools/mock_crypto_client_stream_factory.cc
@@ -23,7 +23,7 @@
 MockCryptoClientStreamFactory::CreateQuicCryptoClientStream(
     const QuicServerId& server_id,
     QuicChromiumClientSession* session,
-    scoped_ptr<ProofVerifyContext> /*proof_verify_context*/,
+    std::unique_ptr<ProofVerifyContext> /*proof_verify_context*/,
     QuicCryptoClientConfig* crypto_config) {
   const ProofVerifyDetailsChromium* proof_verify_details = nullptr;
   if (!proof_verify_details_queue_.empty()) {
diff --git a/net/quic/test_tools/mock_crypto_client_stream_factory.h b/net/quic/test_tools/mock_crypto_client_stream_factory.h
index 1a12a39..db64c3a 100644
--- a/net/quic/test_tools/mock_crypto_client_stream_factory.h
+++ b/net/quic/test_tools/mock_crypto_client_stream_factory.h
@@ -26,7 +26,7 @@
   QuicCryptoClientStream* CreateQuicCryptoClientStream(
       const QuicServerId& server_id,
       QuicChromiumClientSession* session,
-      scoped_ptr<ProofVerifyContext> proof_verify_context,
+      std::unique_ptr<ProofVerifyContext> proof_verify_context,
       QuicCryptoClientConfig* crypto_config) override;
 
   void set_handshake_mode(
diff --git a/net/quic/test_tools/quic_stream_factory_peer.cc b/net/quic/test_tools/quic_stream_factory_peer.cc
index bcb7ba7..0d58f20a 100644
--- a/net/quic/test_tools/quic_stream_factory_peer.cc
+++ b/net/quic/test_tools/quic_stream_factory_peer.cc
@@ -40,7 +40,7 @@
   return factory->active_sessions_[server_id];
 }
 
-scoped_ptr<QuicHttpStream> QuicStreamFactoryPeer::CreateFromSession(
+std::unique_ptr<QuicHttpStream> QuicStreamFactoryPeer::CreateFromSession(
     QuicStreamFactory* factory,
     QuicChromiumClientSession* session) {
   return factory->CreateFromSession(session);
diff --git a/net/quic/test_tools/quic_stream_factory_peer.h b/net/quic/test_tools/quic_stream_factory_peer.h
index c2d2993..e0d85a3 100644
--- a/net/quic/test_tools/quic_stream_factory_peer.h
+++ b/net/quic/test_tools/quic_stream_factory_peer.h
@@ -40,7 +40,7 @@
       QuicStreamFactory* factory,
       const HostPortPair& host_port_pair);
 
-  static scoped_ptr<QuicHttpStream> CreateFromSession(
+  static std::unique_ptr<QuicHttpStream> CreateFromSession(
       QuicStreamFactory* factory,
       QuicChromiumClientSession* session);
 
diff --git a/net/quic/test_tools/quic_test_packet_maker.cc b/net/quic/test_tools/quic_test_packet_maker.cc
index 67e0ffa..99f5712 100644
--- a/net/quic/test_tools/quic_test_packet_maker.cc
+++ b/net/quic/test_tools/quic_test_packet_maker.cc
@@ -33,7 +33,7 @@
   host_.assign(host);
 }
 
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakePingPacket(
+std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakePingPacket(
     QuicPacketNumber num,
     bool include_version) {
   QuicPacketHeader header;
@@ -47,10 +47,11 @@
   header.fec_group = 0;
 
   QuicPingFrame ping;
-  return scoped_ptr<QuicReceivedPacket>(MakePacket(header, QuicFrame(ping)));
+  return std::unique_ptr<QuicReceivedPacket>(
+      MakePacket(header, QuicFrame(ping)));
 }
 
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeRstPacket(
+std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeRstPacket(
     QuicPacketNumber num,
     bool include_version,
     QuicStreamId stream_id,
@@ -58,7 +59,7 @@
   return MakeRstPacket(num, include_version, stream_id, error_code, 0);
 }
 
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeRstPacket(
+std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeRstPacket(
     QuicPacketNumber num,
     bool include_version,
     QuicStreamId stream_id,
@@ -76,10 +77,11 @@
 
   QuicRstStreamFrame rst(stream_id, error_code, bytes_written);
   DVLOG(1) << "Adding frame: " << QuicFrame(&rst);
-  return scoped_ptr<QuicReceivedPacket>(MakePacket(header, QuicFrame(&rst)));
+  return std::unique_ptr<QuicReceivedPacket>(
+      MakePacket(header, QuicFrame(&rst)));
 }
 
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckAndRstPacket(
+std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckAndRstPacket(
     QuicPacketNumber num,
     bool include_version,
     QuicStreamId stream_id,
@@ -118,7 +120,7 @@
 
   QuicFramer framer(SupportedVersions(version_), clock_->Now(),
                     Perspective::IS_CLIENT);
-  scoped_ptr<QuicPacket> packet(
+  std::unique_ptr<QuicPacket> packet(
       BuildUnsizedDataPacket(&framer, header, frames));
   char buffer[kMaxPacketSize];
   size_t encrypted_size = framer.EncryptPayload(ENCRYPTION_NONE, /*path_id=*/0u,
@@ -126,10 +128,10 @@
                                                 buffer, kMaxPacketSize);
   EXPECT_NE(0u, encrypted_size);
   QuicReceivedPacket encrypted(buffer, encrypted_size, QuicTime::Zero(), false);
-  return scoped_ptr<QuicReceivedPacket>(encrypted.Clone());
+  return std::unique_ptr<QuicReceivedPacket>(encrypted.Clone());
 }
 
-scoped_ptr<QuicReceivedPacket>
+std::unique_ptr<QuicReceivedPacket>
 QuicTestPacketMaker::MakeAckAndConnectionClosePacket(
     QuicPacketNumber num,
     bool include_version,
@@ -171,7 +173,7 @@
 
   QuicFramer framer(SupportedVersions(version_), clock_->Now(),
                     Perspective::IS_CLIENT);
-  scoped_ptr<QuicPacket> packet(
+  std::unique_ptr<QuicPacket> packet(
       BuildUnsizedDataPacket(&framer, header, frames));
   char buffer[kMaxPacketSize];
   size_t encrypted_size = framer.EncryptPayload(ENCRYPTION_NONE, /*path_id=*/0u,
@@ -179,11 +181,11 @@
                                                 buffer, kMaxPacketSize);
   EXPECT_NE(0u, encrypted_size);
   QuicReceivedPacket encrypted(buffer, encrypted_size, clock_->Now(), false);
-  return scoped_ptr<QuicReceivedPacket>(encrypted.Clone());
+  return std::unique_ptr<QuicReceivedPacket>(encrypted.Clone());
 }
 
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeConnectionClosePacket(
-    QuicPacketNumber num) {
+std::unique_ptr<QuicReceivedPacket>
+QuicTestPacketMaker::MakeConnectionClosePacket(QuicPacketNumber num) {
   QuicPacketHeader header;
   header.public_header.connection_id = connection_id_;
   header.public_header.reset_flag = false;
@@ -197,10 +199,11 @@
   QuicConnectionCloseFrame close;
   close.error_code = QUIC_CRYPTO_VERSION_NOT_SUPPORTED;
   close.error_details = "Time to panic!";
-  return scoped_ptr<QuicReceivedPacket>(MakePacket(header, QuicFrame(&close)));
+  return std::unique_ptr<QuicReceivedPacket>(
+      MakePacket(header, QuicFrame(&close)));
 }
 
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeGoAwayPacket(
+std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeGoAwayPacket(
     QuicPacketNumber num,
     QuicErrorCode error_code,
     std::string reason_phrase) {
@@ -218,12 +221,13 @@
   goaway.error_code = error_code;
   goaway.last_good_stream_id = 0;
   goaway.reason_phrase = reason_phrase;
-  return scoped_ptr<QuicReceivedPacket>(MakePacket(header, QuicFrame(&goaway)));
+  return std::unique_ptr<QuicReceivedPacket>(
+      MakePacket(header, QuicFrame(&goaway)));
 }
 
 // Sets both least_unacked fields in stop waiting frame and ack frame
 // to be |least_unacked|.
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckPacket(
+std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckPacket(
     QuicPacketNumber packet_number,
     QuicPacketNumber largest_received,
     QuicPacketNumber least_unacked,
@@ -232,7 +236,7 @@
                        least_unacked, send_feedback);
 }
 
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckPacket(
+std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckPacket(
     QuicPacketNumber packet_number,
     QuicPacketNumber largest_received,
     QuicPacketNumber ack_least_unacked,
@@ -263,7 +267,7 @@
   stop_waiting.least_unacked = stop_least_unacked;
   frames.push_back(QuicFrame(&stop_waiting));
 
-  scoped_ptr<QuicPacket> packet(
+  std::unique_ptr<QuicPacket> packet(
       BuildUnsizedDataPacket(&framer, header, frames));
   char buffer[kMaxPacketSize];
   size_t encrypted_size = framer.EncryptPayload(ENCRYPTION_NONE, /*path_id=*/0u,
@@ -271,11 +275,11 @@
                                                 buffer, kMaxPacketSize);
   EXPECT_NE(0u, encrypted_size);
   QuicReceivedPacket encrypted(buffer, encrypted_size, clock_->Now(), false);
-  return scoped_ptr<QuicReceivedPacket>(encrypted.Clone());
+  return std::unique_ptr<QuicReceivedPacket>(encrypted.Clone());
 }
 
 // Returns a newly created packet to send kData on stream 1.
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeDataPacket(
+std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeDataPacket(
     QuicPacketNumber packet_number,
     QuicStreamId stream_id,
     bool should_include_version,
@@ -287,7 +291,7 @@
   return MakePacket(header_, QuicFrame(&frame));
 }
 
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckAndDataPacket(
+std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckAndDataPacket(
     QuicPacketNumber packet_number,
     bool include_version,
     QuicStreamId stream_id,
@@ -316,7 +320,8 @@
   return MakeMultipleFramesPacket(header_, frames);
 }
 
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeRequestHeadersPacket(
+std::unique_ptr<QuicReceivedPacket>
+QuicTestPacketMaker::MakeRequestHeadersPacket(
     QuicPacketNumber packet_number,
     QuicStreamId stream_id,
     bool should_include_version,
@@ -331,15 +336,15 @@
 
 // If |offset| is provided, will use the value when creating the packet.
 // Will also update the value after packet creation.
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeRequestHeadersPacket(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
-    bool should_include_version,
-    bool fin,
-    SpdyPriority priority,
-    const SpdyHeaderBlock& headers,
-    size_t* spdy_headers_frame_length,
-    QuicStreamOffset* offset) {
+std::unique_ptr<QuicReceivedPacket>
+QuicTestPacketMaker::MakeRequestHeadersPacket(QuicPacketNumber packet_number,
+                                              QuicStreamId stream_id,
+                                              bool should_include_version,
+                                              bool fin,
+                                              SpdyPriority priority,
+                                              const SpdyHeaderBlock& headers,
+                                              size_t* spdy_headers_frame_length,
+                                              QuicStreamOffset* offset) {
   InitializeHeader(packet_number, should_include_version);
   SpdySerializedFrame spdy_frame;
   if (spdy_request_framer_.protocol_version() == SPDY3) {
@@ -376,7 +381,7 @@
 
 // Convenience method for calling MakeRequestHeadersPacket with nullptr for
 // |spdy_headers_frame_length|.
-scoped_ptr<QuicReceivedPacket>
+std::unique_ptr<QuicReceivedPacket>
 QuicTestPacketMaker::MakeRequestHeadersPacketWithOffsetTracking(
     QuicPacketNumber packet_number,
     QuicStreamId stream_id,
@@ -392,7 +397,8 @@
 
 // If |offset| is provided, will use the value when creating the packet.
 // Will also update the value after packet creation.
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeResponseHeadersPacket(
+std::unique_ptr<QuicReceivedPacket>
+QuicTestPacketMaker::MakeResponseHeadersPacket(
     QuicPacketNumber packet_number,
     QuicStreamId stream_id,
     bool should_include_version,
@@ -430,7 +436,8 @@
   }
 }
 
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeResponseHeadersPacket(
+std::unique_ptr<QuicReceivedPacket>
+QuicTestPacketMaker::MakeResponseHeadersPacket(
     QuicPacketNumber packet_number,
     QuicStreamId stream_id,
     bool should_include_version,
@@ -444,7 +451,7 @@
 
 // Convenience method for calling MakeResponseHeadersPacket with nullptr for
 // |spdy_headers_frame_length|.
-scoped_ptr<QuicReceivedPacket>
+std::unique_ptr<QuicReceivedPacket>
 QuicTestPacketMaker::MakeResponseHeadersPacketWithOffsetTracking(
     QuicPacketNumber packet_number,
     QuicStreamId stream_id,
@@ -487,7 +494,7 @@
   return headers;
 }
 
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakePacket(
+std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakePacket(
     const QuicPacketHeader& header,
     const QuicFrame& frame) {
   QuicFrames frames;
@@ -495,12 +502,12 @@
   return MakeMultipleFramesPacket(header, frames);
 }
 
-scoped_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeMultipleFramesPacket(
-    const QuicPacketHeader& header,
-    const QuicFrames& frames) {
+std::unique_ptr<QuicReceivedPacket>
+QuicTestPacketMaker::MakeMultipleFramesPacket(const QuicPacketHeader& header,
+                                              const QuicFrames& frames) {
   QuicFramer framer(SupportedVersions(version_), clock_->Now(),
                     Perspective::IS_CLIENT);
-  scoped_ptr<QuicPacket> packet(
+  std::unique_ptr<QuicPacket> packet(
       BuildUnsizedDataPacket(&framer, header, frames));
   char buffer[kMaxPacketSize];
   size_t encrypted_size = framer.EncryptPayload(ENCRYPTION_NONE, /*path_id=*/0u,
@@ -508,7 +515,7 @@
                                                 buffer, kMaxPacketSize);
   EXPECT_NE(0u, encrypted_size);
   QuicReceivedPacket encrypted(buffer, encrypted_size, clock_->Now(), false);
-  return scoped_ptr<QuicReceivedPacket>(encrypted.Clone());
+  return std::unique_ptr<QuicReceivedPacket>(encrypted.Clone());
 }
 
 void QuicTestPacketMaker::InitializeHeader(QuicPacketNumber packet_number,
diff --git a/net/quic/test_tools/quic_test_packet_maker.h b/net/quic/test_tools/quic_test_packet_maker.h
index 3574ab7..e60ab3c 100644
--- a/net/quic/test_tools/quic_test_packet_maker.h
+++ b/net/quic/test_tools/quic_test_packet_maker.h
@@ -9,8 +9,9 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/request_priority.h"
 #include "net/quic/quic_protocol.h"
 #include "net/quic/test_tools/mock_clock.h"
@@ -30,22 +31,22 @@
   ~QuicTestPacketMaker();
 
   void set_hostname(const std::string& host);
-  scoped_ptr<QuicReceivedPacket> MakePingPacket(QuicPacketNumber num,
-                                                bool include_version);
-  scoped_ptr<QuicReceivedPacket> MakeRstPacket(
+  std::unique_ptr<QuicReceivedPacket> MakePingPacket(QuicPacketNumber num,
+                                                     bool include_version);
+  std::unique_ptr<QuicReceivedPacket> MakeRstPacket(
       QuicPacketNumber num,
       bool include_version,
       QuicStreamId stream_id,
       QuicRstStreamErrorCode error_code);
 
-  scoped_ptr<QuicReceivedPacket> MakeRstPacket(
+  std::unique_ptr<QuicReceivedPacket> MakeRstPacket(
       QuicPacketNumber num,
       bool include_version,
       QuicStreamId stream_id,
       QuicRstStreamErrorCode error_code,
       size_t bytes_written);
 
-  scoped_ptr<QuicReceivedPacket> MakeAckAndRstPacket(
+  std::unique_ptr<QuicReceivedPacket> MakeAckAndRstPacket(
       QuicPacketNumber num,
       bool include_version,
       QuicStreamId stream_id,
@@ -54,7 +55,7 @@
       QuicPacketNumber ack_least_unacked,
       QuicPacketNumber stop_least_unacked,
       bool send_feedback);
-  scoped_ptr<QuicReceivedPacket> MakeAckAndConnectionClosePacket(
+  std::unique_ptr<QuicReceivedPacket> MakeAckAndConnectionClosePacket(
       QuicPacketNumber num,
       bool include_version,
       QuicTime::Delta delta_time_largest_observed,
@@ -62,29 +63,31 @@
       QuicPacketNumber least_unacked,
       QuicErrorCode quic_error,
       std::string& quic_error_details);
-  scoped_ptr<QuicReceivedPacket> MakeConnectionClosePacket(
+  std::unique_ptr<QuicReceivedPacket> MakeConnectionClosePacket(
       QuicPacketNumber num);
-  scoped_ptr<QuicReceivedPacket> MakeGoAwayPacket(QuicPacketNumber num,
-                                                  QuicErrorCode error_code,
-                                                  std::string reason_phrase);
-  scoped_ptr<QuicReceivedPacket> MakeAckPacket(
+  std::unique_ptr<QuicReceivedPacket> MakeGoAwayPacket(
+      QuicPacketNumber num,
+      QuicErrorCode error_code,
+      std::string reason_phrase);
+  std::unique_ptr<QuicReceivedPacket> MakeAckPacket(
       QuicPacketNumber packet_number,
       QuicPacketNumber largest_received,
       QuicPacketNumber least_unacked,
       bool send_feedback);
-  scoped_ptr<QuicReceivedPacket> MakeAckPacket(
+  std::unique_ptr<QuicReceivedPacket> MakeAckPacket(
       QuicPacketNumber packet_number,
       QuicPacketNumber largest_received,
       QuicPacketNumber ack_least_unacked,
       QuicPacketNumber stop_least_unacked,
       bool send_feedback);
-  scoped_ptr<QuicReceivedPacket> MakeDataPacket(QuicPacketNumber packet_number,
-                                                QuicStreamId stream_id,
-                                                bool should_include_version,
-                                                bool fin,
-                                                QuicStreamOffset offset,
-                                                base::StringPiece data);
-  scoped_ptr<QuicReceivedPacket> MakeAckAndDataPacket(
+  std::unique_ptr<QuicReceivedPacket> MakeDataPacket(
+      QuicPacketNumber packet_number,
+      QuicStreamId stream_id,
+      bool should_include_version,
+      bool fin,
+      QuicStreamOffset offset,
+      base::StringPiece data);
+  std::unique_ptr<QuicReceivedPacket> MakeAckAndDataPacket(
       QuicPacketNumber packet_number,
       bool include_version,
       QuicStreamId stream_id,
@@ -96,7 +99,7 @@
 
   // If |spdy_headers_frame_length| is non-null, it will be set to the size of
   // the SPDY headers frame created for this packet.
-  scoped_ptr<QuicReceivedPacket> MakeRequestHeadersPacket(
+  std::unique_ptr<QuicReceivedPacket> MakeRequestHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -105,7 +108,7 @@
       const SpdyHeaderBlock& headers,
       size_t* spdy_headers_frame_length);
 
-  scoped_ptr<QuicReceivedPacket> MakeRequestHeadersPacket(
+  std::unique_ptr<QuicReceivedPacket> MakeRequestHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -117,18 +120,18 @@
 
   // Convenience method for calling MakeRequestHeadersPacket with nullptr for
   // |spdy_headers_frame_length|.
-  scoped_ptr<QuicReceivedPacket> MakeRequestHeadersPacketWithOffsetTracking(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      bool should_include_version,
-      bool fin,
-      SpdyPriority priority,
-      const SpdyHeaderBlock& headers,
-      QuicStreamOffset* offset);
+  std::unique_ptr<QuicReceivedPacket>
+  MakeRequestHeadersPacketWithOffsetTracking(QuicPacketNumber packet_number,
+                                             QuicStreamId stream_id,
+                                             bool should_include_version,
+                                             bool fin,
+                                             SpdyPriority priority,
+                                             const SpdyHeaderBlock& headers,
+                                             QuicStreamOffset* offset);
 
   // If |spdy_headers_frame_length| is non-null, it will be set to the size of
   // the SPDY headers frame created for this packet.
-  scoped_ptr<QuicReceivedPacket> MakeResponseHeadersPacket(
+  std::unique_ptr<QuicReceivedPacket> MakeResponseHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -137,7 +140,7 @@
       size_t* spdy_headers_frame_length,
       QuicStreamOffset* offset);
 
-  scoped_ptr<QuicReceivedPacket> MakeResponseHeadersPacket(
+  std::unique_ptr<QuicReceivedPacket> MakeResponseHeadersPacket(
       QuicPacketNumber packet_number,
       QuicStreamId stream_id,
       bool should_include_version,
@@ -147,13 +150,13 @@
 
   // Convenience method for calling MakeResponseHeadersPacket with nullptr for
   // |spdy_headers_frame_length|.
-  scoped_ptr<QuicReceivedPacket> MakeResponseHeadersPacketWithOffsetTracking(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      bool should_include_version,
-      bool fin,
-      const SpdyHeaderBlock& headers,
-      QuicStreamOffset* offset);
+  std::unique_ptr<QuicReceivedPacket>
+  MakeResponseHeadersPacketWithOffsetTracking(QuicPacketNumber packet_number,
+                                              QuicStreamId stream_id,
+                                              bool should_include_version,
+                                              bool fin,
+                                              const SpdyHeaderBlock& headers,
+                                              QuicStreamOffset* offset);
 
   SpdyHeaderBlock GetRequestHeaders(const std::string& method,
                                     const std::string& scheme,
@@ -164,9 +167,9 @@
                                      const std::string& alt_svc);
 
  private:
-  scoped_ptr<QuicReceivedPacket> MakePacket(const QuicPacketHeader& header,
-                                            const QuicFrame& frame);
-  scoped_ptr<QuicReceivedPacket> MakeMultipleFramesPacket(
+  std::unique_ptr<QuicReceivedPacket> MakePacket(const QuicPacketHeader& header,
+                                                 const QuicFrame& frame);
+  std::unique_ptr<QuicReceivedPacket> MakeMultipleFramesPacket(
       const QuicPacketHeader& header,
       const QuicFrames& frames);
 
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
index 3d9267a..5fd9d7de 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -535,7 +535,7 @@
   QuicFramer framer(versions != nullptr ? *versions : QuicSupportedVersions(),
                     QuicTime::Zero(), Perspective::IS_CLIENT);
 
-  scoped_ptr<QuicPacket> packet(
+  std::unique_ptr<QuicPacket> packet(
       BuildUnsizedDataPacket(&framer, header, frames));
   EXPECT_TRUE(packet != nullptr);
   char* buffer = new char[kMaxPacketSize];
@@ -586,7 +586,7 @@
   QuicFramer framer(versions != nullptr ? *versions : QuicSupportedVersions(),
                     QuicTime::Zero(), Perspective::IS_CLIENT);
 
-  scoped_ptr<QuicPacket> packet(
+  std::unique_ptr<QuicPacket> packet(
       BuildUnsizedDataPacket(&framer, header, frames));
   EXPECT_TRUE(packet != nullptr);
 
@@ -611,7 +611,7 @@
   EXPECT_EQ(actual_len, expected_len);
   const int min_len = min(actual_len, expected_len);
   const int max_len = max(actual_len, expected_len);
-  scoped_ptr<bool[]> marks(new bool[max_len]);
+  std::unique_ptr<bool[]> marks(new bool[max_len]);
   bool identical = (actual_len == expected_len);
   for (int i = 0; i < min_len; ++i) {
     if (actual[i] != expected[i]) {
@@ -651,7 +651,8 @@
     const CryptoHandshakeMessage& message,
     bool should_include_version) {
   CryptoFramer crypto_framer;
-  scoped_ptr<QuicData> data(crypto_framer.ConstructHandshakeMessage(message));
+  std::unique_ptr<QuicData> data(
+      crypto_framer.ConstructHandshakeMessage(message));
   QuicFramer quic_framer(QuicSupportedVersions(), QuicTime::Zero(),
                          Perspective::IS_CLIENT);
 
diff --git a/net/quic/test_tools/quic_test_utils.h b/net/quic/test_tools/quic_test_utils.h
index 87889f7..83a800e 100644
--- a/net/quic/test_tools/quic_test_utils.h
+++ b/net/quic/test_tools/quic_test_utils.h
@@ -513,7 +513,7 @@
       QuicAckListenerInterface* ack_notifier_delegate);
 
  private:
-  scoped_ptr<QuicCryptoStream> crypto_stream_;
+  std::unique_ptr<QuicCryptoStream> crypto_stream_;
 
   DISALLOW_COPY_AND_ASSIGN(MockQuicSpdySession);
 };
@@ -567,7 +567,7 @@
   QuicCryptoClientStream* GetCryptoStream() override;
 
  private:
-  scoped_ptr<QuicCryptoClientStream> crypto_stream_;
+  std::unique_ptr<QuicCryptoClientStream> crypto_stream_;
   QuicClientPushPromiseIndex push_promise_index_;
 
   DISALLOW_COPY_AND_ASSIGN(TestQuicSpdyClientSession);
diff --git a/net/quic/test_tools/simple_quic_framer.cc b/net/quic/test_tools/simple_quic_framer.cc
index dd0e0cb..62e74b61 100644
--- a/net/quic/test_tools/simple_quic_framer.cc
+++ b/net/quic/test_tools/simple_quic_framer.cc
@@ -137,8 +137,8 @@
   QuicErrorCode error_;
   bool has_header_;
   QuicPacketHeader header_;
-  scoped_ptr<QuicVersionNegotiationPacket> version_negotiation_packet_;
-  scoped_ptr<QuicPublicResetPacket> public_reset_packet_;
+  std::unique_ptr<QuicVersionNegotiationPacket> version_negotiation_packet_;
+  std::unique_ptr<QuicPublicResetPacket> public_reset_packet_;
   vector<QuicAckFrame> ack_frames_;
   vector<QuicStopWaitingFrame> stop_waiting_frames_;
   vector<QuicPingFrame> ping_frames_;
diff --git a/net/quic/test_tools/simple_quic_framer.h b/net/quic/test_tools/simple_quic_framer.h
index f09db61e..bfc4761 100644
--- a/net/quic/test_tools/simple_quic_framer.h
+++ b/net/quic/test_tools/simple_quic_framer.h
@@ -7,10 +7,10 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/quic/quic_framer.h"
 #include "net/quic/quic_protocol.h"
@@ -56,7 +56,7 @@
 
  private:
   QuicFramer framer_;
-  scoped_ptr<SimpleFramerVisitor> visitor_;
+  std::unique_ptr<SimpleFramerVisitor> visitor_;
   DISALLOW_COPY_AND_ASSIGN(SimpleQuicFramer);
 };
 
diff --git a/net/socket/client_socket_factory.cc b/net/socket/client_socket_factory.cc
index 72aa245..78685594 100644
--- a/net/socket/client_socket_factory.cc
+++ b/net/socket/client_socket_factory.cc
@@ -49,34 +49,34 @@
     ClearSSLSessionCache();
   }
 
-  scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+  std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket(
       DatagramSocket::BindType bind_type,
       const RandIntCallback& rand_int_cb,
       NetLog* net_log,
       const NetLog::Source& source) override {
-    return scoped_ptr<DatagramClientSocket>(
+    return std::unique_ptr<DatagramClientSocket>(
         new UDPClientSocket(bind_type, rand_int_cb, net_log, source));
   }
 
-  scoped_ptr<StreamSocket> CreateTransportClientSocket(
+  std::unique_ptr<StreamSocket> CreateTransportClientSocket(
       const AddressList& addresses,
-      scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+      std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
       NetLog* net_log,
       const NetLog::Source& source) override {
-    return scoped_ptr<StreamSocket>(new TCPClientSocket(
+    return std::unique_ptr<StreamSocket>(new TCPClientSocket(
         addresses, std::move(socket_performance_watcher), net_log, source));
   }
 
-  scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
-      scoped_ptr<ClientSocketHandle> transport_socket,
+  std::unique_ptr<SSLClientSocket> CreateSSLClientSocket(
+      std::unique_ptr<ClientSocketHandle> transport_socket,
       const HostPortPair& host_and_port,
       const SSLConfig& ssl_config,
       const SSLClientSocketContext& context) override {
 #if defined(USE_OPENSSL)
-    return scoped_ptr<SSLClientSocket>(new SSLClientSocketOpenSSL(
+    return std::unique_ptr<SSLClientSocket>(new SSLClientSocketOpenSSL(
         std::move(transport_socket), host_and_port, ssl_config, context));
 #else
-    return scoped_ptr<SSLClientSocket>(new SSLClientSocketNSS(
+    return std::unique_ptr<SSLClientSocket>(new SSLClientSocketNSS(
         std::move(transport_socket), host_and_port, ssl_config, context));
 #endif
   }
diff --git a/net/socket/client_socket_factory.h b/net/socket/client_socket_factory.h
index be12df7..ea1aacb 100644
--- a/net/socket/client_socket_factory.h
+++ b/net/socket/client_socket_factory.h
@@ -5,9 +5,9 @@
 #ifndef NET_SOCKET_CLIENT_SOCKET_FACTORY_H_
 #define NET_SOCKET_CLIENT_SOCKET_FACTORY_H_
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/base/rand_callback.h"
 #include "net/base/socket_performance_watcher.h"
@@ -33,23 +33,23 @@
 
   // |source| is the NetLog::Source for the entity trying to create the socket,
   // if it has one.
-  virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+  virtual std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket(
       DatagramSocket::BindType bind_type,
       const RandIntCallback& rand_int_cb,
       NetLog* net_log,
       const NetLog::Source& source) = 0;
 
-  virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+  virtual std::unique_ptr<StreamSocket> CreateTransportClientSocket(
       const AddressList& addresses,
-      scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+      std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
       NetLog* net_log,
       const NetLog::Source& source) = 0;
 
   // It is allowed to pass in a |transport_socket| that is not obtained from a
   // socket pool. The caller could create a ClientSocketHandle directly and call
   // set_socket() on it to set a valid StreamSocket instance.
-  virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
-      scoped_ptr<ClientSocketHandle> transport_socket,
+  virtual std::unique_ptr<SSLClientSocket> CreateSSLClientSocket(
+      std::unique_ptr<ClientSocketHandle> transport_socket,
       const HostPortPair& host_and_port,
       const SSLConfig& ssl_config,
       const SSLClientSocketContext& context) = 0;
diff --git a/net/socket/client_socket_handle.cc b/net/socket/client_socket_handle.cc
index 97b1b89d..0dc7b39 100644
--- a/net/socket/client_socket_handle.cc
+++ b/net/socket/client_socket_handle.cc
@@ -136,7 +136,7 @@
   return true;
 }
 
-void ClientSocketHandle::SetSocket(scoped_ptr<StreamSocket> s) {
+void ClientSocketHandle::SetSocket(std::unique_ptr<StreamSocket> s) {
   socket_ = std::move(s);
 }
 
@@ -148,7 +148,7 @@
   callback.Run(result);
 }
 
-scoped_ptr<StreamSocket> ClientSocketHandle::PassSocket() {
+std::unique_ptr<StreamSocket> ClientSocketHandle::PassSocket() {
   return std::move(socket_);
 }
 
diff --git a/net/socket/client_socket_handle.h b/net/socket/client_socket_handle.h
index a8af5c07..2b1cf5c 100644
--- a/net/socket/client_socket_handle.h
+++ b/net/socket/client_socket_handle.h
@@ -5,12 +5,12 @@
 #ifndef NET_SOCKET_CLIENT_SOCKET_HANDLE_H_
 #define NET_SOCKET_CLIENT_SOCKET_HANDLE_H_
 
+#include <memory>
 #include <string>
 
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/completion_callback.h"
 #include "net/base/ip_endpoint.h"
@@ -132,7 +132,7 @@
   //
   // SetSocket() may also be used if this handle is used as simply for
   // socket storage (e.g., http://crbug.com/37810).
-  void SetSocket(scoped_ptr<StreamSocket> s);
+  void SetSocket(std::unique_ptr<StreamSocket> s);
   void set_reuse_type(SocketReuseType reuse_type) { reuse_type_ = reuse_type; }
   void set_idle_time(base::TimeDelta idle_time) { idle_time_ = idle_time; }
   void set_pool_id(int id) { pool_id_ = id; }
@@ -176,7 +176,7 @@
 
   // SetSocket() must be called with a new socket before this handle
   // is destroyed if is_initialized() is true.
-  scoped_ptr<StreamSocket> PassSocket();
+  std::unique_ptr<StreamSocket> PassSocket();
 
   // These may only be used if is_initialized() is true.
   const std::string& group_name() const { return group_name_; }
@@ -210,7 +210,7 @@
   bool is_initialized_;
   ClientSocketPool* pool_;
   HigherLayeredPool* higher_pool_;
-  scoped_ptr<StreamSocket> socket_;
+  std::unique_ptr<StreamSocket> socket_;
   std::string group_name_;
   SocketReuseType reuse_type_;
   CompletionCallback callback_;
@@ -220,7 +220,7 @@
   bool is_ssl_error_;
   HttpResponseInfo ssl_error_response_info_;
   SSLFailureState ssl_failure_state_;
-  scoped_ptr<ClientSocketHandle> pending_http_proxy_connection_;
+  std::unique_ptr<ClientSocketHandle> pending_http_proxy_connection_;
   std::vector<ConnectionAttempt> connection_attempts_;
   base::TimeTicks init_time_;
   base::TimeDelta setup_time_;
diff --git a/net/socket/client_socket_pool.h b/net/socket/client_socket_pool.h
index 73d90dd..b59f6049 100644
--- a/net/socket/client_socket_pool.h
+++ b/net/socket/client_socket_pool.h
@@ -6,11 +6,11 @@
 #define NET_SOCKET_CLIENT_SOCKET_POOL_H_
 
 #include <deque>
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/completion_callback.h"
 #include "net/base/load_states.h"
@@ -139,7 +139,7 @@
   // change when it flushes, so it can use this |id| to discard sockets with
   // mismatched ids.
   virtual void ReleaseSocket(const std::string& group_name,
-                             scoped_ptr<StreamSocket> socket,
+                             std::unique_ptr<StreamSocket> socket,
                              int id) = 0;
 
   // This flushes all state from the ClientSocketPool.  This means that all
@@ -166,7 +166,7 @@
   // DictionaryValue.
   // If |include_nested_pools| is true, the states of any nested
   // ClientSocketPools will be included.
-  virtual scoped_ptr<base::DictionaryValue> GetInfoAsValue(
+  virtual std::unique_ptr<base::DictionaryValue> GetInfoAsValue(
       const std::string& name,
       const std::string& type,
       bool include_nested_pools) const = 0;
diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
index b240e3db..9792259 100644
--- a/net/socket/client_socket_pool_base.cc
+++ b/net/socket/client_socket_pool_base.cc
@@ -74,7 +74,7 @@
   net_log().EndEvent(NetLog::TYPE_SOCKET_POOL_CONNECT_JOB);
 }
 
-scoped_ptr<StreamSocket> ConnectJob::PassSocket() {
+std::unique_ptr<StreamSocket> ConnectJob::PassSocket() {
   return std::move(socket_);
 }
 
@@ -96,7 +96,7 @@
   return rv;
 }
 
-void ConnectJob::SetSocket(scoped_ptr<StreamSocket> socket) {
+void ConnectJob::SetSocket(std::unique_ptr<StreamSocket> socket) {
   if (socket) {
     net_log().AddEvent(NetLog::TYPE_CONNECT_JOB_SET_SOCKET,
                        socket->NetLog().source().ToEventParametersCallback());
@@ -132,7 +132,7 @@
 
 void ConnectJob::OnTimeout() {
   // Make sure the socket is NULL before calling into |delegate|.
-  SetSocket(scoped_ptr<StreamSocket>());
+  SetSocket(std::unique_ptr<StreamSocket>());
 
   net_log_.AddEvent(NetLog::TYPE_SOCKET_POOL_CONNECT_JOB_TIMED_OUT);
 
@@ -279,7 +279,7 @@
 
 int ClientSocketPoolBaseHelper::RequestSocket(
     const std::string& group_name,
-    scoped_ptr<const Request> request) {
+    std::unique_ptr<const Request> request) {
   CHECK(!request->callback().is_null());
   CHECK(request->handle());
 
@@ -416,7 +416,7 @@
 
   // We couldn't find a socket to reuse, and there's space to allocate one,
   // so allocate and connect a new one.
-  scoped_ptr<ConnectJob> connect_job(
+  std::unique_ptr<ConnectJob> connect_job(
       connect_job_factory_->NewConnectJob(group_name, request, this));
 
   int rv = connect_job->Connect();
@@ -442,7 +442,7 @@
     group->AddJob(std::move(connect_job), preconnecting);
   } else {
     LogBoundConnectJobToRequest(connect_job->net_log().source(), request);
-    scoped_ptr<StreamSocket> error_socket;
+    std::unique_ptr<StreamSocket> error_socket;
     if (!preconnecting) {
       DCHECK(handle);
       connect_job->GetAdditionalErrorState(handle);
@@ -511,14 +511,9 @@
     if (idle_socket.socket->WasEverUsed())
       idle_socket.socket->ClearConnectionAttempts();
 
-    HandOutSocket(
-        scoped_ptr<StreamSocket>(idle_socket.socket),
-        reuse_type,
-        LoadTimingInfo::ConnectTiming(),
-        request.handle(),
-        idle_time,
-        group,
-        request.net_log());
+    HandOutSocket(std::unique_ptr<StreamSocket>(idle_socket.socket), reuse_type,
+                  LoadTimingInfo::ConnectTiming(), request.handle(), idle_time,
+                  group, request.net_log());
     return true;
   }
 
@@ -538,7 +533,7 @@
   if (callback_it != pending_callback_map_.end()) {
     int result = callback_it->second.result;
     pending_callback_map_.erase(callback_it);
-    scoped_ptr<StreamSocket> socket = handle->PassSocket();
+    std::unique_ptr<StreamSocket> socket = handle->PassSocket();
     if (socket) {
       if (result != OK)
         socket->Disconnect();
@@ -552,7 +547,7 @@
   Group* group = GetOrCreateGroup(group_name);
 
   // Search pending_requests for matching handle.
-  scoped_ptr<const Request> request =
+  std::unique_ptr<const Request> request =
       group->FindAndRemovePendingRequest(handle);
   if (request) {
     request->net_log().AddEvent(NetLog::TYPE_CANCELLED);
@@ -611,9 +606,10 @@
   return LOAD_STATE_WAITING_FOR_AVAILABLE_SOCKET;
 }
 
-scoped_ptr<base::DictionaryValue> ClientSocketPoolBaseHelper::GetInfoAsValue(
-    const std::string& name, const std::string& type) const {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+std::unique_ptr<base::DictionaryValue>
+ClientSocketPoolBaseHelper::GetInfoAsValue(const std::string& name,
+                                           const std::string& type) const {
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("name", name);
   dict->SetString("type", type);
   dict->SetInteger("handed_out_socket_count", handed_out_socket_count_);
@@ -786,9 +782,10 @@
                &ClientSocketPoolBaseHelper::OnCleanupTimerFired);
 }
 
-void ClientSocketPoolBaseHelper::ReleaseSocket(const std::string& group_name,
-                                               scoped_ptr<StreamSocket> socket,
-                                               int id) {
+void ClientSocketPoolBaseHelper::ReleaseSocket(
+    const std::string& group_name,
+    std::unique_ptr<StreamSocket> socket,
+    int id) {
   GroupMap::iterator i = group_map_.find(group_name);
   CHECK(i != group_map_.end());
 
@@ -894,7 +891,7 @@
   CHECK(group_it != group_map_.end());
   Group* group = group_it->second;
 
-  scoped_ptr<StreamSocket> socket = job->PassSocket();
+  std::unique_ptr<StreamSocket> socket = job->PassSocket();
 
   // Copies of these are needed because |job| may be deleted before they are
   // accessed.
@@ -907,7 +904,7 @@
   if (result == OK) {
     DCHECK(socket.get());
     RemoveConnectJob(job, group);
-    scoped_ptr<const Request> request = group->PopNextPendingRequest();
+    std::unique_ptr<const Request> request = group->PopNextPendingRequest();
     if (request) {
       LogBoundConnectJobToRequest(job_log.source(), *request);
       HandOutSocket(std::move(socket), ClientSocketHandle::UNUSED,
@@ -924,7 +921,7 @@
     // If we got a socket, it must contain error information so pass that
     // up so that the caller can retrieve it.
     bool handed_out_socket = false;
-    scoped_ptr<const Request> request = group->PopNextPendingRequest();
+    std::unique_ptr<const Request> request = group->PopNextPendingRequest();
     if (request) {
       LogBoundConnectJobToRequest(job_log.source(), *request);
       job->GetAdditionalErrorState(request->handle());
@@ -993,7 +990,7 @@
 
   int rv = RequestSocketInternal(group_name, *next_request);
   if (rv != ERR_IO_PENDING) {
-    scoped_ptr<const Request> request = group->PopNextPendingRequest();
+    std::unique_ptr<const Request> request = group->PopNextPendingRequest();
     DCHECK(request);
     if (group->IsEmpty())
       RemoveGroup(group_name);
@@ -1004,7 +1001,7 @@
 }
 
 void ClientSocketPoolBaseHelper::HandOutSocket(
-    scoped_ptr<StreamSocket> socket,
+    std::unique_ptr<StreamSocket> socket,
     ClientSocketHandle::SocketReuseType reuse_type,
     const LoadTimingInfo::ConnectTiming& connect_timing,
     ClientSocketHandle* handle,
@@ -1034,7 +1031,7 @@
 }
 
 void ClientSocketPoolBaseHelper::AddIdleSocket(
-    scoped_ptr<StreamSocket> socket,
+    std::unique_ptr<StreamSocket> socket,
     Group* group) {
   DCHECK(socket);
   IdleSocket idle_socket;
@@ -1069,7 +1066,7 @@
     Group* group = i->second;
 
     while (true) {
-      scoped_ptr<const Request> request = group->PopNextPendingRequest();
+      std::unique_ptr<const Request> request = group->PopNextPendingRequest();
       if (!request)
         break;
       InvokeUserCallbackLater(request->handle(), request->callback(), error);
@@ -1210,7 +1207,7 @@
   return true;
 }
 
-void ClientSocketPoolBaseHelper::Group::AddJob(scoped_ptr<ConnectJob> job,
+void ClientSocketPoolBaseHelper::Group::AddJob(std::unique_ptr<ConnectJob> job,
                                                bool is_preconnect) {
   SanityCheck();
 
@@ -1220,7 +1217,7 @@
 }
 
 void ClientSocketPoolBaseHelper::Group::RemoveJob(ConnectJob* job) {
-  scoped_ptr<ConnectJob> owned_job(job);
+  std::unique_ptr<ConnectJob> owned_job(job);
   SanityCheck();
 
   // Check that |job| is in the list.
@@ -1258,7 +1255,7 @@
   if (pending_requests_.empty())
     return;
 
-  scoped_ptr<ConnectJob> backup_job =
+  std::unique_ptr<ConnectJob> backup_job =
       pool->connect_job_factory_->NewConnectJob(
           group_name, *pending_requests_.FirstMax().value(), pool);
   backup_job->net_log().AddEvent(NetLog::TYPE_BACKUP_CONNECT_JOB_CREATED);
@@ -1307,7 +1304,7 @@
 }
 
 void ClientSocketPoolBaseHelper::Group::InsertPendingRequest(
-    scoped_ptr<const Request> request) {
+    std::unique_ptr<const Request> request) {
   // This value must be cached before we release |request|.
   RequestPriority priority = request->priority();
   if (request->respect_limits() == ClientSocketPool::RespectLimits::DISABLED) {
@@ -1321,33 +1318,33 @@
   }
 }
 
-scoped_ptr<const ClientSocketPoolBaseHelper::Request>
+std::unique_ptr<const ClientSocketPoolBaseHelper::Request>
 ClientSocketPoolBaseHelper::Group::PopNextPendingRequest() {
   if (pending_requests_.empty())
-    return scoped_ptr<const ClientSocketPoolBaseHelper::Request>();
+    return std::unique_ptr<const ClientSocketPoolBaseHelper::Request>();
   return RemovePendingRequest(pending_requests_.FirstMax());
 }
 
-scoped_ptr<const ClientSocketPoolBaseHelper::Request>
+std::unique_ptr<const ClientSocketPoolBaseHelper::Request>
 ClientSocketPoolBaseHelper::Group::FindAndRemovePendingRequest(
     ClientSocketHandle* handle) {
   for (RequestQueue::Pointer pointer = pending_requests_.FirstMax();
        !pointer.is_null();
        pointer = pending_requests_.GetNextTowardsLastMin(pointer)) {
     if (pointer.value()->handle() == handle) {
-      scoped_ptr<const Request> request = RemovePendingRequest(pointer);
+      std::unique_ptr<const Request> request = RemovePendingRequest(pointer);
       return request;
     }
   }
-  return scoped_ptr<const ClientSocketPoolBaseHelper::Request>();
+  return std::unique_ptr<const ClientSocketPoolBaseHelper::Request>();
 }
 
-scoped_ptr<const ClientSocketPoolBaseHelper::Request>
+std::unique_ptr<const ClientSocketPoolBaseHelper::Request>
 ClientSocketPoolBaseHelper::Group::RemovePendingRequest(
     const RequestQueue::Pointer& pointer) {
   // TODO(eroman): Temporary for debugging http://crbug.com/467797.
   CHECK(!pointer.is_null());
-  scoped_ptr<const Request> request(pointer.value());
+  std::unique_ptr<const Request> request(pointer.value());
   pending_requests_.Erase(pointer);
   // If there are no more requests, kill the backup timer.
   if (pending_requests_.empty())
diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h
index 1e57adb..74e65235d 100644
--- a/net/socket/client_socket_pool_base.h
+++ b/net/socket/client_socket_pool_base.h
@@ -24,10 +24,12 @@
 
 #include <stddef.h>
 #include <stdint.h>
+
 #include <cstddef>
 #include <deque>
 #include <list>
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 #include <utility>
@@ -35,7 +37,6 @@
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
@@ -68,7 +69,7 @@
     virtual ~Delegate() {}
 
     // Alerts the delegate that the connection completed. |job| must
-    // be destroyed by the delegate. A scoped_ptr<> isn't used because
+    // be destroyed by the delegate. A std::unique_ptr<> isn't used because
     // the caller of this function doesn't own |job|.
     virtual void OnConnectJobComplete(int result,
                                       ConnectJob* job) = 0;
@@ -93,7 +94,7 @@
   // Releases ownership of the underlying socket to the caller.
   // Returns the released socket, or NULL if there was a connection
   // error.
-  scoped_ptr<StreamSocket> PassSocket();
+  std::unique_ptr<StreamSocket> PassSocket();
 
   // Begins connecting the socket.  Returns OK on success, ERR_IO_PENDING if it
   // cannot complete synchronously without blocking, or another net error code
@@ -121,7 +122,7 @@
   ClientSocketPool::RespectLimits respect_limits() const {
     return respect_limits_;
   }
-  void SetSocket(scoped_ptr<StreamSocket> socket);
+  void SetSocket(std::unique_ptr<StreamSocket> socket);
   StreamSocket* socket() { return socket_.get(); }
   void NotifyDelegateOfCompletion(int rv);
   void ResetTimer(base::TimeDelta remainingTime);
@@ -146,7 +147,7 @@
   // Timer to abort jobs that take too long.
   base::OneShotTimer timer_;
   Delegate* delegate_;
-  scoped_ptr<StreamSocket> socket_;
+  std::unique_ptr<StreamSocket> socket_;
   BoundNetLog net_log_;
   // A ConnectJob is idle until Connect() has been called.
   bool idle_;
@@ -222,7 +223,7 @@
     ConnectJobFactory() {}
     virtual ~ConnectJobFactory() {}
 
-    virtual scoped_ptr<ConnectJob> NewConnectJob(
+    virtual std::unique_ptr<ConnectJob> NewConnectJob(
         const std::string& group_name,
         const Request& request,
         ConnectJob::Delegate* delegate) const = 0;
@@ -257,7 +258,7 @@
 
   // See ClientSocketPool::RequestSocket for documentation on this function.
   int RequestSocket(const std::string& group_name,
-                    scoped_ptr<const Request> request);
+                    std::unique_ptr<const Request> request);
 
   // See ClientSocketPool::RequestSocket for documentation on this function.
   void RequestSockets(const std::string& group_name,
@@ -270,7 +271,7 @@
 
   // See ClientSocketPool::ReleaseSocket for documentation on this function.
   void ReleaseSocket(const std::string& group_name,
-                     scoped_ptr<StreamSocket> socket,
+                     std::unique_ptr<StreamSocket> socket,
                      int id);
 
   // See ClientSocketPool::FlushWithError for documentation on this function.
@@ -336,7 +337,7 @@
   bool CloseOneIdleConnectionInHigherLayeredPool();
 
   // See ClientSocketPool::GetInfoAsValue for documentation on this function.
-  scoped_ptr<base::DictionaryValue> GetInfoAsValue(
+  std::unique_ptr<base::DictionaryValue> GetInfoAsValue(
       const std::string& name,
       const std::string& type) const;
 
@@ -433,7 +434,7 @@
     // Otherwise, returns false.
     bool TryToUseUnassignedConnectJob();
 
-    void AddJob(scoped_ptr<ConnectJob> job, bool is_preconnect);
+    void AddJob(std::unique_ptr<ConnectJob> job, bool is_preconnect);
     // Remove |job| from this group, which must already own |job|.
     void RemoveJob(ConnectJob* job);
     void RemoveAllJobs();
@@ -456,15 +457,15 @@
     // Inserts the request into the queue based on priority
     // order. Older requests are prioritized over requests of equal
     // priority.
-    void InsertPendingRequest(scoped_ptr<const Request> request);
+    void InsertPendingRequest(std::unique_ptr<const Request> request);
 
     // Gets and removes the next pending request. Returns NULL if
     // there are no pending requests.
-    scoped_ptr<const Request> PopNextPendingRequest();
+    std::unique_ptr<const Request> PopNextPendingRequest();
 
     // Finds the pending request for |handle| and removes it. Returns
     // the removed pending request, or NULL if there was none.
-    scoped_ptr<const Request> FindAndRemovePendingRequest(
+    std::unique_ptr<const Request> FindAndRemovePendingRequest(
         ClientSocketHandle* handle);
 
     void IncrementActiveSocketCount() { active_socket_count_++; }
@@ -479,7 +480,7 @@
    private:
     // Returns the iterator's pending request after removing it from
     // the queue.
-    scoped_ptr<const Request> RemovePendingRequest(
+    std::unique_ptr<const Request> RemovePendingRequest(
         const RequestQueue::Pointer& pointer);
 
     // Called when the backup socket timer fires.
@@ -557,7 +558,7 @@
   void ProcessPendingRequest(const std::string& group_name, Group* group);
 
   // Assigns |socket| to |handle| and updates |group|'s counters appropriately.
-  void HandOutSocket(scoped_ptr<StreamSocket> socket,
+  void HandOutSocket(std::unique_ptr<StreamSocket> socket,
                      ClientSocketHandle::SocketReuseType reuse_type,
                      const LoadTimingInfo::ConnectTiming& connect_timing,
                      ClientSocketHandle* handle,
@@ -566,7 +567,7 @@
                      const BoundNetLog& net_log);
 
   // Adds |socket| to the list of idle sockets for |group|.
-  void AddIdleSocket(scoped_ptr<StreamSocket> socket, Group* group);
+  void AddIdleSocket(std::unique_ptr<StreamSocket> socket, Group* group);
 
   // Iterates through |group_map_|, canceling all ConnectJobs and deleting
   // groups if they are no longer needed.
@@ -650,7 +651,7 @@
   const base::TimeDelta unused_idle_socket_timeout_;
   const base::TimeDelta used_idle_socket_timeout_;
 
-  const scoped_ptr<ConnectJobFactory> connect_job_factory_;
+  const std::unique_ptr<ConnectJobFactory> connect_job_factory_;
 
   // TODO(vandebo) Remove when backup jobs move to TransportClientSocketPool
   bool connect_backup_jobs_enabled_;
@@ -711,7 +712,7 @@
     ConnectJobFactory() {}
     virtual ~ConnectJobFactory() {}
 
-    virtual scoped_ptr<ConnectJob> NewConnectJob(
+    virtual std::unique_ptr<ConnectJob> NewConnectJob(
         const std::string& group_name,
         const Request& request,
         ConnectJob::Delegate* delegate) const = 0;
@@ -765,7 +766,7 @@
                     ClientSocketHandle* handle,
                     const CompletionCallback& callback,
                     const BoundNetLog& net_log) {
-    scoped_ptr<const Request> request(new Request(
+    std::unique_ptr<const Request> request(new Request(
         handle, callback, priority, respect_limits,
         internal::ClientSocketPoolBaseHelper::NORMAL, params, net_log));
     return helper_.RequestSocket(group_name, std::move(request));
@@ -791,7 +792,7 @@
   }
 
   void ReleaseSocket(const std::string& group_name,
-                     scoped_ptr<StreamSocket> socket,
+                     std::unique_ptr<StreamSocket> socket,
                      int id) {
     return helper_.ReleaseSocket(group_name, std::move(socket), id);
   }
@@ -837,8 +838,9 @@
     return helper_.CleanupIdleSockets(force);
   }
 
-  scoped_ptr<base::DictionaryValue> GetInfoAsValue(const std::string& name,
-                                        const std::string& type) const {
+  std::unique_ptr<base::DictionaryValue> GetInfoAsValue(
+      const std::string& name,
+      const std::string& type) const {
     return helper_.GetInfoAsValue(name, type);
   }
 
@@ -870,7 +872,7 @@
         : connect_job_factory_(connect_job_factory) {}
     ~ConnectJobFactoryAdaptor() override {}
 
-    scoped_ptr<ConnectJob> NewConnectJob(
+    std::unique_ptr<ConnectJob> NewConnectJob(
         const std::string& group_name,
         const internal::ClientSocketPoolBaseHelper::Request& request,
         ConnectJob::Delegate* delegate) const override {
@@ -883,7 +885,7 @@
       return connect_job_factory_->ConnectionTimeout();
     }
 
-    const scoped_ptr<ConnectJobFactory> connect_job_factory_;
+    const std::unique_ptr<ConnectJobFactory> connect_job_factory_;
   };
 
   internal::ClientSocketPoolBaseHelper helper_;
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index 78093cc..11e4659 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -204,31 +204,32 @@
  public:
   MockClientSocketFactory() : allocation_count_(0) {}
 
-  scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+  std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket(
       DatagramSocket::BindType bind_type,
       const RandIntCallback& rand_int_cb,
       NetLog* net_log,
       const NetLog::Source& source) override {
     NOTREACHED();
-    return scoped_ptr<DatagramClientSocket>();
+    return std::unique_ptr<DatagramClientSocket>();
   }
 
-  scoped_ptr<StreamSocket> CreateTransportClientSocket(
+  std::unique_ptr<StreamSocket> CreateTransportClientSocket(
       const AddressList& addresses,
-      scoped_ptr<SocketPerformanceWatcher> /* socket_performance_watcher */,
+      std::unique_ptr<
+          SocketPerformanceWatcher> /* socket_performance_watcher */,
       NetLog* /* net_log */,
       const NetLog::Source& /*source*/) override {
     allocation_count_++;
-    return scoped_ptr<StreamSocket>();
+    return std::unique_ptr<StreamSocket>();
   }
 
-  scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
-      scoped_ptr<ClientSocketHandle> transport_socket,
+  std::unique_ptr<SSLClientSocket> CreateSSLClientSocket(
+      std::unique_ptr<ClientSocketHandle> transport_socket,
       const HostPortPair& host_and_port,
       const SSLConfig& ssl_config,
       const SSLClientSocketContext& context) override {
     NOTIMPLEMENTED();
-    return scoped_ptr<SSLClientSocket>();
+    return std::unique_ptr<SSLClientSocket>();
   }
 
   void ClearSSLSessionCache() override { NOTIMPLEMENTED(); }
@@ -313,8 +314,8 @@
     AddressList ignored;
     client_socket_factory_->CreateTransportClientSocket(ignored, NULL, NULL,
                                                         NetLog::Source());
-    SetSocket(
-        scoped_ptr<StreamSocket>(new MockClientSocket(net_log().net_log())));
+    SetSocket(std::unique_ptr<StreamSocket>(
+        new MockClientSocket(net_log().net_log())));
     switch (job_type_) {
       case kMockJob:
         return DoConnect(true /* successful */, false /* sync */,
@@ -391,7 +392,7 @@
       }
       default:
         NOTREACHED();
-        SetSocket(scoped_ptr<StreamSocket>());
+        SetSocket(std::unique_ptr<StreamSocket>());
         return ERR_FAILED;
     }
   }
@@ -404,7 +405,7 @@
       result = ERR_PROXY_AUTH_REQUESTED;
     } else {
       result = ERR_CONNECTION_FAILED;
-      SetSocket(scoped_ptr<StreamSocket>());
+      SetSocket(std::unique_ptr<StreamSocket>());
     }
 
     if (was_async)
@@ -449,7 +450,7 @@
 
   // ConnectJobFactory implementation.
 
-  scoped_ptr<ConnectJob> NewConnectJob(
+  std::unique_ptr<ConnectJob> NewConnectJob(
       const std::string& group_name,
       const TestClientSocketPoolBase::Request& request,
       ConnectJob::Delegate* delegate) const override {
@@ -459,13 +460,9 @@
       job_type = job_types_->front();
       job_types_->pop_front();
     }
-    return scoped_ptr<ConnectJob>(new TestConnectJob(job_type,
-                                                     group_name,
-                                                     request,
-                                                     timeout_duration_,
-                                                     delegate,
-                                                     client_socket_factory_,
-                                                     net_log_));
+    return std::unique_ptr<ConnectJob>(
+        new TestConnectJob(job_type, group_name, request, timeout_duration_,
+                           delegate, client_socket_factory_, net_log_));
   }
 
   base::TimeDelta ConnectionTimeout() const override {
@@ -530,7 +527,7 @@
   }
 
   void ReleaseSocket(const std::string& group_name,
-                     scoped_ptr<StreamSocket> socket,
+                     std::unique_ptr<StreamSocket> socket,
                      int id) override {
     base_.ReleaseSocket(group_name, std::move(socket), id);
   }
@@ -560,7 +557,7 @@
     base_.RemoveHigherLayeredPool(higher_pool);
   }
 
-  scoped_ptr<base::DictionaryValue> GetInfoAsValue(
+  std::unique_ptr<base::DictionaryValue> GetInfoAsValue(
       const std::string& name,
       const std::string& type,
       bool include_nested_pools) const override {
@@ -635,8 +632,8 @@
 
   void OnConnectJobComplete(int result, ConnectJob* job) override {
     result_ = result;
-    scoped_ptr<ConnectJob> owned_job(job);
-    scoped_ptr<StreamSocket> socket = owned_job->PassSocket();
+    std::unique_ptr<ConnectJob> owned_job(job);
+    std::unique_ptr<StreamSocket> socket = owned_job->PassSocket();
     // socket.get() should be NULL iff result != OK
     EXPECT_EQ(socket == NULL, result != OK);
     have_result_ = true;
@@ -727,7 +724,7 @@
 
   TestSocketRequest* request(int i) { return test_base_.request(i); }
   size_t requests_size() const { return test_base_.requests_size(); }
-  std::vector<scoped_ptr<TestSocketRequest>>* requests() {
+  std::vector<std::unique_ptr<TestSocketRequest>>* requests() {
     return test_base_.requests();
   }
   size_t completion_count() const { return test_base_.completion_count(); }
@@ -738,7 +735,7 @@
   MockClientSocketFactory client_socket_factory_;
   TestConnectJobFactory* connect_job_factory_;
   scoped_refptr<TestSocketParams> params_;
-  scoped_ptr<TestClientSocketPool> pool_;
+  std::unique_ptr<TestClientSocketPool> pool_;
   ClientSocketPoolTest test_base_;
 };
 
@@ -751,14 +748,10 @@
       &ignored, CompletionCallback(), DEFAULT_PRIORITY,
       ClientSocketPool::RespectLimits::ENABLED,
       internal::ClientSocketPoolBaseHelper::NORMAL, params_, BoundNetLog());
-  scoped_ptr<TestConnectJob> job(
-      new TestConnectJob(TestConnectJob::kMockJob,
-                         "a",
-                         request,
-                         base::TimeDelta::FromMicroseconds(1),
-                         &delegate,
-                         &client_socket_factory_,
-                         NULL));
+  std::unique_ptr<TestConnectJob> job(
+      new TestConnectJob(TestConnectJob::kMockJob, "a", request,
+                         base::TimeDelta::FromMicroseconds(1), &delegate,
+                         &client_socket_factory_, NULL));
   EXPECT_EQ(OK, job->Connect());
 }
 
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc
index dee8218..ce8a5a5 100644
--- a/net/socket/client_socket_pool_manager.cc
+++ b/net/socket/client_socket_pool_manager.cc
@@ -85,7 +85,7 @@
                          const CompletionCallback& callback) {
   scoped_refptr<HttpProxySocketParams> http_proxy_params;
   scoped_refptr<SOCKSSocketParams> socks_params;
-  scoped_ptr<HostPortPair> proxy_host_port;
+  std::unique_ptr<HostPortPair> proxy_host_port;
 
   bool using_ssl = group_type == ClientSocketPoolManager::SSL_GROUP;
   HostPortPair origin_host_port = endpoint;
diff --git a/net/socket/client_socket_pool_manager.h b/net/socket/client_socket_pool_manager.h
index d8d22a1b..66c26f5 100644
--- a/net/socket/client_socket_pool_manager.h
+++ b/net/socket/client_socket_pool_manager.h
@@ -84,7 +84,7 @@
   virtual SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
       const HostPortPair& proxy_server) = 0;
   // Creates a Value summary of the state of the socket pools.
-  virtual scoped_ptr<base::Value> SocketPoolInfoToValue() const = 0;
+  virtual std::unique_ptr<base::Value> SocketPoolInfoToValue() const = 0;
 };
 
 // A helper method that uses the passed in proxy information to initialize a
diff --git a/net/socket/client_socket_pool_manager_impl.cc b/net/socket/client_socket_pool_manager_impl.cc
index def70d0..305f05e 100644
--- a/net/socket/client_socket_pool_manager_impl.cc
+++ b/net/socket/client_socket_pool_manager_impl.cc
@@ -330,9 +330,9 @@
   return ret.first->second;
 }
 
-scoped_ptr<base::Value> ClientSocketPoolManagerImpl::SocketPoolInfoToValue()
-    const {
-  scoped_ptr<base::ListValue> list(new base::ListValue());
+std::unique_ptr<base::Value>
+ClientSocketPoolManagerImpl::SocketPoolInfoToValue() const {
+  std::unique_ptr<base::ListValue> list(new base::ListValue());
   list->Append(transport_socket_pool_->GetInfoAsValue("transport_socket_pool",
                                                 "transport_socket_pool",
                                                 false));
diff --git a/net/socket/client_socket_pool_manager_impl.h b/net/socket/client_socket_pool_manager_impl.h
index d4a3f64..3fae145 100644
--- a/net/socket/client_socket_pool_manager_impl.h
+++ b/net/socket/client_socket_pool_manager_impl.h
@@ -6,12 +6,12 @@
 #define NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_
 
 #include <map>
+#include <memory>
 #include <type_traits>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "base/threading/non_thread_safe.h"
 #include "net/cert/cert_database.h"
@@ -87,7 +87,7 @@
       const HostPortPair& proxy_server) override;
 
   // Creates a Value summary of the state of the socket pools.
-  scoped_ptr<base::Value> SocketPoolInfoToValue() const override;
+  std::unique_ptr<base::Value> SocketPoolInfoToValue() const override;
 
   // CertDatabase::Observer methods:
   void OnCertAdded(const X509Certificate* cert) override;
@@ -118,8 +118,8 @@
 
   // Note: this ordering is important.
 
-  scoped_ptr<TransportClientSocketPool> transport_socket_pool_;
-  scoped_ptr<SSLClientSocketPool> ssl_socket_pool_;
+  std::unique_ptr<TransportClientSocketPool> transport_socket_pool_;
+  std::unique_ptr<SSLClientSocketPool> ssl_socket_pool_;
   TransportSocketPoolMap transport_socket_pools_for_socks_proxies_;
   SOCKSSocketPoolMap socks_socket_pools_;
   TransportSocketPoolMap transport_socket_pools_for_http_proxies_;
diff --git a/net/socket/fuzzed_socket.cc b/net/socket/fuzzed_socket.cc
index 5b7cca76..c00faafd 100644
--- a/net/socket/fuzzed_socket.cc
+++ b/net/socket/fuzzed_socket.cc
@@ -153,7 +153,7 @@
 }
 
 bool FuzzedSocket::IsConnected() const {
-  return net_error_ != OK && !error_pending_;
+  return net_error_ == OK && !error_pending_;
 }
 
 bool FuzzedSocket::IsConnectedAndIdle() const {
diff --git a/net/socket/mock_client_socket_pool_manager.cc b/net/socket/mock_client_socket_pool_manager.cc
index bdf18f6..668c303 100644
--- a/net/socket/mock_client_socket_pool_manager.cc
+++ b/net/socket/mock_client_socket_pool_manager.cc
@@ -87,10 +87,10 @@
   return NULL;
 }
 
-scoped_ptr<base::Value> MockClientSocketPoolManager::SocketPoolInfoToValue()
-    const {
+std::unique_ptr<base::Value>
+MockClientSocketPoolManager::SocketPoolInfoToValue() const {
   NOTIMPLEMENTED();
-  return scoped_ptr<base::Value>(nullptr);
+  return std::unique_ptr<base::Value>(nullptr);
 }
 
 }  // namespace net
diff --git a/net/socket/mock_client_socket_pool_manager.h b/net/socket/mock_client_socket_pool_manager.h
index e24b2fb..919ef32 100644
--- a/net/socket/mock_client_socket_pool_manager.h
+++ b/net/socket/mock_client_socket_pool_manager.h
@@ -37,7 +37,7 @@
       const HostPortPair& http_proxy) override;
   SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
       const HostPortPair& proxy_server) override;
-  scoped_ptr<base::Value> SocketPoolInfoToValue() const override;
+  std::unique_ptr<base::Value> SocketPoolInfoToValue() const override;
 
  private:
   typedef internal::OwnedPoolMap<HostPortPair, TransportClientSocketPool*>
@@ -49,8 +49,8 @@
   typedef internal::OwnedPoolMap<HostPortPair, SSLClientSocketPool*>
       SSLSocketPoolMap;
 
-  scoped_ptr<TransportClientSocketPool> transport_socket_pool_;
-  scoped_ptr<SSLClientSocketPool> ssl_socket_pool_;
+  std::unique_ptr<TransportClientSocketPool> transport_socket_pool_;
+  std::unique_ptr<SSLClientSocketPool> ssl_socket_pool_;
   SOCKSSocketPoolMap socks_socket_pools_;
   HTTPProxySocketPoolMap http_proxy_socket_pools_;
   SSLSocketPoolMap ssl_socket_pools_for_proxies_;
diff --git a/net/socket/nss_ssl_util.cc b/net/socket/nss_ssl_util.cc
index 6d0064d..274aa2da 100644
--- a/net/socket/nss_ssl_util.cc
+++ b/net/socket/nss_ssl_util.cc
@@ -80,11 +80,11 @@
   }
 }
 
-scoped_ptr<base::Value> NetLogSSLErrorCallback(
+std::unique_ptr<base::Value> NetLogSSLErrorCallback(
     int net_error,
     int ssl_lib_error,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("net_error", net_error);
   if (ssl_lib_error)
     dict->SetInteger("ssl_lib_error", ssl_lib_error);
@@ -157,7 +157,7 @@
         TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
         TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, 0,
     };
-    scoped_ptr<uint16_t[]> ciphers(new uint16_t[num_ciphers]);
+    std::unique_ptr<uint16_t[]> ciphers(new uint16_t[num_ciphers]);
     memcpy(ciphers.get(), ssl_ciphers, sizeof(uint16_t) * num_ciphers);
 
     if (CiphersRemove(chacha_ciphers, ciphers.get(), num_ciphers) &&
@@ -380,12 +380,12 @@
 // Returns parameters to attach to the NetLog when we receive an error in
 // response to a call to an NSS function.  Used instead of
 // NetLogSSLErrorCallback with events of type TYPE_SSL_NSS_ERROR.
-scoped_ptr<base::Value> NetLogSSLFailedNSSFunctionCallback(
+std::unique_ptr<base::Value> NetLogSSLFailedNSSFunctionCallback(
     const char* function,
     const char* param,
     int ssl_lib_error,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("function", function);
   if (param[0] != '\0')
     dict->SetString("param", param);
diff --git a/net/socket/sequenced_socket_data_unittest.cc b/net/socket/sequenced_socket_data_unittest.cc
index c27fd615..6a732e9 100644
--- a/net/socket/sequenced_socket_data_unittest.cc
+++ b/net/socket/sequenced_socket_data_unittest.cc
@@ -2,11 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "net/base/io_buffer.h"
 #include "net/base/test_completion_callback.h"
@@ -213,7 +213,7 @@
 
  private:
   MockConnect connect_data_;
-  scoped_ptr<SequencedSocketData> data_;
+  std::unique_ptr<SequencedSocketData> data_;
 
   const HostPortPair endpoint_;
   scoped_refptr<TransportSocketParams> tcp_params_;
diff --git a/net/socket/server_socket.h b/net/socket/server_socket.h
index a0794f1..9ad5cf81 100644
--- a/net/socket/server_socket.h
+++ b/net/socket/server_socket.h
@@ -7,10 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
 
@@ -39,7 +39,7 @@
 
   // Accepts connection. Callback is called when new connection is
   // accepted.
-  virtual int Accept(scoped_ptr<StreamSocket>* socket,
+  virtual int Accept(std::unique_ptr<StreamSocket>* socket,
                      const CompletionCallback& callback) = 0;
 
  private:
diff --git a/net/socket/socket_net_log_params.cc b/net/socket/socket_net_log_params.cc
index 347644a..d53bd8a6 100644
--- a/net/socket/socket_net_log_params.cc
+++ b/net/socket/socket_net_log_params.cc
@@ -15,37 +15,37 @@
 
 namespace {
 
-scoped_ptr<base::Value> NetLogSocketErrorCallback(
+std::unique_ptr<base::Value> NetLogSocketErrorCallback(
     int net_error,
     int os_error,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("net_error", net_error);
   dict->SetInteger("os_error", os_error);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogHostPortPairCallback(
+std::unique_ptr<base::Value> NetLogHostPortPairCallback(
     const HostPortPair* host_and_port,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("host_and_port", host_and_port->ToString());
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogIPEndPointCallback(
+std::unique_ptr<base::Value> NetLogIPEndPointCallback(
     const IPEndPoint* address,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("address", address->ToString());
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSourceAddressCallback(
+std::unique_ptr<base::Value> NetLogSourceAddressCallback(
     const struct sockaddr* net_address,
     socklen_t address_len,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   IPEndPoint ipe;
   bool result = ipe.FromSockAddr(net_address, address_len);
   DCHECK(result);
diff --git a/net/socket/socket_posix.cc b/net/socket/socket_posix.cc
index ca8b04f09..19d4343f 100644
--- a/net/socket/socket_posix.cc
+++ b/net/socket/socket_posix.cc
@@ -142,7 +142,7 @@
   return OK;
 }
 
-int SocketPosix::Accept(scoped_ptr<SocketPosix>* socket,
+int SocketPosix::Accept(std::unique_ptr<SocketPosix>* socket,
                         const CompletionCallback& callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK_NE(kInvalidSocket, socket_fd_);
@@ -367,7 +367,7 @@
   }
 }
 
-int SocketPosix::DoAccept(scoped_ptr<SocketPosix>* socket) {
+int SocketPosix::DoAccept(std::unique_ptr<SocketPosix>* socket) {
   SockaddrStorage new_peer_address;
   int new_socket = HANDLE_EINTR(accept(socket_fd_,
                                        new_peer_address.addr,
@@ -375,7 +375,7 @@
   if (new_socket < 0)
     return MapAcceptError(errno);
 
-  scoped_ptr<SocketPosix> accepted_socket(new SocketPosix);
+  std::unique_ptr<SocketPosix> accepted_socket(new SocketPosix);
   int rv = accepted_socket->AdoptConnectedSocket(new_socket, new_peer_address);
   if (rv != OK)
     return rv;
diff --git a/net/socket/socket_posix.h b/net/socket/socket_posix.h
index f6df5292..956552a 100644
--- a/net/socket/socket_posix.h
+++ b/net/socket/socket_posix.h
@@ -5,10 +5,11 @@
 #ifndef NET_SOCKET_SOCKET_POSIX_H_
 #define NET_SOCKET_SOCKET_POSIX_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/threading/thread_checker.h"
 #include "net/base/completion_callback.h"
@@ -39,7 +40,7 @@
   int Bind(const SockaddrStorage& address);
 
   int Listen(int backlog);
-  int Accept(scoped_ptr<SocketPosix>* socket,
+  int Accept(std::unique_ptr<SocketPosix>* socket,
              const CompletionCallback& callback);
 
   // Connects socket. On non-ERR_IO_PENDING error, sets errno and returns a net
@@ -87,7 +88,7 @@
   void OnFileCanReadWithoutBlocking(int fd) override;
   void OnFileCanWriteWithoutBlocking(int fd) override;
 
-  int DoAccept(scoped_ptr<SocketPosix>* socket);
+  int DoAccept(std::unique_ptr<SocketPosix>* socket);
   void AcceptCompleted();
 
   int DoConnect();
@@ -104,7 +105,7 @@
   SocketDescriptor socket_fd_;
 
   base::MessageLoopForIO::FileDescriptorWatcher accept_socket_watcher_;
-  scoped_ptr<SocketPosix>* accept_socket_;
+  std::unique_ptr<SocketPosix>* accept_socket_;
   CompletionCallback accept_callback_;
 
   base::MessageLoopForIO::FileDescriptorWatcher read_socket_watcher_;
@@ -123,7 +124,7 @@
   // called when connect is complete.
   bool waiting_connect_;
 
-  scoped_ptr<SockaddrStorage> peer_address_;
+  std::unique_ptr<SockaddrStorage> peer_address_;
 
   base::ThreadChecker thread_checker_;
 
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index 9c99cef..8068a11 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -13,6 +13,7 @@
 #include "base/compiler_specific.h"
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
@@ -710,14 +711,14 @@
   mock_ssl_data_.ResetNextIndex();
 }
 
-scoped_ptr<DatagramClientSocket>
+std::unique_ptr<DatagramClientSocket>
 MockClientSocketFactory::CreateDatagramClientSocket(
     DatagramSocket::BindType bind_type,
     const RandIntCallback& rand_int_cb,
     NetLog* net_log,
     const NetLog::Source& source) {
   SocketDataProvider* data_provider = mock_data_.GetNext();
-  scoped_ptr<MockUDPClientSocket> socket(
+  std::unique_ptr<MockUDPClientSocket> socket(
       new MockUDPClientSocket(data_provider, net_log));
   if (bind_type == DatagramSocket::RANDOM_BIND)
     socket->set_source_port(
@@ -726,19 +727,20 @@
   return std::move(socket);
 }
 
-scoped_ptr<StreamSocket> MockClientSocketFactory::CreateTransportClientSocket(
+std::unique_ptr<StreamSocket>
+MockClientSocketFactory::CreateTransportClientSocket(
     const AddressList& addresses,
-    scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+    std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
     NetLog* net_log,
     const NetLog::Source& source) {
   SocketDataProvider* data_provider = mock_data_.GetNext();
-  scoped_ptr<MockTCPClientSocket> socket(
+  std::unique_ptr<MockTCPClientSocket> socket(
       new MockTCPClientSocket(addresses, net_log, data_provider));
   return std::move(socket);
 }
 
-scoped_ptr<SSLClientSocket> MockClientSocketFactory::CreateSSLClientSocket(
-    scoped_ptr<ClientSocketHandle> transport_socket,
+std::unique_ptr<SSLClientSocket> MockClientSocketFactory::CreateSSLClientSocket(
+    std::unique_ptr<ClientSocketHandle> transport_socket,
     const HostPortPair& host_and_port,
     const SSLConfig& ssl_config,
     const SSLClientSocketContext& context) {
@@ -751,7 +753,7 @@
                    next_ssl_data->next_protos_expected_in_ssl_config.end(),
                    ssl_config.alpn_protos.begin()));
   }
-  return scoped_ptr<SSLClientSocket>(new MockSSLClientSocket(
+  return std::unique_ptr<SSLClientSocket>(new MockSSLClientSocket(
       std::move(transport_socket), host_and_port, ssl_config, next_ssl_data));
 }
 
@@ -1138,15 +1140,14 @@
 }
 
 MockSSLClientSocket::MockSSLClientSocket(
-    scoped_ptr<ClientSocketHandle> transport_socket,
+    std::unique_ptr<ClientSocketHandle> transport_socket,
     const HostPortPair& host_port_pair,
     const SSLConfig& ssl_config,
     SSLSocketDataProvider* data)
     : MockClientSocket(
           // Have to use the right BoundNetLog for LoadTimingInfo regression
           // tests.
-          transport_socket->socket()
-              ->NetLog()),
+          transport_socket->socket()->NetLog()),
       transport_(std::move(transport_socket)),
       data_(data) {
   DCHECK(data_);
@@ -1525,7 +1526,7 @@
 }
 
 bool ClientSocketPoolTest::ReleaseOneConnection(KeepAlive keep_alive) {
-  for (scoped_ptr<TestSocketRequest>& it : requests_) {
+  for (std::unique_ptr<TestSocketRequest>& it : requests_) {
     if (it->handle()->is_initialized()) {
       if (keep_alive == NO_KEEP_ALIVE)
         it->handle()->socket()->Disconnect();
@@ -1545,7 +1546,7 @@
 }
 
 MockTransportClientSocketPool::MockConnectJob::MockConnectJob(
-    scoped_ptr<StreamSocket> socket,
+    std::unique_ptr<StreamSocket> socket,
     ClientSocketHandle* handle,
     const CompletionCallback& callback)
     : socket_(std::move(socket)), handle_(handle), user_callback_(callback) {}
@@ -1631,18 +1632,18 @@
     const CompletionCallback& callback,
     const BoundNetLog& net_log) {
   last_request_priority_ = priority;
-  scoped_ptr<StreamSocket> socket =
+  std::unique_ptr<StreamSocket> socket =
       client_socket_factory_->CreateTransportClientSocket(
           AddressList(), NULL, net_log.net_log(), NetLog::Source());
   MockConnectJob* job = new MockConnectJob(std::move(socket), handle, callback);
-  job_list_.push_back(make_scoped_ptr(job));
+  job_list_.push_back(base::WrapUnique(job));
   handle->set_pool_id(1);
   return job->Connect();
 }
 
 void MockTransportClientSocketPool::CancelRequest(const std::string& group_name,
                                                   ClientSocketHandle* handle) {
-  for (scoped_ptr<MockConnectJob>& it : job_list_) {
+  for (std::unique_ptr<MockConnectJob>& it : job_list_) {
     if (it->CancelHandle(handle)) {
       cancel_count_++;
       break;
@@ -1652,7 +1653,7 @@
 
 void MockTransportClientSocketPool::ReleaseSocket(
     const std::string& group_name,
-    scoped_ptr<StreamSocket> socket,
+    std::unique_ptr<StreamSocket> socket,
     int id) {
   EXPECT_EQ(1, id);
   release_count_++;
@@ -1690,9 +1691,10 @@
   return transport_pool_->CancelRequest(group_name, handle);
 }
 
-void MockSOCKSClientSocketPool::ReleaseSocket(const std::string& group_name,
-                                              scoped_ptr<StreamSocket> socket,
-                                              int id) {
+void MockSOCKSClientSocketPool::ReleaseSocket(
+    const std::string& group_name,
+    std::unique_ptr<StreamSocket> socket,
+    int id) {
   return transport_pool_->ReleaseSocket(group_name, std::move(socket), id);
 }
 
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index f942a35..c731cc55 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -10,14 +10,15 @@
 
 #include <cstring>
 #include <deque>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
@@ -454,7 +455,7 @@
   bool is_using_tcp_fast_open_;
 
   // Used by RunUntilPaused.  NULL at all other times.
-  scoped_ptr<base::RunLoop> run_until_paused_run_loop_;
+  std::unique_ptr<base::RunLoop> run_until_paused_run_loop_;
 
   base::WeakPtrFactory<SequencedSocketData> weak_factory_;
 
@@ -515,18 +516,18 @@
   }
 
   // ClientSocketFactory
-  scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+  std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket(
       DatagramSocket::BindType bind_type,
       const RandIntCallback& rand_int_cb,
       NetLog* net_log,
       const NetLog::Source& source) override;
-  scoped_ptr<StreamSocket> CreateTransportClientSocket(
+  std::unique_ptr<StreamSocket> CreateTransportClientSocket(
       const AddressList& addresses,
-      scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+      std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
       NetLog* net_log,
       const NetLog::Source& source) override;
-  scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
-      scoped_ptr<ClientSocketHandle> transport_socket,
+  std::unique_ptr<SSLClientSocket> CreateSSLClientSocket(
+      std::unique_ptr<ClientSocketHandle> transport_socket,
       const HostPortPair& host_and_port,
       const SSLConfig& ssl_config,
       const SSLClientSocketContext& context) override;
@@ -675,7 +676,7 @@
 
 class MockSSLClientSocket : public MockClientSocket, public AsyncSocket {
  public:
-  MockSSLClientSocket(scoped_ptr<ClientSocketHandle> transport_socket,
+  MockSSLClientSocket(std::unique_ptr<ClientSocketHandle> transport_socket,
                       const HostPortPair& host_and_port,
                       const SSLConfig& ssl_config,
                       SSLSocketDataProvider* socket);
@@ -720,7 +721,7 @@
                               const CompletionCallback& callback,
                               int rv);
 
-  scoped_ptr<ClientSocketHandle> transport_;
+  std::unique_ptr<ClientSocketHandle> transport_;
   SSLSocketDataProvider* data_;
 
   DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocket);
@@ -841,7 +842,7 @@
     DCHECK(socket_pool);
     TestSocketRequest* request(
         new TestSocketRequest(&request_order_, &completion_count_));
-    requests_.push_back(make_scoped_ptr(request));
+    requests_.push_back(base::WrapUnique(request));
     int rv = request->handle()->Init(group_name, socket_params, priority,
                                      respect_limits, request->callback(),
                                      socket_pool, BoundNetLog());
@@ -868,11 +869,13 @@
   TestSocketRequest* request(int i) { return requests_[i].get(); }
 
   size_t requests_size() const { return requests_.size(); }
-  std::vector<scoped_ptr<TestSocketRequest>>* requests() { return &requests_; }
+  std::vector<std::unique_ptr<TestSocketRequest>>* requests() {
+    return &requests_;
+  }
   size_t completion_count() const { return completion_count_; }
 
  private:
-  std::vector<scoped_ptr<TestSocketRequest>> requests_;
+  std::vector<std::unique_ptr<TestSocketRequest>> requests_;
   std::vector<TestSocketRequest*> request_order_;
   size_t completion_count_;
 
@@ -894,7 +897,7 @@
 
   class MockConnectJob {
    public:
-    MockConnectJob(scoped_ptr<StreamSocket> socket,
+    MockConnectJob(std::unique_ptr<StreamSocket> socket,
                    ClientSocketHandle* handle,
                    const CompletionCallback& callback);
     ~MockConnectJob();
@@ -905,7 +908,7 @@
    private:
     void OnConnect(int rv);
 
-    scoped_ptr<StreamSocket> socket_;
+    std::unique_ptr<StreamSocket> socket_;
     ClientSocketHandle* handle_;
     CompletionCallback user_callback_;
 
@@ -936,12 +939,12 @@
   void CancelRequest(const std::string& group_name,
                      ClientSocketHandle* handle) override;
   void ReleaseSocket(const std::string& group_name,
-                     scoped_ptr<StreamSocket> socket,
+                     std::unique_ptr<StreamSocket> socket,
                      int id) override;
 
  private:
   ClientSocketFactory* client_socket_factory_;
-  std::vector<scoped_ptr<MockConnectJob>> job_list_;
+  std::vector<std::unique_ptr<MockConnectJob>> job_list_;
   RequestPriority last_request_priority_;
   int release_count_;
   int cancel_count_;
@@ -969,7 +972,7 @@
   void CancelRequest(const std::string& group_name,
                      ClientSocketHandle* handle) override;
   void ReleaseSocket(const std::string& group_name,
-                     scoped_ptr<StreamSocket> socket,
+                     std::unique_ptr<StreamSocket> socket,
                      int id) override;
 
  private:
diff --git a/net/socket/socks5_client_socket.cc b/net/socket/socks5_client_socket.cc
index 8c172b0..ae362ce 100644
--- a/net/socket/socks5_client_socket.cc
+++ b/net/socket/socks5_client_socket.cc
@@ -29,7 +29,7 @@
 static_assert(sizeof(struct in6_addr) == 16, "incorrect system size of IPv6");
 
 SOCKS5ClientSocket::SOCKS5ClientSocket(
-    scoped_ptr<ClientSocketHandle> transport_socket,
+    std::unique_ptr<ClientSocketHandle> transport_socket,
     const HostResolver::RequestInfo& req_info)
     : io_callback_(base::Bind(&SOCKS5ClientSocket::OnIOComplete,
                               base::Unretained(this))),
diff --git a/net/socket/socks5_client_socket.h b/net/socket/socks5_client_socket.h
index 4d3d6db..c65ddc2 100644
--- a/net/socket/socks5_client_socket.h
+++ b/net/socket/socks5_client_socket.h
@@ -8,11 +8,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/address_list.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_errors.h"
@@ -36,7 +36,7 @@
   // Although SOCKS 5 supports 3 different modes of addressing, we will
   // always pass it a hostname. This means the DNS resolving is done
   // proxy side.
-  SOCKS5ClientSocket(scoped_ptr<ClientSocketHandle> transport_socket,
+  SOCKS5ClientSocket(std::unique_ptr<ClientSocketHandle> transport_socket,
                      const HostResolver::RequestInfo& req_info);
 
   // On destruction Disconnect() is called.
@@ -123,7 +123,7 @@
   CompletionCallback io_callback_;
 
   // Stores the underlying socket.
-  scoped_ptr<ClientSocketHandle> transport_;
+  std::unique_ptr<ClientSocketHandle> transport_;
 
   State next_state_;
 
diff --git a/net/socket/socks5_client_socket_fuzzer.cc b/net/socket/socks5_client_socket_fuzzer.cc
index 290db900..2315cb9 100644
--- a/net/socket/socks5_client_socket_fuzzer.cc
+++ b/net/socket/socks5_client_socket_fuzzer.cc
@@ -2,13 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "net/socket/socks5_client_socket.h"
-
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "net/base/address_list.h"
 #include "net/base/net_errors.h"
@@ -16,6 +15,7 @@
 #include "net/log/test_net_log.h"
 #include "net/socket/client_socket_handle.h"
 #include "net/socket/fuzzed_socket.h"
+#include "net/socket/socks5_client_socket.h"
 
 // Fuzzer for Socks5ClientSocket.  Only covers the SOCKS5 greeet and
 // handshake.
@@ -30,11 +30,11 @@
   net::BoundTestNetLog bound_test_net_log;
 
   net::TestCompletionCallback callback;
-  scoped_ptr<net::FuzzedSocket> fuzzed_socket(
+  std::unique_ptr<net::FuzzedSocket> fuzzed_socket(
       new net::FuzzedSocket(data, size, bound_test_net_log.bound()));
   CHECK_EQ(net::OK, fuzzed_socket->Connect(callback.callback()));
 
-  scoped_ptr<net::ClientSocketHandle> socket_handle(
+  std::unique_ptr<net::ClientSocketHandle> socket_handle(
       new net::ClientSocketHandle());
   socket_handle->SetSocket(std::move(fuzzed_socket));
 
diff --git a/net/socket/socks5_client_socket_unittest.cc b/net/socket/socks5_client_socket_unittest.cc
index c41c6b9..a32f449 100644
--- a/net/socket/socks5_client_socket_unittest.cc
+++ b/net/socket/socks5_client_socket_unittest.cc
@@ -36,27 +36,28 @@
  public:
   SOCKS5ClientSocketTest();
   // Create a SOCKSClientSocket on top of a MockSocket.
-  scoped_ptr<SOCKS5ClientSocket> BuildMockSocket(MockRead reads[],
-                                                 size_t reads_count,
-                                                 MockWrite writes[],
-                                                 size_t writes_count,
-                                                 const std::string& hostname,
-                                                 int port,
-                                                 NetLog* net_log);
+  std::unique_ptr<SOCKS5ClientSocket> BuildMockSocket(
+      MockRead reads[],
+      size_t reads_count,
+      MockWrite writes[],
+      size_t writes_count,
+      const std::string& hostname,
+      int port,
+      NetLog* net_log);
 
   void SetUp() override;
 
  protected:
   const uint16_t kNwPort;
   TestNetLog net_log_;
-  scoped_ptr<SOCKS5ClientSocket> user_sock_;
+  std::unique_ptr<SOCKS5ClientSocket> user_sock_;
   AddressList address_list_;
   // Filled in by BuildMockSocket() and owned by its return value
   // (which |user_sock| is set to).
   StreamSocket* tcp_sock_;
   TestCompletionCallback callback_;
-  scoped_ptr<MockHostResolver> host_resolver_;
-  scoped_ptr<SocketDataProvider> data_;
+  std::unique_ptr<MockHostResolver> host_resolver_;
+  std::unique_ptr<SocketDataProvider> data_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocketTest);
@@ -85,7 +86,7 @@
   ASSERT_EQ(OK, rv);
 }
 
-scoped_ptr<SOCKS5ClientSocket> SOCKS5ClientSocketTest::BuildMockSocket(
+std::unique_ptr<SOCKS5ClientSocket> SOCKS5ClientSocketTest::BuildMockSocket(
     MockRead reads[],
     size_t reads_count,
     MockWrite writes[],
@@ -104,11 +105,11 @@
   EXPECT_EQ(OK, rv);
   EXPECT_TRUE(tcp_sock_->IsConnected());
 
-  scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
+  std::unique_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
   // |connection| takes ownership of |tcp_sock_|, but keep a
   // non-owning pointer to it.
-  connection->SetSocket(scoped_ptr<StreamSocket>(tcp_sock_));
-  return scoped_ptr<SOCKS5ClientSocket>(new SOCKS5ClientSocket(
+  connection->SetSocket(std::unique_ptr<StreamSocket>(tcp_sock_));
+  return std::unique_ptr<SOCKS5ClientSocket>(new SOCKS5ClientSocket(
       std::move(connection),
       HostResolver::RequestInfo(HostPortPair(hostname, port))));
 }
diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc
index b212f62..b5d5ce0 100644
--- a/net/socket/socks_client_socket.cc
+++ b/net/socket/socks_client_socket.cc
@@ -57,7 +57,7 @@
               "socks4 server response struct has incorrect size");
 
 SOCKSClientSocket::SOCKSClientSocket(
-    scoped_ptr<ClientSocketHandle> transport_socket,
+    std::unique_ptr<ClientSocketHandle> transport_socket,
     const HostResolver::RequestInfo& req_info,
     RequestPriority priority,
     HostResolver* host_resolver)
diff --git a/net/socket/socks_client_socket.h b/net/socket/socks_client_socket.h
index c011560..d6702631 100644
--- a/net/socket/socks_client_socket.h
+++ b/net/socket/socks_client_socket.h
@@ -8,12 +8,12 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/address_list.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_errors.h"
@@ -32,7 +32,7 @@
  public:
   // |req_info| contains the hostname and port to which the socket above will
   // communicate to via the socks layer. For testing the referrer is optional.
-  SOCKSClientSocket(scoped_ptr<ClientSocketHandle> transport_socket,
+  SOCKSClientSocket(std::unique_ptr<ClientSocketHandle> transport_socket,
                     const HostResolver::RequestInfo& req_info,
                     RequestPriority priority,
                     HostResolver* host_resolver);
@@ -103,7 +103,7 @@
   const std::string BuildHandshakeWriteBuffer() const;
 
   // Stores the underlying socket.
-  scoped_ptr<ClientSocketHandle> transport_;
+  std::unique_ptr<ClientSocketHandle> transport_;
 
   State next_state_;
 
diff --git a/net/socket/socks_client_socket_fuzzer.cc b/net/socket/socks_client_socket_fuzzer.cc
index 1c16921e..ef3a9e4 100644
--- a/net/socket/socks_client_socket_fuzzer.cc
+++ b/net/socket/socks_client_socket_fuzzer.cc
@@ -2,13 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "net/socket/socks_client_socket.h"
-
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "net/base/address_list.h"
 #include "net/base/net_errors.h"
@@ -18,6 +17,7 @@
 #include "net/log/test_net_log.h"
 #include "net/socket/client_socket_handle.h"
 #include "net/socket/fuzzed_socket.h"
+#include "net/socket/socks_client_socket.h"
 
 // Fuzzer for SocksClientSocket.  Only covers the SOCKS4 handshake.
 //
@@ -56,11 +56,11 @@
   mock_host_resolver.set_rules(rules.get());
 
   net::TestCompletionCallback callback;
-  scoped_ptr<net::FuzzedSocket> fuzzed_socket(
+  std::unique_ptr<net::FuzzedSocket> fuzzed_socket(
       new net::FuzzedSocket(data, size, bound_test_net_log.bound()));
   CHECK_EQ(net::OK, fuzzed_socket->Connect(callback.callback()));
 
-  scoped_ptr<net::ClientSocketHandle> socket_handle(
+  std::unique_ptr<net::ClientSocketHandle> socket_handle(
       new net::ClientSocketHandle());
   socket_handle->SetSocket(std::move(fuzzed_socket));
 
diff --git a/net/socket/socks_client_socket_pool.cc b/net/socket/socks_client_socket_pool.cc
index b3d8995a..4fae68c 100644
--- a/net/socket/socks_client_socket_pool.cc
+++ b/net/socket/socks_client_socket_pool.cc
@@ -59,7 +59,8 @@
 
 SOCKSConnectJob::~SOCKSConnectJob() {
   // We don't worry about cancelling the tcp socket since the destructor in
-  // scoped_ptr<ClientSocketHandle> transport_socket_handle_ will take care of
+  // std::unique_ptr<ClientSocketHandle> transport_socket_handle_ will take care
+  // of
   // it.
 }
 
@@ -166,12 +167,12 @@
   return DoLoop(OK);
 }
 
-scoped_ptr<ConnectJob>
+std::unique_ptr<ConnectJob>
 SOCKSClientSocketPool::SOCKSConnectJobFactory::NewConnectJob(
     const std::string& group_name,
     const PoolBase::Request& request,
     ConnectJob::Delegate* delegate) const {
-  return scoped_ptr<ConnectJob>(new SOCKSConnectJob(
+  return std::unique_ptr<ConnectJob>(new SOCKSConnectJob(
       group_name, request.priority(), request.respect_limits(),
       request.params(), ConnectionTimeout(), transport_pool_, host_resolver_,
       delegate, net_log_));
@@ -237,7 +238,7 @@
 }
 
 void SOCKSClientSocketPool::ReleaseSocket(const std::string& group_name,
-                                          scoped_ptr<StreamSocket> socket,
+                                          std::unique_ptr<StreamSocket> socket,
                                           int id) {
   base_.ReleaseSocket(group_name, std::move(socket), id);
 }
@@ -264,13 +265,13 @@
   return base_.GetLoadState(group_name, handle);
 }
 
-scoped_ptr<base::DictionaryValue> SOCKSClientSocketPool::GetInfoAsValue(
+std::unique_ptr<base::DictionaryValue> SOCKSClientSocketPool::GetInfoAsValue(
     const std::string& name,
     const std::string& type,
     bool include_nested_pools) const {
-  scoped_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type));
+  std::unique_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type));
   if (include_nested_pools) {
-    scoped_ptr<base::ListValue> list(new base::ListValue());
+    std::unique_ptr<base::ListValue> list(new base::ListValue());
     list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool",
                                                  "transport_socket_pool",
                                                  false));
diff --git a/net/socket/socks_client_socket_pool.h b/net/socket/socks_client_socket_pool.h
index 175ce49..b1371bb 100644
--- a/net/socket/socks_client_socket_pool.h
+++ b/net/socket/socks_client_socket_pool.h
@@ -5,12 +5,12 @@
 #ifndef NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_
 #define NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_
 
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/host_port_pair.h"
 #include "net/dns/host_resolver.h"
@@ -97,8 +97,8 @@
 
   State next_state_;
   CompletionCallback callback_;
-  scoped_ptr<ClientSocketHandle> transport_socket_handle_;
-  scoped_ptr<StreamSocket> socket_;
+  std::unique_ptr<ClientSocketHandle> transport_socket_handle_;
+  std::unique_ptr<StreamSocket> socket_;
 
   DISALLOW_COPY_AND_ASSIGN(SOCKSConnectJob);
 };
@@ -135,7 +135,7 @@
                      ClientSocketHandle* handle) override;
 
   void ReleaseSocket(const std::string& group_name,
-                     scoped_ptr<StreamSocket> socket,
+                     std::unique_ptr<StreamSocket> socket,
                      int id) override;
 
   void FlushWithError(int error) override;
@@ -149,7 +149,7 @@
   LoadState GetLoadState(const std::string& group_name,
                          const ClientSocketHandle* handle) const override;
 
-  scoped_ptr<base::DictionaryValue> GetInfoAsValue(
+  std::unique_ptr<base::DictionaryValue> GetInfoAsValue(
       const std::string& name,
       const std::string& type,
       bool include_nested_pools) const override;
@@ -181,7 +181,7 @@
     ~SOCKSConnectJobFactory() override {}
 
     // ClientSocketPoolBase::ConnectJobFactory methods.
-    scoped_ptr<ConnectJob> NewConnectJob(
+    std::unique_ptr<ConnectJob> NewConnectJob(
         const std::string& group_name,
         const PoolBase::Request& request,
         ConnectJob::Delegate* delegate) const override;
diff --git a/net/socket/socks_client_socket_pool_unittest.cc b/net/socket/socks_client_socket_pool_unittest.cc
index 5723bef..17b7df8d 100644
--- a/net/socket/socks_client_socket_pool_unittest.cc
+++ b/net/socket/socks_client_socket_pool_unittest.cc
@@ -83,9 +83,9 @@
     SocketDataProvider* data_provider() { return data_.get(); }
 
    private:
-    scoped_ptr<StaticSocketDataProvider> data_;
-    scoped_ptr<MockWrite[]> writes_;
-    scoped_ptr<MockRead[]> reads_;
+    std::unique_ptr<StaticSocketDataProvider> data_;
+    std::unique_ptr<MockWrite[]> writes_;
+    std::unique_ptr<MockRead[]> reads_;
   };
 
   SOCKSClientSocketPoolTest()
@@ -111,7 +111,7 @@
     return test_base_.GetOrderOfRequest(index);
   }
 
-  std::vector<scoped_ptr<TestSocketRequest>>* requests() {
+  std::vector<std::unique_ptr<TestSocketRequest>>* requests() {
     return test_base_.requests();
   }
 
diff --git a/net/socket/socks_client_socket_unittest.cc b/net/socket/socks_client_socket_unittest.cc
index bff76c10..764c71bc 100644
--- a/net/socket/socks_client_socket_unittest.cc
+++ b/net/socket/socks_client_socket_unittest.cc
@@ -4,10 +4,10 @@
 
 #include "net/socket/socks_client_socket.h"
 
+#include <memory>
 #include <utility>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/address_list.h"
 #include "net/base/test_completion_callback.h"
 #include "net/base/winsock_init.h"
@@ -34,23 +34,26 @@
  public:
   SOCKSClientSocketTest();
   // Create a SOCKSClientSocket on top of a MockSocket.
-  scoped_ptr<SOCKSClientSocket> BuildMockSocket(
-      MockRead reads[], size_t reads_count,
-      MockWrite writes[], size_t writes_count,
+  std::unique_ptr<SOCKSClientSocket> BuildMockSocket(
+      MockRead reads[],
+      size_t reads_count,
+      MockWrite writes[],
+      size_t writes_count,
       HostResolver* host_resolver,
-      const std::string& hostname, int port,
+      const std::string& hostname,
+      int port,
       NetLog* net_log);
   void SetUp() override;
 
  protected:
-  scoped_ptr<SOCKSClientSocket> user_sock_;
+  std::unique_ptr<SOCKSClientSocket> user_sock_;
   AddressList address_list_;
   // Filled in by BuildMockSocket() and owned by its return value
   // (which |user_sock| is set to).
   StreamSocket* tcp_sock_;
   TestCompletionCallback callback_;
-  scoped_ptr<MockHostResolver> host_resolver_;
-  scoped_ptr<SocketDataProvider> data_;
+  std::unique_ptr<MockHostResolver> host_resolver_;
+  std::unique_ptr<SocketDataProvider> data_;
 };
 
 SOCKSClientSocketTest::SOCKSClientSocketTest()
@@ -62,7 +65,7 @@
   PlatformTest::SetUp();
 }
 
-scoped_ptr<SOCKSClientSocket> SOCKSClientSocketTest::BuildMockSocket(
+std::unique_ptr<SOCKSClientSocket> SOCKSClientSocketTest::BuildMockSocket(
     MockRead reads[],
     size_t reads_count,
     MockWrite writes[],
@@ -71,7 +74,6 @@
     const std::string& hostname,
     int port,
     NetLog* net_log) {
-
   TestCompletionCallback callback;
   data_.reset(new StaticSocketDataProvider(reads, reads_count,
                                            writes, writes_count));
@@ -83,11 +85,11 @@
   EXPECT_EQ(OK, rv);
   EXPECT_TRUE(tcp_sock_->IsConnected());
 
-  scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
+  std::unique_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
   // |connection| takes ownership of |tcp_sock_|, but keep a
   // non-owning pointer to it.
-  connection->SetSocket(scoped_ptr<StreamSocket>(tcp_sock_));
-  return scoped_ptr<SOCKSClientSocket>(new SOCKSClientSocket(
+  connection->SetSocket(std::unique_ptr<StreamSocket>(tcp_sock_));
+  return std::unique_ptr<SOCKSClientSocket>(new SOCKSClientSocket(
       std::move(connection),
       HostResolver::RequestInfo(HostPortPair(hostname, port)), DEFAULT_PRIORITY,
       host_resolver));
@@ -387,8 +389,8 @@
 // Calls Disconnect() while a host resolve is in progress. The outstanding host
 // resolve should be cancelled.
 TEST_F(SOCKSClientSocketTest, DisconnectWhileHostResolveInProgress) {
-  scoped_ptr<HangingHostResolverWithCancel> hanging_resolver(
-    new HangingHostResolverWithCancel());
+  std::unique_ptr<HangingHostResolverWithCancel> hanging_resolver(
+      new HangingHostResolverWithCancel());
 
   // Doesn't matter what the socket data is, we will never use it -- garbage.
   MockWrite data_writes[] = { MockWrite(SYNCHRONOUS, "", 0) };
@@ -438,7 +440,7 @@
 TEST_F(SOCKSClientSocketTest, NoIPv6RealResolver) {
   const char kHostName[] = "::1";
 
-  scoped_ptr<HostResolver> host_resolver(
+  std::unique_ptr<HostResolver> host_resolver(
       HostResolver::CreateSystemResolver(HostResolver::Options(), NULL));
 
   user_sock_ = BuildMockSocket(NULL, 0,
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index e3d0a36..1d5c7157 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -784,7 +784,7 @@
   // prior to invoking OnHandshakeIOComplete.
   // Read on the NSS task runner when once OnHandshakeIOComplete is invoked
   // on the NSS task runner.
-  scoped_ptr<crypto::ECPrivateKey> channel_id_key_;
+  std::unique_ptr<crypto::ECPrivateKey> channel_id_key_;
 
   DISALLOW_COPY_AND_ASSIGN(Core);
 };
@@ -2354,7 +2354,7 @@
 }
 
 SSLClientSocketNSS::SSLClientSocketNSS(
-    scoped_ptr<ClientSocketHandle> transport_socket,
+    std::unique_ptr<ClientSocketHandle> transport_socket,
     const HostPortPair& host_and_port,
     const SSLConfig& ssl_config,
     const SSLClientSocketContext& context)
diff --git a/net/socket/ssl_client_socket_nss.h b/net/socket/ssl_client_socket_nss.h
index 7073290..c96fc41 100644
--- a/net/socket/ssl_client_socket_nss.h
+++ b/net/socket/ssl_client_socket_nss.h
@@ -11,10 +11,10 @@
 #include <nss.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/platform_thread.h"
 #include "base/time/time.h"
@@ -51,7 +51,7 @@
   // authentication is requested, the host_and_port field of SSLCertRequestInfo
   // will be populated with |host_and_port|.  |ssl_config| specifies
   // the SSL settings.
-  SSLClientSocketNSS(scoped_ptr<ClientSocketHandle> transport_socket,
+  SSLClientSocketNSS(std::unique_ptr<ClientSocketHandle> transport_socket,
                      const HostPortPair& host_and_port,
                      const SSLConfig& ssl_config,
                      const SSLClientSocketContext& context);
@@ -153,7 +153,7 @@
   // uses the first one as a fallback for NPN.
   static void ReorderNextProtos(NextProtoVector* next_protos);
 
-  scoped_ptr<ClientSocketHandle> transport_;
+  std::unique_ptr<ClientSocketHandle> transport_;
   HostPortPair host_and_port_;
   SSLConfig ssl_config_;
 
@@ -164,7 +164,7 @@
   CertVerifyResult server_cert_verify_result_;
 
   CertVerifier* const cert_verifier_;
-  scoped_ptr<CertVerifier::Request> cert_verifier_request_;
+  std::unique_ptr<CertVerifier::Request> cert_verifier_request_;
 
   // Certificate Transparency: Verifier and result holder.
   ct::CTVerifyResult ct_verify_result_;
diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc
index cfad9de..03e33ad3e 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -118,7 +118,7 @@
   }
 }
 
-scoped_ptr<base::Value> NetLogPrivateKeyOperationCallback(
+std::unique_ptr<base::Value> NetLogPrivateKeyOperationCallback(
     SSLPrivateKey::Type type,
     SSLPrivateKey::Hash hash,
     NetLogCaptureMode mode) {
@@ -151,17 +151,17 @@
       break;
   }
 
-  scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue);
+  std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue);
   value->SetString("type", type_str);
   value->SetString("hash", hash_str);
   return std::move(value);
 }
 
-scoped_ptr<base::Value> NetLogChannelIDLookupCallback(
+std::unique_ptr<base::Value> NetLogChannelIDLookupCallback(
     ChannelIDService* channel_id_service,
     NetLogCaptureMode capture_mode) {
   ChannelIDStore* store = channel_id_service->GetChannelIDStore();
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetBoolean("ephemeral", store->IsEphemeral());
   dict->SetString("service", base::HexEncode(&channel_id_service,
                                              sizeof(channel_id_service)));
@@ -169,11 +169,11 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogChannelIDLookupCompleteCallback(
+std::unique_ptr<base::Value> NetLogChannelIDLookupCompleteCallback(
     crypto::ECPrivateKey* key,
     int result,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("net_error", result);
   std::string raw_key;
   if (result == OK && key && key->ExportRawPublicKey(&raw_key)) {
@@ -360,7 +360,7 @@
   ScopedSSL_CTX ssl_ctx_;
 
 #if !defined(OS_NACL)
-  scoped_ptr<SSLKeyLogger> ssl_key_logger_;
+  std::unique_ptr<SSLKeyLogger> ssl_key_logger_;
 #endif
 
   // TODO(davidben): Use a separate cache per URLRequestContext.
@@ -468,7 +468,7 @@
 }
 
 SSLClientSocketOpenSSL::SSLClientSocketOpenSSL(
-    scoped_ptr<ClientSocketHandle> transport_socket,
+    std::unique_ptr<ClientSocketHandle> transport_socket,
     const HostPortPair& host_and_port,
     const SSLConfig& ssl_config,
     const SSLClientSocketContext& context)
diff --git a/net/socket/ssl_client_socket_openssl.h b/net/socket/ssl_client_socket_openssl.h
index 628d4db..d160c90 100644
--- a/net/socket/ssl_client_socket_openssl.h
+++ b/net/socket/ssl_client_socket_openssl.h
@@ -10,13 +10,13 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/containers/mru_cache.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "build/build_config.h"
 #include "net/base/completion_callback.h"
@@ -53,7 +53,7 @@
   // The given hostname will be compared with the name(s) in the server's
   // certificate during the SSL handshake.  ssl_config specifies the SSL
   // settings.
-  SSLClientSocketOpenSSL(scoped_ptr<ClientSocketHandle> transport_socket,
+  SSLClientSocketOpenSSL(std::unique_ptr<ClientSocketHandle> transport_socket,
                          const HostPortPair& host_and_port,
                          const SSLConfig& ssl_config,
                          const SSLClientSocketContext& context);
@@ -279,7 +279,7 @@
   int transport_write_error_;
 
   // Set when Connect finishes.
-  scoped_ptr<PeerCertificateChain> server_cert_chain_;
+  std::unique_ptr<PeerCertificateChain> server_cert_chain_;
   scoped_refptr<X509Certificate> server_cert_;
   CertVerifyResult server_cert_verify_result_;
   bool completed_connect_;
@@ -296,7 +296,7 @@
   std::vector<SSLClientCertType> cert_key_types_;
 
   CertVerifier* const cert_verifier_;
-  scoped_ptr<CertVerifier::Request> cert_verifier_request_;
+  std::unique_ptr<CertVerifier::Request> cert_verifier_request_;
   base::TimeTicks start_cert_verification_time_;
 
   // Certificate Transparency: Verifier and result holder.
@@ -313,7 +313,7 @@
   SSL* ssl_;
   BIO* transport_bio_;
 
-  scoped_ptr<ClientSocketHandle> transport_;
+  std::unique_ptr<ClientSocketHandle> transport_;
   const HostPortPair host_and_port_;
   SSLConfig ssl_config_;
   // ssl_session_cache_shard_ is an opaque string that partitions the SSL
@@ -338,7 +338,7 @@
   NextProtoStatus npn_status_;
   std::string npn_proto_;
   // Written by the |channel_id_service_|.
-  scoped_ptr<crypto::ECPrivateKey> channel_id_key_;
+  std::unique_ptr<crypto::ECPrivateKey> channel_id_key_;
   // True if a channel ID was sent.
   bool channel_id_sent_;
   // True if the current session was newly-established, but the certificate had
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
index 2a2865c6..00a36c5 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -551,11 +551,12 @@
     ssl_config_service_->RemoveObserver(this);
 }
 
-scoped_ptr<ConnectJob> SSLClientSocketPool::SSLConnectJobFactory::NewConnectJob(
+std::unique_ptr<ConnectJob>
+SSLClientSocketPool::SSLConnectJobFactory::NewConnectJob(
     const std::string& group_name,
     const PoolBase::Request& request,
     ConnectJob::Delegate* delegate) const {
-  return scoped_ptr<ConnectJob>(new SSLConnectJob(
+  return std::unique_ptr<ConnectJob>(new SSLConnectJob(
       group_name, request.priority(), request.respect_limits(),
       request.params(), ConnectionTimeout(), transport_pool_, socks_pool_,
       http_proxy_pool_, client_socket_factory_, context_, delegate, net_log_));
@@ -597,7 +598,7 @@
 }
 
 void SSLClientSocketPool::ReleaseSocket(const std::string& group_name,
-                                        scoped_ptr<StreamSocket> socket,
+                                        std::unique_ptr<StreamSocket> socket,
                                         int id) {
   base_.ReleaseSocket(group_name, std::move(socket), id);
 }
@@ -624,11 +625,11 @@
   return base_.GetLoadState(group_name, handle);
 }
 
-scoped_ptr<base::DictionaryValue> SSLClientSocketPool::GetInfoAsValue(
+std::unique_ptr<base::DictionaryValue> SSLClientSocketPool::GetInfoAsValue(
     const std::string& name,
     const std::string& type,
     bool include_nested_pools) const {
-  scoped_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type));
+  std::unique_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type));
   if (include_nested_pools) {
     base::ListValue* list = new base::ListValue();
     if (transport_pool_) {
diff --git a/net/socket/ssl_client_socket_pool.h b/net/socket/ssl_client_socket_pool.h
index d5f4807..3dc03e5 100644
--- a/net/socket/ssl_client_socket_pool.h
+++ b/net/socket/ssl_client_socket_pool.h
@@ -5,11 +5,11 @@
 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_
 #define NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/privacy_mode.h"
 #include "net/http/http_response_info.h"
@@ -160,8 +160,8 @@
 
   State next_state_;
   CompletionCallback callback_;
-  scoped_ptr<ClientSocketHandle> transport_socket_handle_;
-  scoped_ptr<SSLClientSocket> ssl_socket_;
+  std::unique_ptr<ClientSocketHandle> transport_socket_handle_;
+  std::unique_ptr<SSLClientSocket> ssl_socket_;
 
   HttpResponseInfo error_response_info_;
 
@@ -218,7 +218,7 @@
                      ClientSocketHandle* handle) override;
 
   void ReleaseSocket(const std::string& group_name,
-                     scoped_ptr<StreamSocket> socket,
+                     std::unique_ptr<StreamSocket> socket,
                      int id) override;
 
   void FlushWithError(int error) override;
@@ -232,7 +232,7 @@
   LoadState GetLoadState(const std::string& group_name,
                          const ClientSocketHandle* handle) const override;
 
-  scoped_ptr<base::DictionaryValue> GetInfoAsValue(
+  std::unique_ptr<base::DictionaryValue> GetInfoAsValue(
       const std::string& name,
       const std::string& type,
       bool include_nested_pools) const override;
@@ -271,7 +271,7 @@
     ~SSLConnectJobFactory() override;
 
     // ClientSocketPoolBase::ConnectJobFactory methods.
-    scoped_ptr<ConnectJob> NewConnectJob(
+    std::unique_ptr<ConnectJob> NewConnectJob(
         const std::string& group_name,
         const PoolBase::Request& request,
         ConnectJob::Delegate* delegate) const override;
diff --git a/net/socket/ssl_client_socket_pool_unittest.cc b/net/socket/ssl_client_socket_pool_unittest.cc
index f83ffd5..f3caaf54 100644
--- a/net/socket/ssl_client_socket_pool_unittest.cc
+++ b/net/socket/ssl_client_socket_pool_unittest.cc
@@ -176,13 +176,13 @@
 
   MockClientSocketFactory socket_factory_;
   MockCachingHostResolver host_resolver_;
-  scoped_ptr<CertVerifier> cert_verifier_;
-  scoped_ptr<TransportSecurityState> transport_security_state_;
-  const scoped_ptr<ProxyService> proxy_service_;
+  std::unique_ptr<CertVerifier> cert_verifier_;
+  std::unique_ptr<TransportSecurityState> transport_security_state_;
+  const std::unique_ptr<ProxyService> proxy_service_;
   const scoped_refptr<SSLConfigService> ssl_config_service_;
-  const scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_;
+  const std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_;
   HttpServerPropertiesImpl http_server_properties_;
-  const scoped_ptr<HttpNetworkSession> session_;
+  const std::unique_ptr<HttpNetworkSession> session_;
 
   scoped_refptr<TransportSocketParams> direct_transport_socket_params_;
   MockTransportClientSocketPool transport_socket_pool_;
@@ -196,7 +196,7 @@
   HttpProxyClientSocketPool http_proxy_socket_pool_;
 
   SSLConfig ssl_config_;
-  scoped_ptr<SSLClientSocketPool> pool_;
+  std::unique_ptr<SSLClientSocketPool> pool_;
 };
 
 INSTANTIATE_TEST_CASE_P(NextProto,
@@ -794,7 +794,7 @@
   EXPECT_FALSE(handle.is_ssl_error());
   const HttpResponseInfo& tunnel_info = handle.ssl_error_response_info();
   EXPECT_EQ(tunnel_info.headers->response_code(), 407);
-  scoped_ptr<ClientSocketHandle> tunnel_handle(
+  std::unique_ptr<ClientSocketHandle> tunnel_handle(
       handle.release_pending_http_proxy_connection());
   EXPECT_TRUE(tunnel_handle->socket());
   EXPECT_FALSE(tunnel_handle->socket()->IsConnected());
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
index d95956b..b3088999 100644
--- a/net/socket/ssl_client_socket_unittest.cc
+++ b/net/socket/ssl_client_socket_unittest.cc
@@ -78,7 +78,7 @@
 // StreamSocket.
 class WrappedStreamSocket : public StreamSocket {
  public:
-  explicit WrappedStreamSocket(scoped_ptr<StreamSocket> transport)
+  explicit WrappedStreamSocket(std::unique_ptr<StreamSocket> transport)
       : transport_(std::move(transport)) {}
   ~WrappedStreamSocket() override {}
 
@@ -144,7 +144,7 @@
   }
 
  protected:
-  scoped_ptr<StreamSocket> transport_;
+  std::unique_ptr<StreamSocket> transport_;
 };
 
 // ReadBufferingStreamSocket is a wrapper for an existing StreamSocket that
@@ -155,7 +155,7 @@
 // them from the TestServer.
 class ReadBufferingStreamSocket : public WrappedStreamSocket {
  public:
-  explicit ReadBufferingStreamSocket(scoped_ptr<StreamSocket> transport);
+  explicit ReadBufferingStreamSocket(std::unique_ptr<StreamSocket> transport);
   ~ReadBufferingStreamSocket() override {}
 
   // Socket implementation:
@@ -193,7 +193,7 @@
 };
 
 ReadBufferingStreamSocket::ReadBufferingStreamSocket(
-    scoped_ptr<StreamSocket> transport)
+    std::unique_ptr<StreamSocket> transport)
     : WrappedStreamSocket(std::move(transport)),
       read_buffer_(new GrowableIOBuffer()),
       buffer_size_(0) {}
@@ -285,7 +285,8 @@
 // Simulates synchronously receiving an error during Read() or Write()
 class SynchronousErrorStreamSocket : public WrappedStreamSocket {
  public:
-  explicit SynchronousErrorStreamSocket(scoped_ptr<StreamSocket> transport);
+  explicit SynchronousErrorStreamSocket(
+      std::unique_ptr<StreamSocket> transport);
   ~SynchronousErrorStreamSocket() override {}
 
   // Socket implementation:
@@ -327,7 +328,7 @@
 };
 
 SynchronousErrorStreamSocket::SynchronousErrorStreamSocket(
-    scoped_ptr<StreamSocket> transport)
+    std::unique_ptr<StreamSocket> transport)
     : WrappedStreamSocket(std::move(transport)),
       have_read_error_(false),
       pending_read_error_(OK),
@@ -356,7 +357,7 @@
 // semantics).
 class FakeBlockingStreamSocket : public WrappedStreamSocket {
  public:
-  explicit FakeBlockingStreamSocket(scoped_ptr<StreamSocket> transport);
+  explicit FakeBlockingStreamSocket(std::unique_ptr<StreamSocket> transport);
   ~FakeBlockingStreamSocket() override {}
 
   // Socket implementation:
@@ -410,7 +411,7 @@
   int pending_read_result_;
 
   // WaitForReadResult() wait loop.
-  scoped_ptr<base::RunLoop> read_loop_;
+  std::unique_ptr<base::RunLoop> read_loop_;
 
   // True if write calls are blocked.
   bool should_block_write_;
@@ -425,11 +426,11 @@
   int pending_write_len_;
 
   // WaitForWrite() wait loop.
-  scoped_ptr<base::RunLoop> write_loop_;
+  std::unique_ptr<base::RunLoop> write_loop_;
 };
 
 FakeBlockingStreamSocket::FakeBlockingStreamSocket(
-    scoped_ptr<StreamSocket> transport)
+    std::unique_ptr<StreamSocket> transport)
     : WrappedStreamSocket(std::move(transport)),
       should_block_read_(false),
       pending_read_result_(ERR_IO_PENDING),
@@ -577,7 +578,7 @@
 // reads and writes on the socket.
 class CountingStreamSocket : public WrappedStreamSocket {
  public:
-  explicit CountingStreamSocket(scoped_ptr<StreamSocket> transport)
+  explicit CountingStreamSocket(std::unique_ptr<StreamSocket> transport)
       : WrappedStreamSocket(std::move(transport)),
         read_count_(0),
         write_count_(0) {}
@@ -638,11 +639,11 @@
 // channel id.
 class FailingChannelIDStore : public ChannelIDStore {
   int GetChannelID(const std::string& server_identifier,
-                   scoped_ptr<crypto::ECPrivateKey>* key_result,
+                   std::unique_ptr<crypto::ECPrivateKey>* key_result,
                    const GetChannelIDCallback& callback) override {
     return ERR_UNEXPECTED;
   }
-  void SetChannelID(scoped_ptr<ChannelID> channel_id) override {}
+  void SetChannelID(std::unique_ptr<ChannelID> channel_id) override {}
   void DeleteChannelID(const std::string& server_identifier,
                        const base::Closure& completion_callback) override {}
   void DeleteAllCreatedBetween(
@@ -660,14 +661,14 @@
 // channel id.
 class AsyncFailingChannelIDStore : public ChannelIDStore {
   int GetChannelID(const std::string& server_identifier,
-                   scoped_ptr<crypto::ECPrivateKey>* key_result,
+                   std::unique_ptr<crypto::ECPrivateKey>* key_result,
                    const GetChannelIDCallback& callback) override {
     base::ThreadTaskRunnerHandle::Get()->PostTask(
         FROM_HERE,
         base::Bind(callback, ERR_UNEXPECTED, server_identifier, nullptr));
     return ERR_IO_PENDING;
   }
-  void SetChannelID(scoped_ptr<ChannelID> channel_id) override {}
+  void SetChannelID(std::unique_ptr<ChannelID> channel_id) override {}
   void DeleteChannelID(const std::string& server_identifier,
                        const base::Closure& completion_callback) override {}
   void DeleteAllCreatedBetween(
@@ -752,11 +753,11 @@
     return true;
   }
 
-  scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
-      scoped_ptr<StreamSocket> transport_socket,
+  std::unique_ptr<SSLClientSocket> CreateSSLClientSocket(
+      std::unique_ptr<StreamSocket> transport_socket,
       const HostPortPair& host_and_port,
       const SSLConfig& ssl_config) {
-    scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
+    std::unique_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
     connection->SetSocket(std::move(transport_socket));
     return socket_factory_->CreateSSLClientSocket(
         std::move(connection), host_and_port, ssl_config, context_);
@@ -772,7 +773,7 @@
   // itself was a success.
   bool CreateAndConnectSSLClientSocket(const SSLConfig& ssl_config,
                                        int* result) {
-    scoped_ptr<StreamSocket> transport(
+    std::unique_ptr<StreamSocket> transport(
         new TCPClientSocket(addr_, NULL, &log_, NetLog::Source()));
     int rv = callback_.GetResult(transport->Connect(callback_.callback()));
     if (rv != OK) {
@@ -805,14 +806,14 @@
   }
 
   ClientSocketFactory* socket_factory_;
-  scoped_ptr<MockCertVerifier> cert_verifier_;
-  scoped_ptr<TransportSecurityState> transport_security_state_;
+  std::unique_ptr<MockCertVerifier> cert_verifier_;
+  std::unique_ptr<TransportSecurityState> transport_security_state_;
   SSLClientSocketContext context_;
-  scoped_ptr<SSLClientSocket> sock_;
+  std::unique_ptr<SSLClientSocket> sock_;
   TestNetLog log_;
 
  private:
-  scoped_ptr<SpawnedTestServer> spawned_test_server_;
+  std::unique_ptr<SpawnedTestServer> spawned_test_server_;
   TestCompletionCallback callback_;
   AddressList addr_;
 };
@@ -835,12 +836,12 @@
 
     TestCompletionCallback callback;
     TestNetLog log;
-    scoped_ptr<StreamSocket> transport(
+    std::unique_ptr<StreamSocket> transport(
         new TCPClientSocket(addr, NULL, &log, NetLog::Source()));
     int rv = callback.GetResult(transport->Connect(callback.callback()));
     EXPECT_EQ(OK, rv);
 
-    scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+    std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
         std::move(transport), spawned_test_server.host_port_pair(),
         SSLConfig()));
     EXPECT_FALSE(sock->IsConnected());
@@ -878,18 +879,18 @@
       const SSLConfig& client_config,
       TestCompletionCallback* callback,
       FakeBlockingStreamSocket** out_raw_transport,
-      scoped_ptr<SSLClientSocket>* out_sock) {
+      std::unique_ptr<SSLClientSocket>* out_sock) {
     CHECK(spawned_test_server());
 
-    scoped_ptr<StreamSocket> real_transport(
+    std::unique_ptr<StreamSocket> real_transport(
         new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
-    scoped_ptr<FakeBlockingStreamSocket> transport(
+    std::unique_ptr<FakeBlockingStreamSocket> transport(
         new FakeBlockingStreamSocket(std::move(real_transport)));
     int rv = callback->GetResult(transport->Connect(callback->callback()));
     EXPECT_EQ(OK, rv);
 
     FakeBlockingStreamSocket* raw_transport = transport.get();
-    scoped_ptr<SSLClientSocket> sock = CreateSSLClientSocket(
+    std::unique_ptr<SSLClientSocket> sock = CreateSSLClientSocket(
         std::move(transport), spawned_test_server()->host_port_pair(),
         client_config);
 
@@ -924,7 +925,7 @@
 
     TestCompletionCallback callback;
     FakeBlockingStreamSocket* raw_transport = NULL;
-    scoped_ptr<SSLClientSocket> sock;
+    std::unique_ptr<SSLClientSocket> sock;
     ASSERT_NO_FATAL_FAILURE(CreateAndConnectUntilServerFinishedReceived(
         client_config, &callback, &raw_transport, &sock));
 
@@ -990,7 +991,7 @@
   }
 
  private:
-  scoped_ptr<ChannelIDService> channel_id_service_;
+  std::unique_ptr<ChannelIDService> channel_id_service_;
 };
 
 }  // namespace
@@ -1000,12 +1001,12 @@
 
   TestCompletionCallback callback;
   TestNetLog log;
-  scoped_ptr<StreamSocket> transport(
+  std::unique_ptr<StreamSocket> transport(
       new TCPClientSocket(addr(), NULL, &log, NetLog::Source()));
   int rv = callback.GetResult(transport->Connect(callback.callback()));
   EXPECT_EQ(OK, rv);
 
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       SSLConfig()));
 
@@ -1146,14 +1147,14 @@
   ASSERT_TRUE(StartTestServer(SpawnedTestServer::SSLOptions()));
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> transport(
+  std::unique_ptr<StreamSocket> transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
   EXPECT_EQ(0, transport->GetTotalReceivedBytes());
 
   int rv = callback.GetResult(transport->Connect(callback.callback()));
   EXPECT_EQ(OK, rv);
 
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       SSLConfig()));
   EXPECT_EQ(0, sock->GetTotalReceivedBytes());
@@ -1203,9 +1204,9 @@
   ASSERT_TRUE(StartTestServer(SpawnedTestServer::SSLOptions()));
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> real_transport(
+  std::unique_ptr<StreamSocket> real_transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
-  scoped_ptr<SynchronousErrorStreamSocket> transport(
+  std::unique_ptr<SynchronousErrorStreamSocket> transport(
       new SynchronousErrorStreamSocket(std::move(real_transport)));
   int rv = callback.GetResult(transport->Connect(callback.callback()));
   EXPECT_EQ(OK, rv);
@@ -1215,7 +1216,7 @@
   ssl_config.false_start_enabled = false;
 
   SynchronousErrorStreamSocket* raw_transport = transport.get();
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       ssl_config));
 
@@ -1234,9 +1235,9 @@
   ASSERT_TRUE(StartTestServer(SpawnedTestServer::SSLOptions()));
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> real_transport(
+  std::unique_ptr<StreamSocket> real_transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
-  scoped_ptr<SynchronousErrorStreamSocket> transport(
+  std::unique_ptr<SynchronousErrorStreamSocket> transport(
       new SynchronousErrorStreamSocket(std::move(real_transport)));
   int rv = callback.GetResult(transport->Connect(callback.callback()));
   EXPECT_EQ(OK, rv);
@@ -1246,7 +1247,7 @@
   ssl_config.false_start_enabled = false;
 
   SynchronousErrorStreamSocket* raw_transport = transport.get();
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       ssl_config));
 
@@ -1284,14 +1285,14 @@
   ASSERT_TRUE(StartTestServer(SpawnedTestServer::SSLOptions()));
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> real_transport(
+  std::unique_ptr<StreamSocket> real_transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
   // Note: |error_socket|'s ownership is handed to |transport|, but a pointer
   // is retained in order to configure additional errors.
-  scoped_ptr<SynchronousErrorStreamSocket> error_socket(
+  std::unique_ptr<SynchronousErrorStreamSocket> error_socket(
       new SynchronousErrorStreamSocket(std::move(real_transport)));
   SynchronousErrorStreamSocket* raw_error_socket = error_socket.get();
-  scoped_ptr<FakeBlockingStreamSocket> transport(
+  std::unique_ptr<FakeBlockingStreamSocket> transport(
       new FakeBlockingStreamSocket(std::move(error_socket)));
   FakeBlockingStreamSocket* raw_transport = transport.get();
   int rv = callback.GetResult(transport->Connect(callback.callback()));
@@ -1301,7 +1302,7 @@
   SSLConfig ssl_config;
   ssl_config.false_start_enabled = false;
 
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       ssl_config));
 
@@ -1351,14 +1352,14 @@
   ASSERT_TRUE(StartTestServer(SpawnedTestServer::SSLOptions()));
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> real_transport(
+  std::unique_ptr<StreamSocket> real_transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
   // Note: intermediate sockets' ownership are handed to |sock|, but a pointer
   // is retained in order to query them.
-  scoped_ptr<SynchronousErrorStreamSocket> error_socket(
+  std::unique_ptr<SynchronousErrorStreamSocket> error_socket(
       new SynchronousErrorStreamSocket(std::move(real_transport)));
   SynchronousErrorStreamSocket* raw_error_socket = error_socket.get();
-  scoped_ptr<CountingStreamSocket> counting_socket(
+  std::unique_ptr<CountingStreamSocket> counting_socket(
       new CountingStreamSocket(std::move(error_socket)));
   CountingStreamSocket* raw_counting_socket = counting_socket.get();
   int rv = callback.GetResult(counting_socket->Connect(callback.callback()));
@@ -1368,7 +1369,7 @@
   SSLConfig ssl_config;
   ssl_config.false_start_enabled = false;
 
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(counting_socket), spawned_test_server()->host_port_pair(),
       ssl_config));
 
@@ -1451,14 +1452,14 @@
   ASSERT_TRUE(StartTestServer(SpawnedTestServer::SSLOptions()));
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> real_transport(
+  std::unique_ptr<StreamSocket> real_transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
   // Note: |error_socket|'s ownership is handed to |transport|, but a pointer
   // is retained in order to configure additional errors.
-  scoped_ptr<SynchronousErrorStreamSocket> error_socket(
+  std::unique_ptr<SynchronousErrorStreamSocket> error_socket(
       new SynchronousErrorStreamSocket(std::move(real_transport)));
   SynchronousErrorStreamSocket* raw_error_socket = error_socket.get();
-  scoped_ptr<FakeBlockingStreamSocket> transport(
+  std::unique_ptr<FakeBlockingStreamSocket> transport(
       new FakeBlockingStreamSocket(std::move(error_socket)));
   FakeBlockingStreamSocket* raw_transport = transport.get();
 
@@ -1469,7 +1470,7 @@
   SSLConfig ssl_config;
   ssl_config.false_start_enabled = false;
 
-  scoped_ptr<SSLClientSocket> sock = CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock = CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       ssl_config);
 
@@ -1560,14 +1561,14 @@
   ASSERT_TRUE(StartTestServer(SpawnedTestServer::SSLOptions()));
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> real_transport(
+  std::unique_ptr<StreamSocket> real_transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
   // Note: |error_socket|'s ownership is handed to |transport|, but a pointer
   // is retained in order to configure additional errors.
-  scoped_ptr<SynchronousErrorStreamSocket> error_socket(
+  std::unique_ptr<SynchronousErrorStreamSocket> error_socket(
       new SynchronousErrorStreamSocket(std::move(real_transport)));
   SynchronousErrorStreamSocket* raw_error_socket = error_socket.get();
-  scoped_ptr<FakeBlockingStreamSocket> transport(
+  std::unique_ptr<FakeBlockingStreamSocket> transport(
       new FakeBlockingStreamSocket(std::move(error_socket)));
   FakeBlockingStreamSocket* raw_transport = transport.get();
 
@@ -1578,7 +1579,7 @@
   SSLConfig ssl_config;
   ssl_config.false_start_enabled = false;
 
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       ssl_config));
 
@@ -1657,15 +1658,15 @@
   ASSERT_TRUE(StartTestServer(SpawnedTestServer::SSLOptions()));
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> real_transport(
+  std::unique_ptr<StreamSocket> real_transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
-  scoped_ptr<SynchronousErrorStreamSocket> transport(
+  std::unique_ptr<SynchronousErrorStreamSocket> transport(
       new SynchronousErrorStreamSocket(std::move(real_transport)));
   int rv = callback.GetResult(transport->Connect(callback.callback()));
   EXPECT_EQ(OK, rv);
 
   SynchronousErrorStreamSocket* raw_transport = transport.get();
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       SSLConfig()));
 
@@ -1683,9 +1684,9 @@
   ASSERT_TRUE(StartTestServer(SpawnedTestServer::SSLOptions()));
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> real_transport(
+  std::unique_ptr<StreamSocket> real_transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
-  scoped_ptr<SynchronousErrorStreamSocket> transport(
+  std::unique_ptr<SynchronousErrorStreamSocket> transport(
       new SynchronousErrorStreamSocket(std::move(real_transport)));
   int rv = callback.GetResult(transport->Connect(callback.callback()));
   EXPECT_EQ(OK, rv);
@@ -1695,7 +1696,7 @@
   ssl_config.false_start_enabled = false;
 
   SynchronousErrorStreamSocket* raw_transport = transport.get();
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       ssl_config));
 
@@ -1716,12 +1717,12 @@
   ASSERT_TRUE(StartTestServer(SpawnedTestServer::SSLOptions()));
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> real_transport(
+  std::unique_ptr<StreamSocket> real_transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
-  scoped_ptr<SynchronousErrorStreamSocket> error_socket(
+  std::unique_ptr<SynchronousErrorStreamSocket> error_socket(
       new SynchronousErrorStreamSocket(std::move(real_transport)));
   SynchronousErrorStreamSocket* raw_error_socket = error_socket.get();
-  scoped_ptr<FakeBlockingStreamSocket> transport(
+  std::unique_ptr<FakeBlockingStreamSocket> transport(
       new FakeBlockingStreamSocket(std::move(error_socket)));
   FakeBlockingStreamSocket* raw_transport = transport.get();
   int rv = callback.GetResult(transport->Connect(callback.callback()));
@@ -1731,7 +1732,7 @@
   SSLConfig ssl_config;
   ssl_config.false_start_enabled = false;
 
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       ssl_config));
 
@@ -1797,15 +1798,15 @@
 
   TestCompletionCallback callback;
 
-  scoped_ptr<StreamSocket> real_transport(
+  std::unique_ptr<StreamSocket> real_transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
-  scoped_ptr<ReadBufferingStreamSocket> transport(
+  std::unique_ptr<ReadBufferingStreamSocket> transport(
       new ReadBufferingStreamSocket(std::move(real_transport)));
   ReadBufferingStreamSocket* raw_transport = transport.get();
   int rv = callback.GetResult(transport->Connect(callback.callback()));
   ASSERT_EQ(OK, rv);
 
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       SSLConfig()));
 
@@ -1868,12 +1869,12 @@
   TestCompletionCallback callback;
   TestNetLog log;
   log.SetCaptureMode(NetLogCaptureMode::IncludeSocketBytes());
-  scoped_ptr<StreamSocket> transport(
+  std::unique_ptr<StreamSocket> transport(
       new TCPClientSocket(addr(), NULL, &log, NetLog::Source()));
   int rv = callback.GetResult(transport->Connect(callback.callback()));
   EXPECT_EQ(OK, rv);
 
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       SSLConfig()));
 
@@ -1937,12 +1938,12 @@
   StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> transport(
+  std::unique_ptr<StreamSocket> transport(
       new MockTCPClientSocket(addr(), NULL, &data));
   int rv = callback.GetResult(transport->Connect(callback.callback()));
   EXPECT_EQ(OK, rv);
 
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       SSLConfig()));
 
@@ -1982,15 +1983,15 @@
   ASSERT_TRUE(StartTestServer(SpawnedTestServer::SSLOptions()));
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> transport(
+  std::unique_ptr<StreamSocket> transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
   int rv = callback.GetResult(transport->Connect(callback.callback()));
   EXPECT_EQ(OK, rv);
 
-  scoped_ptr<ClientSocketHandle> socket_handle(new ClientSocketHandle());
+  std::unique_ptr<ClientSocketHandle> socket_handle(new ClientSocketHandle());
   socket_handle->SetSocket(std::move(transport));
 
-  scoped_ptr<SSLClientSocket> sock(socket_factory_->CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(socket_factory_->CreateSSLClientSocket(
       std::move(socket_handle), spawned_test_server()->host_port_pair(),
       SSLConfig(), context_));
 
@@ -2511,14 +2512,14 @@
   ASSERT_TRUE(StartTestServer(SpawnedTestServer::SSLOptions()));
 
   TestCompletionCallback callback;
-  scoped_ptr<StreamSocket> real_transport(
+  std::unique_ptr<StreamSocket> real_transport(
       new TCPClientSocket(addr(), NULL, NULL, NetLog::Source()));
-  scoped_ptr<FakeBlockingStreamSocket> transport(
+  std::unique_ptr<FakeBlockingStreamSocket> transport(
       new FakeBlockingStreamSocket(std::move(real_transport)));
   FakeBlockingStreamSocket* raw_transport = transport.get();
   ASSERT_EQ(OK, callback.GetResult(transport->Connect(callback.callback())));
 
-  scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
       std::move(transport), spawned_test_server()->host_port_pair(),
       SSLConfig()));
   ASSERT_EQ(OK, callback.GetResult(sock->Connect(callback.callback())));
@@ -2567,11 +2568,11 @@
   sock_.reset();
 
   // Using a different HostPortPair uses a different session cache key.
-  scoped_ptr<StreamSocket> transport(
+  std::unique_ptr<StreamSocket> transport(
       new TCPClientSocket(addr(), NULL, &log_, NetLog::Source()));
   TestCompletionCallback callback;
   ASSERT_EQ(OK, callback.GetResult(transport->Connect(callback.callback())));
-  scoped_ptr<SSLClientSocket> sock = CreateSSLClientSocket(
+  std::unique_ptr<SSLClientSocket> sock = CreateSSLClientSocket(
       std::move(transport), HostPortPair("example.com", 443), ssl_config);
   ASSERT_EQ(OK, callback.GetResult(sock->Connect(callback.callback())));
   ASSERT_TRUE(sock->GetSSLInfo(&ssl_info));
@@ -2962,7 +2963,7 @@
   // Start a handshake up to the server Finished message.
   TestCompletionCallback callback;
   FakeBlockingStreamSocket* raw_transport1 = NULL;
-  scoped_ptr<SSLClientSocket> sock1;
+  std::unique_ptr<SSLClientSocket> sock1;
   ASSERT_NO_FATAL_FAILURE(CreateAndConnectUntilServerFinishedReceived(
       client_config, &callback, &raw_transport1, &sock1));
   // Although raw_transport1 has the server Finished blocked, the handshake
@@ -3019,7 +3020,7 @@
   // Start a handshake up to the server Finished message.
   TestCompletionCallback callback;
   FakeBlockingStreamSocket* raw_transport1 = NULL;
-  scoped_ptr<SSLClientSocket> sock1;
+  std::unique_ptr<SSLClientSocket> sock1;
   ASSERT_NO_FATAL_FAILURE(CreateAndConnectUntilServerFinishedReceived(
       client_config, &callback, &raw_transport1, &sock1));
   // Although raw_transport1 has the server Finished blocked, the handshake
diff --git a/net/socket/ssl_server_socket.h b/net/socket/ssl_server_socket.h
index 479bbc7..dfda6c1 100644
--- a/net/socket/ssl_server_socket.h
+++ b/net/socket/ssl_server_socket.h
@@ -5,7 +5,8 @@
 #ifndef NET_SOCKET_SSL_SERVER_SOCKET_H_
 #define NET_SOCKET_SSL_SERVER_SOCKET_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
 #include "net/socket/ssl_socket.h"
@@ -41,8 +42,8 @@
   //
   // The caller starts the SSL server handshake by calling Handshake on the
   // returned socket.
-  virtual scoped_ptr<SSLServerSocket> CreateSSLServerSocket(
-      scoped_ptr<StreamSocket> socket) = 0;
+  virtual std::unique_ptr<SSLServerSocket> CreateSSLServerSocket(
+      std::unique_ptr<StreamSocket> socket) = 0;
 };
 
 // Configures the underlying SSL library for the use of SSL server sockets.
@@ -62,7 +63,7 @@
 // It takes a reference to |certificate|.
 // The |key| and |ssl_config| parameters are copied.
 //
-NET_EXPORT scoped_ptr<SSLServerContext> CreateSSLServerContext(
+NET_EXPORT std::unique_ptr<SSLServerContext> CreateSSLServerContext(
     X509Certificate* certificate,
     const crypto::RSAPrivateKey& key,
     const SSLServerConfig& ssl_config);
diff --git a/net/socket/ssl_server_socket_nss.cc b/net/socket/ssl_server_socket_nss.cc
index 8e02909..17f7d62 100644
--- a/net/socket/ssl_server_socket_nss.cc
+++ b/net/socket/ssl_server_socket_nss.cc
@@ -79,7 +79,7 @@
  public:
   // See comments on CreateSSLServerSocket for details of how these
   // parameters are used.
-  SSLServerSocketNSS(scoped_ptr<StreamSocket> socket,
+  SSLServerSocketNSS(std::unique_ptr<StreamSocket> socket,
                      X509Certificate* certificate,
                      const crypto::RSAPrivateKey& key,
                      const SSLServerConfig& ssl_server_config);
@@ -187,7 +187,7 @@
   memio_Private* nss_bufs_;
 
   // StreamSocket for sending and receiving data.
-  scoped_ptr<StreamSocket> transport_socket_;
+  std::unique_ptr<StreamSocket> transport_socket_;
 
   // Options for the SSL socket.
   SSLServerConfig ssl_server_config_;
@@ -196,7 +196,7 @@
   scoped_refptr<X509Certificate> cert_;
 
   // Private key used by the server.
-  scoped_ptr<crypto::RSAPrivateKey> key_;
+  std::unique_ptr<crypto::RSAPrivateKey> key_;
 
   State next_handshake_state_;
   bool completed_handshake_;
@@ -205,7 +205,7 @@
 };
 
 SSLServerSocketNSS::SSLServerSocketNSS(
-    scoped_ptr<StreamSocket> transport_socket,
+    std::unique_ptr<StreamSocket> transport_socket,
     X509Certificate* cert,
     const crypto::RSAPrivateKey& key,
     const SSLServerConfig& ssl_server_config)
@@ -946,11 +946,11 @@
 
 }  // namespace
 
-scoped_ptr<SSLServerContext> CreateSSLServerContext(
+std::unique_ptr<SSLServerContext> CreateSSLServerContext(
     X509Certificate* certificate,
     const crypto::RSAPrivateKey& key,
     const SSLServerConfig& ssl_server_config) {
-  return scoped_ptr<SSLServerContext>(
+  return std::unique_ptr<SSLServerContext>(
       new SSLServerContextNSS(certificate, key, ssl_server_config));
 }
 
@@ -966,12 +966,12 @@
 
 SSLServerContextNSS::~SSLServerContextNSS() {}
 
-scoped_ptr<SSLServerSocket> SSLServerContextNSS::CreateSSLServerSocket(
-    scoped_ptr<StreamSocket> socket) {
+std::unique_ptr<SSLServerSocket> SSLServerContextNSS::CreateSSLServerSocket(
+    std::unique_ptr<StreamSocket> socket) {
   DCHECK(g_nss_server_sockets_init) << "EnableSSLServerSockets() has not been"
                                     << " called yet!";
 
-  return scoped_ptr<SSLServerSocket>(new SSLServerSocketNSS(
+  return std::unique_ptr<SSLServerSocket>(new SSLServerSocketNSS(
       std::move(socket), cert_.get(), *key_, ssl_server_config_));
 }
 
diff --git a/net/socket/ssl_server_socket_nss.h b/net/socket/ssl_server_socket_nss.h
index 497d461..9464cede 100644
--- a/net/socket/ssl_server_socket_nss.h
+++ b/net/socket/ssl_server_socket_nss.h
@@ -11,8 +11,9 @@
 #include <nss.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/host_port_pair.h"
 #include "net/base/nss_memio.h"
@@ -29,8 +30,8 @@
                       const SSLServerConfig& ssl_server_config);
   ~SSLServerContextNSS() override;
 
-  scoped_ptr<SSLServerSocket> CreateSSLServerSocket(
-      scoped_ptr<StreamSocket> socket) override;
+  std::unique_ptr<SSLServerSocket> CreateSSLServerSocket(
+      std::unique_ptr<StreamSocket> socket) override;
 
  private:
   // Options for the SSL socket.
@@ -40,7 +41,7 @@
   scoped_refptr<X509Certificate> cert_;
 
   // Private key used by the server.
-  scoped_ptr<crypto::RSAPrivateKey> key_;
+  std::unique_ptr<crypto::RSAPrivateKey> key_;
 };
 
 }  // namespace net
diff --git a/net/socket/ssl_server_socket_openssl.cc b/net/socket/ssl_server_socket_openssl.cc
index 74f22313..d931c5c 100644
--- a/net/socket/ssl_server_socket_openssl.cc
+++ b/net/socket/ssl_server_socket_openssl.cc
@@ -55,7 +55,7 @@
  public:
   // See comments on CreateSSLServerSocket for details of how these
   // parameters are used.
-  SSLServerSocketOpenSSL(scoped_ptr<StreamSocket> socket, SSL* ssl);
+  SSLServerSocketOpenSSL(std::unique_ptr<StreamSocket> socket, SSL* ssl);
   ~SSLServerSocketOpenSSL() override;
 
   // SSLServerSocket interface.
@@ -160,7 +160,7 @@
   BIO* transport_bio_;
 
   // StreamSocket for sending and receiving data.
-  scoped_ptr<StreamSocket> transport_socket_;
+  std::unique_ptr<StreamSocket> transport_socket_;
 
   // Certificate for the client.
   scoped_refptr<X509Certificate> client_cert_;
@@ -172,7 +172,7 @@
 };
 
 SSLServerSocketOpenSSL::SSLServerSocketOpenSSL(
-    scoped_ptr<StreamSocket> transport_socket,
+    std::unique_ptr<StreamSocket> transport_socket,
     SSL* ssl)
     : transport_send_busy_(false),
       transport_recv_busy_(false),
@@ -805,7 +805,7 @@
   // http://crbug.com/347402
   // The API for Verify supports the parts needed for async completion
   // but is currently expected to complete synchronously.
-  scoped_ptr<ClientCertVerifier::Request> ignore_async;
+  std::unique_ptr<ClientCertVerifier::Request> ignore_async;
   int res =
       verifier->Verify(client_cert.get(), CompletionCallback(), &ignore_async);
   DCHECK_NE(res, ERR_IO_PENDING);
@@ -819,11 +819,11 @@
 
 }  // namespace
 
-scoped_ptr<SSLServerContext> CreateSSLServerContext(
+std::unique_ptr<SSLServerContext> CreateSSLServerContext(
     X509Certificate* certificate,
     const crypto::RSAPrivateKey& key,
     const SSLServerConfig& ssl_server_config) {
-  return scoped_ptr<SSLServerContext>(
+  return std::unique_ptr<SSLServerContext>(
       new SSLServerContextOpenSSL(certificate, key, ssl_server_config));
 }
 
@@ -943,10 +943,10 @@
 
 SSLServerContextOpenSSL::~SSLServerContextOpenSSL() {}
 
-scoped_ptr<SSLServerSocket> SSLServerContextOpenSSL::CreateSSLServerSocket(
-    scoped_ptr<StreamSocket> socket) {
+std::unique_ptr<SSLServerSocket> SSLServerContextOpenSSL::CreateSSLServerSocket(
+    std::unique_ptr<StreamSocket> socket) {
   SSL* ssl = SSL_new(ssl_ctx_.get());
-  return scoped_ptr<SSLServerSocket>(
+  return std::unique_ptr<SSLServerSocket>(
       new SSLServerSocketOpenSSL(std::move(socket), ssl));
 }
 
diff --git a/net/socket/ssl_server_socket_openssl.h b/net/socket/ssl_server_socket_openssl.h
index 3a9d9c85..02e385ce 100644
--- a/net/socket/ssl_server_socket_openssl.h
+++ b/net/socket/ssl_server_socket_openssl.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/io_buffer.h"
 #include "net/log/net_log.h"
@@ -34,8 +35,8 @@
                           const SSLServerConfig& ssl_server_config);
   ~SSLServerContextOpenSSL() override;
 
-  scoped_ptr<SSLServerSocket> CreateSSLServerSocket(
-      scoped_ptr<StreamSocket> socket) override;
+  std::unique_ptr<SSLServerSocket> CreateSSLServerSocket(
+      std::unique_ptr<StreamSocket> socket) override;
 
  private:
   ScopedSSL_CTX ssl_ctx_;
@@ -47,7 +48,7 @@
   scoped_refptr<X509Certificate> cert_;
 
   // Private key used by the server.
-  scoped_ptr<crypto::RSAPrivateKey> key_;
+  std::unique_ptr<crypto::RSAPrivateKey> key_;
 };
 
 }  // namespace net
diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc
index 7327586..74e06ab 100644
--- a/net/socket/ssl_server_socket_unittest.cc
+++ b/net/socket/ssl_server_socket_unittest.cc
@@ -375,10 +375,11 @@
     server_socket_.reset();
     channel_1_.reset(new FakeDataChannel());
     channel_2_.reset(new FakeDataChannel());
-    scoped_ptr<ClientSocketHandle> client_connection(new ClientSocketHandle);
-    client_connection->SetSocket(scoped_ptr<StreamSocket>(
+    std::unique_ptr<ClientSocketHandle> client_connection(
+        new ClientSocketHandle);
+    client_connection->SetSocket(std::unique_ptr<StreamSocket>(
         new FakeSocket(channel_1_.get(), channel_2_.get())));
-    scoped_ptr<StreamSocket> server_socket(
+    std::unique_ptr<StreamSocket> server_socket(
         new FakeSocket(channel_2_.get(), channel_1_.get()));
 
     HostPortPair host_and_pair("unittest", 0);
@@ -404,7 +405,8 @@
         ImportCertFromFile(GetTestCertsDirectory(), cert_file_name);
     ASSERT_TRUE(client_ssl_config_.client_cert);
 
-    scoped_ptr<crypto::RSAPrivateKey> key = ReadTestKey(private_key_file_name);
+    std::unique_ptr<crypto::RSAPrivateKey> key =
+        ReadTestKey(private_key_file_name);
     ASSERT_TRUE(key);
 
     client_ssl_config_.client_private_key = WrapOpenSSLPrivateKey(
@@ -441,7 +443,8 @@
     server_ssl_config_.client_cert_verifier = client_cert_verifier_.get();
   }
 
-  scoped_ptr<crypto::RSAPrivateKey> ReadTestKey(const base::StringPiece& name) {
+  std::unique_ptr<crypto::RSAPrivateKey> ReadTestKey(
+      const base::StringPiece& name) {
     base::FilePath certs_dir(GetTestCertsDirectory());
     base::FilePath key_path = certs_dir.AppendASCII(name);
     std::string key_string;
@@ -451,24 +454,24 @@
         reinterpret_cast<const uint8_t*>(key_string.data()),
         reinterpret_cast<const uint8_t*>(key_string.data() +
                                          key_string.length()));
-    scoped_ptr<crypto::RSAPrivateKey> key(
+    std::unique_ptr<crypto::RSAPrivateKey> key(
         crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(key_vector));
     return key;
   }
 #endif
 
-  scoped_ptr<FakeDataChannel> channel_1_;
-  scoped_ptr<FakeDataChannel> channel_2_;
+  std::unique_ptr<FakeDataChannel> channel_1_;
+  std::unique_ptr<FakeDataChannel> channel_2_;
   SSLConfig client_ssl_config_;
   SSLServerConfig server_ssl_config_;
-  scoped_ptr<SSLClientSocket> client_socket_;
-  scoped_ptr<SSLServerSocket> server_socket_;
+  std::unique_ptr<SSLClientSocket> client_socket_;
+  std::unique_ptr<SSLServerSocket> server_socket_;
   ClientSocketFactory* socket_factory_;
-  scoped_ptr<MockCertVerifier> cert_verifier_;
-  scoped_ptr<MockClientCertVerifier> client_cert_verifier_;
-  scoped_ptr<TransportSecurityState> transport_security_state_;
-  scoped_ptr<SSLServerContext> server_context_;
-  scoped_ptr<crypto::RSAPrivateKey> server_private_key_;
+  std::unique_ptr<MockCertVerifier> cert_verifier_;
+  std::unique_ptr<MockClientCertVerifier> client_cert_verifier_;
+  std::unique_ptr<TransportSecurityState> transport_security_state_;
+  std::unique_ptr<SSLServerContext> server_context_;
+  std::unique_ptr<crypto::RSAPrivateKey> server_private_key_;
   scoped_refptr<X509Certificate> server_cert_;
 };
 
diff --git a/net/socket/tcp_client_socket.cc b/net/socket/tcp_client_socket.cc
index 1ae979e..c43a82d 100644
--- a/net/socket/tcp_client_socket.cc
+++ b/net/socket/tcp_client_socket.cc
@@ -20,7 +20,7 @@
 
 TCPClientSocket::TCPClientSocket(
     const AddressList& addresses,
-    scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+    std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
     net::NetLog* net_log,
     const net::NetLog::Source& source)
     : socket_performance_watcher_(socket_performance_watcher.get()),
@@ -33,7 +33,7 @@
       previously_disconnected_(false),
       total_received_bytes_(0) {}
 
-TCPClientSocket::TCPClientSocket(scoped_ptr<TCPSocket> connected_socket,
+TCPClientSocket::TCPClientSocket(std::unique_ptr<TCPSocket> connected_socket,
                                  const IPEndPoint& peer_address)
     : socket_performance_watcher_(nullptr),
       socket_(std::move(connected_socket)),
diff --git a/net/socket/tcp_client_socket.h b/net/socket/tcp_client_socket.h
index ddda0a6..bf41545 100644
--- a/net/socket/tcp_client_socket.h
+++ b/net/socket/tcp_client_socket.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/address_list.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
@@ -30,13 +31,13 @@
   // connection.
   TCPClientSocket(
       const AddressList& addresses,
-      scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+      std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
       net::NetLog* net_log,
       const net::NetLog::Source& source);
 
   // Adopts the given, connected socket and then acts as if Connect() had been
   // called. This function is used by TCPServerSocket and for testing.
-  TCPClientSocket(scoped_ptr<TCPSocket> connected_socket,
+  TCPClientSocket(std::unique_ptr<TCPSocket> connected_socket,
                   const IPEndPoint& peer_address);
 
   ~TCPClientSocket() override;
@@ -115,11 +116,11 @@
   // is destroyed.
   SocketPerformanceWatcher* socket_performance_watcher_;
 
-  scoped_ptr<TCPSocket> socket_;
+  std::unique_ptr<TCPSocket> socket_;
 
   // Local IP address and port we are bound to. Set to NULL if Bind()
   // wasn't called (in that case OS chooses address/port).
-  scoped_ptr<IPEndPoint> bind_address_;
+  std::unique_ptr<IPEndPoint> bind_address_;
 
   // The list of addresses we should try in order to establish a connection.
   AddressList addresses_;
diff --git a/net/socket/tcp_client_socket_unittest.cc b/net/socket/tcp_client_socket_unittest.cc
index 92d59ff..856c1087 100644
--- a/net/socket/tcp_client_socket_unittest.cc
+++ b/net/socket/tcp_client_socket_unittest.cc
@@ -49,7 +49,7 @@
   EXPECT_EQ(ERR_IO_PENDING, socket.Connect(connect_callback.callback()));
 
   TestCompletionCallback accept_callback;
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
   int result = server.Accept(&accepted_socket, accept_callback.callback());
   if (result == ERR_IO_PENDING)
     result = accept_callback.WaitForResult();
@@ -144,7 +144,7 @@
   for (size_t i = 0; i < kNumIPs; ++i)
     ip_list.push_back(IPAddress(72, 14, 213, i));
 
-  scoped_ptr<TestSocketPerformanceWatcher> watcher(
+  std::unique_ptr<TestSocketPerformanceWatcher> watcher(
       new TestSocketPerformanceWatcher());
   TestSocketPerformanceWatcher* watcher_ptr = watcher.get();
 
diff --git a/net/socket/tcp_server_socket.cc b/net/socket/tcp_server_socket.cc
index 7ff9155..d617fa5 100644
--- a/net/socket/tcp_server_socket.cc
+++ b/net/socket/tcp_server_socket.cc
@@ -50,7 +50,7 @@
   return socket_.GetLocalAddress(address);
 }
 
-int TCPServerSocket::Accept(scoped_ptr<StreamSocket>* socket,
+int TCPServerSocket::Accept(std::unique_ptr<StreamSocket>* socket,
                             const CompletionCallback& callback) {
   DCHECK(socket);
   DCHECK(!callback.is_null());
@@ -85,9 +85,9 @@
 
 int TCPServerSocket::ConvertAcceptedSocket(
     int result,
-    scoped_ptr<StreamSocket>* output_accepted_socket) {
+    std::unique_ptr<StreamSocket>* output_accepted_socket) {
   // Make sure the TCPSocket object is destroyed in any case.
-  scoped_ptr<TCPSocket> temp_accepted_socket(std::move(accepted_socket_));
+  std::unique_ptr<TCPSocket> temp_accepted_socket(std::move(accepted_socket_));
   if (result != OK)
     return result;
 
@@ -98,7 +98,7 @@
 }
 
 void TCPServerSocket::OnAcceptCompleted(
-    scoped_ptr<StreamSocket>* output_accepted_socket,
+    std::unique_ptr<StreamSocket>* output_accepted_socket,
     const CompletionCallback& forward_callback,
     int result) {
   result = ConvertAcceptedSocket(result, output_accepted_socket);
diff --git a/net/socket/tcp_server_socket.h b/net/socket/tcp_server_socket.h
index 7611ff911..993d4ba 100644
--- a/net/socket/tcp_server_socket.h
+++ b/net/socket/tcp_server_socket.h
@@ -5,8 +5,9 @@
 #ifndef NET_SOCKET_TCP_SERVER_SOCKET_H_
 #define NET_SOCKET_TCP_SERVER_SOCKET_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/ip_endpoint.h"
 #include "net/base/net_export.h"
 #include "net/log/net_log.h"
@@ -23,7 +24,7 @@
   // net::ServerSocket implementation.
   int Listen(const IPEndPoint& address, int backlog) override;
   int GetLocalAddress(IPEndPoint* address) const override;
-  int Accept(scoped_ptr<StreamSocket>* socket,
+  int Accept(std::unique_ptr<StreamSocket>* socket,
              const CompletionCallback& callback) override;
 
   // Detachs from the current thread, to allow the socket to be transferred to
@@ -36,16 +37,17 @@
   // |output_accepted_socket|.
   // |output_accepted_socket| is untouched on failure. But |accepted_socket_| is
   // set to NULL in any case.
-  int ConvertAcceptedSocket(int result,
-                            scoped_ptr<StreamSocket>* output_accepted_socket);
+  int ConvertAcceptedSocket(
+      int result,
+      std::unique_ptr<StreamSocket>* output_accepted_socket);
   // Completion callback for calling TCPSocket::Accept().
-  void OnAcceptCompleted(scoped_ptr<StreamSocket>* output_accepted_socket,
+  void OnAcceptCompleted(std::unique_ptr<StreamSocket>* output_accepted_socket,
                          const CompletionCallback& forward_callback,
                          int result);
 
   TCPSocket socket_;
 
-  scoped_ptr<TCPSocket> accepted_socket_;
+  std::unique_ptr<TCPSocket> accepted_socket_;
   IPEndPoint accepted_address_;
   bool pending_accept_;
 
diff --git a/net/socket/tcp_server_socket_unittest.cc b/net/socket/tcp_server_socket_unittest.cc
index b0d7039f..a0d6c49 100644
--- a/net/socket/tcp_server_socket_unittest.cc
+++ b/net/socket/tcp_server_socket_unittest.cc
@@ -4,12 +4,12 @@
 
 #include "net/socket/tcp_server_socket.h"
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/address_list.h"
 #include "net/base/io_buffer.h"
 #include "net/base/ip_address.h"
@@ -72,7 +72,7 @@
   connecting_socket.Connect(connect_callback.callback());
 
   TestCompletionCallback accept_callback;
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
   int result = socket_.Accept(&accepted_socket, accept_callback.callback());
   if (result == ERR_IO_PENDING)
     result = accept_callback.WaitForResult();
@@ -92,7 +92,7 @@
   ASSERT_NO_FATAL_FAILURE(SetUpIPv4());
 
   TestCompletionCallback accept_callback;
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
 
   ASSERT_EQ(ERR_IO_PENDING,
             socket_.Accept(&accepted_socket, accept_callback.callback()));
@@ -117,7 +117,7 @@
   ASSERT_NO_FATAL_FAILURE(SetUpIPv4());
 
   TestCompletionCallback accept_callback;
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
 
   ASSERT_EQ(ERR_IO_PENDING,
             socket_.Accept(&accepted_socket, accept_callback.callback()));
@@ -135,7 +135,7 @@
   EXPECT_EQ(OK, accept_callback.WaitForResult());
 
   TestCompletionCallback accept_callback2;
-  scoped_ptr<StreamSocket> accepted_socket2;
+  std::unique_ptr<StreamSocket> accepted_socket2;
   int result = socket_.Accept(&accepted_socket2, accept_callback2.callback());
   if (result == ERR_IO_PENDING)
     result = accept_callback2.WaitForResult();
@@ -165,7 +165,7 @@
   connecting_socket.Connect(connect_callback.callback());
 
   TestCompletionCallback accept_callback;
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
   int result = socket_.Accept(&accepted_socket, accept_callback.callback());
   if (result == ERR_IO_PENDING)
     result = accept_callback.WaitForResult();
@@ -189,7 +189,7 @@
   connecting_socket.Connect(connect_callback.callback());
 
   TestCompletionCallback accept_callback;
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
   int result = socket_.Accept(&accepted_socket, accept_callback.callback());
   ASSERT_EQ(OK, accept_callback.GetResult(result));
 
diff --git a/net/socket/tcp_socket_posix.cc b/net/socket/tcp_socket_posix.cc
index d674463f..1024771 100644
--- a/net/socket/tcp_socket_posix.cc
+++ b/net/socket/tcp_socket_posix.cc
@@ -139,7 +139,7 @@
 }
 
 TCPSocketPosix::TCPSocketPosix(
-    scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+    std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
     NetLog* net_log,
     const NetLog::Source& source)
     : socket_performance_watcher_(std::move(socket_performance_watcher)),
@@ -202,7 +202,7 @@
   return socket_->Listen(backlog);
 }
 
-int TCPSocketPosix::Accept(scoped_ptr<TCPSocketPosix>* tcp_socket,
+int TCPSocketPosix::Accept(std::unique_ptr<TCPSocketPosix>* tcp_socket,
                            IPEndPoint* address,
                            const CompletionCallback& callback) {
   DCHECK(tcp_socket);
@@ -483,20 +483,21 @@
 }
 
 void TCPSocketPosix::SetTickClockForTesting(
-    scoped_ptr<base::TickClock> tick_clock) {
+    std::unique_ptr<base::TickClock> tick_clock) {
   tick_clock_ = std::move(tick_clock);
 }
 
-void TCPSocketPosix::AcceptCompleted(scoped_ptr<TCPSocketPosix>* tcp_socket,
-                                     IPEndPoint* address,
-                                     const CompletionCallback& callback,
-                                     int rv) {
+void TCPSocketPosix::AcceptCompleted(
+    std::unique_ptr<TCPSocketPosix>* tcp_socket,
+    IPEndPoint* address,
+    const CompletionCallback& callback,
+    int rv) {
   DCHECK_NE(ERR_IO_PENDING, rv);
   callback.Run(HandleAcceptCompleted(tcp_socket, address, rv));
 }
 
 int TCPSocketPosix::HandleAcceptCompleted(
-    scoped_ptr<TCPSocketPosix>* tcp_socket,
+    std::unique_ptr<TCPSocketPosix>* tcp_socket,
     IPEndPoint* address,
     int rv) {
   if (rv == OK)
@@ -512,8 +513,9 @@
   return rv;
 }
 
-int TCPSocketPosix::BuildTcpSocketPosix(scoped_ptr<TCPSocketPosix>* tcp_socket,
-                                        IPEndPoint* address) {
+int TCPSocketPosix::BuildTcpSocketPosix(
+    std::unique_ptr<TCPSocketPosix>* tcp_socket,
+    IPEndPoint* address) {
   DCHECK(accept_socket_);
 
   SockaddrStorage storage;
diff --git a/net/socket/tcp_socket_posix.h b/net/socket/tcp_socket_posix.h
index d092b57..6cb5771 100644
--- a/net/socket/tcp_socket_posix.h
+++ b/net/socket/tcp_socket_posix.h
@@ -7,10 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/address_family.h"
 #include "net/base/completion_callback.h"
@@ -34,7 +35,7 @@
   // |socket_performance_watcher| is notified of the performance metrics related
   // to this socket. |socket_performance_watcher| may be null.
   TCPSocketPosix(
-      scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+      std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
       NetLog* net_log,
       const NetLog::Source& source);
   virtual ~TCPSocketPosix();
@@ -46,7 +47,7 @@
   int Bind(const IPEndPoint& address);
 
   int Listen(int backlog);
-  int Accept(scoped_ptr<TCPSocketPosix>* socket,
+  int Accept(std::unique_ptr<TCPSocketPosix>* socket,
              IPEndPoint* address,
              const CompletionCallback& callback);
 
@@ -105,7 +106,7 @@
   void StartLoggingMultipleConnectAttempts(const AddressList& addresses);
   void EndLoggingMultipleConnectAttempts(int net_error);
 
-  void SetTickClockForTesting(scoped_ptr<base::TickClock> tick_clock);
+  void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
 
   const BoundNetLog& net_log() const { return net_log_; }
 
@@ -179,14 +180,14 @@
     TCP_FASTOPEN_MAX_VALUE
   };
 
-  void AcceptCompleted(scoped_ptr<TCPSocketPosix>* tcp_socket,
+  void AcceptCompleted(std::unique_ptr<TCPSocketPosix>* tcp_socket,
                        IPEndPoint* address,
                        const CompletionCallback& callback,
                        int rv);
-  int HandleAcceptCompleted(scoped_ptr<TCPSocketPosix>* tcp_socket,
+  int HandleAcceptCompleted(std::unique_ptr<TCPSocketPosix>* tcp_socket,
                             IPEndPoint* address,
                             int rv);
-  int BuildTcpSocketPosix(scoped_ptr<TCPSocketPosix>* tcp_socket,
+  int BuildTcpSocketPosix(std::unique_ptr<TCPSocketPosix>* tcp_socket,
                           IPEndPoint* address);
 
   void ConnectCompleted(const CompletionCallback& callback, int rv);
@@ -214,14 +215,14 @@
   // Called after the first read completes on a TCP FastOpen socket.
   void UpdateTCPFastOpenStatusAfterRead();
 
-  scoped_ptr<SocketPosix> socket_;
-  scoped_ptr<SocketPosix> accept_socket_;
+  std::unique_ptr<SocketPosix> socket_;
+  std::unique_ptr<SocketPosix> accept_socket_;
 
   // Socket performance statistics (such as RTT) are reported to the
   // |socket_performance_watcher_|. May be nullptr.
-  scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher_;
+  std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher_;
 
-  scoped_ptr<base::TickClock> tick_clock_;
+  std::unique_ptr<base::TickClock> tick_clock_;
 
   // Minimum interval betweeen consecutive notifications to
   // |socket_performance_watcher_|.
diff --git a/net/socket/tcp_socket_unittest.cc b/net/socket/tcp_socket_unittest.cc
index 5a34d400..0f572c5 100644
--- a/net/socket/tcp_socket_unittest.cc
+++ b/net/socket/tcp_socket_unittest.cc
@@ -7,11 +7,11 @@
 #include <stddef.h>
 #include <string.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/test/simple_test_tick_clock.h"
 #include "base/time/time.h"
 #include "net/base/address_list.h"
@@ -89,7 +89,7 @@
 
   void TestAcceptAsync() {
     TestCompletionCallback accept_callback;
-    scoped_ptr<TCPSocket> accepted_socket;
+    std::unique_ptr<TCPSocket> accepted_socket;
     IPEndPoint accepted_address;
     ASSERT_EQ(ERR_IO_PENDING,
               socket_.Accept(&accepted_socket, &accepted_address,
@@ -127,14 +127,14 @@
                             size_t expect_rtt_notification_count) {
     ASSERT_NO_FATAL_FAILURE(SetUpListenIPv4());
 
-    scoped_ptr<base::SimpleTestTickClock> tick_clock(
+    std::unique_ptr<base::SimpleTestTickClock> tick_clock(
         new base::SimpleTestTickClock());
     base::SimpleTestTickClock* tick_clock_ptr = tick_clock.get();
     tick_clock_ptr->SetNowTicks(base::TimeTicks::Now());
 
     TestCompletionCallback connect_callback;
 
-    scoped_ptr<TestSocketPerformanceWatcher> watcher(
+    std::unique_ptr<TestSocketPerformanceWatcher> watcher(
         new TestSocketPerformanceWatcher(should_notify_updated_rtt));
     TestSocketPerformanceWatcher* watcher_ptr = watcher.get();
 
@@ -146,7 +146,7 @@
     connecting_socket.Connect(local_address_, connect_callback.callback());
 
     TestCompletionCallback accept_callback;
-    scoped_ptr<TCPSocket> accepted_socket;
+    std::unique_ptr<TCPSocket> accepted_socket;
     IPEndPoint accepted_address;
     result = socket_.Accept(&accepted_socket, &accepted_address,
                             accept_callback.callback());
@@ -210,7 +210,7 @@
   connecting_socket.Connect(connect_callback.callback());
 
   TestCompletionCallback accept_callback;
-  scoped_ptr<TCPSocket> accepted_socket;
+  std::unique_ptr<TCPSocket> accepted_socket;
   IPEndPoint accepted_address;
   int result = socket_.Accept(&accepted_socket, &accepted_address,
                               accept_callback.callback());
@@ -256,7 +256,7 @@
   ASSERT_NO_FATAL_FAILURE(SetUpListenIPv4());
 
   TestCompletionCallback accept_callback;
-  scoped_ptr<TCPSocket> accepted_socket;
+  std::unique_ptr<TCPSocket> accepted_socket;
   IPEndPoint accepted_address;
 
   ASSERT_EQ(ERR_IO_PENDING,
@@ -276,7 +276,7 @@
   EXPECT_EQ(OK, accept_callback.WaitForResult());
 
   TestCompletionCallback accept_callback2;
-  scoped_ptr<TCPSocket> accepted_socket2;
+  std::unique_ptr<TCPSocket> accepted_socket2;
   IPEndPoint accepted_address2;
 
   int result = socket_.Accept(&accepted_socket2, &accepted_address2,
@@ -309,7 +309,7 @@
   connecting_socket.Connect(connect_callback.callback());
 
   TestCompletionCallback accept_callback;
-  scoped_ptr<TCPSocket> accepted_socket;
+  std::unique_ptr<TCPSocket> accepted_socket;
   IPEndPoint accepted_address;
   int result = socket_.Accept(&accepted_socket, &accepted_address,
                               accept_callback.callback());
@@ -335,7 +335,7 @@
   connecting_socket.Connect(local_address_, connect_callback.callback());
 
   TestCompletionCallback accept_callback;
-  scoped_ptr<TCPSocket> accepted_socket;
+  std::unique_ptr<TCPSocket> accepted_socket;
   IPEndPoint accepted_address;
   result = socket_.Accept(&accepted_socket, &accepted_address,
                           accept_callback.callback());
diff --git a/net/socket/tcp_socket_win.cc b/net/socket/tcp_socket_win.cc
index f77dbbf..d4bdabd 100644
--- a/net/socket/tcp_socket_win.cc
+++ b/net/socket/tcp_socket_win.cc
@@ -243,7 +243,7 @@
 //-----------------------------------------------------------------------------
 
 TCPSocketWin::TCPSocketWin(
-    scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+    std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
     net::NetLog* net_log,
     const net::NetLog::Source& source)
     : socket_(INVALID_SOCKET),
@@ -363,7 +363,7 @@
   return OK;
 }
 
-int TCPSocketWin::Accept(scoped_ptr<TCPSocketWin>* socket,
+int TCPSocketWin::Accept(std::unique_ptr<TCPSocketWin>* socket,
                          IPEndPoint* address,
                          const CompletionCallback& callback) {
   DCHECK(CalledOnValidThread());
@@ -682,7 +682,7 @@
   }
 }
 
-int TCPSocketWin::AcceptInternal(scoped_ptr<TCPSocketWin>* socket,
+int TCPSocketWin::AcceptInternal(std::unique_ptr<TCPSocketWin>* socket,
                                  IPEndPoint* address) {
   SockaddrStorage storage;
   int new_socket = accept(socket_, storage.addr, &storage.addr_len);
@@ -702,7 +702,7 @@
     net_log_.EndEventWithNetErrorCode(NetLog::TYPE_TCP_ACCEPT, net_error);
     return net_error;
   }
-  scoped_ptr<TCPSocketWin> tcp_socket(
+  std::unique_ptr<TCPSocketWin> tcp_socket(
       new TCPSocketWin(NULL, net_log_.net_log(), net_log_.source()));
   int adopt_result = tcp_socket->AdoptConnectedSocket(new_socket, ip_end_point);
   if (adopt_result != OK) {
diff --git a/net/socket/tcp_socket_win.h b/net/socket/tcp_socket_win.h
index 2f3be46..4710287 100644
--- a/net/socket/tcp_socket_win.h
+++ b/net/socket/tcp_socket_win.h
@@ -8,10 +8,11 @@
 #include <stdint.h>
 #include <winsock2.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "base/win/object_watcher.h"
 #include "net/base/address_family.h"
@@ -29,9 +30,10 @@
 class NET_EXPORT TCPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe),
                                 public base::win::ObjectWatcher::Delegate  {
  public:
-  TCPSocketWin(scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
-               NetLog* net_log,
-               const NetLog::Source& source);
+  TCPSocketWin(
+      std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+      NetLog* net_log,
+      const NetLog::Source& source);
   ~TCPSocketWin() override;
 
   int Open(AddressFamily family);
@@ -46,7 +48,7 @@
   int Bind(const IPEndPoint& address);
 
   int Listen(int backlog);
-  int Accept(scoped_ptr<TCPSocketWin>* socket,
+  int Accept(std::unique_ptr<TCPSocketWin>* socket,
              IPEndPoint* address,
              const CompletionCallback& callback);
 
@@ -115,7 +117,7 @@
   // base::ObjectWatcher::Delegate implementation.
   void OnObjectSignaled(HANDLE object) override;
 
-  int AcceptInternal(scoped_ptr<TCPSocketWin>* socket,
+  int AcceptInternal(std::unique_ptr<TCPSocketWin>* socket,
                      IPEndPoint* address);
 
   int DoConnect();
@@ -132,12 +134,12 @@
   SOCKET socket_;
 
   // |socket_performance_watcher_| may be nullptr.
-  scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher_;
+  std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher_;
 
   HANDLE accept_event_;
   base::win::ObjectWatcher accept_watcher_;
 
-  scoped_ptr<TCPSocketWin>* accept_socket_;
+  std::unique_ptr<TCPSocketWin>* accept_socket_;
   IPEndPoint* accept_address_;
   CompletionCallback accept_callback_;
 
@@ -157,7 +159,7 @@
   // External callback; called when write is complete.
   CompletionCallback write_callback_;
 
-  scoped_ptr<IPEndPoint> peer_address_;
+  std::unique_ptr<IPEndPoint> peer_address_;
   // The OS error that a connect attempt last completed with.
   int connect_os_error_;
 
diff --git a/net/socket/transport_client_socket_pool.cc b/net/socket/transport_client_socket_pool.cc
index 241a712..8b2f180 100644
--- a/net/socket/transport_client_socket_pool.cc
+++ b/net/socket/transport_client_socket_pool.cc
@@ -301,7 +301,7 @@
   helper_.set_next_state(
       TransportConnectJobHelper::STATE_TRANSPORT_CONNECT_COMPLETE);
   // Create a |SocketPerformanceWatcher|, and pass the ownership.
-  scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher;
+  std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher;
   if (socket_performance_watcher_factory_) {
     socket_performance_watcher =
         socket_performance_watcher_factory_->CreateSocketPerformanceWatcher(
@@ -426,7 +426,7 @@
   DCHECK(!fallback_addresses_.get());
 
   // Create a |SocketPerformanceWatcher|, and pass the ownership.
-  scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher;
+  std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher;
   if (socket_performance_watcher_factory_) {
     socket_performance_watcher =
         socket_performance_watcher_factory_->CreateSocketPerformanceWatcher(
@@ -505,12 +505,12 @@
   }
 }
 
-scoped_ptr<ConnectJob>
+std::unique_ptr<ConnectJob>
 TransportClientSocketPool::TransportConnectJobFactory::NewConnectJob(
     const std::string& group_name,
     const PoolBase::Request& request,
     ConnectJob::Delegate* delegate) const {
-  return scoped_ptr<ConnectJob>(new TransportConnectJob(
+  return std::unique_ptr<ConnectJob>(new TransportConnectJob(
       group_name, request.priority(), request.respect_limits(),
       request.params(), ConnectionTimeout(), client_socket_factory_,
       socket_performance_watcher_factory_, host_resolver_, delegate, net_log_));
@@ -598,7 +598,7 @@
 
 void TransportClientSocketPool::ReleaseSocket(
     const std::string& group_name,
-    scoped_ptr<StreamSocket> socket,
+    std::unique_ptr<StreamSocket> socket,
     int id) {
   base_.ReleaseSocket(group_name, std::move(socket), id);
 }
@@ -625,10 +625,10 @@
   return base_.GetLoadState(group_name, handle);
 }
 
-scoped_ptr<base::DictionaryValue> TransportClientSocketPool::GetInfoAsValue(
-    const std::string& name,
-    const std::string& type,
-    bool include_nested_pools) const {
+std::unique_ptr<base::DictionaryValue>
+TransportClientSocketPool::GetInfoAsValue(const std::string& name,
+                                          const std::string& type,
+                                          bool include_nested_pools) const {
   return base_.GetInfoAsValue(name, type);
 }
 
diff --git a/net/socket/transport_client_socket_pool.h b/net/socket/transport_client_socket_pool.h
index 73aae2c..bd4f33e 100644
--- a/net/socket/transport_client_socket_pool.h
+++ b/net/socket/transport_client_socket_pool.h
@@ -5,11 +5,11 @@
 #ifndef NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_
 #define NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
 #include "net/base/host_port_pair.h"
@@ -202,10 +202,10 @@
 
   TransportConnectJobHelper helper_;
 
-  scoped_ptr<StreamSocket> transport_socket_;
+  std::unique_ptr<StreamSocket> transport_socket_;
 
-  scoped_ptr<StreamSocket> fallback_transport_socket_;
-  scoped_ptr<AddressList> fallback_addresses_;
+  std::unique_ptr<StreamSocket> fallback_transport_socket_;
+  std::unique_ptr<AddressList> fallback_addresses_;
   base::TimeTicks fallback_connect_start_time_;
   base::OneShotTimer fallback_timer_;
   SocketPerformanceWatcherFactory* socket_performance_watcher_factory_;
@@ -255,7 +255,7 @@
   void CancelRequest(const std::string& group_name,
                      ClientSocketHandle* handle) override;
   void ReleaseSocket(const std::string& group_name,
-                     scoped_ptr<StreamSocket> socket,
+                     std::unique_ptr<StreamSocket> socket,
                      int id) override;
   void FlushWithError(int error) override;
   void CloseIdleSockets() override;
@@ -263,7 +263,7 @@
   int IdleSocketCountInGroup(const std::string& group_name) const override;
   LoadState GetLoadState(const std::string& group_name,
                          const ClientSocketHandle* handle) const override;
-  scoped_ptr<base::DictionaryValue> GetInfoAsValue(
+  std::unique_ptr<base::DictionaryValue> GetInfoAsValue(
       const std::string& name,
       const std::string& type,
       bool include_nested_pools) const override;
@@ -301,7 +301,7 @@
 
     // ClientSocketPoolBase::ConnectJobFactory methods.
 
-    scoped_ptr<ConnectJob> NewConnectJob(
+    std::unique_ptr<ConnectJob> NewConnectJob(
         const std::string& group_name,
         const PoolBase::Request& request,
         ConnectJob::Delegate* delegate) const override;
diff --git a/net/socket/transport_client_socket_pool_test_util.cc b/net/socket/transport_client_socket_pool_test_util.cc
index 2679cf14..6561e793 100644
--- a/net/socket/transport_client_socket_pool_test_util.cc
+++ b/net/socket/transport_client_socket_pool_test_util.cc
@@ -190,34 +190,34 @@
                       weak_factory_.GetWeakPtr());
   }
 
-  static scoped_ptr<StreamSocket> MakeMockPendingClientSocket(
+  static std::unique_ptr<StreamSocket> MakeMockPendingClientSocket(
       const AddressList& addrlist,
       bool should_connect,
       net::NetLog* net_log) {
-    scoped_ptr<MockTriggerableClientSocket> socket(
+    std::unique_ptr<MockTriggerableClientSocket> socket(
         new MockTriggerableClientSocket(addrlist, should_connect, net_log));
     base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
                                                   socket->GetConnectCallback());
     return std::move(socket);
   }
 
-  static scoped_ptr<StreamSocket> MakeMockDelayedClientSocket(
+  static std::unique_ptr<StreamSocket> MakeMockDelayedClientSocket(
       const AddressList& addrlist,
       bool should_connect,
       const base::TimeDelta& delay,
       net::NetLog* net_log) {
-    scoped_ptr<MockTriggerableClientSocket> socket(
+    std::unique_ptr<MockTriggerableClientSocket> socket(
         new MockTriggerableClientSocket(addrlist, should_connect, net_log));
     base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
         FROM_HERE, socket->GetConnectCallback(), delay);
     return std::move(socket);
   }
 
-  static scoped_ptr<StreamSocket> MakeMockStalledClientSocket(
+  static std::unique_ptr<StreamSocket> MakeMockStalledClientSocket(
       const AddressList& addrlist,
       net::NetLog* net_log,
       bool failing) {
-    scoped_ptr<MockTriggerableClientSocket> socket(
+    std::unique_ptr<MockTriggerableClientSocket> socket(
         new MockTriggerableClientSocket(addrlist, true, net_log));
     if (failing) {
       DCHECK_LE(1u, addrlist.size());
@@ -359,20 +359,20 @@
 
 MockTransportClientSocketFactory::~MockTransportClientSocketFactory() {}
 
-scoped_ptr<DatagramClientSocket>
+std::unique_ptr<DatagramClientSocket>
 MockTransportClientSocketFactory::CreateDatagramClientSocket(
     DatagramSocket::BindType bind_type,
     const RandIntCallback& rand_int_cb,
     NetLog* net_log,
     const NetLog::Source& source) {
   NOTREACHED();
-  return scoped_ptr<DatagramClientSocket>();
+  return std::unique_ptr<DatagramClientSocket>();
 }
 
-scoped_ptr<StreamSocket>
+std::unique_ptr<StreamSocket>
 MockTransportClientSocketFactory::CreateTransportClientSocket(
     const AddressList& addresses,
-    scoped_ptr<SocketPerformanceWatcher> /* socket_performance_watcher */,
+    std::unique_ptr<SocketPerformanceWatcher> /* socket_performance_watcher */,
     NetLog* /* net_log */,
     const NetLog::Source& /* source */) {
   allocation_count_++;
@@ -384,10 +384,10 @@
 
   switch (type) {
     case MOCK_CLIENT_SOCKET:
-      return scoped_ptr<StreamSocket>(
+      return std::unique_ptr<StreamSocket>(
           new MockConnectClientSocket(addresses, net_log_));
     case MOCK_FAILING_CLIENT_SOCKET:
-      return scoped_ptr<StreamSocket>(
+      return std::unique_ptr<StreamSocket>(
           new MockFailingClientSocket(addresses, net_log_));
     case MOCK_PENDING_CLIENT_SOCKET:
       return MockTriggerableClientSocket::MakeMockPendingClientSocket(
@@ -408,7 +408,7 @@
       return MockTriggerableClientSocket::MakeMockStalledClientSocket(
           addresses, net_log_, true);
     case MOCK_TRIGGERABLE_CLIENT_SOCKET: {
-      scoped_ptr<MockTriggerableClientSocket> rv(
+      std::unique_ptr<MockTriggerableClientSocket> rv(
           new MockTriggerableClientSocket(addresses, true, net_log_));
       triggerable_sockets_.push(rv->GetConnectCallback());
       // run_loop_quit_closure_ behaves like a condition variable. It will
@@ -421,19 +421,19 @@
     }
     default:
       NOTREACHED();
-      return scoped_ptr<StreamSocket>(
+      return std::unique_ptr<StreamSocket>(
           new MockConnectClientSocket(addresses, net_log_));
   }
 }
 
-scoped_ptr<SSLClientSocket>
+std::unique_ptr<SSLClientSocket>
 MockTransportClientSocketFactory::CreateSSLClientSocket(
-    scoped_ptr<ClientSocketHandle> transport_socket,
+    std::unique_ptr<ClientSocketHandle> transport_socket,
     const HostPortPair& host_and_port,
     const SSLConfig& ssl_config,
     const SSLClientSocketContext& context) {
   NOTIMPLEMENTED();
-  return scoped_ptr<SSLClientSocket>();
+  return std::unique_ptr<SSLClientSocket>();
 }
 
 void MockTransportClientSocketFactory::ClearSSLSessionCache() {
diff --git a/net/socket/transport_client_socket_pool_test_util.h b/net/socket/transport_client_socket_pool_test_util.h
index efab9d3..679fb17 100644
--- a/net/socket/transport_client_socket_pool_test_util.h
+++ b/net/socket/transport_client_socket_pool_test_util.h
@@ -9,12 +9,12 @@
 #ifndef NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_TEST_UTIL_H_
 #define NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_TEST_UTIL_H_
 
+#include <memory>
 #include <queue>
 
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/address_list.h"
 #include "net/base/socket_performance_watcher.h"
@@ -73,20 +73,21 @@
   explicit MockTransportClientSocketFactory(NetLog* net_log);
   ~MockTransportClientSocketFactory() override;
 
-  scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+  std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket(
       DatagramSocket::BindType bind_type,
       const RandIntCallback& rand_int_cb,
       NetLog* net_log,
       const NetLog::Source& source) override;
 
-  scoped_ptr<StreamSocket> CreateTransportClientSocket(
+  std::unique_ptr<StreamSocket> CreateTransportClientSocket(
       const AddressList& addresses,
-      scoped_ptr<SocketPerformanceWatcher> /* socket_performance_watcher */,
+      std::unique_ptr<
+          SocketPerformanceWatcher> /* socket_performance_watcher */,
       NetLog* /* net_log */,
       const NetLog::Source& /* source */) override;
 
-  scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
-      scoped_ptr<ClientSocketHandle> transport_socket,
+  std::unique_ptr<SSLClientSocket> CreateSSLClientSocket(
+      std::unique_ptr<ClientSocketHandle> transport_socket,
       const HostPortPair& host_and_port,
       const SSLConfig& ssl_config,
       const SSLClientSocketContext& context) override;
diff --git a/net/socket/transport_client_socket_pool_unittest.cc b/net/socket/transport_client_socket_pool_unittest.cc
index c79844a..75c2d42df 100644
--- a/net/socket/transport_client_socket_pool_unittest.cc
+++ b/net/socket/transport_client_socket_pool_unittest.cc
@@ -85,7 +85,7 @@
     test_base_.ReleaseAllConnections(keep_alive);
   }
 
-  std::vector<scoped_ptr<TestSocketRequest>>* requests() {
+  std::vector<std::unique_ptr<TestSocketRequest>>* requests() {
     return test_base_.requests();
   }
   size_t completion_count() const { return test_base_.completion_count(); }
@@ -93,7 +93,7 @@
   bool connect_backup_jobs_enabled_;
   TestNetLog net_log_;
   scoped_refptr<TransportSocketParams> params_;
-  scoped_ptr<MockHostResolver> host_resolver_;
+  std::unique_ptr<MockHostResolver> host_resolver_;
   MockTransportClientSocketFactory client_socket_factory_;
   TransportClientSocketPool pool_;
   ClientSocketPoolTest test_base_;
diff --git a/net/socket/transport_client_socket_unittest.cc b/net/socket/transport_client_socket_unittest.cc
index c1e9c78..f4649bf3 100644
--- a/net/socket/transport_client_socket_unittest.cc
+++ b/net/socket/transport_client_socket_unittest.cc
@@ -2,11 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "net/base/address_list.h"
 #include "net/base/io_buffer.h"
@@ -85,11 +85,11 @@
   uint16_t listen_port_;
   TestNetLog net_log_;
   ClientSocketFactory* const socket_factory_;
-  scoped_ptr<StreamSocket> sock_;
-  scoped_ptr<StreamSocket> connected_sock_;
+  std::unique_ptr<StreamSocket> sock_;
+  std::unique_ptr<StreamSocket> connected_sock_;
 
  private:
-  scoped_ptr<TCPServerSocket> listen_sock_;
+  std::unique_ptr<TCPServerSocket> listen_sock_;
   bool close_server_socket_on_next_send_;
 };
 
@@ -109,7 +109,7 @@
 
   AddressList addr;
   // MockHostResolver resolves everything to 127.0.0.1.
-  scoped_ptr<HostResolver> resolver(new MockHostResolver());
+  std::unique_ptr<HostResolver> resolver(new MockHostResolver());
   HostResolver::RequestInfo info(HostPortPair("localhost", listen_port_));
   TestCompletionCallback callback;
   int rv = resolver->Resolve(info, DEFAULT_PRIORITY, &addr, callback.callback(),
diff --git a/net/socket/unix_domain_client_socket_posix.cc b/net/socket/unix_domain_client_socket_posix.cc
index 792cfac9..bf86475 100644
--- a/net/socket/unix_domain_client_socket_posix.cc
+++ b/net/socket/unix_domain_client_socket_posix.cc
@@ -21,7 +21,8 @@
       use_abstract_namespace_(use_abstract_namespace) {
 }
 
-UnixDomainClientSocket::UnixDomainClientSocket(scoped_ptr<SocketPosix> socket)
+UnixDomainClientSocket::UnixDomainClientSocket(
+    std::unique_ptr<SocketPosix> socket)
     : use_abstract_namespace_(false), socket_(std::move(socket)) {}
 
 UnixDomainClientSocket::~UnixDomainClientSocket() {
diff --git a/net/socket/unix_domain_client_socket_posix.h b/net/socket/unix_domain_client_socket_posix.h
index 596aa09..e7b033a 100644
--- a/net/socket/unix_domain_client_socket_posix.h
+++ b/net/socket/unix_domain_client_socket_posix.h
@@ -7,10 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
 #include "net/log/net_log.h"
@@ -31,7 +31,7 @@
                          bool use_abstract_namespace);
   // Builds a client socket with SocketPosix which is already connected.
   // UnixDomainServerSocket uses this after it accepts a connection.
-  explicit UnixDomainClientSocket(scoped_ptr<SocketPosix> socket);
+  explicit UnixDomainClientSocket(std::unique_ptr<SocketPosix> socket);
 
   ~UnixDomainClientSocket() override;
 
@@ -78,7 +78,7 @@
  private:
   const std::string socket_path_;
   const bool use_abstract_namespace_;
-  scoped_ptr<SocketPosix> socket_;
+  std::unique_ptr<SocketPosix> socket_;
   // This net log is just to comply StreamSocket::NetLog(). It throws away
   // everything.
   BoundNetLog net_log_;
diff --git a/net/socket/unix_domain_client_socket_posix_unittest.cc b/net/socket/unix_domain_client_socket_posix_unittest.cc
index b20678b..4cccfc2 100644
--- a/net/socket/unix_domain_client_socket_posix_unittest.cc
+++ b/net/socket/unix_domain_client_socket_posix_unittest.cc
@@ -5,12 +5,13 @@
 #include "net/socket/unix_domain_client_socket_posix.h"
 
 #include <unistd.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/files/file_path.h"
 #include "base/files/scoped_temp_dir.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/posix/eintr_wrapper.h"
 #include "net/base/io_buffer.h"
 #include "net/base/net_errors.h"
@@ -133,7 +134,7 @@
                                        kUseAbstractNamespace);
   EXPECT_EQ(OK, server_socket.BindAndListen(socket_path_, /*backlog=*/1));
 
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
   TestCompletionCallback accept_callback;
   EXPECT_EQ(ERR_IO_PENDING,
             server_socket.Accept(&accepted_socket, accept_callback.callback()));
@@ -184,7 +185,7 @@
   // to be sure it hasn't gotten accidentally closed.
   SockaddrStorage addr;
   ASSERT_TRUE(UnixDomainClientSocket::FillAddress(socket_path_, false, &addr));
-  scoped_ptr<SocketPosix> adopter(new SocketPosix);
+  std::unique_ptr<SocketPosix> adopter(new SocketPosix);
   adopter->AdoptConnectedSocket(client_socket_fd, addr);
   UnixDomainClientSocket rewrapped_socket(std::move(adopter));
   EXPECT_TRUE(rewrapped_socket.IsConnected());
@@ -211,7 +212,7 @@
                                        kUseAbstractNamespace);
   EXPECT_EQ(OK, server_socket.BindAndListen(socket_path_, /*backlog=*/1));
 
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
   TestCompletionCallback accept_callback;
   EXPECT_EQ(ERR_IO_PENDING,
             server_socket.Accept(&accepted_socket, accept_callback.callback()));
@@ -256,7 +257,7 @@
 TEST_F(UnixDomainClientSocketTest, DisconnectFromClient) {
   UnixDomainServerSocket server_socket(CreateAuthCallback(true), false);
   EXPECT_EQ(OK, server_socket.BindAndListen(socket_path_, /*backlog=*/1));
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
   TestCompletionCallback accept_callback;
   EXPECT_EQ(ERR_IO_PENDING,
             server_socket.Accept(&accepted_socket, accept_callback.callback()));
@@ -289,7 +290,7 @@
 TEST_F(UnixDomainClientSocketTest, DisconnectFromServer) {
   UnixDomainServerSocket server_socket(CreateAuthCallback(true), false);
   EXPECT_EQ(OK, server_socket.BindAndListen(socket_path_, /*backlog=*/1));
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
   TestCompletionCallback accept_callback;
   EXPECT_EQ(ERR_IO_PENDING,
             server_socket.Accept(&accepted_socket, accept_callback.callback()));
@@ -322,7 +323,7 @@
 TEST_F(UnixDomainClientSocketTest, ReadAfterWrite) {
   UnixDomainServerSocket server_socket(CreateAuthCallback(true), false);
   EXPECT_EQ(OK, server_socket.BindAndListen(socket_path_, /*backlog=*/1));
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
   TestCompletionCallback accept_callback;
   EXPECT_EQ(ERR_IO_PENDING,
             server_socket.Accept(&accepted_socket, accept_callback.callback()));
@@ -391,7 +392,7 @@
 TEST_F(UnixDomainClientSocketTest, ReadBeforeWrite) {
   UnixDomainServerSocket server_socket(CreateAuthCallback(true), false);
   EXPECT_EQ(OK, server_socket.BindAndListen(socket_path_, /*backlog=*/1));
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
   TestCompletionCallback accept_callback;
   EXPECT_EQ(ERR_IO_PENDING,
             server_socket.Accept(&accepted_socket, accept_callback.callback()));
diff --git a/net/socket/unix_domain_server_socket_posix.cc b/net/socket/unix_domain_server_socket_posix.cc
index b6ba35c6..ecd9adf 100644
--- a/net/socket/unix_domain_server_socket_posix.cc
+++ b/net/socket/unix_domain_server_socket_posix.cc
@@ -21,13 +21,13 @@
 namespace {
 
 // Intended for use as SetterCallbacks in Accept() helper methods.
-void SetStreamSocket(scoped_ptr<StreamSocket>* socket,
-                     scoped_ptr<SocketPosix> accepted_socket) {
+void SetStreamSocket(std::unique_ptr<StreamSocket>* socket,
+                     std::unique_ptr<SocketPosix> accepted_socket) {
   socket->reset(new UnixDomainClientSocket(std::move(accepted_socket)));
 }
 
 void SetSocketDescriptor(SocketDescriptor* socket,
-                         scoped_ptr<SocketPosix> accepted_socket) {
+                         std::unique_ptr<SocketPosix> accepted_socket) {
   *socket = accepted_socket->ReleaseConnectedSocket();
 }
 
@@ -86,7 +86,7 @@
     return ERR_ADDRESS_INVALID;
   }
 
-  scoped_ptr<SocketPosix> socket(new SocketPosix);
+  std::unique_ptr<SocketPosix> socket(new SocketPosix);
   int rv = socket->Open(AF_UNIX);
   DCHECK_NE(ERR_IO_PENDING, rv);
   if (rv != OK)
@@ -118,7 +118,7 @@
   return ERR_ADDRESS_INVALID;
 }
 
-int UnixDomainServerSocket::Accept(scoped_ptr<StreamSocket>* socket,
+int UnixDomainServerSocket::Accept(std::unique_ptr<StreamSocket>* socket,
                                    const CompletionCallback& callback) {
   DCHECK(socket);
 
diff --git a/net/socket/unix_domain_server_socket_posix.h b/net/socket/unix_domain_server_socket_posix.h
index 7395f058..0d528351 100644
--- a/net/socket/unix_domain_server_socket_posix.h
+++ b/net/socket/unix_domain_server_socket_posix.h
@@ -8,11 +8,11 @@
 #include <stdint.h>
 #include <sys/types.h>
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/socket/server_socket.h"
 #include "net/socket/socket_descriptor.h"
@@ -56,7 +56,7 @@
                                uint16_t port,
                                int backlog) override;
   int GetLocalAddress(IPEndPoint* address) const override;
-  int Accept(scoped_ptr<StreamSocket>* socket,
+  int Accept(std::unique_ptr<StreamSocket>* socket,
              const CompletionCallback& callback) override;
 
   // Creates a server socket, binds it to the specified |socket_path| and
@@ -72,7 +72,7 @@
   // A callback to wrap the setting of the out-parameter to Accept().
   // This allows the internal machinery of that call to be implemented in
   // a manner that's agnostic to the caller's desired output.
-  typedef base::Callback<void(scoped_ptr<SocketPosix>)> SetterCallback;
+  typedef base::Callback<void(std::unique_ptr<SocketPosix>)> SetterCallback;
 
   int DoAccept(const SetterCallback& setter_callback,
                const CompletionCallback& callback);
@@ -81,11 +81,11 @@
                        int rv);
   bool AuthenticateAndGetStreamSocket(const SetterCallback& setter_callback);
 
-  scoped_ptr<SocketPosix> listen_socket_;
+  std::unique_ptr<SocketPosix> listen_socket_;
   const AuthCallback auth_callback_;
   const bool use_abstract_namespace_;
 
-  scoped_ptr<SocketPosix> accept_socket_;
+  std::unique_ptr<SocketPosix> accept_socket_;
 
   DISALLOW_COPY_AND_ASSIGN(UnixDomainServerSocket);
 };
diff --git a/net/socket/unix_domain_server_socket_posix_unittest.cc b/net/socket/unix_domain_server_socket_posix_unittest.cc
index be472c0..f44e544e 100644
--- a/net/socket/unix_domain_server_socket_posix_unittest.cc
+++ b/net/socket/unix_domain_server_socket_posix_unittest.cc
@@ -4,12 +4,12 @@
 
 #include "net/socket/unix_domain_server_socket_posix.h"
 
+#include <memory>
 #include <vector>
 
 #include "base/bind.h"
 #include "base/files/file_path.h"
 #include "base/files/scoped_temp_dir.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/stl_util.h"
 #include "net/base/io_buffer.h"
@@ -86,7 +86,7 @@
                                        kUseAbstractNamespace);
   EXPECT_EQ(OK, server_socket.BindAndListen(socket_path_, /*backlog=*/1));
 
-  scoped_ptr<StreamSocket> accepted_socket;
+  std::unique_ptr<StreamSocket> accepted_socket;
   TestCompletionCallback accept_callback;
   EXPECT_EQ(ERR_IO_PENDING,
             server_socket.Accept(&accepted_socket, accept_callback.callback()));
diff --git a/net/socket/websocket_endpoint_lock_manager.h b/net/socket/websocket_endpoint_lock_manager.h
index dfbc308..a0388b6 100644
--- a/net/socket/websocket_endpoint_lock_manager.h
+++ b/net/socket/websocket_endpoint_lock_manager.h
@@ -104,7 +104,7 @@
     // Must be NULL to copy this object into the map. Must be set to non-NULL
     // after the object is inserted into the map then point to the same list
     // until this object is deleted.
-    scoped_ptr<WaiterQueue> queue;
+    std::unique_ptr<WaiterQueue> queue;
 
     // This pointer is only used to identify the last instance of StreamSocket
     // that was passed to RememberSocket() for this endpoint. It should only be
diff --git a/net/socket/websocket_transport_client_socket_pool.cc b/net/socket/websocket_transport_client_socket_pool.cc
index 6ca72b39..412a63a 100644
--- a/net/socket/websocket_transport_client_socket_pool.cc
+++ b/net/socket/websocket_transport_client_socket_pool.cc
@@ -310,7 +310,7 @@
     return ERR_IO_PENDING;
   }
 
-  scoped_ptr<WebSocketTransportConnectJob> connect_job(
+  std::unique_ptr<WebSocketTransportConnectJob> connect_job(
       new WebSocketTransportConnectJob(
           group_name, priority, respect_limits, casted_params,
           ConnectionTimeout(), callback, client_socket_factory_, host_resolver_,
@@ -333,7 +333,7 @@
     // TODO(ricea): Implement backup job timer?
     AddJob(handle, std::move(connect_job));
   } else {
-    scoped_ptr<StreamSocket> error_socket;
+    std::unique_ptr<StreamSocket> error_socket;
     connect_job->GetAdditionalErrorState(handle);
     error_socket = connect_job->PassSocket();
     if (error_socket) {
@@ -363,7 +363,7 @@
   DCHECK(!handle->is_initialized());
   if (DeleteStalledRequest(handle))
     return;
-  scoped_ptr<StreamSocket> socket = handle->PassSocket();
+  std::unique_ptr<StreamSocket> socket = handle->PassSocket();
   if (socket)
     ReleaseSocket(handle->group_name(), std::move(socket), handle->id());
   if (!DeleteJob(handle))
@@ -374,7 +374,7 @@
 
 void WebSocketTransportClientSocketPool::ReleaseSocket(
     const std::string& group_name,
-    scoped_ptr<StreamSocket> socket,
+    std::unique_ptr<StreamSocket> socket,
     int id) {
   WebSocketEndpointLockManager::GetInstance()->UnlockSocket(socket.get());
   CHECK_GT(handed_out_socket_count_, 0);
@@ -432,12 +432,12 @@
   return LookupConnectJob(handle)->GetLoadState();
 }
 
-scoped_ptr<base::DictionaryValue>
-    WebSocketTransportClientSocketPool::GetInfoAsValue(
-        const std::string& name,
-        const std::string& type,
-        bool include_nested_pools) const {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+std::unique_ptr<base::DictionaryValue>
+WebSocketTransportClientSocketPool::GetInfoAsValue(
+    const std::string& name,
+    const std::string& type,
+    bool include_nested_pools) const {
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("name", name);
   dict->SetString("type", type);
   dict->SetInteger("handed_out_socket_count", handed_out_socket_count_);
@@ -462,7 +462,7 @@
     WebSocketTransportConnectJob* job) {
   DCHECK_NE(ERR_IO_PENDING, result);
 
-  scoped_ptr<StreamSocket> socket = job->PassSocket();
+  std::unique_ptr<StreamSocket> socket = job->PassSocket();
 
   // See comment in FlushWithError.
   if (flushing_) {
@@ -527,7 +527,7 @@
 }
 
 void WebSocketTransportClientSocketPool::HandOutSocket(
-    scoped_ptr<StreamSocket> socket,
+    std::unique_ptr<StreamSocket> socket,
     const LoadTimingInfo::ConnectTiming& connect_timing,
     ClientSocketHandle* handle,
     const BoundNetLog& net_log) {
@@ -547,7 +547,7 @@
 
 void WebSocketTransportClientSocketPool::AddJob(
     ClientSocketHandle* handle,
-    scoped_ptr<WebSocketTransportConnectJob> connect_job) {
+    std::unique_ptr<WebSocketTransportConnectJob> connect_job) {
   bool inserted =
       pending_connects_.insert(PendingConnectsMap::value_type(
                                    handle, connect_job.release())).second;
diff --git a/net/socket/websocket_transport_client_socket_pool.h b/net/socket/websocket_transport_client_socket_pool.h
index 23b7774..0fda885 100644
--- a/net/socket/websocket_transport_client_socket_pool.h
+++ b/net/socket/websocket_transport_client_socket_pool.h
@@ -7,12 +7,12 @@
 
 #include <list>
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
@@ -98,8 +98,8 @@
   // in parallel. If the list of IPv6 addresses is non-empty, then the IPv6 jobs
   // go first, followed after |kIPv6FallbackTimerInMs| by the IPv4
   // addresses. First sub-job to establish a connection wins.
-  scoped_ptr<WebSocketTransportConnectSubJob> ipv4_job_;
-  scoped_ptr<WebSocketTransportConnectSubJob> ipv6_job_;
+  std::unique_ptr<WebSocketTransportConnectSubJob> ipv4_job_;
+  std::unique_ptr<WebSocketTransportConnectSubJob> ipv6_job_;
 
   base::OneShotTimer fallback_timer_;
   TransportConnectJobHelper::ConnectionLatencyHistogram race_result_;
@@ -146,7 +146,7 @@
   void CancelRequest(const std::string& group_name,
                      ClientSocketHandle* handle) override;
   void ReleaseSocket(const std::string& group_name,
-                     scoped_ptr<StreamSocket> socket,
+                     std::unique_ptr<StreamSocket> socket,
                      int id) override;
   void FlushWithError(int error) override;
   void CloseIdleSockets() override;
@@ -154,7 +154,7 @@
   int IdleSocketCountInGroup(const std::string& group_name) const override;
   LoadState GetLoadState(const std::string& group_name,
                          const ClientSocketHandle* handle) const override;
-  scoped_ptr<base::DictionaryValue> GetInfoAsValue(
+  std::unique_ptr<base::DictionaryValue> GetInfoAsValue(
       const std::string& name,
       const std::string& type,
       bool include_nested_pools) const override;
@@ -211,12 +211,12 @@
                           const CompletionCallback& callback,
                           int rv);
   bool ReachedMaxSocketsLimit() const;
-  void HandOutSocket(scoped_ptr<StreamSocket> socket,
+  void HandOutSocket(std::unique_ptr<StreamSocket> socket,
                      const LoadTimingInfo::ConnectTiming& connect_timing,
                      ClientSocketHandle* handle,
                      const BoundNetLog& net_log);
   void AddJob(ClientSocketHandle* handle,
-              scoped_ptr<WebSocketTransportConnectJob> connect_job);
+              std::unique_ptr<WebSocketTransportConnectJob> connect_job);
   bool DeleteJob(ClientSocketHandle* handle);
   const WebSocketTransportConnectJob* LookupConnectJob(
       const ClientSocketHandle* handle) const;
diff --git a/net/socket/websocket_transport_client_socket_pool_unittest.cc b/net/socket/websocket_transport_client_socket_pool_unittest.cc
index bbc9de80..48026dd 100644
--- a/net/socket/websocket_transport_client_socket_pool_unittest.cc
+++ b/net/socket/websocket_transport_client_socket_pool_unittest.cc
@@ -100,14 +100,14 @@
 
   TestSocketRequest* request(int i) { return test_base_.request(i); }
 
-  std::vector<scoped_ptr<TestSocketRequest>>* requests() {
+  std::vector<std::unique_ptr<TestSocketRequest>>* requests() {
     return test_base_.requests();
   }
   size_t completion_count() const { return test_base_.completion_count(); }
 
   TestNetLog net_log_;
   scoped_refptr<TransportSocketParams> params_;
-  scoped_ptr<MockHostResolver> host_resolver_;
+  std::unique_ptr<MockHostResolver> host_resolver_;
   MockTransportClientSocketFactory client_socket_factory_;
   WebSocketTransportClientSocketPool pool_;
   ClientSocketPoolTest test_base_;
@@ -463,7 +463,7 @@
 // The lock on the endpoint is released when a ClientSocketHandle is deleted.
 TEST_F(WebSocketTransportClientSocketPoolTest, LockReleasedOnHandleDelete) {
   TestCompletionCallback callback;
-  scoped_ptr<ClientSocketHandle> handle(new ClientSocketHandle);
+  std::unique_ptr<ClientSocketHandle> handle(new ClientSocketHandle);
   int rv =
       handle->Init("a", params_, LOW, ClientSocketPool::RespectLimits::ENABLED,
                    callback.callback(), &pool_, BoundNetLog());
diff --git a/net/socket/websocket_transport_connect_sub_job.h b/net/socket/websocket_transport_connect_sub_job.h
index 36a4e943..f7ff5339 100644
--- a/net/socket/websocket_transport_connect_sub_job.h
+++ b/net/socket/websocket_transport_connect_sub_job.h
@@ -6,11 +6,12 @@
 #define NET_SOCKET_WEBSOCKET_TRANSPORT_CONNECT_SUB_JOB_H_
 
 #include <stddef.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/address_list.h"
 #include "net/base/load_states.h"
 #include "net/socket/websocket_endpoint_lock_manager.h"
@@ -47,7 +48,9 @@
 
   SubJobType type() const { return type_; }
 
-  scoped_ptr<StreamSocket> PassSocket() { return std::move(transport_socket_); }
+  std::unique_ptr<StreamSocket> PassSocket() {
+    return std::move(transport_socket_);
+  }
 
   // Implementation of WebSocketEndpointLockManager::EndpointWaiter.
   void GotEndpointLock() override;
@@ -83,7 +86,7 @@
   State next_state_;
   const SubJobType type_;
 
-  scoped_ptr<StreamSocket> transport_socket_;
+  std::unique_ptr<StreamSocket> transport_socket_;
 
   DISALLOW_COPY_AND_ASSIGN(WebSocketTransportConnectSubJob);
 };
diff --git a/net/spdy/bidirectional_stream_spdy_impl.cc b/net/spdy/bidirectional_stream_spdy_impl.cc
index c7e023ba..cb348cc 100644
--- a/net/spdy/bidirectional_stream_spdy_impl.cc
+++ b/net/spdy/bidirectional_stream_spdy_impl.cc
@@ -51,7 +51,7 @@
     const BidirectionalStreamRequestInfo* request_info,
     const BoundNetLog& net_log,
     BidirectionalStreamImpl::Delegate* delegate,
-    scoped_ptr<base::Timer> timer) {
+    std::unique_ptr<base::Timer> timer) {
   DCHECK(!stream_);
   DCHECK(timer);
 
@@ -153,7 +153,7 @@
 }
 
 void BidirectionalStreamSpdyImpl::OnDataReceived(
-    scoped_ptr<SpdyBuffer> buffer) {
+    std::unique_ptr<SpdyBuffer> buffer) {
   DCHECK(stream_);
   DCHECK(!stream_closed_);
 
@@ -207,7 +207,7 @@
 }
 
 void BidirectionalStreamSpdyImpl::SendRequestHeaders() {
-  scoped_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock);
+  std::unique_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock);
   HttpRequestInfo http_request_info;
   http_request_info.url = request_info_->url;
   http_request_info.method = request_info_->method;
diff --git a/net/spdy/bidirectional_stream_spdy_impl.h b/net/spdy/bidirectional_stream_spdy_impl.h
index 62e7bb6..7f30c844 100644
--- a/net/spdy/bidirectional_stream_spdy_impl.h
+++ b/net/spdy/bidirectional_stream_spdy_impl.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "net/http/bidirectional_stream_impl.h"
 #include "net/http/bidirectional_stream_request_info.h"
@@ -40,7 +41,7 @@
   void Start(const BidirectionalStreamRequestInfo* request_info,
              const BoundNetLog& net_log,
              BidirectionalStreamImpl::Delegate* delegate,
-             scoped_ptr<base::Timer> timer) override;
+             std::unique_ptr<base::Timer> timer) override;
   int ReadData(IOBuffer* buf, int buf_len) override;
   void SendData(IOBuffer* data, int length, bool end_stream) override;
   void Cancel() override;
@@ -52,7 +53,7 @@
   void OnRequestHeadersSent() override;
   SpdyResponseHeadersStatus OnResponseHeadersUpdated(
       const SpdyHeaderBlock& response_headers) override;
-  void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+  void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override;
   void OnDataSent() override;
   void OnTrailers(const SpdyHeaderBlock& trailers) override;
   void OnClose(int status) override;
@@ -67,7 +68,7 @@
   const base::WeakPtr<SpdySession> spdy_session_;
   const BidirectionalStreamRequestInfo* request_info_;
   BidirectionalStreamImpl::Delegate* delegate_;
-  scoped_ptr<base::Timer> timer_;
+  std::unique_ptr<base::Timer> timer_;
   SpdyStreamRequest stream_request_;
   base::WeakPtr<SpdyStream> stream_;
 
diff --git a/net/spdy/buffered_spdy_framer.h b/net/spdy/buffered_spdy_framer.h
index 8ad0def..69d8b42 100644
--- a/net/spdy/buffered_spdy_framer.h
+++ b/net/spdy/buffered_spdy_framer.h
@@ -8,10 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/socket/next_proto.h"
 #include "net/spdy/spdy_framer.h"
@@ -301,7 +301,7 @@
     bool fin;
     bool unidirectional;
   };
-  scoped_ptr<ControlFrameFields> control_frame_fields_;
+  std::unique_ptr<ControlFrameFields> control_frame_fields_;
 
   // Collection of fields of a GOAWAY frame that this class needs to buffer.
   struct GoAwayFields {
@@ -309,7 +309,7 @@
     SpdyGoAwayStatus status;
     std::string debug_data;
   };
-  scoped_ptr<GoAwayFields> goaway_fields_;
+  std::unique_ptr<GoAwayFields> goaway_fields_;
 
   DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer);
 };
diff --git a/net/spdy/buffered_spdy_framer_unittest.cc b/net/spdy/buffered_spdy_framer_unittest.cc
index be2d66e..5eaa47fd 100644
--- a/net/spdy/buffered_spdy_framer_unittest.cc
+++ b/net/spdy/buffered_spdy_framer_unittest.cc
@@ -227,7 +227,7 @@
   headers["aa"] = "vv";
   headers["bb"] = "ww";
   BufferedSpdyFramer framer(spdy_version());
-  scoped_ptr<SpdySerializedFrame> control_frame(
+  std::unique_ptr<SpdySerializedFrame> control_frame(
       framer.CreateSynStream(1,  // stream_id
                              0,  // associated_stream_id
                              1,  // priority
@@ -255,7 +255,7 @@
   headers["alpha"] = "beta";
   headers["gamma"] = "delta";
   BufferedSpdyFramer framer(spdy_version());
-  scoped_ptr<SpdySerializedFrame> control_frame(
+  std::unique_ptr<SpdySerializedFrame> control_frame(
       framer.CreateSynReply(1,  // stream_id
                             CONTROL_FLAG_NONE, &headers));
   EXPECT_TRUE(control_frame.get() != NULL);
@@ -282,7 +282,7 @@
   headers["alpha"] = "beta";
   headers["gamma"] = "delta";
   BufferedSpdyFramer framer(spdy_version());
-  scoped_ptr<SpdySerializedFrame> control_frame(
+  std::unique_ptr<SpdySerializedFrame> control_frame(
       framer.CreateHeaders(1,  // stream_id
                            CONTROL_FLAG_NONE,
                            0,  // priority
@@ -308,7 +308,7 @@
   headers["alpha"] = "beta";
   headers["gamma"] = "delta";
   BufferedSpdyFramer framer(spdy_version());
-  scoped_ptr<SpdySerializedFrame> control_frame(
+  std::unique_ptr<SpdySerializedFrame> control_frame(
       framer.CreatePushPromise(1, 2, &headers));
   EXPECT_TRUE(control_frame.get() != NULL);
 
@@ -330,7 +330,7 @@
   if (spdy_version() < HTTP2)
     return;
   BufferedSpdyFramer framer(spdy_version());
-  scoped_ptr<SpdySerializedFrame> goaway_frame(
+  std::unique_ptr<SpdySerializedFrame> goaway_frame(
       framer.CreateGoAway(2u, GOAWAY_FRAME_SIZE_ERROR, "foo"));
 
   TestBufferedSpdyVisitor visitor(spdy_version());
diff --git a/net/spdy/fuzzing/hpack_fuzz_util.h b/net/spdy/fuzzing/hpack_fuzz_util.h
index 3ee64e6..289bb6a16 100644
--- a/net/spdy/fuzzing/hpack_fuzz_util.h
+++ b/net/spdy/fuzzing/hpack_fuzz_util.h
@@ -8,10 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/net_export.h"
 #include "net/spdy/hpack/hpack_decoder.h"
@@ -69,9 +69,9 @@
   struct NET_EXPORT_PRIVATE FuzzerContext {
     FuzzerContext();
     ~FuzzerContext();
-    scoped_ptr<HpackDecoder> first_stage;
-    scoped_ptr<HpackEncoder> second_stage;
-    scoped_ptr<HpackDecoder> third_stage;
+    std::unique_ptr<HpackDecoder> first_stage;
+    std::unique_ptr<HpackEncoder> second_stage;
+    std::unique_ptr<HpackDecoder> third_stage;
   };
 
   static void InitializeFuzzerContext(FuzzerContext* context);
diff --git a/net/spdy/hpack/hpack_constants.cc b/net/spdy/hpack/hpack_constants.cc
index 59a55dac..b9db0ef 100644
--- a/net/spdy/hpack/hpack_constants.cc
+++ b/net/spdy/hpack/hpack_constants.cc
@@ -4,10 +4,10 @@
 
 #include "net/spdy/hpack/hpack_constants.h"
 
+#include <memory>
 #include <vector>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/singleton.h"
 #include "net/spdy/hpack/hpack_huffman_table.h"
 #include "net/spdy/hpack/hpack_static_table.h"
@@ -22,7 +22,7 @@
  public:
   SharedHpackHuffmanTable() {
     std::vector<HpackHuffmanSymbol> code = HpackHuffmanCode();
-    scoped_ptr<HpackHuffmanTable> mutable_table(new HpackHuffmanTable());
+    std::unique_ptr<HpackHuffmanTable> mutable_table(new HpackHuffmanTable());
     CHECK(mutable_table->Initialize(&code[0], code.size()));
     CHECK(mutable_table->IsInitialized());
     table.reset(mutable_table.release());
@@ -32,7 +32,7 @@
     return base::Singleton<SharedHpackHuffmanTable>::get();
   }
 
-  scoped_ptr<const HpackHuffmanTable> table;
+  std::unique_ptr<const HpackHuffmanTable> table;
 };
 
 // SharedHpackStaticTable is a Singleton wrapping a HpackStaticTable
@@ -41,7 +41,7 @@
  public:
   SharedHpackStaticTable() {
     std::vector<HpackStaticEntry> static_table = HpackStaticTableVector();
-    scoped_ptr<HpackStaticTable> mutable_table(new HpackStaticTable());
+    std::unique_ptr<HpackStaticTable> mutable_table(new HpackStaticTable());
     mutable_table->Initialize(&static_table[0], static_table.size());
     CHECK(mutable_table->IsInitialized());
     table.reset(mutable_table.release());
@@ -51,7 +51,7 @@
     return base::Singleton<SharedHpackStaticTable>::get();
   }
 
-  scoped_ptr<const HpackStaticTable> table;
+  std::unique_ptr<const HpackStaticTable> table;
 };
 
 }  // namespace
diff --git a/net/spdy/http2_write_scheduler.h b/net/spdy/http2_write_scheduler.h
index 2bf5aee..e7fb924 100644
--- a/net/spdy/http2_write_scheduler.h
+++ b/net/spdy/http2_write_scheduler.h
@@ -11,6 +11,7 @@
 #include <cmath>
 #include <deque>
 #include <map>
+#include <memory>
 #include <queue>
 #include <set>
 #include <unordered_map>
@@ -21,7 +22,6 @@
 #include "base/containers/linked_list.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 
 namespace net {
@@ -316,7 +316,7 @@
     LOG(DFATAL) << "Stream " << stream_id << " not registered";
     return;
   }
-  scoped_ptr<StreamInfo> stream_info(std::move(it->second));
+  std::unique_ptr<StreamInfo> stream_info(std::move(it->second));
   all_stream_infos_.erase(it);
   // If scheduled, unschedule.
   if (stream_info->scheduled) {
diff --git a/net/spdy/spdy_buffer.cc b/net/spdy/spdy_buffer.cc
index be783fc..28e807d 100644
--- a/net/spdy/spdy_buffer.cc
+++ b/net/spdy/spdy_buffer.cc
@@ -22,14 +22,14 @@
 
 // Makes a SpdySerializedFrame with |size| bytes of data copied from |data|.
 // |data| must be non-NULL and |size| must be positive.
-scoped_ptr<SpdySerializedFrame> MakeSpdySerializedFrame(const char* data,
-                                                        size_t size) {
+std::unique_ptr<SpdySerializedFrame> MakeSpdySerializedFrame(const char* data,
+                                                             size_t size) {
   DCHECK(data);
   CHECK_GT(size, 0u);
   CHECK_LE(size, kMaxSpdyFrameSize);
-  scoped_ptr<char[]> frame_data(new char[size]);
+  std::unique_ptr<char[]> frame_data(new char[size]);
   std::memcpy(frame_data.get(), data, size);
-  scoped_ptr<SpdySerializedFrame> frame(new SpdySerializedFrame(
+  std::unique_ptr<SpdySerializedFrame> frame(new SpdySerializedFrame(
       frame_data.release(), size, true /* owns_buffer */));
   return frame;
 }
@@ -57,7 +57,7 @@
   DISALLOW_COPY_AND_ASSIGN(SharedFrameIOBuffer);
 };
 
-SpdyBuffer::SpdyBuffer(scoped_ptr<SpdySerializedFrame> frame)
+SpdyBuffer::SpdyBuffer(std::unique_ptr<SpdySerializedFrame> frame)
     : shared_frame_(new SharedFrame()), offset_(0) {
   shared_frame_->data = std::move(frame);
 }
diff --git a/net/spdy/spdy_buffer.h b/net/spdy/spdy_buffer.h
index d12c89f..0d9ffbf 100644
--- a/net/spdy/spdy_buffer.h
+++ b/net/spdy/spdy_buffer.h
@@ -6,12 +6,12 @@
 #define NET_SPDY_SPDY_BUFFER_H_
 
 #include <cstddef>
+#include <memory>
 #include <vector>
 
 #include "base/callback_forward.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
@@ -47,7 +47,7 @@
 
   // Construct with the data in the given frame. Assumes that data is
   // owned by |frame| or outlives it.
-  explicit SpdyBuffer(scoped_ptr<SpdySerializedFrame> frame);
+  explicit SpdyBuffer(std::unique_ptr<SpdySerializedFrame> frame);
 
   // Construct with a copy of the given raw data. |data| must be
   // non-NULL and |size| must be non-zero.
@@ -88,7 +88,8 @@
 
   // Ref-count the passed-in SpdySerializedFrame to support the semantics of
   // |GetIOBufferForRemainingData()|.
-  typedef base::RefCountedData<scoped_ptr<SpdySerializedFrame>> SharedFrame;
+  typedef base::RefCountedData<std::unique_ptr<SpdySerializedFrame>>
+      SharedFrame;
 
   class SharedFrameIOBuffer;
 
diff --git a/net/spdy/spdy_buffer_producer.cc b/net/spdy/spdy_buffer_producer.cc
index 8f18d19..46d766b 100644
--- a/net/spdy/spdy_buffer_producer.cc
+++ b/net/spdy/spdy_buffer_producer.cc
@@ -16,12 +16,12 @@
 
 SpdyBufferProducer::~SpdyBufferProducer() {}
 
-SimpleBufferProducer::SimpleBufferProducer(scoped_ptr<SpdyBuffer> buffer)
+SimpleBufferProducer::SimpleBufferProducer(std::unique_ptr<SpdyBuffer> buffer)
     : buffer_(std::move(buffer)) {}
 
 SimpleBufferProducer::~SimpleBufferProducer() {}
 
-scoped_ptr<SpdyBuffer> SimpleBufferProducer::ProduceBuffer() {
+std::unique_ptr<SpdyBuffer> SimpleBufferProducer::ProduceBuffer() {
   DCHECK(buffer_);
   return std::move(buffer_);
 }
diff --git a/net/spdy/spdy_buffer_producer.h b/net/spdy/spdy_buffer_producer.h
index 849ecd2..8d09f7b 100644
--- a/net/spdy/spdy_buffer_producer.h
+++ b/net/spdy/spdy_buffer_producer.h
@@ -5,9 +5,10 @@
 #ifndef NET_SPDY_SPDY_BUFFER_PRODUCER_H_
 #define NET_SPDY_SPDY_BUFFER_PRODUCER_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
@@ -22,7 +23,7 @@
   SpdyBufferProducer();
 
   // Produces the buffer to be written. Will be called at most once.
-  virtual scoped_ptr<SpdyBuffer> ProduceBuffer() = 0;
+  virtual std::unique_ptr<SpdyBuffer> ProduceBuffer() = 0;
 
   virtual ~SpdyBufferProducer();
 
@@ -33,14 +34,14 @@
 // A simple wrapper around a single SpdyBuffer.
 class NET_EXPORT_PRIVATE SimpleBufferProducer : public SpdyBufferProducer {
  public:
-  explicit SimpleBufferProducer(scoped_ptr<SpdyBuffer> buffer);
+  explicit SimpleBufferProducer(std::unique_ptr<SpdyBuffer> buffer);
 
   ~SimpleBufferProducer() override;
 
-  scoped_ptr<SpdyBuffer> ProduceBuffer() override;
+  std::unique_ptr<SpdyBuffer> ProduceBuffer() override;
 
  private:
-  scoped_ptr<SpdyBuffer> buffer_;
+  std::unique_ptr<SpdyBuffer> buffer_;
 
   DISALLOW_COPY_AND_ASSIGN(SimpleBufferProducer);
 };
diff --git a/net/spdy/spdy_buffer_unittest.cc b/net/spdy/spdy_buffer_unittest.cc
index 46a5c2b..3dd4942 100644
--- a/net/spdy/spdy_buffer_unittest.cc
+++ b/net/spdy/spdy_buffer_unittest.cc
@@ -6,11 +6,11 @@
 
 #include <cstddef>
 #include <cstring>
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/io_buffer.h"
 #include "net/spdy/spdy_protocol.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -32,8 +32,9 @@
 // Construct a SpdyBuffer from a SpdySerializedFrame and make sure its data
 // points to the frame's underlying data.
 TEST_F(SpdyBufferTest, FrameConstructor) {
-  SpdyBuffer buffer(scoped_ptr<SpdySerializedFrame>(new SpdySerializedFrame(
-      const_cast<char*>(kData), kDataSize, false /* owns_buffer */)));
+  SpdyBuffer buffer(
+      std::unique_ptr<SpdySerializedFrame>(new SpdySerializedFrame(
+          const_cast<char*>(kData), kDataSize, false /* owns_buffer */)));
 
   EXPECT_EQ(kData, buffer.GetRemainingData());
   EXPECT_EQ(kDataSize, buffer.GetRemainingSize());
@@ -119,7 +120,7 @@
 // Make sure the IOBuffer returned by GetIOBufferForRemainingData()
 // outlives the buffer itself.
 TEST_F(SpdyBufferTest, IOBufferForRemainingDataOutlivesBuffer) {
-  scoped_ptr<SpdyBuffer> buffer(new SpdyBuffer(kData, kDataSize));
+  std::unique_ptr<SpdyBuffer> buffer(new SpdyBuffer(kData, kDataSize));
 
   scoped_refptr<IOBuffer> io_buffer = buffer->GetIOBufferForRemainingData();
   buffer.reset();
diff --git a/net/spdy/spdy_frame_builder.h b/net/spdy/spdy_frame_builder.h
index d1f9535..65d5f288 100644
--- a/net/spdy/spdy_frame_builder.h
+++ b/net/spdy/spdy_frame_builder.h
@@ -8,9 +8,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "base/sys_byteorder.h"
 #include "net/base/net_export.h"
@@ -138,7 +138,7 @@
   // write of given size, in bytes.
   bool CanWrite(size_t length) const;
 
-  scoped_ptr<char[]> buffer_;
+  std::unique_ptr<char[]> buffer_;
   size_t capacity_;  // Allocation size of payload, set by constructor.
   size_t length_;    // Length of the latest frame in the buffer.
   size_t offset_;    // Position at which the latest frame begins.
diff --git a/net/spdy/spdy_frame_reader_test.cc b/net/spdy/spdy_frame_reader_test.cc
index ca178de..c68f3f4 100644
--- a/net/spdy/spdy_frame_reader_test.cc
+++ b/net/spdy/spdy_frame_reader_test.cc
@@ -2,12 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "net/spdy/spdy_frame_reader.h"
+
 #include <algorithm>
 #include <iostream>
+#include <memory>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/sys_byteorder.h"
-#include "net/spdy/spdy_frame_reader.h"
 #include "testing/platform_test.h"
 
 namespace net {
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index ab242b8e..611f3e4 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -8,17 +8,17 @@
 
 #include <algorithm>
 #include <iterator>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/lazy_instance.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/metrics/histogram_macros.h"
 #include "net/quic/quic_flags.h"
 #include "net/spdy/hpack/hpack_constants.h"
+#include "net/spdy/spdy_bitmasks.h"
 #include "net/spdy/spdy_frame_builder.h"
 #include "net/spdy/spdy_frame_reader.h"
-#include "net/spdy/spdy_bitmasks.h"
 #include "third_party/zlib/zlib.h"
 
 using base::StringPiece;
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h
index 7375333..7e25329 100644
--- a/net/spdy/spdy_framer.h
+++ b/net/spdy/spdy_framer.h
@@ -13,7 +13,6 @@
 #include <string>
 #include <utility>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "base/sys_byteorder.h"
 #include "net/base/net_export.h"
@@ -592,7 +591,7 @@
     size_t len() const { return len_; }
 
    private:
-    scoped_ptr<char[]> buffer_;
+    std::unique_ptr<char[]> buffer_;
     size_t capacity_;
     size_t len_;
   };
@@ -742,14 +741,14 @@
   // current_frame_buffer_.
   SpdySettingsScratch settings_scratch_;
 
-  scoped_ptr<CharBuffer> altsvc_scratch_;
+  std::unique_ptr<CharBuffer> altsvc_scratch_;
 
   // SPDY header compressors.
-  scoped_ptr<z_stream> header_compressor_;
-  scoped_ptr<z_stream> header_decompressor_;
+  std::unique_ptr<z_stream> header_compressor_;
+  std::unique_ptr<z_stream> header_decompressor_;
 
-  scoped_ptr<HpackEncoder> hpack_encoder_;
-  scoped_ptr<HpackDecoder> hpack_decoder_;
+  std::unique_ptr<HpackEncoder> hpack_encoder_;
+  std::unique_ptr<HpackDecoder> hpack_decoder_;
 
   SpdyFramerVisitorInterface* visitor_;
   SpdyFramerDebugVisitorInterface* debug_visitor_;
diff --git a/net/spdy/spdy_framer_test.cc b/net/spdy/spdy_framer_test.cc
index 3c4724e..e08169e 100644
--- a/net/spdy/spdy_framer_test.cc
+++ b/net/spdy/spdy_framer_test.cc
@@ -15,7 +15,6 @@
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/quic/quic_flags.h"
 #include "net/spdy/hpack/hpack_constants.h"
 #include "net/spdy/mock_spdy_framer_visitor.h"
@@ -240,7 +239,7 @@
 
    private:
     SpdyMajorVersion version_;
-    scoped_ptr<char[]> buffer_;
+    std::unique_ptr<char[]> buffer_;
     size_t size_;
     bool finished_;
 
@@ -602,7 +601,7 @@
   size_t last_frame_len_;
 
   // Header block streaming state:
-  scoped_ptr<char[]> header_buffer_;
+  std::unique_ptr<char[]> header_buffer_;
   size_t header_buffer_length_;
   size_t header_buffer_size_;
   SpdyStreamId header_stream_id_;
@@ -983,7 +982,7 @@
     return;
   }
 
-  scoped_ptr<TestSpdyVisitor> visitor(new TestSpdyVisitor(spdy_version_));
+  std::unique_ptr<TestSpdyVisitor> visitor(new TestSpdyVisitor(spdy_version_));
   SpdyFramer framer(spdy_version_);
   framer.set_debug_visitor(visitor.get());
   SpdySynStreamIR syn_stream(1);
@@ -1753,7 +1752,7 @@
     };
 
     const int kFrameSize = arraysize(kFrameHeader) + kDataSize;
-    scoped_ptr<unsigned char[]> expected_frame_data(
+    std::unique_ptr<unsigned char[]> expected_frame_data(
         new unsigned char[kFrameSize]);
     memcpy(expected_frame_data.get(), kFrameHeader, arraysize(kFrameHeader));
     memset(expected_frame_data.get() + arraysize(kFrameHeader), 'A', kDataSize);
@@ -5736,7 +5735,7 @@
 // to ProcessInput (i.e. will not be calling set_process_single_input_frame()).
 TEST_P(SpdyFramerTest, ProcessAllInput) {
   SpdyFramer framer(spdy_version_);
-  scoped_ptr<TestSpdyVisitor> visitor(new TestSpdyVisitor(spdy_version_));
+  std::unique_ptr<TestSpdyVisitor> visitor(new TestSpdyVisitor(spdy_version_));
   framer.set_visitor(visitor.get());
 
   // Create two input frames.
@@ -5786,7 +5785,7 @@
 TEST_P(SpdyFramerTest, ProcessAtMostOneFrame) {
   SpdyFramer framer(spdy_version_);
   framer.set_process_single_input_frame(true);
-  scoped_ptr<TestSpdyVisitor> visitor;
+  std::unique_ptr<TestSpdyVisitor> visitor;
 
   // Create two input frames.
   const char four_score[] = "Four score and ...";
diff --git a/net/spdy/spdy_header_block.cc b/net/spdy/spdy_header_block.cc
index b24085f..b060309b 100644
--- a/net/spdy/spdy_header_block.cc
+++ b/net/spdy/spdy_header_block.cc
@@ -85,7 +85,7 @@
 
  private:
   // TODO(bnc): As soon as move semantics are allowed, change from naked pointer
-  // to scoped_ptr<>, or better yet, unique_ptr<>.
+  // to std::unique_ptr<>, or better yet, unique_ptr<>.
   struct Block {
     char* data;
     size_t size = 0;
@@ -228,10 +228,10 @@
   block_.insert(make_pair(storage_->Write(key), storage_->Write(value)));
 }
 
-scoped_ptr<base::Value> SpdyHeaderBlockNetLogCallback(
+std::unique_ptr<base::Value> SpdyHeaderBlockNetLogCallback(
     const SpdyHeaderBlock* headers,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   base::DictionaryValue* headers_dict = new base::DictionaryValue();
   for (SpdyHeaderBlock::const_iterator it = headers->begin();
        it != headers->end(); ++it) {
diff --git a/net/spdy/spdy_header_block.h b/net/spdy/spdy_header_block.h
index 58d6cf4c..14e655f 100644
--- a/net/spdy/spdy_header_block.h
+++ b/net/spdy/spdy_header_block.h
@@ -11,7 +11,6 @@
 #include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/linked_hash_map.h"
 #include "net/base/net_export.h"
@@ -126,11 +125,11 @@
   void AppendHeader(const base::StringPiece key, const base::StringPiece value);
 
   MapType block_;
-  scoped_ptr<Storage> storage_;
+  std::unique_ptr<Storage> storage_;
 };
 
 // Converts a SpdyHeaderBlock into NetLog event parameters.
-NET_EXPORT scoped_ptr<base::Value> SpdyHeaderBlockNetLogCallback(
+NET_EXPORT std::unique_ptr<base::Value> SpdyHeaderBlockNetLogCallback(
     const SpdyHeaderBlock* headers,
     NetLogCaptureMode capture_mode);
 
diff --git a/net/spdy/spdy_header_block_test.cc b/net/spdy/spdy_header_block_test.cc
index ec2b665..8413d28 100644
--- a/net/spdy/spdy_header_block_test.cc
+++ b/net/spdy/spdy_header_block_test.cc
@@ -4,9 +4,9 @@
 
 #include "net/spdy/spdy_header_block.h"
 
+#include <memory>
 #include <utility>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "net/log/net_log.h"
 #include "net/spdy/spdy_test_utils.h"
@@ -76,7 +76,7 @@
   headers["A"] = "a";
   headers["B"] = "b";
 
-  scoped_ptr<base::Value> event_param(SpdyHeaderBlockNetLogCallback(
+  std::unique_ptr<base::Value> event_param(SpdyHeaderBlockNetLogCallback(
       &headers, NetLogCaptureMode::IncludeCookiesAndCredentials()));
 
   SpdyHeaderBlock headers2;
diff --git a/net/spdy/spdy_headers_block_parser.h b/net/spdy/spdy_headers_block_parser.h
index 4ee8760..8e2db8b 100644
--- a/net/spdy/spdy_headers_block_parser.h
+++ b/net/spdy/spdy_headers_block_parser.h
@@ -8,8 +8,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/net_export.h"
 #include "net/spdy/spdy_headers_handler_interface.h"
diff --git a/net/spdy/spdy_headers_block_parser_test.cc b/net/spdy/spdy_headers_block_parser_test.cc
index 85beb6cd..edbff63 100644
--- a/net/spdy/spdy_headers_block_parser_test.cc
+++ b/net/spdy/spdy_headers_block_parser_test.cc
@@ -4,9 +4,9 @@
 
 #include "net/spdy/spdy_headers_block_parser.h"
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/sys_byteorder.h"
 #include "net/test/gtest_util.h"
@@ -86,7 +86,7 @@
   SpdyMajorVersion spdy_version_;
 
   MockSpdyHeadersHandler handler_;
-  scoped_ptr<SpdyHeadersBlockParser> parser_;
+  std::unique_ptr<SpdyHeadersBlockParser> parser_;
 
   static const char *const kBaseKey;
   static const char *const kBaseValue;
diff --git a/net/spdy/spdy_http_stream.cc b/net/spdy/spdy_http_stream.cc
index 4fdbc0e9..2bdd4990 100644
--- a/net/spdy/spdy_http_stream.cc
+++ b/net/spdy/spdy_http_stream.cc
@@ -274,7 +274,7 @@
     return ERR_IO_PENDING;
   }
 
-  scoped_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock);
+  std::unique_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock);
   CreateSpdyHeadersFromHttpRequest(*request_info_, request_headers,
                                    stream_->GetProtocolVersion(), direct_,
                                    headers.get());
@@ -351,7 +351,7 @@
   return RESPONSE_HEADERS_ARE_COMPLETE;
 }
 
-void SpdyHttpStream::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
+void SpdyHttpStream::OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) {
   CHECK_EQ(response_headers_status_, RESPONSE_HEADERS_ARE_COMPLETE);
 
   // Note that data may be received for a SpdyStream prior to the user calling
diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h
index 76130d8..c77ffea 100644
--- a/net/spdy/spdy_http_stream.h
+++ b/net/spdy/spdy_http_stream.h
@@ -89,7 +89,7 @@
   void OnRequestHeadersSent() override;
   SpdyResponseHeadersStatus OnResponseHeadersUpdated(
       const SpdyHeaderBlock& response_headers) override;
-  void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+  void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override;
   void OnDataSent() override;
   void OnTrailers(const SpdyHeaderBlock& trailers) override;
   void OnClose(int status) override;
@@ -147,7 +147,7 @@
   // It is not owned by this stream object, or point to |push_response_info_|.
   HttpResponseInfo* response_info_;
 
-  scoped_ptr<HttpResponseInfo> push_response_info_;
+  std::unique_ptr<HttpResponseInfo> push_response_info_;
 
   // We don't use SpdyStream's |response_header_status_| as we
   // sometimes call back into our delegate before it is updated.
diff --git a/net/spdy/spdy_http_stream_unittest.cc b/net/spdy/spdy_http_stream_unittest.cc
index 9ef70cede..a6d4a12 100644
--- a/net/spdy/spdy_http_stream_unittest.cc
+++ b/net/spdy/spdy_http_stream_unittest.cc
@@ -6,7 +6,8 @@
 
 #include <stdint.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/stl_util.h"
@@ -126,8 +127,8 @@
   SpdyTestUtil spdy_util_;
   TestNetLog net_log_;
   SpdySessionDependencies session_deps_;
-  scoped_ptr<SequencedSocketData> sequenced_data_;
-  scoped_ptr<HttpNetworkSession> http_session_;
+  std::unique_ptr<SequencedSocketData> sequenced_data_;
+  std::unique_ptr<HttpNetworkSession> http_session_;
   base::WeakPtr<SpdySession> session_;
 
  private:
@@ -162,12 +163,12 @@
 }
 
 TEST_P(SpdyHttpStreamTest, SendRequest) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
       CreateMockWrite(*req.get(), 0),
   };
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1), MockRead(SYNCHRONOUS, 0, 2)  // EOF
@@ -185,7 +186,8 @@
   HttpResponseInfo response;
   HttpRequestHeaders headers;
   BoundNetLog net_log;
-  scoped_ptr<SpdyHttpStream> http_stream(new SpdyHttpStream(session_, true));
+  std::unique_ptr<SpdyHttpStream> http_stream(
+      new SpdyHttpStream(session_, true));
   // Make sure getting load timing information the stream early does not crash.
   LoadTimingInfo load_timing_info;
   EXPECT_FALSE(http_stream->GetLoadTimingInfo(&load_timing_info));
@@ -223,21 +225,21 @@
 }
 
 TEST_P(SpdyHttpStreamTest, LoadTimingTwoRequests) {
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
     CreateMockWrite(*req2, 1),
   };
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body1(
+  std::unique_ptr<SpdySerializedFrame> body1(
       spdy_util_.ConstructSpdyBodyFrame(1, "", 0, true));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, "", 0, true));
   MockRead reads[] = {
     CreateMockRead(*resp1, 2),
@@ -258,7 +260,8 @@
   TestCompletionCallback callback1;
   HttpResponseInfo response1;
   HttpRequestHeaders headers1;
-  scoped_ptr<SpdyHttpStream> http_stream1(new SpdyHttpStream(session_, true));
+  std::unique_ptr<SpdyHttpStream> http_stream1(
+      new SpdyHttpStream(session_, true));
 
   HttpRequestInfo request2;
   request2.method = "GET";
@@ -266,7 +269,8 @@
   TestCompletionCallback callback2;
   HttpResponseInfo response2;
   HttpRequestHeaders headers2;
-  scoped_ptr<SpdyHttpStream> http_stream2(new SpdyHttpStream(session_, true));
+  std::unique_ptr<SpdyHttpStream> http_stream2(
+      new SpdyHttpStream(session_, true));
 
   // First write.
   ASSERT_EQ(OK,
@@ -325,16 +329,16 @@
 TEST_P(SpdyHttpStreamTest, SendChunkedPost) {
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       framer.CreateDataFrame(1, kUploadData, kUploadDataSize, DATA_FLAG_FIN));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),  // request
       CreateMockWrite(*body, 1)  // POST upload frame
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
       CreateMockRead(*resp, 2),
@@ -390,16 +394,16 @@
 TEST_P(SpdyHttpStreamTest, ConnectionClosedDuringChunkedPost) {
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       framer.CreateDataFrame(1, kUploadData, kUploadDataSize, DATA_FLAG_NONE));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),  // Request
       CreateMockWrite(*body, 1)  // First POST upload frame
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_CONNECTION_CLOSED, 2)  // Server hangs up early.
@@ -461,13 +465,13 @@
 TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPost) {
   const char kUploadData1[] = "12345678";
   const int kUploadData1Size = arraysize(kUploadData1)-1;
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
-  scoped_ptr<SpdySerializedFrame> chunk1(
+  std::unique_ptr<SpdySerializedFrame> chunk1(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> chunk2(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> chunk2(spdy_util_.ConstructSpdyBodyFrame(
       1, kUploadData1, kUploadData1Size, false));
-  scoped_ptr<SpdySerializedFrame> chunk3(
+  std::unique_ptr<SpdySerializedFrame> chunk3(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes[] = {
     CreateMockWrite(*req.get(), 0),
@@ -475,7 +479,7 @@
     CreateMockWrite(*chunk2, 2),
     CreateMockWrite(*chunk3, 3),
   };
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
     CreateMockRead(*resp, 4),
@@ -501,7 +505,8 @@
   upload_stream.AppendData(kUploadData, kUploadDataSize, false);
 
   BoundNetLog net_log;
-  scoped_ptr<SpdyHttpStream> http_stream(new SpdyHttpStream(session_, true));
+  std::unique_ptr<SpdyHttpStream> http_stream(
+      new SpdyHttpStream(session_, true));
   ASSERT_EQ(OK, http_stream->InitializeStream(&request, DEFAULT_PRIORITY,
                                               net_log, CompletionCallback()));
 
@@ -564,18 +569,18 @@
 // Test that the SpdyStream state machine can handle sending a final empty data
 // frame when uploading a chunked data stream.
 TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPostWithEmptyFinalDataFrame) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
-  scoped_ptr<SpdySerializedFrame> chunk1(
+  std::unique_ptr<SpdySerializedFrame> chunk1(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> chunk2(
+  std::unique_ptr<SpdySerializedFrame> chunk2(
       spdy_util_.ConstructSpdyBodyFrame(1, "", 0, true));
   MockWrite writes[] = {
     CreateMockWrite(*req.get(), 0),
     CreateMockWrite(*chunk1, 1),  // POST upload frames
     CreateMockWrite(*chunk2, 2),
   };
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
     CreateMockRead(*resp, 3),
@@ -600,7 +605,8 @@
   upload_stream.AppendData(kUploadData, kUploadDataSize, false);
 
   BoundNetLog net_log;
-  scoped_ptr<SpdyHttpStream> http_stream(new SpdyHttpStream(session_, true));
+  std::unique_ptr<SpdyHttpStream> http_stream(
+      new SpdyHttpStream(session_, true));
   ASSERT_EQ(OK, http_stream->InitializeStream(&request, DEFAULT_PRIORITY,
                                               net_log, CompletionCallback()));
 
@@ -656,15 +662,15 @@
 // Test that the SpdyStream state machine handles a chunked upload with no
 // payload. Unclear if this is a case worth supporting.
 TEST_P(SpdyHttpStreamTest, ChunkedPostWithEmptyPayload) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
-  scoped_ptr<SpdySerializedFrame> chunk(
+  std::unique_ptr<SpdySerializedFrame> chunk(
       spdy_util_.ConstructSpdyBodyFrame(1, "", 0, true));
   MockWrite writes[] = {
     CreateMockWrite(*req.get(), 0),
     CreateMockWrite(*chunk, 1),
   };
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
     CreateMockRead(*resp, 2),
@@ -688,7 +694,8 @@
   upload_stream.AppendData("", 0, true);
 
   BoundNetLog net_log;
-  scoped_ptr<SpdyHttpStream> http_stream(new SpdyHttpStream(session_, true));
+  std::unique_ptr<SpdyHttpStream> http_stream(
+      new SpdyHttpStream(session_, true));
   ASSERT_EQ(OK, http_stream->InitializeStream(&request, DEFAULT_PRIORITY,
                                               net_log, CompletionCallback()));
 
@@ -728,12 +735,12 @@
 TEST_P(SpdyHttpStreamTest, SpdyURLTest) {
   const char* const full_url = "http://www.example.org/foo?query=what#anchor";
   const char* const base_url = "http://www.example.org/foo?query=what";
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(base_url, 1, LOWEST));
   MockWrite writes[] = {
       CreateMockWrite(*req.get(), 0),
   };
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1), MockRead(SYNCHRONOUS, 0, 2)  // EOF
@@ -751,7 +758,8 @@
   HttpResponseInfo response;
   HttpRequestHeaders headers;
   BoundNetLog net_log;
-  scoped_ptr<SpdyHttpStream> http_stream(new SpdyHttpStream(session_, true));
+  std::unique_ptr<SpdyHttpStream> http_stream(
+      new SpdyHttpStream(session_, true));
   ASSERT_EQ(OK,
             http_stream->InitializeStream(
                 &request, DEFAULT_PRIORITY, net_log, CompletionCallback()));
@@ -776,17 +784,17 @@
 // Test the receipt of a WINDOW_UPDATE frame while waiting for a chunk to be
 // made available is handled correctly.
 TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPostWithWindowUpdate) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
-  scoped_ptr<SpdySerializedFrame> chunk1(
+  std::unique_ptr<SpdySerializedFrame> chunk1(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes[] = {
     CreateMockWrite(*req.get(), 0),
     CreateMockWrite(*chunk1, 1),
   };
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
-  scoped_ptr<SpdySerializedFrame> window_update(
+  std::unique_ptr<SpdySerializedFrame> window_update(
       spdy_util_.ConstructSpdyWindowUpdate(1, kUploadDataSize));
   MockRead reads[] = {
       CreateMockRead(*window_update, 2),
@@ -812,7 +820,8 @@
   ASSERT_EQ(OK, upload_stream.Init(TestCompletionCallback().callback()));
 
   BoundNetLog net_log;
-  scoped_ptr<SpdyHttpStream> http_stream(new SpdyHttpStream(session_, true));
+  std::unique_ptr<SpdyHttpStream> http_stream(
+      new SpdyHttpStream(session_, true));
   ASSERT_EQ(OK, http_stream->InitializeStream(&request, DEFAULT_PRIORITY,
                                               net_log, CompletionCallback()));
 
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index 900f103..67d97f8 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
@@ -10,7 +11,7 @@
 #include "base/bind_helpers.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/strings/string_piece.h"
 #include "base/test/test_file_util.h"
@@ -118,19 +119,20 @@
       test_params.priority_to_dependency;
 }
 
-scoped_ptr<SpdySessionDependencies> CreateSpdySessionDependencies(
+std::unique_ptr<SpdySessionDependencies> CreateSpdySessionDependencies(
     SpdyNetworkTransactionTestParams test_params) {
-  scoped_ptr<SpdySessionDependencies> session_deps(
+  std::unique_ptr<SpdySessionDependencies> session_deps(
       new SpdySessionDependencies(test_params.protocol));
   UpdateSpdySessionDependencies(test_params, session_deps.get());
   return session_deps;
 }
 
-scoped_ptr<SpdySessionDependencies> CreateSpdySessionDependencies(
+std::unique_ptr<SpdySessionDependencies> CreateSpdySessionDependencies(
     SpdyNetworkTransactionTestParams test_params,
-    scoped_ptr<ProxyService> proxy_service) {
-  scoped_ptr<SpdySessionDependencies> session_deps(new SpdySessionDependencies(
-      test_params.protocol, std::move(proxy_service)));
+    std::unique_ptr<ProxyService> proxy_service) {
+  std::unique_ptr<SpdySessionDependencies> session_deps(
+      new SpdySessionDependencies(test_params.protocol,
+                                  std::move(proxy_service)));
   UpdateSpdySessionDependencies(test_params, session_deps.get());
   return session_deps;
 }
@@ -174,7 +176,7 @@
         RequestPriority priority,
         const BoundNetLog& log,
         SpdyNetworkTransactionTestParams test_params,
-        scoped_ptr<SpdySessionDependencies> session_deps)
+        std::unique_ptr<SpdySessionDependencies> session_deps)
         : request_(request),
           priority_(priority),
           session_deps_(session_deps.get() == NULL
@@ -307,7 +309,7 @@
 
     void RunToCompletionWithSSLData(
         SocketDataProvider* data,
-        scoped_ptr<SSLSocketDataProvider> ssl_provider) {
+        std::unique_ptr<SSLSocketDataProvider> ssl_provider) {
       RunPreTestSetup();
       AddDataWithSSLSocketDataProvider(data, std::move(ssl_provider));
       RunDefaultTest();
@@ -315,7 +317,7 @@
     }
 
     void AddData(SocketDataProvider* data) {
-      scoped_ptr<SSLSocketDataProvider> ssl_provider(
+      std::unique_ptr<SSLSocketDataProvider> ssl_provider(
           new SSLSocketDataProvider(ASYNC, OK));
       ssl_provider->cert =
           ImportCertFromFile(GetTestCertsDirectory(), "spdy_pooling.pem");
@@ -324,7 +326,7 @@
 
     void AddDataWithSSLSocketDataProvider(
         SocketDataProvider* data,
-        scoped_ptr<SSLSocketDataProvider> ssl_provider) {
+        std::unique_ptr<SSLSocketDataProvider> ssl_provider) {
       data_vector_.push_back(data);
       if (ssl_provider->next_proto_status ==
           SSLClientSocket::kNextProtoUnsupported) {
@@ -338,8 +340,8 @@
       session_deps_->socket_factory->AddSocketDataProvider(data);
       if (test_params_.ssl_type == HTTP_SPDY_VIA_ALT_SVC) {
         MockConnect hanging_connect(SYNCHRONOUS, ERR_IO_PENDING);
-        scoped_ptr<StaticSocketDataProvider> hanging_non_alt_svc_socket(
-            make_scoped_ptr(new StaticSocketDataProvider(NULL, 0, NULL, 0)));
+        std::unique_ptr<StaticSocketDataProvider> hanging_non_alt_svc_socket(
+            base::WrapUnique(new StaticSocketDataProvider(NULL, 0, NULL, 0)));
         hanging_non_alt_svc_socket->set_connect_data(hanging_connect);
         session_deps_->socket_factory->AddSocketDataProvider(
             hanging_non_alt_svc_socket.get());
@@ -347,7 +349,7 @@
       }
     }
 
-    void SetSession(scoped_ptr<HttpNetworkSession> session) {
+    void SetSession(std::unique_ptr<HttpNetworkSession> session) {
       session_ = std::move(session);
     }
     HttpNetworkTransaction* trans() { return trans_.get(); }
@@ -355,7 +357,7 @@
     TransactionHelperResult& output() { return output_; }
     const HttpRequestInfo& request() const { return request_; }
     HttpNetworkSession* session() const { return session_.get(); }
-    scoped_ptr<SpdySessionDependencies>& session_deps() {
+    std::unique_ptr<SpdySessionDependencies>& session_deps() {
       return session_deps_;
     }
     int port() const { return port_; }
@@ -365,18 +367,18 @@
 
    private:
     typedef std::vector<SocketDataProvider*> DataVector;
-    typedef std::vector<scoped_ptr<SSLSocketDataProvider>> SSLVector;
-    typedef std::vector<scoped_ptr<SocketDataProvider>> AlternateVector;
+    typedef std::vector<std::unique_ptr<SSLSocketDataProvider>> SSLVector;
+    typedef std::vector<std::unique_ptr<SocketDataProvider>> AlternateVector;
     HttpRequestInfo request_;
     RequestPriority priority_;
-    scoped_ptr<SpdySessionDependencies> session_deps_;
-    scoped_ptr<HttpNetworkSession> session_;
+    std::unique_ptr<SpdySessionDependencies> session_deps_;
+    std::unique_ptr<HttpNetworkSession> session_;
     TransactionHelperResult output_;
-    scoped_ptr<SocketDataProvider> first_transaction_;
+    std::unique_ptr<SocketDataProvider> first_transaction_;
     SSLVector ssl_vector_;
     TestCompletionCallback callback_;
-    scoped_ptr<HttpNetworkTransaction> trans_;
-    scoped_ptr<HttpNetworkTransaction> trans_http_;
+    std::unique_ptr<HttpNetworkTransaction> trans_;
+    std::unique_ptr<HttpNetworkTransaction> trans_http_;
     DataVector data_vector_;
     AlternateVector alternate_vector_;
     const BoundNetLog log_;
@@ -420,8 +422,8 @@
 
   const HttpRequestInfo& CreatePostRequest() {
     if (!post_request_initialized_) {
-      std::vector<scoped_ptr<UploadElementReader>> element_readers;
-      element_readers.push_back(make_scoped_ptr(
+      std::vector<std::unique_ptr<UploadElementReader>> element_readers;
+      element_readers.push_back(base::WrapUnique(
           new UploadBytesElementReader(kUploadData, kUploadDataSize)));
       upload_data_stream_.reset(
           new ElementsUploadDataStream(std::move(element_readers), 0));
@@ -441,8 +443,8 @@
       CHECK_EQ(static_cast<int>(kUploadDataSize),
                base::WriteFile(file_path, kUploadData, kUploadDataSize));
 
-      std::vector<scoped_ptr<UploadElementReader>> element_readers;
-      element_readers.push_back(make_scoped_ptr(new UploadFileElementReader(
+      std::vector<std::unique_ptr<UploadElementReader>> element_readers;
+      element_readers.push_back(base::WrapUnique(new UploadFileElementReader(
           base::ThreadTaskRunnerHandle::Get().get(), file_path, 0,
           kUploadDataSize, base::Time())));
       upload_data_stream_.reset(
@@ -466,8 +468,8 @@
              base::WriteFile(file_path, kUploadData, kUploadDataSize));
     CHECK(base::MakeFileUnreadable(file_path));
 
-    std::vector<scoped_ptr<UploadElementReader>> element_readers;
-    element_readers.push_back(make_scoped_ptr(new UploadFileElementReader(
+    std::vector<std::unique_ptr<UploadElementReader>> element_readers;
+    element_readers.push_back(base::WrapUnique(new UploadFileElementReader(
         base::ThreadTaskRunnerHandle::Get().get(), file_path, 0,
         kUploadDataSize, base::Time())));
     upload_data_stream_.reset(
@@ -491,13 +493,13 @@
       CHECK_EQ(static_cast<int>(kUploadDataSize),
                base::WriteFile(file_path, kUploadData, kUploadDataSize));
 
-      std::vector<scoped_ptr<UploadElementReader>> element_readers;
-      element_readers.push_back(make_scoped_ptr(
+      std::vector<std::unique_ptr<UploadElementReader>> element_readers;
+      element_readers.push_back(base::WrapUnique(
           new UploadBytesElementReader(kUploadData, kFileRangeOffset)));
-      element_readers.push_back(make_scoped_ptr(new UploadFileElementReader(
+      element_readers.push_back(base::WrapUnique(new UploadFileElementReader(
           base::ThreadTaskRunnerHandle::Get().get(), file_path,
           kFileRangeOffset, kFileRangeLength, base::Time())));
-      element_readers.push_back(make_scoped_ptr(new UploadBytesElementReader(
+      element_readers.push_back(base::WrapUnique(new UploadBytesElementReader(
           kUploadData + kFileRangeOffset + kFileRangeLength,
           kUploadDataSize - (kFileRangeOffset + kFileRangeLength))));
       upload_data_stream_.reset(
@@ -583,7 +585,7 @@
     rv = callback.WaitForResult();
 
     // Request the pushed path.
-    scoped_ptr<HttpNetworkTransaction> trans2(
+    std::unique_ptr<HttpNetworkTransaction> trans2(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
     rv = trans2->Start(
         &CreateGetPushRequest(), callback.callback(), BoundNetLog());
@@ -626,7 +628,7 @@
   static void StartTransactionCallback(HttpNetworkSession* session,
                                        GURL url,
                                        int result) {
-    scoped_ptr<HttpNetworkTransaction> trans(
+    std::unique_ptr<HttpNetworkTransaction> trans(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, session));
     TestCompletionCallback callback;
     HttpRequestInfo request;
@@ -661,8 +663,8 @@
   SpdyTestUtil spdy_util_;
 
  private:
-  scoped_ptr<ChunkedUploadDataStream> upload_chunked_data_stream_;
-  scoped_ptr<UploadDataStream> upload_data_stream_;
+  std::unique_ptr<ChunkedUploadDataStream> upload_chunked_data_stream_;
+  std::unique_ptr<UploadDataStream> upload_data_stream_;
   bool get_request_initialized_;
   bool post_request_initialized_;
   bool chunked_post_request_initialized_;
@@ -702,23 +704,23 @@
 
 // Verify HttpNetworkTransaction constructor.
 TEST_P(SpdyNetworkTransactionTest, Constructor) {
-  scoped_ptr<SpdySessionDependencies> session_deps(
+  std::unique_ptr<SpdySessionDependencies> session_deps(
       CreateSpdySessionDependencies(GetParam()));
-  scoped_ptr<HttpNetworkSession> session(
+  std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(session_deps.get()));
-  scoped_ptr<HttpTransaction> trans(
+  std::unique_ptr<HttpTransaction> trans(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
 }
 
 TEST_P(SpdyNetworkTransactionTest, Get) {
   // Construct the request.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -744,7 +746,7 @@
     spdy_test_util.set_default_url(GURL(GetDefaultUrl()));
 
     // Construct the request.
-    scoped_ptr<SpdySerializedFrame> req(
+    std::unique_ptr<SpdySerializedFrame> req(
         spdy_test_util.ConstructSpdyGet(nullptr, 0, 1, p, true));
     MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
@@ -774,9 +776,9 @@
         FAIL();
     }
 
-    scoped_ptr<SpdySerializedFrame> resp(
+    std::unique_ptr<SpdySerializedFrame> resp(
         spdy_test_util.ConstructSpdyGetSynReply(nullptr, 0, 1));
-    scoped_ptr<SpdySerializedFrame> body(
+    std::unique_ptr<SpdySerializedFrame> body(
         spdy_test_util.ConstructSpdyBodyFrame(1, true));
     MockRead reads[] = {
         CreateMockRead(*resp, 1),
@@ -809,31 +811,31 @@
 // can allow multiple streams in flight.
 
 TEST_P(SpdyNetworkTransactionTest, ThreeGets) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> fbody(
+  std::unique_ptr<SpdySerializedFrame> fbody(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, false));
-  scoped_ptr<SpdySerializedFrame> fbody2(
+  std::unique_ptr<SpdySerializedFrame> fbody2(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
 
-  scoped_ptr<SpdySerializedFrame> req3(
+  std::unique_ptr<SpdySerializedFrame> req3(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 5, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp3(
+  std::unique_ptr<SpdySerializedFrame> resp3(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 5));
-  scoped_ptr<SpdySerializedFrame> body3(
+  std::unique_ptr<SpdySerializedFrame> body3(
       spdy_util_.ConstructSpdyBodyFrame(5, false));
-  scoped_ptr<SpdySerializedFrame> fbody3(
+  std::unique_ptr<SpdySerializedFrame> fbody3(
       spdy_util_.ConstructSpdyBodyFrame(5, true));
 
   MockWrite writes[] = {
@@ -870,11 +872,11 @@
   // on will negotiate SPDY and will be used for all requests.
   helper.AddData(&data_placeholder1);
   helper.AddData(&data_placeholder2);
-  scoped_ptr<HttpNetworkTransaction> trans1(
+  std::unique_ptr<HttpNetworkTransaction> trans1(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
-  scoped_ptr<HttpNetworkTransaction> trans2(
+  std::unique_ptr<HttpNetworkTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
-  scoped_ptr<HttpNetworkTransaction> trans3(
+  std::unique_ptr<HttpNetworkTransaction> trans3(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
 
   TestCompletionCallback callback1;
@@ -915,22 +917,22 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, TwoGetsLateBinding) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> fbody(
+  std::unique_ptr<SpdySerializedFrame> fbody(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, false));
-  scoped_ptr<SpdySerializedFrame> fbody2(
+  std::unique_ptr<SpdySerializedFrame> fbody2(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
 
   MockWrite writes[] = {
@@ -961,9 +963,9 @@
   // the same time which results in two sockets being connected. The first
   // on will negotiate SPDY and will be used for all requests.
   helper.AddData(&data_placeholder);
-  scoped_ptr<HttpNetworkTransaction> trans1(
+  std::unique_ptr<HttpNetworkTransaction> trans1(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
-  scoped_ptr<HttpNetworkTransaction> trans2(
+  std::unique_ptr<HttpNetworkTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
 
   TestCompletionCallback callback1;
@@ -1006,22 +1008,22 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, TwoGetsLateBindingFromPreconnect) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> fbody(
+  std::unique_ptr<SpdySerializedFrame> fbody(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, false));
-  scoped_ptr<SpdySerializedFrame> fbody2(
+  std::unique_ptr<SpdySerializedFrame> fbody2(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
 
   MockWrite writes[] = {
@@ -1055,9 +1057,9 @@
   helper.AddData(&data_placeholder);
   helper.AddData(&data_placeholder);
 
-  scoped_ptr<HttpNetworkTransaction> trans1(
+  std::unique_ptr<HttpNetworkTransaction> trans1(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
-  scoped_ptr<HttpNetworkTransaction> trans2(
+  std::unique_ptr<HttpNetworkTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
 
   TestCompletionCallback callback1;
@@ -1117,42 +1119,42 @@
 TEST_P(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrent) {
   // Construct the request.
   // Each request fully completes before the next starts.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> fbody(
+  std::unique_ptr<SpdySerializedFrame> fbody(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   spdy_util_.UpdateWithStreamDestruction(1);
 
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, false));
-  scoped_ptr<SpdySerializedFrame> fbody2(
+  std::unique_ptr<SpdySerializedFrame> fbody2(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
   spdy_util_.UpdateWithStreamDestruction(3);
 
-  scoped_ptr<SpdySerializedFrame> req3(
+  std::unique_ptr<SpdySerializedFrame> req3(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 5, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp3(
+  std::unique_ptr<SpdySerializedFrame> resp3(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 5));
-  scoped_ptr<SpdySerializedFrame> body3(
+  std::unique_ptr<SpdySerializedFrame> body3(
       spdy_util_.ConstructSpdyBodyFrame(5, false));
-  scoped_ptr<SpdySerializedFrame> fbody3(
+  std::unique_ptr<SpdySerializedFrame> fbody3(
       spdy_util_.ConstructSpdyBodyFrame(5, true));
 
   SettingsMap settings;
   const uint32_t max_concurrent_streams = 1;
   settings[SETTINGS_MAX_CONCURRENT_STREAMS] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, max_concurrent_streams);
-  scoped_ptr<SpdySerializedFrame> settings_frame(
+  std::unique_ptr<SpdySerializedFrame> settings_frame(
       spdy_util_.ConstructSpdySettings(settings));
-  scoped_ptr<SpdySerializedFrame> settings_ack(
+  std::unique_ptr<SpdySerializedFrame> settings_ack(
       spdy_util_.ConstructSpdySettingsAck());
 
   MockWrite writes[] = {
@@ -1186,11 +1188,11 @@
                                        BoundNetLog(), GetParam(), NULL);
     helper.RunPreTestSetup();
     helper.AddData(&data);
-    scoped_ptr<HttpNetworkTransaction> trans1(
+    std::unique_ptr<HttpNetworkTransaction> trans1(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
-    scoped_ptr<HttpNetworkTransaction> trans2(
+    std::unique_ptr<HttpNetworkTransaction> trans2(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
-    scoped_ptr<HttpNetworkTransaction> trans3(
+    std::unique_ptr<HttpNetworkTransaction> trans3(
         new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
 
     TestCompletionCallback callback1;
@@ -1257,50 +1259,50 @@
 // the response from the server.
 TEST_P(SpdyNetworkTransactionTest, FourGetsWithMaxConcurrentPriority) {
   // Construct the request.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> fbody(
+  std::unique_ptr<SpdySerializedFrame> fbody(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   spdy_util_.UpdateWithStreamDestruction(1);
 
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, false));
-  scoped_ptr<SpdySerializedFrame> fbody2(
+  std::unique_ptr<SpdySerializedFrame> fbody2(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
   spdy_util_.UpdateWithStreamDestruction(3);
 
-  scoped_ptr<SpdySerializedFrame> req4(
+  std::unique_ptr<SpdySerializedFrame> req4(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 5, HIGHEST, true));
-  scoped_ptr<SpdySerializedFrame> resp4(
+  std::unique_ptr<SpdySerializedFrame> resp4(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 5));
-  scoped_ptr<SpdySerializedFrame> fbody4(
+  std::unique_ptr<SpdySerializedFrame> fbody4(
       spdy_util_.ConstructSpdyBodyFrame(5, true));
   spdy_util_.UpdateWithStreamDestruction(5);
 
-  scoped_ptr<SpdySerializedFrame> req3(
+  std::unique_ptr<SpdySerializedFrame> req3(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 7, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp3(
+  std::unique_ptr<SpdySerializedFrame> resp3(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 7));
-  scoped_ptr<SpdySerializedFrame> body3(
+  std::unique_ptr<SpdySerializedFrame> body3(
       spdy_util_.ConstructSpdyBodyFrame(7, false));
-  scoped_ptr<SpdySerializedFrame> fbody3(
+  std::unique_ptr<SpdySerializedFrame> fbody3(
       spdy_util_.ConstructSpdyBodyFrame(7, true));
 
   SettingsMap settings;
   const uint32_t max_concurrent_streams = 1;
   settings[SETTINGS_MAX_CONCURRENT_STREAMS] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, max_concurrent_streams);
-  scoped_ptr<SpdySerializedFrame> settings_frame(
+  std::unique_ptr<SpdySerializedFrame> settings_frame(
       spdy_util_.ConstructSpdySettings(settings));
-  scoped_ptr<SpdySerializedFrame> settings_ack(
+  std::unique_ptr<SpdySerializedFrame> settings_ack(
       spdy_util_.ConstructSpdySettingsAck());
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),
@@ -1336,13 +1338,13 @@
   helper.RunPreTestSetup();
   helper.AddData(&data);
 
-  scoped_ptr<HttpNetworkTransaction> trans1(
+  std::unique_ptr<HttpNetworkTransaction> trans1(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
-  scoped_ptr<HttpNetworkTransaction> trans2(
+  std::unique_ptr<HttpNetworkTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
-  scoped_ptr<HttpNetworkTransaction> trans3(
+  std::unique_ptr<HttpNetworkTransaction> trans3(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
-  scoped_ptr<HttpNetworkTransaction> trans4(
+  std::unique_ptr<HttpNetworkTransaction> trans4(
       new HttpNetworkTransaction(HIGHEST, helper.session()));
 
   TestCompletionCallback callback1;
@@ -1421,32 +1423,32 @@
 // the spdy_session
 TEST_P(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrentDelete) {
   // Construct the request.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> fbody(
+  std::unique_ptr<SpdySerializedFrame> fbody(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   spdy_util_.UpdateWithStreamDestruction(1);
 
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, false));
-  scoped_ptr<SpdySerializedFrame> fbody2(
+  std::unique_ptr<SpdySerializedFrame> fbody2(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
 
   SettingsMap settings;
   const uint32_t max_concurrent_streams = 1;
   settings[SETTINGS_MAX_CONCURRENT_STREAMS] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, max_concurrent_streams);
-  scoped_ptr<SpdySerializedFrame> settings_frame(
+  std::unique_ptr<SpdySerializedFrame> settings_frame(
       spdy_util_.ConstructSpdySettings(settings));
-  scoped_ptr<SpdySerializedFrame> settings_ack(
+  std::unique_ptr<SpdySerializedFrame> settings_ack(
       spdy_util_.ConstructSpdySettingsAck());
 
   MockWrite writes[] = {
@@ -1473,11 +1475,11 @@
                                      BoundNetLog(), GetParam(), NULL);
   helper.RunPreTestSetup();
   helper.AddData(&data);
-  scoped_ptr<HttpNetworkTransaction> trans1(
+  std::unique_ptr<HttpNetworkTransaction> trans1(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
-  scoped_ptr<HttpNetworkTransaction> trans2(
+  std::unique_ptr<HttpNetworkTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
-  scoped_ptr<HttpNetworkTransaction> trans3(
+  std::unique_ptr<HttpNetworkTransaction> trans3(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
 
   TestCompletionCallback callback1;
@@ -1560,28 +1562,28 @@
 // a pending stream creation.  http://crbug.com/52901
 TEST_P(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrentSocketClose) {
   // Construct the request.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> fin_body(
+  std::unique_ptr<SpdySerializedFrame> fin_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   spdy_util_.UpdateWithStreamDestruction(1);
 
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
 
   SettingsMap settings;
   const uint32_t max_concurrent_streams = 1;
   settings[SETTINGS_MAX_CONCURRENT_STREAMS] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, max_concurrent_streams);
-  scoped_ptr<SpdySerializedFrame> settings_frame(
+  std::unique_ptr<SpdySerializedFrame> settings_frame(
       spdy_util_.ConstructSpdySettings(settings));
-  scoped_ptr<SpdySerializedFrame> settings_ack(
+  std::unique_ptr<SpdySerializedFrame> settings_ack(
       spdy_util_.ConstructSpdySettingsAck());
 
   MockWrite writes[] = {
@@ -1663,17 +1665,17 @@
   request.method = "PUT";
   request.url = GURL(GetDefaultUrl());
 
-  scoped_ptr<SpdyHeaderBlock> put_headers(
+  std::unique_ptr<SpdyHeaderBlock> put_headers(
       spdy_util_.ConstructPutHeaderBlock(GetDefaultUrl(), 0));
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdySyn(1, *put_headers, LOWEST, true));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -1698,17 +1700,17 @@
   request.method = "HEAD";
   request.url = GURL(GetDefaultUrl());
 
-  scoped_ptr<SpdyHeaderBlock> head_headers(
+  std::unique_ptr<SpdyHeaderBlock> head_headers(
       spdy_util_.ConstructHeadHeaderBlock(GetDefaultUrl(), 0));
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdySyn(1, *head_headers, LOWEST, true));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -1728,15 +1730,15 @@
 
 // Test that a simple POST works.
 TEST_P(SpdyNetworkTransactionTest, Post) {
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       GetDefaultUrl(), 1, kUploadDataSize, LOWEST, NULL, 0));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*body, 1),  // POST upload frame
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
       CreateMockRead(*resp, 2),
@@ -1756,15 +1758,15 @@
 
 // Test that a POST with a file works.
 TEST_P(SpdyNetworkTransactionTest, FilePost) {
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       GetDefaultUrl(), 1, kUploadDataSize, LOWEST, NULL, 0));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*body, 1),  // POST upload frame
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
       CreateMockRead(*resp, 2),
@@ -1806,15 +1808,15 @@
 
 // Test that a complex POST works.
 TEST_P(SpdyNetworkTransactionTest, ComplexPost) {
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       GetDefaultUrl(), 1, kUploadDataSize, LOWEST, NULL, 0));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*body, 1),  // POST upload frame
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
       CreateMockRead(*resp, 2),
@@ -1835,15 +1837,15 @@
 
 // Test that a chunked POST works.
 TEST_P(SpdyNetworkTransactionTest, ChunkedPost) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*body, 1),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
       CreateMockRead(*resp, 2),
@@ -1871,13 +1873,13 @@
 
 // Test that a chunked POST works with chunks appended after transaction starts.
 TEST_P(SpdyNetworkTransactionTest, DelayedChunkedPost) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
-  scoped_ptr<SpdySerializedFrame> chunk1(
+  std::unique_ptr<SpdySerializedFrame> chunk1(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> chunk2(
+  std::unique_ptr<SpdySerializedFrame> chunk2(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
-  scoped_ptr<SpdySerializedFrame> chunk3(
+  std::unique_ptr<SpdySerializedFrame> chunk3(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),
@@ -1886,7 +1888,7 @@
       CreateMockWrite(*chunk3, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
       CreateMockRead(*resp, 4),
@@ -1938,18 +1940,18 @@
 
   // When request.upload_data_stream is NULL for post, content-length is
   // expected to be 0.
-  scoped_ptr<SpdyHeaderBlock> req_block(
+  std::unique_ptr<SpdyHeaderBlock> req_block(
       spdy_util_.ConstructPostHeaderBlock(GetDefaultUrl(), 0));
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdySyn(1, *req_block, LOWEST, true));
 
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -1972,7 +1974,7 @@
 TEST_P(SpdyNetworkTransactionTest, EmptyPost) {
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
   // Create an empty UploadDataStream.
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   ElementsUploadDataStream stream(std::move(element_readers), 0);
 
   // Setup the request
@@ -1983,18 +1985,18 @@
 
   const uint64_t kContentLength = 0;
 
-  scoped_ptr<SpdyHeaderBlock> req_block(
+  std::unique_ptr<SpdyHeaderBlock> req_block(
       spdy_util_.ConstructPostHeaderBlock(GetDefaultUrl(), kContentLength));
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdySyn(1, *req_block, LOWEST, true));
 
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -2015,15 +2017,15 @@
 
 // While we're doing a post, the server sends the reply before upload completes.
 TEST_P(SpdyNetworkTransactionTest, ResponseBeforePostCompletes) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes[] = {
     CreateMockWrite(*req, 0),
     CreateMockWrite(*body, 3),
   };
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
     CreateMockRead(*resp, 1),
@@ -2063,9 +2065,9 @@
 // socket causes the TCP write to return zero. This test checks that the client
 // tries to queue up the RST_STREAM frame again.
 TEST_P(SpdyNetworkTransactionTest, SocketWriteReturnsZero) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
     CreateMockWrite(*req.get(), 0, SYNCHRONOUS),
@@ -2073,7 +2075,7 @@
     CreateMockWrite(*rst.get(), 3, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead reads[] = {
     CreateMockRead(*resp.get(), 1, ASYNC),
@@ -2100,15 +2102,15 @@
 
 // Test that the transaction doesn't crash when we don't have a reply.
 TEST_P(SpdyNetworkTransactionTest, ResponseWithoutSynReply) {
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*body, 1), MockRead(ASYNC, 0, 3)  // EOF
   };
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_PROTOCOL_ERROR));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 2),
@@ -2124,19 +2126,19 @@
 // Test that the transaction doesn't crash when we get two replies on the same
 // stream ID. See http://crbug.com/45639.
 TEST_P(SpdyNetworkTransactionTest, ResponseWithTwoSynReplies) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_PROTOCOL_ERROR));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 4),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp0(
+  std::unique_ptr<SpdySerializedFrame> resp0(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp0, 1), CreateMockRead(*resp1, 2),
@@ -2171,9 +2173,9 @@
 
 TEST_P(SpdyNetworkTransactionTest, ResetReplyWithTransferEncoding) {
   // Construct the request.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_PROTOCOL_ERROR));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 2),
@@ -2182,9 +2184,9 @@
   const char* const headers[] = {
     "transfer-encoding", "chunked"
   };
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(headers, 1, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -2205,23 +2207,23 @@
 
 TEST_P(SpdyNetworkTransactionTest, ResetPushWithTransferEncoding) {
   // Construct the request.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_PROTOCOL_ERROR));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 4),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   const char* const headers[] = {
     "transfer-encoding", "chunked"
   };
-  scoped_ptr<SpdySerializedFrame> push(
+  std::unique_ptr<SpdySerializedFrame> push(
       spdy_util_.ConstructSpdyPush(headers, arraysize(headers) / 2, 2, 1,
                                    GetDefaultUrlWithPath("/1").c_str()));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -2245,13 +2247,13 @@
 
 TEST_P(SpdyNetworkTransactionTest, CancelledTransaction) {
   // Construct the request.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
     CreateMockWrite(*req),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead reads[] = {
     CreateMockRead(*resp),
@@ -2285,16 +2287,16 @@
 
 // Verify that the client sends a Rst Frame upon cancelling the stream.
 TEST_P(SpdyNetworkTransactionTest, CancelledTransactionSendRst) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
     CreateMockWrite(*req, 0, SYNCHRONOUS),
     CreateMockWrite(*rst, 2, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead reads[] = {
     CreateMockRead(*resp, 1, ASYNC),
@@ -2326,7 +2328,7 @@
 // to start another transaction on a session that is closing down. See
 // http://crbug.com/47455
 TEST_P(SpdyNetworkTransactionTest, StartTransactionOnReadCallback) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {CreateMockWrite(*req)};
   MockWrite writes2[] = {CreateMockWrite(*req, 0)};
@@ -2339,7 +2341,7 @@
       0x07, 'h',  'e',  'l',  'l',  'o',  '!',
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -2391,13 +2393,13 @@
 // transaction. Failures will usually be valgrind errors. See
 // http://crbug.com/46925
 TEST_P(SpdyNetworkTransactionTest, DeleteSessionOnReadCallback) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp.get(), 1),
@@ -2439,21 +2441,21 @@
 
 // Send a spdy request to www.example.org that gets redirected to www.foo.com.
 TEST_P(SpdyNetworkTransactionTest, DISABLED_RedirectGetRequest) {
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(GetDefaultUrl()));
   (*headers)["user-agent"] = "";
   (*headers)["accept-encoding"] = "gzip, deflate";
-  scoped_ptr<SpdyHeaderBlock> headers2(
+  std::unique_ptr<SpdyHeaderBlock> headers2(
       spdy_util_.ConstructGetHeaderBlock("http://www.foo.com/index.php"));
   (*headers2)["user-agent"] = "";
   (*headers2)["accept-encoding"] = "gzip, deflate";
 
   // Setup writes/reads to www.example.org
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdySyn(1, *headers2, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReplyRedirect(1));
   MockWrite writes[] = {
     CreateMockWrite(*req, 1),
@@ -2464,9 +2466,9 @@
   };
 
   // Setup writes/reads to www.foo.com
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes2[] = {
     CreateMockWrite(*req2, 1),
@@ -2484,7 +2486,7 @@
   TestDelegate d;
   {
     SpdyURLRequestContext spdy_url_request_context(GetParam().protocol);
-    scoped_ptr<URLRequest> r(spdy_url_request_context.CreateRequest(
+    std::unique_ptr<URLRequest> r(spdy_url_request_context.CreateRequest(
         GURL(GetDefaultUrl()), DEFAULT_PRIORITY, &d));
     spdy_url_request_context.socket_factory().
         AddSocketDataProvider(&data);
@@ -2514,22 +2516,22 @@
 // Send a spdy request to www.example.org. Get a pushed stream that redirects to
 // www.foo.com.
 TEST_P(SpdyNetworkTransactionTest, DISABLED_RedirectServerPush) {
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(GetDefaultUrl()));
   (*headers)["user-agent"] = "";
   (*headers)["accept-encoding"] = "gzip, deflate";
 
   // Setup writes/reads to www.example.org
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> rep(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> rep(spdy_util_.ConstructSpdyPush(
       NULL, 0, 2, 1, GetDefaultUrlWithPath("/foo.dat").c_str(),
       "301 Moved Permanently", "http://www.foo.com/index.php"));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_CANCEL));
   MockWrite writes[] = {
     CreateMockWrite(*req, 1),
@@ -2544,15 +2546,15 @@
   };
 
   // Setup writes/reads to www.foo.com
-  scoped_ptr<SpdyHeaderBlock> headers2(
+  std::unique_ptr<SpdyHeaderBlock> headers2(
       spdy_util_.ConstructGetHeaderBlock("http://www.foo.com/index.php"));
   (*headers2)["user-agent"] = "";
   (*headers2)["accept-encoding"] = "gzip, deflate";
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdySyn(1, *headers2, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes2[] = {
     CreateMockWrite(*req2, 1),
@@ -2571,7 +2573,7 @@
   TestDelegate d2;
   SpdyURLRequestContext spdy_url_request_context(GetParam().protocol);
   {
-    scoped_ptr<URLRequest> r(spdy_url_request_context.CreateRequest(
+    std::unique_ptr<URLRequest> r(spdy_url_request_context.CreateRequest(
         GURL(GetDefaultUrl()), DEFAULT_PRIORITY, &d));
     spdy_url_request_context.socket_factory().
         AddSocketDataProvider(&data);
@@ -2583,7 +2585,7 @@
     std::string contents("hello!");
     EXPECT_EQ(contents, d.data_received());
 
-    scoped_ptr<URLRequest> r2(spdy_url_request_context.CreateRequest(
+    std::unique_ptr<URLRequest> r2(spdy_url_request_context.CreateRequest(
         GURL(GetDefaultUrlWithPath("/foo.dat")), DEFAULT_PRIORITY, &d2));
     spdy_url_request_context.socket_factory().
         AddSocketDataProvider(&data2);
@@ -2608,20 +2610,20 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, ServerPushSingleDataFrame) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       NULL, 0, 2, 1, GetDefaultUrlWithPath("/foo.dat").c_str()));
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> stream2_body(
+  std::unique_ptr<SpdySerializedFrame> stream2_body(
       spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                         true));
   MockRead reads[] = {
@@ -2651,20 +2653,20 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, ServerPushBeforeSynReply) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 2, 1, GetDefaultUrlWithPath("/foo.dat").c_str()));
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> stream2_body(
+  std::unique_ptr<SpdySerializedFrame> stream2_body(
       spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                         true));
   MockRead reads[] = {
@@ -2694,21 +2696,21 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, ServerPushSingleDataFrame2) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       NULL, 0, 2, 1, GetDefaultUrlWithPath("/foo.dat").c_str()));
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> stream2_body(
+  std::unique_ptr<SpdySerializedFrame> stream2_body(
       spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                         true));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*stream1_reply, 1),
@@ -2737,19 +2739,19 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, ServerPushServerAborted) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       NULL, 0, 2, 1, GetDefaultUrlWithPath("/foo.dat").c_str()));
-  scoped_ptr<SpdySerializedFrame> stream2_rst(
+  std::unique_ptr<SpdySerializedFrame> stream2_rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_PROTOCOL_ERROR));
   MockRead reads[] = {
       CreateMockRead(*stream1_reply, 1),
@@ -2789,25 +2791,25 @@
 // Verify that we don't leak streams and that we properly send a reset
 // if the server pushes the same stream twice.
 TEST_P(SpdyNetworkTransactionTest, ServerPushDuplicate) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> stream3_rst(
+  std::unique_ptr<SpdySerializedFrame> stream3_rst(
       spdy_util_.ConstructSpdyRstStream(4, RST_STREAM_PROTOCOL_ERROR));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0), CreateMockWrite(*stream3_rst, 4),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       NULL, 0, 2, 1, GetDefaultUrlWithPath("/foo.dat").c_str()));
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> stream2_body(
+  std::unique_ptr<SpdySerializedFrame> stream2_body(
       spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                         true));
-  scoped_ptr<SpdySerializedFrame> stream3_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream3_syn(spdy_util_.ConstructSpdyPush(
       NULL, 0, 4, 1, GetDefaultUrlWithPath("/foo.dat").c_str()));
   MockRead reads[] = {
       CreateMockRead(*stream1_reply, 1),
@@ -2837,30 +2839,30 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, ServerPushMultipleDataFrame) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       NULL, 0, 2, 1, GetDefaultUrlWithPath("/foo.dat").c_str()));
   static const char kPushedData[] = "pushed my darling hello my baby";
-  scoped_ptr<SpdySerializedFrame> stream2_body_base(
+  std::unique_ptr<SpdySerializedFrame> stream2_body_base(
       spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                         true));
   const size_t kChunkSize = strlen(kPushedData) / 4;
-  scoped_ptr<SpdySerializedFrame> stream2_body1(
+  std::unique_ptr<SpdySerializedFrame> stream2_body1(
       new SpdySerializedFrame(stream2_body_base->data(), kChunkSize, false));
-  scoped_ptr<SpdySerializedFrame> stream2_body2(new SpdySerializedFrame(
+  std::unique_ptr<SpdySerializedFrame> stream2_body2(new SpdySerializedFrame(
       stream2_body_base->data() + kChunkSize, kChunkSize, false));
-  scoped_ptr<SpdySerializedFrame> stream2_body3(new SpdySerializedFrame(
+  std::unique_ptr<SpdySerializedFrame> stream2_body3(new SpdySerializedFrame(
       stream2_body_base->data() + 2 * kChunkSize, kChunkSize, false));
-  scoped_ptr<SpdySerializedFrame> stream2_body4(new SpdySerializedFrame(
+  std::unique_ptr<SpdySerializedFrame> stream2_body4(new SpdySerializedFrame(
       stream2_body_base->data() + 3 * kChunkSize,
       stream2_body_base->size() - 3 * kChunkSize, false));
   MockRead reads[] = {
@@ -2890,30 +2892,30 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, ServerPushMultipleDataFrameInterrupted) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       NULL, 0, 2, 1, GetDefaultUrlWithPath("/foo.dat").c_str()));
   static const char kPushedData[] = "pushed my darling hello my baby";
-  scoped_ptr<SpdySerializedFrame> stream2_body_base(
+  std::unique_ptr<SpdySerializedFrame> stream2_body_base(
       spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                         true));
   const size_t kChunkSize = strlen(kPushedData) / 4;
-  scoped_ptr<SpdySerializedFrame> stream2_body1(
+  std::unique_ptr<SpdySerializedFrame> stream2_body1(
       new SpdySerializedFrame(stream2_body_base->data(), kChunkSize, false));
-  scoped_ptr<SpdySerializedFrame> stream2_body2(new SpdySerializedFrame(
+  std::unique_ptr<SpdySerializedFrame> stream2_body2(new SpdySerializedFrame(
       stream2_body_base->data() + kChunkSize, kChunkSize, false));
-  scoped_ptr<SpdySerializedFrame> stream2_body3(new SpdySerializedFrame(
+  std::unique_ptr<SpdySerializedFrame> stream2_body3(new SpdySerializedFrame(
       stream2_body_base->data() + 2 * kChunkSize, kChunkSize, false));
-  scoped_ptr<SpdySerializedFrame> stream2_body4(new SpdySerializedFrame(
+  std::unique_ptr<SpdySerializedFrame> stream2_body4(new SpdySerializedFrame(
       stream2_body_base->data() + 3 * kChunkSize,
       stream2_body_base->size() - 3 * kChunkSize, false));
   MockRead reads[] = {
@@ -2942,9 +2944,9 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID0) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> goaway;
+  std::unique_ptr<SpdySerializedFrame> goaway;
   if (spdy_util_.spdy_version() == SPDY3) {
     goaway.reset(spdy_util_.ConstructSpdyGoAway(0, GOAWAY_PROTOCOL_ERROR,
                                                 "Push on even stream id."));
@@ -2956,9 +2958,9 @@
       CreateMockWrite(*stream1_syn, 0), CreateMockWrite(*goaway, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       NULL, 0, 2, 0, GetDefaultUrlWithPath("/foo.dat").c_str()));
   MockRead reads[] = {
       CreateMockRead(*stream1_reply, 1),
@@ -2993,19 +2995,19 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID9) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> stream2_rst(
+  std::unique_ptr<SpdySerializedFrame> stream2_rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_INVALID_STREAM));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0), CreateMockWrite(*stream2_rst, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       NULL, 0, 2, 9, GetDefaultUrlWithPath("/foo.dat").c_str()));
   MockRead reads[] = {
       CreateMockRead(*stream1_reply, 1),
@@ -3042,23 +3044,23 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, ServerPushNoURL) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> stream2_rst(
+  std::unique_ptr<SpdySerializedFrame> stream2_rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_PROTOCOL_ERROR));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0), CreateMockWrite(*stream2_rst, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdyHeaderBlock> incomplete_headers(new SpdyHeaderBlock());
+  std::unique_ptr<SpdyHeaderBlock> incomplete_headers(new SpdyHeaderBlock());
   (*incomplete_headers)[spdy_util_.GetStatusKey()] = "200 OK";
   (*incomplete_headers)[spdy_util_.GetVersionKey()] = "HTTP/1.1";
   (*incomplete_headers)["hello"] = "bye";
-  scoped_ptr<SpdySerializedFrame> stream2_syn(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(
       spdy_util_.ConstructInitialSpdyPushFrame(std::move(incomplete_headers), 2,
                                                1));
   MockRead reads[] = {
@@ -3097,19 +3099,19 @@
 
 // PUSH_PROMISE on a server-initiated stream should trigger GOAWAY.
 TEST_P(SpdyNetworkTransactionTest, ServerPushOnPushedStream) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
       2, GOAWAY_PROTOCOL_ERROR, "Push on even stream id."));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0), CreateMockWrite(*goaway, 4),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 2, 1, GetDefaultUrlWithPath("/foo.dat").c_str()));
-  scoped_ptr<SpdySerializedFrame> stream3_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream3_syn(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 4, 2, GetDefaultUrlWithPath("/bar.dat").c_str()));
   MockRead reads[] = {
       CreateMockRead(*stream1_reply, 1), CreateMockRead(*stream2_syn, 2),
@@ -3124,19 +3126,19 @@
 
 // PUSH_PROMISE on a closed client-initiated stream should trigger RST_STREAM.
 TEST_P(SpdyNetworkTransactionTest, ServerPushOnClosedStream) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_INVALID_STREAM));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0), CreateMockWrite(*rst, 5),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 2, 1, GetDefaultUrlWithPath("/foo.dat").c_str()));
   MockRead reads[] = {
       CreateMockRead(*stream1_reply, 1), CreateMockRead(*stream1_body, 2),
@@ -3168,25 +3170,25 @@
 // PUSH_PROMISE on a server-initiated stream should trigger GOAWAY even if
 // stream is closed.
 TEST_P(SpdyNetworkTransactionTest, ServerPushOnClosedPushedStream) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
       2, GOAWAY_PROTOCOL_ERROR, "Push on even stream id."));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0), CreateMockWrite(*goaway, 7),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 2, 1, GetDefaultUrlWithPath("/foo.dat").c_str()));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> stream2_body(
+  std::unique_ptr<SpdySerializedFrame> stream2_body(
       spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                         true));
-  scoped_ptr<SpdySerializedFrame> stream3_syn(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> stream3_syn(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 4, 2, GetDefaultUrlWithPath("/bar.dat").c_str()));
 
   MockRead reads[] = {
@@ -3211,7 +3213,7 @@
   EXPECT_TRUE(response.headers.get());
   EXPECT_EQ("HTTP/1.1 200", response.headers->GetStatusLine());
 
-  scoped_ptr<HttpNetworkTransaction> trans2(
+  std::unique_ptr<HttpNetworkTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
   TestCompletionCallback callback2;
   rv = trans2->Start(&CreateGetPushRequest(), callback2.callback(),
@@ -3281,14 +3283,14 @@
     SpdyTestUtil spdy_test_util(GetParam().protocol,
                                 GetParam().priority_to_dependency);
     spdy_test_util.set_default_url(GURL(GetDefaultUrl()));
-    scoped_ptr<SpdySerializedFrame> req(
+    std::unique_ptr<SpdySerializedFrame> req(
         spdy_test_util.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
     MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
-    scoped_ptr<SpdySerializedFrame> resp(
+    std::unique_ptr<SpdySerializedFrame> resp(
         spdy_test_util.ConstructSpdyGetSynReply(test_cases[i].extra_headers,
                                                 test_cases[i].num_headers, 1));
-    scoped_ptr<SpdySerializedFrame> body(
+    std::unique_ptr<SpdySerializedFrame> body(
         spdy_test_util.ConstructSpdyBodyFrame(1, true));
     MockRead reads[] = {
         CreateMockRead(*resp, 1),
@@ -3373,9 +3375,10 @@
     spdy_test_util.set_default_url(GURL(GetDefaultUrl()));
 
     // Construct the request.
-    scoped_ptr<SpdySerializedFrame> frame_req(spdy_test_util.ConstructSpdyGet(
-        test_cases[i].extra_headers[0], test_cases[i].num_headers[0], 1, LOWEST,
-        true));
+    std::unique_ptr<SpdySerializedFrame> frame_req(
+        spdy_test_util.ConstructSpdyGet(test_cases[i].extra_headers[0],
+                                        test_cases[i].num_headers[0], 1, LOWEST,
+                                        true));
 
     MockWrite writes[] = {
         CreateMockWrite(*frame_req, 0),
@@ -3386,10 +3389,10 @@
     AppendToHeaderBlock(test_cases[i].extra_headers[1],
                         test_cases[i].num_headers[1],
                         &reply_headers);
-    scoped_ptr<SpdySerializedFrame> frame_reply(
+    std::unique_ptr<SpdySerializedFrame> frame_reply(
         spdy_test_util.ConstructSpdyReply(1, reply_headers));
 
-    scoped_ptr<SpdySerializedFrame> body(
+    std::unique_ptr<SpdySerializedFrame> body(
         spdy_test_util.ConstructSpdyBodyFrame(1, true));
     MockRead reads[] = {
         CreateMockRead(*frame_reply, 1),
@@ -3468,9 +3471,9 @@
                                 GetParam().priority_to_dependency);
     spdy_test_util.set_default_url(GURL(GetDefaultUrl()));
 
-    scoped_ptr<SpdySerializedFrame> req(
+    std::unique_ptr<SpdySerializedFrame> req(
         spdy_test_util.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-    scoped_ptr<SpdySerializedFrame> rst(
+    std::unique_ptr<SpdySerializedFrame> rst(
         spdy_test_util.ConstructSpdyRstStream(1, RST_STREAM_PROTOCOL_ERROR));
     MockWrite writes[] = {
         CreateMockWrite(*req, 0), CreateMockWrite(*rst, 2),
@@ -3480,7 +3483,7 @@
     SpdyHeaderBlock reply_headers;
     AppendToHeaderBlock(
         test_cases[i].headers, test_cases[i].num_headers, &reply_headers);
-    scoped_ptr<SpdySerializedFrame> resp(
+    std::unique_ptr<SpdySerializedFrame> resp(
         spdy_test_util.ConstructSpdyReply(1, reply_headers));
     MockRead reads[] = {
         CreateMockRead(*resp, 1), MockRead(ASYNC, 0, 3)  // EOF
@@ -3501,16 +3504,16 @@
     return;
   }
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
       0, GOAWAY_COMPRESSION_ERROR, "Framer error: 5 (DECOMPRESS_FAILURE)."));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*goaway, 3),
   };
 
   // This is the length field that's too short.
-  scoped_ptr<SpdySerializedFrame> syn_reply_wrong_length(
+  std::unique_ptr<SpdySerializedFrame> syn_reply_wrong_length(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
   size_t right_size =
       syn_reply_wrong_length->size() -
@@ -3519,7 +3522,7 @@
   test::SetFrameLength(syn_reply_wrong_length.get(),
                        wrong_size,
                        spdy_util_.spdy_version());
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       MockRead(ASYNC, syn_reply_wrong_length->data(),
@@ -3540,14 +3543,14 @@
     return;
   }
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
       0, GOAWAY_COMPRESSION_ERROR, "Framer error: 5 (DECOMPRESS_FAILURE)."));
   MockWrite writes[] = {CreateMockWrite(*req, 0), CreateMockWrite(*goaway, 2)};
 
   // This is the length field that's too short.
-  scoped_ptr<SpdySerializedFrame> syn_reply_wrong_length(
+  std::unique_ptr<SpdySerializedFrame> syn_reply_wrong_length(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
   size_t right_size =
       syn_reply_wrong_length->size() -
@@ -3575,14 +3578,14 @@
     // Decompression failures are a stream error in SPDY3.
     return;
   }
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
       0, GOAWAY_COMPRESSION_ERROR, "Framer error: 5 (DECOMPRESS_FAILURE)."));
   MockWrite writes[] = {CreateMockWrite(*req, 0), CreateMockWrite(*goaway, 2)};
 
   // Read HEADERS with corrupted payload.
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   memset(resp->data() + 12, 0xcf, resp->size() - 12);
   MockRead reads[] = {CreateMockRead(*resp, 1)};
@@ -3596,15 +3599,15 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, GoAwayOnFrameSizeError) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
       0, GOAWAY_FRAME_SIZE_ERROR,
       "Framer error: 12 (INVALID_CONTROL_FRAME_SIZE)."));
   MockWrite writes[] = {CreateMockWrite(*req, 0), CreateMockWrite(*goaway, 2)};
 
   // Read WINDOW_UPDATE with incorrectly-sized payload.
-  scoped_ptr<SpdySerializedFrame> bad_window_update(
+  std::unique_ptr<SpdySerializedFrame> bad_window_update(
       spdy_util_.ConstructSpdyWindowUpdate(1, 1));
   test::SetFrameLength(bad_window_update.get(),
                        bad_window_update->size() - 1,
@@ -3621,7 +3624,7 @@
 
 // Test that we shutdown correctly on write errors.
 TEST_P(SpdyNetworkTransactionTest, WriteError) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
       // We'll write 10 bytes successfully
@@ -3651,17 +3654,17 @@
 // Test that partial writes work.
 TEST_P(SpdyNetworkTransactionTest, PartialWrite) {
   // Chop the SYN_STREAM frame into 5 chunks.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   const int kChunks = 5;
-  scoped_ptr<MockWrite[]> writes(ChopWriteFrame(*req.get(), kChunks));
+  std::unique_ptr<MockWrite[]> writes(ChopWriteFrame(*req.get(), kChunks));
   for (int i = 0; i < kChunks; ++i) {
     writes[i].sequence_number = i;
   }
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, kChunks),
@@ -3684,13 +3687,13 @@
   static const char* const kExtraHeaders[] = {
     "user-agent",   "Chrome",
   };
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(kExtraHeaders, 1, 1, LOWEST, true));
   MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -3777,14 +3780,14 @@
 TEST_P(SpdyNetworkTransactionTest, BufferFull) {
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
   // 2 data frames in a single read.
-  scoped_ptr<SpdySerializedFrame> data_frame_1(
+  std::unique_ptr<SpdySerializedFrame> data_frame_1(
       framer.CreateDataFrame(1, "goodby", 6, DATA_FLAG_NONE));
-  scoped_ptr<SpdySerializedFrame> data_frame_2(
+  std::unique_ptr<SpdySerializedFrame> data_frame_2(
       framer.CreateDataFrame(1, "e worl", 6, DATA_FLAG_NONE));
   const SpdySerializedFrame* data_frames[2] = {
       data_frame_1.get(), data_frame_2.get(),
@@ -3793,10 +3796,10 @@
   int combined_data_frames_len =
       CombineFrames(data_frames, arraysize(data_frames),
                     combined_data_frames, arraysize(combined_data_frames));
-  scoped_ptr<SpdySerializedFrame> last_frame(
+  std::unique_ptr<SpdySerializedFrame> last_frame(
       framer.CreateDataFrame(1, "d", 1, DATA_FLAG_FIN));
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -3870,14 +3873,14 @@
 TEST_P(SpdyNetworkTransactionTest, Buffering) {
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
   // 4 data frames in a single read.
-  scoped_ptr<SpdySerializedFrame> data_frame(
+  std::unique_ptr<SpdySerializedFrame> data_frame(
       framer.CreateDataFrame(1, "message", 7, DATA_FLAG_NONE));
-  scoped_ptr<SpdySerializedFrame> data_frame_fin(
+  std::unique_ptr<SpdySerializedFrame> data_frame_fin(
       framer.CreateDataFrame(1, "message", 7, DATA_FLAG_FIN));
   const SpdySerializedFrame* data_frames[4] = {
       data_frame.get(), data_frame.get(), data_frame.get(),
@@ -3887,7 +3890,7 @@
       CombineFrames(data_frames, arraysize(data_frames),
                     combined_data_frames, arraysize(combined_data_frames));
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -3962,16 +3965,16 @@
 TEST_P(SpdyNetworkTransactionTest, BufferedAll) {
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
   // 5 data frames in a single read.
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> data_frame(
+  std::unique_ptr<SpdySerializedFrame> data_frame(
       framer.CreateDataFrame(1, "message", 7, DATA_FLAG_NONE));
-  scoped_ptr<SpdySerializedFrame> data_frame_fin(
+  std::unique_ptr<SpdySerializedFrame> data_frame_fin(
       framer.CreateDataFrame(1, "message", 7, DATA_FLAG_FIN));
   const SpdySerializedFrame* frames[5] = {reply.get(), data_frame.get(),
                                           data_frame.get(), data_frame.get(),
@@ -4048,13 +4051,13 @@
 TEST_P(SpdyNetworkTransactionTest, BufferedClosed) {
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
   // All data frames in a single read.
   // NOTE: We don't FIN the stream.
-  scoped_ptr<SpdySerializedFrame> data_frame(
+  std::unique_ptr<SpdySerializedFrame> data_frame(
       framer.CreateDataFrame(1, "message", 7, DATA_FLAG_NONE));
   const SpdySerializedFrame* data_frames[4] = {
       data_frame.get(), data_frame.get(), data_frame.get(), data_frame.get()};
@@ -4062,7 +4065,7 @@
   int combined_data_frames_len =
       CombineFrames(data_frames, arraysize(data_frames),
                     combined_data_frames, arraysize(combined_data_frames));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -4135,17 +4138,17 @@
 TEST_P(SpdyNetworkTransactionTest, BufferedCancelled) {
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {CreateMockWrite(*req, 0), CreateMockWrite(*rst, 4)};
 
   // NOTE: We don't FIN the stream.
-  scoped_ptr<SpdySerializedFrame> data_frame(
+  std::unique_ptr<SpdySerializedFrame> data_frame(
       framer.CreateDataFrame(1, "message", 7, DATA_FLAG_NONE));
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -4232,15 +4235,15 @@
       host_port_pair).empty());
 
   // Construct the request.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
   // Construct the reply.
-  scoped_ptr<SpdyHeaderBlock> reply_headers(new SpdyHeaderBlock());
+  std::unique_ptr<SpdyHeaderBlock> reply_headers(new SpdyHeaderBlock());
   (*reply_headers)[spdy_util_.GetStatusKey()] = "200";
   (*reply_headers)[spdy_util_.GetVersionKey()] = "HTTP/1.1";
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyFrame(kSynReplyInfo, std::move(reply_headers)));
 
   const SpdySettingsIds kSampleId1 = SETTINGS_UPLOAD_BANDWIDTH;
@@ -4249,7 +4252,7 @@
   unsigned int kSampleValue2 = 0x0b0b0b0b;
   const SpdySettingsIds kSampleId3 = SETTINGS_ROUND_TRIP_TIME;
   unsigned int kSampleValue3 = 0x0c0c0c0c;
-  scoped_ptr<SpdySerializedFrame> settings_frame;
+  std::unique_ptr<SpdySerializedFrame> settings_frame;
   {
     // Construct the SETTINGS frame.
     SettingsMap settings;
@@ -4265,7 +4268,7 @@
     settings_frame.reset(spdy_util_.ConstructSpdySettings(settings));
   }
 
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*reply, 1),
@@ -4367,18 +4370,18 @@
   SettingsMap initial_settings;
   initial_settings[SETTINGS_MAX_CONCURRENT_STREAMS] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, kMaxConcurrentPushedStreams);
-  scoped_ptr<SpdySerializedFrame> initial_settings_frame(
+  std::unique_ptr<SpdySerializedFrame> initial_settings_frame(
       spdy_util_.ConstructSpdySettings(initial_settings));
 
   // Construct the persisted SETTINGS frame.
   const SettingsMap& settings =
       spdy_session_pool->http_server_properties()->GetSpdySettings(
           host_port_pair);
-  scoped_ptr<SpdySerializedFrame> settings_frame(
+  std::unique_ptr<SpdySerializedFrame> settings_frame(
       spdy_util_.ConstructSpdySettings(settings));
 
   // Construct the request.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
 
   MockWrite writes[] = {
@@ -4388,13 +4391,13 @@
   };
 
   // Construct the reply.
-  scoped_ptr<SpdyHeaderBlock> reply_headers(new SpdyHeaderBlock());
+  std::unique_ptr<SpdyHeaderBlock> reply_headers(new SpdyHeaderBlock());
   (*reply_headers)[spdy_util_.GetStatusKey()] = "200";
   (*reply_headers)[spdy_util_.GetVersionKey()] = "HTTP/1.1";
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyFrame(kSynReplyInfo, std::move(reply_headers)));
 
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*reply, 3),
@@ -4435,11 +4438,12 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, GoAwayWithActiveStream) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
-  scoped_ptr<SpdySerializedFrame> go_away(spdy_util_.ConstructSpdyGoAway());
+  std::unique_ptr<SpdySerializedFrame> go_away(
+      spdy_util_.ConstructSpdyGoAway());
   MockRead reads[] = {
       CreateMockRead(*go_away, 1),
   };
@@ -4454,11 +4458,11 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, CloseWithActiveStream) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1), MockRead(SYNCHRONOUS, 0, 2)  // EOF
@@ -4499,7 +4503,7 @@
   NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
                                      BoundNetLog(), GetParam(), nullptr);
 
-  scoped_ptr<SpdySerializedFrame> go_away(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> go_away(spdy_util_.ConstructSpdyGoAway(
       0, GOAWAY_HTTP_1_1_REQUIRED, "Try again using HTTP/1.1 please."));
   MockRead reads[] = {
       CreateMockRead(*go_away, 0),
@@ -4526,7 +4530,7 @@
   HttpRequestInfo request;
   request.method = "GET";
   request.url = GURL("https://www.example.org/");
-  scoped_ptr<SpdySessionDependencies> session_deps(
+  std::unique_ptr<SpdySessionDependencies> session_deps(
       CreateSpdySessionDependencies(GetParam()));
   // Do not force SPDY so that second socket can negotiate HTTP/1.1.
   NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
@@ -4534,17 +4538,18 @@
 
   // First socket: HTTP/2 request rejected with HTTP_1_1_REQUIRED.
   const char* url = request.url.spec().c_str();
-  scoped_ptr<SpdyHeaderBlock> headers(spdy_util_.ConstructGetHeaderBlock(url));
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdyHeaderBlock> headers(
+      spdy_util_.ConstructGetHeaderBlock(url));
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, true));
   MockWrite writes0[] = {CreateMockWrite(*req, 0)};
-  scoped_ptr<SpdySerializedFrame> go_away(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> go_away(spdy_util_.ConstructSpdyGoAway(
       0, GOAWAY_HTTP_1_1_REQUIRED, "Try again using HTTP/1.1 please."));
   MockRead reads0[] = {CreateMockRead(*go_away, 1)};
   SequencedSocketData data0(reads0, arraysize(reads0), writes0,
                             arraysize(writes0));
 
-  scoped_ptr<SSLSocketDataProvider> ssl_provider0(
+  std::unique_ptr<SSLSocketDataProvider> ssl_provider0(
       new SSLSocketDataProvider(ASYNC, OK));
   // Expect HTTP/2 protocols too in SSLConfig.
   ssl_provider0->next_protos_expected_in_ssl_config.push_back(kProtoHTTP2);
@@ -4566,7 +4571,7 @@
   SequencedSocketData data1(reads1, arraysize(reads1), writes1,
                             arraysize(writes1));
 
-  scoped_ptr<SSLSocketDataProvider> ssl_provider1(
+  std::unique_ptr<SSLSocketDataProvider> ssl_provider1(
       new SSLSocketDataProvider(ASYNC, OK));
   // Expect only HTTP/1.1 protocol in SSLConfig.
   ssl_provider1->next_protos_expected_in_ssl_config.push_back(kProtoHTTP11);
@@ -4615,7 +4620,7 @@
   HttpRequestInfo request;
   request.method = "GET";
   request.url = GURL("https://www.example.org/");
-  scoped_ptr<SpdySessionDependencies> session_deps(
+  std::unique_ptr<SpdySessionDependencies> session_deps(
       CreateSpdySessionDependencies(
           GetParam(),
           ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70")));
@@ -4624,16 +4629,16 @@
                                      GetParam(), std::move(session_deps));
 
   // First socket: HTTP/2 CONNECT rejected with HTTP_1_1_REQUIRED.
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyConnect(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyConnect(
       nullptr, 0, 1, LOWEST, HostPortPair("www.example.org", 443)));
   MockWrite writes0[] = {CreateMockWrite(*req, 0)};
-  scoped_ptr<SpdySerializedFrame> go_away(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> go_away(spdy_util_.ConstructSpdyGoAway(
       0, GOAWAY_HTTP_1_1_REQUIRED, "Try again using HTTP/1.1 please."));
   MockRead reads0[] = {CreateMockRead(*go_away, 1)};
   SequencedSocketData data0(reads0, arraysize(reads0), writes0,
                             arraysize(writes0));
 
-  scoped_ptr<SSLSocketDataProvider> ssl_provider0(
+  std::unique_ptr<SSLSocketDataProvider> ssl_provider0(
       new SSLSocketDataProvider(ASYNC, OK));
   // Expect HTTP/2 protocols too in SSLConfig.
   ssl_provider0->next_protos_expected_in_ssl_config.push_back(kProtoHTTP2);
@@ -4665,7 +4670,7 @@
   SequencedSocketData data1(reads1, arraysize(reads1), writes1,
                             arraysize(writes1));
 
-  scoped_ptr<SSLSocketDataProvider> ssl_provider1(
+  std::unique_ptr<SSLSocketDataProvider> ssl_provider1(
       new SSLSocketDataProvider(ASYNC, OK));
   // Expect only HTTP/1.1 protocol in SSLConfig.
   ssl_provider1->next_protos_expected_in_ssl_config.push_back(kProtoHTTP11);
@@ -4674,7 +4679,7 @@
   helper.AddDataWithSSLSocketDataProvider(&data1, std::move(ssl_provider1));
 
   // A third socket is needed for the tunnelled connection.
-  scoped_ptr<SSLSocketDataProvider> ssl_provider2(
+  std::unique_ptr<SSLSocketDataProvider> ssl_provider2(
       new SSLSocketDataProvider(ASYNC, OK));
   helper.session_deps()->socket_factory->AddSSLSocketDataProvider(
       ssl_provider2.get());
@@ -4721,11 +4726,11 @@
       "Host: www.example.org:443\r\n"
       "Proxy-Connection: keep-alive\r\n\r\n"};
   const char kHTTP200[] = {"HTTP/1.1 200 OK\r\n\r\n"};
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   MockWrite writes[] = {
@@ -4738,7 +4743,7 @@
       CreateMockRead(*body.get(), 4),
       MockRead(ASYNC, 0, 0, 5),
   };
-  scoped_ptr<SequencedSocketData> data(new SequencedSocketData(
+  std::unique_ptr<SequencedSocketData> data(new SequencedSocketData(
       reads, arraysize(reads), writes, arraysize(writes)));
 
   helper.AddData(data.get());
@@ -4785,15 +4790,15 @@
   helper.RunPreTestSetup();
 
   // Construct and send a simple GET request.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -4844,11 +4849,11 @@
       "Host: www.example.org:443\r\n"
       "Proxy-Connection: keep-alive\r\n\r\n"};
   const char kHTTP200[] = {"HTTP/1.1 200 OK\r\n\r\n"};
-  scoped_ptr<SpdySerializedFrame> req2(spdy_util_2.ConstructSpdyGet(
+  std::unique_ptr<SpdySerializedFrame> req2(spdy_util_2.ConstructSpdyGet(
       GetDefaultUrlWithPath("/foo.dat").c_str(), 1, LOWEST));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_2.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_2.ConstructSpdyBodyFrame(1, true));
 
   MockWrite writes2[] = {
@@ -4862,7 +4867,7 @@
       MockRead(ASYNC, 0, 5)  // EOF
   };
 
-  scoped_ptr<SequencedSocketData> data_proxy(new SequencedSocketData(
+  std::unique_ptr<SequencedSocketData> data_proxy(new SequencedSocketData(
       reads2, arraysize(reads2), writes2, arraysize(writes2)));
 
   // Create another request to www.example.org, but this time through a proxy.
@@ -4870,15 +4875,15 @@
   request_proxy.method = "GET";
   request_proxy.url = GURL(GetDefaultUrlWithPath("/foo.dat"));
   request_proxy.load_flags = 0;
-  scoped_ptr<SpdySessionDependencies> ssd_proxy(
+  std::unique_ptr<SpdySessionDependencies> ssd_proxy(
       CreateSpdySessionDependencies(GetParam()));
   // Ensure that this transaction uses the same SpdySessionPool.
-  scoped_ptr<HttpNetworkSession> session_proxy(
+  std::unique_ptr<HttpNetworkSession> session_proxy(
       SpdySessionDependencies::SpdyCreateSession(ssd_proxy.get()));
   NormalSpdyTransactionHelper helper_proxy(request_proxy, DEFAULT_PRIORITY,
                                            BoundNetLog(), GetParam(), NULL);
   HttpNetworkSessionPeer session_peer(session_proxy.get());
-  scoped_ptr<ProxyService> proxy_service(
+  std::unique_ptr<ProxyService> proxy_service(
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
   session_peer.SetProxyService(proxy_service.get());
   helper_proxy.session_deps().swap(ssd_proxy);
@@ -4910,9 +4915,9 @@
 // This can happen when a server reboots without saying goodbye, or when
 // we're behind a NAT that masked the RST.
 TEST_P(SpdyNetworkTransactionTest, VerifyRetryOnConnectionReset) {
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -4927,12 +4932,12 @@
       MockRead(ASYNC, 0, 3)  // EOF
   };
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   // In all cases the connection will be reset before req3 can be
   // dispatched, destroying both streams.
   spdy_util_.UpdateWithStreamDestruction(1);
-  scoped_ptr<SpdySerializedFrame> req3(
+  std::unique_ptr<SpdySerializedFrame> req3(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
   MockWrite writes1[] = {CreateMockWrite(*req, 0), CreateMockWrite(*req3, 5)};
   MockWrite writes2[] = {CreateMockWrite(*req, 0)};
@@ -4961,7 +4966,7 @@
     helper.RunPreTestSetup();
 
     for (int i = 0; i < 2; ++i) {
-      scoped_ptr<HttpNetworkTransaction> trans(
+      std::unique_ptr<HttpNetworkTransaction> trans(
           new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
 
       TestCompletionCallback callback;
@@ -5002,13 +5007,13 @@
 // Test that turning SPDY on and off works properly.
 TEST_P(SpdyNetworkTransactionTest, SpdyOnOffToggle) {
   HttpStreamFactory::set_spdy_enabled(true);
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite spdy_writes[] = {CreateMockWrite(*req, 0)};
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*resp, 1),
@@ -5059,14 +5064,14 @@
 
   // The first request will be a bare GET, the second request will be a
   // GET with an Authorization header.
-  scoped_ptr<SpdySerializedFrame> req_get(
+  std::unique_ptr<SpdySerializedFrame> req_get(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   // Will be refused for lack of auth.
   spdy_util_.UpdateWithStreamDestruction(1);
   const char* const kExtraAuthorizationHeaders[] = {
     "authorization", "Basic Zm9vOmJhcg=="
   };
-  scoped_ptr<SpdySerializedFrame> req_get_authorization(
+  std::unique_ptr<SpdySerializedFrame> req_get_authorization(
       spdy_util_.ConstructSpdyGet(kExtraAuthorizationHeaders,
                                   arraysize(kExtraAuthorizationHeaders) / 2, 3,
                                   LOWEST, true));
@@ -5081,15 +5086,15 @@
     "www-authenticate",
     "Basic realm=\"MyRealm\""
   };
-  scoped_ptr<SpdySerializedFrame> resp_authentication(
+  std::unique_ptr<SpdySerializedFrame> resp_authentication(
       spdy_util_.ConstructSpdySynReplyError(
           "401 Authentication Required", kExtraAuthenticationHeaders,
           arraysize(kExtraAuthenticationHeaders) / 2, 1));
-  scoped_ptr<SpdySerializedFrame> body_authentication(
+  std::unique_ptr<SpdySerializedFrame> body_authentication(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> resp_data(
+  std::unique_ptr<SpdySerializedFrame> resp_data(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body_data(
+  std::unique_ptr<SpdySerializedFrame> body_data(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
   MockRead spdy_reads[] = {
       CreateMockRead(*resp_authentication, 1),
@@ -5146,19 +5151,19 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, ServerPushWithHeaders) {
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
       CreateMockWrite(*stream1_syn, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
 
-  scoped_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock());
+  std::unique_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock());
   spdy_util_.AddUrlToHeaderBlock(GetDefaultUrlWithPath("/foo.dat"),
                                  initial_headers.get());
-  scoped_ptr<SpdySerializedFrame> stream2_syn(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(
       spdy_util_.ConstructInitialSpdyPushFrame(std::move(initial_headers), 2,
                                                1));
 
@@ -5166,14 +5171,14 @@
   late_headers[spdy_util_.GetStatusKey()] = "200";
   late_headers[spdy_util_.GetVersionKey()] = "HTTP/1.1";
   late_headers["hello"] = "bye";
-  scoped_ptr<SpdySerializedFrame> stream2_headers(
+  std::unique_ptr<SpdySerializedFrame> stream2_headers(
       spdy_util_.ConstructSpdyResponseHeaders(2, late_headers, false));
 
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> stream2_body(
+  std::unique_ptr<SpdySerializedFrame> stream2_body(
       spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                         true));
 
@@ -5206,30 +5211,30 @@
 
 TEST_P(SpdyNetworkTransactionTest, ServerPushClaimBeforeHeaders) {
   // We push a stream and attempt to claim it before the headers come down.
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
     CreateMockWrite(*stream1_syn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock());
+  std::unique_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock());
   spdy_util_.AddUrlToHeaderBlock(GetDefaultUrlWithPath("/foo.dat"),
                                  initial_headers.get());
-  scoped_ptr<SpdySerializedFrame> stream2_syn(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(
       spdy_util_.ConstructInitialSpdyPushFrame(std::move(initial_headers), 2,
                                                1));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   SpdyHeaderBlock late_headers;
   late_headers[spdy_util_.GetStatusKey()] = "200";
   late_headers[spdy_util_.GetVersionKey()] = "HTTP/1.1";
   late_headers["hello"] = "bye";
-  scoped_ptr<SpdySerializedFrame> stream2_headers(
+  std::unique_ptr<SpdySerializedFrame> stream2_headers(
       spdy_util_.ConstructSpdyResponseHeaders(2, late_headers, false));
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> stream2_body(
+  std::unique_ptr<SpdySerializedFrame> stream2_body(
       spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                         true));
   MockRead reads[] = {
@@ -5264,7 +5269,7 @@
 
   // Request the pushed path.  At this point, we've received the push, but the
   // headers are not yet complete.
-  scoped_ptr<HttpNetworkTransaction> trans2(
+  std::unique_ptr<HttpNetworkTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
   rv = trans2->Start(
       &CreateGetPushRequest(), callback.callback(), BoundNetLog());
@@ -5314,32 +5319,32 @@
 // TODO(baranovich): HTTP 2 does not allow multiple HEADERS frames
 TEST_P(SpdyNetworkTransactionTest, ServerPushWithTwoHeaderFrames) {
   // We push a stream and attempt to claim it before the headers come down.
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
     CreateMockWrite(*stream1_syn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
 
-  scoped_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock());
+  std::unique_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock());
   if (spdy_util_.spdy_version() < HTTP2) {
     // In HTTP/2 PUSH_PROMISE headers won't show up in the response headers.
     (*initial_headers)["alpha"] = "beta";
   }
   spdy_util_.AddUrlToHeaderBlock(GetDefaultUrlWithPath("/foo.dat"),
                                  initial_headers.get());
-  scoped_ptr<SpdySerializedFrame> stream2_syn(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(
       spdy_util_.ConstructInitialSpdyPushFrame(std::move(initial_headers), 2,
                                                1));
 
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   SpdyHeaderBlock middle_headers;
   middle_headers["hello"] = "bye";
-  scoped_ptr<SpdySerializedFrame> stream2_headers1(
+  std::unique_ptr<SpdySerializedFrame> stream2_headers1(
       spdy_util_.ConstructSpdyResponseHeaders(2, middle_headers, false));
 
   SpdyHeaderBlock late_headers;
@@ -5348,11 +5353,11 @@
     // HTTP/2 eliminates use of the :version header.
     late_headers[spdy_util_.GetVersionKey()] = "HTTP/1.1";
   }
-  scoped_ptr<SpdySerializedFrame> stream2_headers2(
+  std::unique_ptr<SpdySerializedFrame> stream2_headers2(
       spdy_util_.ConstructSpdyResponseHeaders(2, late_headers, false));
 
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> stream2_body(
+  std::unique_ptr<SpdySerializedFrame> stream2_body(
       spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                         true));
 
@@ -5391,7 +5396,7 @@
 
   // Request the pushed path.  At this point, we've received the push, but the
   // headers are not yet complete.
-  scoped_ptr<HttpNetworkTransaction> trans2(
+  std::unique_ptr<HttpNetworkTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
   rv = trans2->Start(
       &CreateGetPushRequest(), callback.callback(), BoundNetLog());
@@ -5446,32 +5451,32 @@
 
 TEST_P(SpdyNetworkTransactionTest, ServerPushWithNoStatusHeaderFrames) {
   // We push a stream and attempt to claim it before the headers come down.
-  scoped_ptr<SpdySerializedFrame> stream1_syn(
+  std::unique_ptr<SpdySerializedFrame> stream1_syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
     CreateMockWrite(*stream1_syn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
 
-  scoped_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock());
+  std::unique_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock());
   spdy_util_.AddUrlToHeaderBlock(GetDefaultUrlWithPath("/foo.dat"),
                                  initial_headers.get());
-  scoped_ptr<SpdySerializedFrame> stream2_syn(
+  std::unique_ptr<SpdySerializedFrame> stream2_syn(
       spdy_util_.ConstructInitialSpdyPushFrame(std::move(initial_headers), 2,
                                                1));
 
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   SpdyHeaderBlock middle_headers;
   middle_headers["hello"] = "bye";
-  scoped_ptr<SpdySerializedFrame> stream2_headers1(
+  std::unique_ptr<SpdySerializedFrame> stream2_headers1(
       spdy_util_.ConstructSpdyResponseHeaders(2, middle_headers, false));
 
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> stream2_body(
+  std::unique_ptr<SpdySerializedFrame> stream2_body(
       spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                         true));
 
@@ -5504,7 +5509,7 @@
 
   // Request the pushed path.  At this point, we've received the push, but the
   // headers are not yet complete.
-  scoped_ptr<HttpNetworkTransaction> trans2(
+  std::unique_ptr<HttpNetworkTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
   rv = trans2->Start(
       &CreateGetPushRequest(), callback.callback(), BoundNetLog());
@@ -5544,22 +5549,22 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, SynReplyWithHeaders) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_PROTOCOL_ERROR));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 4),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
 
   SpdyHeaderBlock late_headers;
   late_headers["hello"] = "bye";
-  scoped_ptr<SpdySerializedFrame> stream1_headers(
+  std::unique_ptr<SpdySerializedFrame> stream1_headers(
       spdy_util_.ConstructSpdyResponseHeaders(1, late_headers, false));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*stream1_reply, 1),
@@ -5580,24 +5585,24 @@
 // trigger a ERR_SPDY_PROTOCOL_ERROR because trailing HEADERS must not be
 // followed by any DATA frames.
 TEST_P(SpdyNetworkTransactionTest, SyncReplyDataAfterTrailers) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_PROTOCOL_ERROR));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 5),
   };
 
-  scoped_ptr<SpdySerializedFrame> stream1_reply(
+  std::unique_ptr<SpdySerializedFrame> stream1_reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> stream1_body(
+  std::unique_ptr<SpdySerializedFrame> stream1_body(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
 
   SpdyHeaderBlock late_headers;
   late_headers["hello"] = "bye";
-  scoped_ptr<SpdySerializedFrame> stream1_headers(
+  std::unique_ptr<SpdySerializedFrame> stream1_headers(
       spdy_util_.ConstructSpdyResponseHeaders(1, late_headers, false));
-  scoped_ptr<SpdySerializedFrame> stream1_body2(
+  std::unique_ptr<SpdySerializedFrame> stream1_body2(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*stream1_reply, 1), CreateMockRead(*stream1_body, 2),
@@ -5645,25 +5650,25 @@
 
     SpdyTestUtil spdy_test_util(GetParam().protocol,
                                 GetParam().priority_to_dependency);
-    scoped_ptr<SpdySerializedFrame> stream1_syn(
+    std::unique_ptr<SpdySerializedFrame> stream1_syn(
         spdy_test_util.ConstructSpdyGet(url_to_fetch, 1, LOWEST));
-    scoped_ptr<SpdySerializedFrame> stream1_body(
+    std::unique_ptr<SpdySerializedFrame> stream1_body(
         spdy_test_util.ConstructSpdyBodyFrame(1, true));
-    scoped_ptr<SpdySerializedFrame> push_rst(
+    std::unique_ptr<SpdySerializedFrame> push_rst(
         spdy_test_util.ConstructSpdyRstStream(2, RST_STREAM_REFUSED_STREAM));
     MockWrite writes[] = {
         CreateMockWrite(*stream1_syn, 0), CreateMockWrite(*push_rst, 3),
     };
 
-    scoped_ptr<SpdySerializedFrame> stream1_reply(
+    std::unique_ptr<SpdySerializedFrame> stream1_reply(
         spdy_test_util.ConstructSpdyGetSynReply(nullptr, 0, 1));
-    scoped_ptr<SpdySerializedFrame> stream2_syn(
+    std::unique_ptr<SpdySerializedFrame> stream2_syn(
         spdy_test_util.ConstructSpdyPush(nullptr, 0, 2, 1, url_to_push));
     const char kPushedData[] = "pushed";
-    scoped_ptr<SpdySerializedFrame> stream2_body(
+    std::unique_ptr<SpdySerializedFrame> stream2_body(
         spdy_test_util.ConstructSpdyBodyFrame(2, kPushedData,
                                               strlen(kPushedData), true));
-    scoped_ptr<SpdySerializedFrame> rst(
+    std::unique_ptr<SpdySerializedFrame> rst(
         spdy_test_util.ConstructSpdyRstStream(2, RST_STREAM_CANCEL));
 
     MockRead reads[] = {
@@ -5685,9 +5690,9 @@
 
     // Enable cross-origin push. Since we are not using a proxy, this should
     // not actually enable cross-origin SPDY push.
-    scoped_ptr<SpdySessionDependencies> session_deps(
+    std::unique_ptr<SpdySessionDependencies> session_deps(
         CreateSpdySessionDependencies(GetParam()));
-    scoped_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
+    std::unique_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
     proxy_delegate->set_trusted_spdy_proxy(net::ProxyServer::FromURI(
         "https://123.45.67.89:443", net::ProxyServer::SCHEME_HTTP));
     session_deps->proxy_delegate.reset(proxy_delegate.release());
@@ -5732,21 +5737,22 @@
   const char* url_to_fetch = "https://www.example.org";
   const char* url_to_push = "https://mail.example.org";
 
-  scoped_ptr<SpdySerializedFrame> headers(
+  std::unique_ptr<SpdySerializedFrame> headers(
       spdy_util_.ConstructSpdyGet(url_to_fetch, 1, LOWEST));
   MockWrite writes[] = {
       CreateMockWrite(*headers, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> push(
+  std::unique_ptr<SpdySerializedFrame> push(
       spdy_util_.ConstructSpdyPush(nullptr, 0, 2, 1, url_to_push));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> pushed_body(spdy_util_.ConstructSpdyBodyFrame(
-      2, kPushedData, strlen(kPushedData), true));
+  std::unique_ptr<SpdySerializedFrame> pushed_body(
+      spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
+                                        true));
   MockRead reads[] = {
       CreateMockRead(*reply, 1),
       CreateMockRead(*push, 2),
@@ -5786,7 +5792,7 @@
   EXPECT_EQ(1u,
             spdy_session->unclaimed_pushed_streams_.count(GURL(url_to_push)));
 
-  scoped_ptr<HttpNetworkTransaction> trans1(
+  std::unique_ptr<HttpNetworkTransaction> trans1(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
   HttpRequestInfo push_request;
   push_request.method = "GET";
@@ -5834,16 +5840,16 @@
   SpdyTestUtil spdy_util_0(GetParam().protocol,
                            GetParam().priority_to_dependency);
 
-  scoped_ptr<SpdySerializedFrame> headers0(
+  std::unique_ptr<SpdySerializedFrame> headers0(
       spdy_util_0.ConstructSpdyGet(url_to_fetch0, 1, LOWEST));
   MockWrite writes0[] = {
       CreateMockWrite(*headers0, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> reply0(
+  std::unique_ptr<SpdySerializedFrame> reply0(
       spdy_util_0.ConstructSpdyGetSynReply(nullptr, 0, 1));
   const char kData0[] = "first";
-  scoped_ptr<SpdySerializedFrame> body0(
+  std::unique_ptr<SpdySerializedFrame> body0(
       spdy_util_0.ConstructSpdyBodyFrame(1, kData0, strlen(kData0), true));
   MockRead reads0[] = {
       CreateMockRead(*reply0, 1),
@@ -5857,21 +5863,21 @@
   SpdyTestUtil spdy_util_1(GetParam().protocol,
                            GetParam().priority_to_dependency);
 
-  scoped_ptr<SpdySerializedFrame> headers1(
+  std::unique_ptr<SpdySerializedFrame> headers1(
       spdy_util_1.ConstructSpdyGet(url_to_fetch1, 1, LOWEST));
   MockWrite writes1[] = {
       CreateMockWrite(*headers1, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> reply1(
+  std::unique_ptr<SpdySerializedFrame> reply1(
       spdy_util_1.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> push(
+  std::unique_ptr<SpdySerializedFrame> push(
       spdy_util_1.ConstructSpdyPush(nullptr, 0, 2, 1, url_to_push));
   const char kData1[] = "second";
-  scoped_ptr<SpdySerializedFrame> body1(
+  std::unique_ptr<SpdySerializedFrame> body1(
       spdy_util_1.ConstructSpdyBodyFrame(1, kData1, strlen(kData1), true));
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> pushed_body(
+  std::unique_ptr<SpdySerializedFrame> pushed_body(
       spdy_util_1.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
                                          true));
 
@@ -5899,14 +5905,14 @@
 
   // "spdy_pooling.pem" is valid for www.example.org, but not for
   // docs.example.org.
-  scoped_ptr<SSLSocketDataProvider> ssl_provider0(
+  std::unique_ptr<SSLSocketDataProvider> ssl_provider0(
       new SSLSocketDataProvider(ASYNC, OK));
   ssl_provider0->cert =
       ImportCertFromFile(GetTestCertsDirectory(), "spdy_pooling.pem");
   helper.AddDataWithSSLSocketDataProvider(&data0, std::move(ssl_provider0));
 
   // "wildcard.pem" is valid for both www.example.org and docs.example.org.
-  scoped_ptr<SSLSocketDataProvider> ssl_provider1(
+  std::unique_ptr<SSLSocketDataProvider> ssl_provider1(
       new SSLSocketDataProvider(ASYNC, OK));
   ssl_provider1->cert =
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem");
@@ -5921,7 +5927,7 @@
   // Request |url_to_fetch1|, during which docs.example.org pushes
   // |url_to_push|, which happens to be for www.example.org, to which there is
   // already an open connection.
-  scoped_ptr<HttpNetworkTransaction> trans1(
+  std::unique_ptr<HttpNetworkTransaction> trans1(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
   HttpRequestInfo request1;
   request1.method = "GET";
@@ -5954,7 +5960,7 @@
             spdy_session1->unclaimed_pushed_streams_.count(GURL(url_to_push)));
 
   // Request |url_to_push|, which should be served from the pushed resource.
-  scoped_ptr<HttpNetworkTransaction> trans2(
+  std::unique_ptr<HttpNetworkTransaction> trans2(
       new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session()));
   HttpRequestInfo push_request;
   push_request.method = "GET";
@@ -6005,24 +6011,25 @@
   const char* url_to_fetch = "https://www.example.org";
   const char* url_to_push = "https://invalid.example.org";
 
-  scoped_ptr<SpdySerializedFrame> headers(
+  std::unique_ptr<SpdySerializedFrame> headers(
       spdy_util_.ConstructSpdyGet(url_to_fetch, 1, LOWEST));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_REFUSED_STREAM));
   MockWrite writes[] = {
       CreateMockWrite(*headers, 0),
       CreateMockWrite(*rst, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> push(
+  std::unique_ptr<SpdySerializedFrame> push(
       spdy_util_.ConstructSpdyPush(nullptr, 0, 2, 1, url_to_push));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   const char kPushedData[] = "pushed";
-  scoped_ptr<SpdySerializedFrame> pushed_body(spdy_util_.ConstructSpdyBodyFrame(
-      2, kPushedData, strlen(kPushedData), true));
+  std::unique_ptr<SpdySerializedFrame> pushed_body(
+      spdy_util_.ConstructSpdyBodyFrame(2, kPushedData, strlen(kPushedData),
+                                        true));
   MockRead reads[] = {
       CreateMockRead(*reply, 1),
       CreateMockRead(*push, 2),
@@ -6048,21 +6055,21 @@
 
 TEST_P(SpdyNetworkTransactionTest, RetryAfterRefused) {
   // Construct the request.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   // Will be destroyed by the RST before stream 3 starts.
   spdy_util_.UpdateWithStreamDestruction(1);
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*req2, 2),
   };
 
-  scoped_ptr<SpdySerializedFrame> refused(
+  std::unique_ptr<SpdySerializedFrame> refused(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_REFUSED_STREAM));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
   MockRead reads[] = {
       CreateMockRead(*refused, 1),
@@ -6115,29 +6122,29 @@
   // req1 is alive when req2 is attempted (during but not after the
   // |data.RunFor(2);| statement below) but not when req3 is attempted.
   // The call to spdy_util_.UpdateWithStreamDestruction() reflects this.
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, HIGHEST, true));
   spdy_util_.UpdateWithStreamDestruction(1);
-  scoped_ptr<SpdySerializedFrame> req3(
+  std::unique_ptr<SpdySerializedFrame> req3(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 5, MEDIUM, true));
   MockWrite writes[] = {
       MockWrite(ASYNC, ERR_IO_PENDING, 0), CreateMockWrite(*req1, 1),
       CreateMockWrite(*req2, 5), CreateMockWrite(*req3, 6),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body1(
+  std::unique_ptr<SpdySerializedFrame> body1(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
-  scoped_ptr<SpdySerializedFrame> resp3(
+  std::unique_ptr<SpdySerializedFrame> resp3(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 5));
-  scoped_ptr<SpdySerializedFrame> body3(
+  std::unique_ptr<SpdySerializedFrame> body3(
       spdy_util_.ConstructSpdyBodyFrame(5, true));
   MockRead reads[] = {
       CreateMockRead(*resp1, 2), MockRead(ASYNC, ERR_IO_PENDING, 3),
@@ -6167,7 +6174,7 @@
   // Now, start both new transactions
   HttpRequestInfo info2 = CreateGetRequest();
   TestCompletionCallback callback2;
-  scoped_ptr<HttpNetworkTransaction> trans2(
+  std::unique_ptr<HttpNetworkTransaction> trans2(
       new HttpNetworkTransaction(MEDIUM, helper.session()));
   rv = trans2->Start(&info2, callback2.callback(), BoundNetLog());
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -6175,7 +6182,7 @@
 
   HttpRequestInfo info3 = CreateGetRequest();
   TestCompletionCallback callback3;
-  scoped_ptr<HttpNetworkTransaction> trans3(
+  std::unique_ptr<HttpNetworkTransaction> trans3(
       new HttpNetworkTransaction(HIGHEST, helper.session()));
   rv = trans3->Start(&info3, callback3.callback(), BoundNetLog());
   EXPECT_EQ(ERR_IO_PENDING, rv);
@@ -6222,15 +6229,16 @@
 // fail under specific circumstances.
 TEST_P(SpdyNetworkTransactionTest, WindowUpdateReceived) {
   static int kFrameCount = 2;
-  scoped_ptr<std::string> content(
+  std::unique_ptr<std::string> content(
       new std::string(kMaxSpdyFrameChunkSize, 'a'));
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       GetDefaultUrl(), 1, kMaxSpdyFrameChunkSize * kFrameCount, LOWEST, NULL,
       0));
-  scoped_ptr<SpdySerializedFrame> body(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> body(spdy_util_.ConstructSpdyBodyFrame(
       1, content->c_str(), content->size(), false));
-  scoped_ptr<SpdySerializedFrame> body_end(spdy_util_.ConstructSpdyBodyFrame(
-      1, content->c_str(), content->size(), true));
+  std::unique_ptr<SpdySerializedFrame> body_end(
+      spdy_util_.ConstructSpdyBodyFrame(1, content->c_str(), content->size(),
+                                        true));
 
   MockWrite writes[] = {
     CreateMockWrite(*req, 0),
@@ -6240,11 +6248,11 @@
 
   static const int32_t kDeltaWindowSize = 0xff;
   static const int kDeltaCount = 4;
-  scoped_ptr<SpdySerializedFrame> window_update(
+  std::unique_ptr<SpdySerializedFrame> window_update(
       spdy_util_.ConstructSpdyWindowUpdate(1, kDeltaWindowSize));
-  scoped_ptr<SpdySerializedFrame> window_update_dummy(
+  std::unique_ptr<SpdySerializedFrame> window_update_dummy(
       spdy_util_.ConstructSpdyWindowUpdate(2, kDeltaWindowSize));
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
       CreateMockRead(*window_update_dummy, 3),
@@ -6260,9 +6268,9 @@
 
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   for (int i = 0; i < kFrameCount; ++i) {
-    element_readers.push_back(make_scoped_ptr(
+    element_readers.push_back(base::WrapUnique(
         new UploadBytesElementReader(content->c_str(), content->size())));
   }
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
@@ -6343,17 +6351,17 @@
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, kMaxConcurrentPushedStreams);
   initial_settings[SETTINGS_INITIAL_WINDOW_SIZE] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, stream_max_recv_window_size);
-  scoped_ptr<SpdySerializedFrame> initial_settings_frame(
+  std::unique_ptr<SpdySerializedFrame> initial_settings_frame(
       spdy_util_.ConstructSpdySettings(initial_settings));
-  scoped_ptr<SpdySerializedFrame> initial_window_update(
+  std::unique_ptr<SpdySerializedFrame> initial_window_update(
       spdy_util_.ConstructSpdyWindowUpdate(
           kSessionFlowControlStreamId,
           session_max_recv_window_size - default_initial_window_size));
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> session_window_update(
+  std::unique_ptr<SpdySerializedFrame> session_window_update(
       spdy_util_.ConstructSpdyWindowUpdate(0, session_window_update_delta));
-  scoped_ptr<SpdySerializedFrame> stream_window_update(
+  std::unique_ptr<SpdySerializedFrame> stream_window_update(
       spdy_util_.ConstructSpdyWindowUpdate(1, stream_window_update_delta));
 
   std::vector<MockWrite> writes;
@@ -6366,15 +6374,15 @@
   writes.push_back(CreateMockWrite(*req, writes.size()));
 
   std::vector<MockRead> reads;
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   reads.push_back(CreateMockRead(*resp, writes.size() + reads.size()));
 
-  std::vector<scoped_ptr<SpdySerializedFrame>> body_frames;
+  std::vector<std::unique_ptr<SpdySerializedFrame>> body_frames;
   const std::string body_data(kChunkSize, 'x');
   for (size_t remaining = kTargetSize; remaining != 0;) {
     size_t frame_size = std::min(remaining, body_data.size());
-    body_frames.push_back(make_scoped_ptr(spdy_util_.ConstructSpdyBodyFrame(
+    body_frames.push_back(base::WrapUnique(spdy_util_.ConstructSpdyBodyFrame(
         1, body_data.data(), frame_size, false)));
     reads.push_back(
         CreateMockRead(*body_frames.back(), writes.size() + reads.size()));
@@ -6446,14 +6454,14 @@
   // set content-length header correctly)
   static int kFrameCount = 3;
 
-  scoped_ptr<std::string> content(
+  std::unique_ptr<std::string> content(
       new std::string(kMaxSpdyFrameChunkSize, 'a'));
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       GetDefaultUrl(), 1, kMaxSpdyFrameChunkSize * kFrameCount, LOWEST, NULL,
       0));
-  scoped_ptr<SpdySerializedFrame> body(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> body(spdy_util_.ConstructSpdyBodyFrame(
       1, content->c_str(), content->size(), false));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_FLOW_CONTROL_ERROR));
 
   // We're not going to write a data frame with FIN, we'll receive a bad
@@ -6465,7 +6473,7 @@
   };
 
   static const int32_t kDeltaWindowSize = 0x7fffffff;  // cause an overflow
-  scoped_ptr<SpdySerializedFrame> window_update(
+  std::unique_ptr<SpdySerializedFrame> window_update(
       spdy_util_.ConstructSpdyWindowUpdate(1, kDeltaWindowSize));
   MockRead reads[] = {
     CreateMockRead(*window_update, 1),
@@ -6474,9 +6482,9 @@
 
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   for (int i = 0; i < kFrameCount; ++i) {
-    element_readers.push_back(make_scoped_ptr(
+    element_readers.push_back(base::WrapUnique(
         new UploadBytesElementReader(content->c_str(), content->size())));
   }
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
@@ -6533,24 +6541,24 @@
   // Construct content for a data frame of maximum size.
   std::string content(kMaxSpdyFrameChunkSize, 'a');
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       GetDefaultUrl(), 1, initial_window_size + kUploadDataSize, LOWEST, NULL,
       0));
 
   // Full frames.
-  scoped_ptr<SpdySerializedFrame> body1(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> body1(spdy_util_.ConstructSpdyBodyFrame(
       1, content.c_str(), content.size(), false));
 
   // Last frame to zero out the window size.
-  scoped_ptr<SpdySerializedFrame> body2(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> body2(spdy_util_.ConstructSpdyBodyFrame(
       1, content.c_str(), last_frame_size, false));
 
   // Data frame to be sent once WINDOW_UPDATE frame is received.
-  scoped_ptr<SpdySerializedFrame> body3(
+  std::unique_ptr<SpdySerializedFrame> body3(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   // Fill in mock writes.
-  scoped_ptr<MockWrite[]> writes(new MockWrite[num_writes]);
+  std::unique_ptr<MockWrite[]> writes(new MockWrite[num_writes]);
   size_t i = 0;
   writes[i] = CreateMockWrite(*req, i);
   for (i = 1; i < num_writes - 2; i++)
@@ -6562,11 +6570,11 @@
 
   // Construct read frame, give enough space to upload the rest of the
   // data.
-  scoped_ptr<SpdySerializedFrame> session_window_update(
+  std::unique_ptr<SpdySerializedFrame> session_window_update(
       spdy_util_.ConstructSpdyWindowUpdate(0, kUploadDataSize));
-  scoped_ptr<SpdySerializedFrame> window_update(
+  std::unique_ptr<SpdySerializedFrame> window_update(
       spdy_util_.ConstructSpdyWindowUpdate(1, kUploadDataSize));
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, i + 1),  // Force a pause
@@ -6581,10 +6589,10 @@
 
   SequencedSocketData data(reads, arraysize(reads), writes.get(), num_writes);
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   std::string upload_data_string(initial_window_size, 'a');
   upload_data_string.append(kUploadData, kUploadDataSize);
-  element_readers.push_back(make_scoped_ptr(new UploadBytesElementReader(
+  element_readers.push_back(base::WrapUnique(new UploadBytesElementReader(
       upload_data_string.c_str(), upload_data_string.size())));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
@@ -6639,20 +6647,20 @@
   // Construct content for a data frame of maximum size.
   std::string content(kMaxSpdyFrameChunkSize, 'a');
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       GetDefaultUrl(), 1, initial_window_size + kUploadDataSize, LOWEST, NULL,
       0));
 
   // Full frames.
-  scoped_ptr<SpdySerializedFrame> body1(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> body1(spdy_util_.ConstructSpdyBodyFrame(
       1, content.c_str(), content.size(), false));
 
   // Last frame to zero out the window size.
-  scoped_ptr<SpdySerializedFrame> body2(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> body2(spdy_util_.ConstructSpdyBodyFrame(
       1, content.c_str(), last_frame_size, false));
 
   // Data frame to be sent once SETTINGS frame is received.
-  scoped_ptr<SpdySerializedFrame> body3(
+  std::unique_ptr<SpdySerializedFrame> body3(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   // Fill in mock reads/writes.
@@ -6671,22 +6679,22 @@
   SettingsMap settings;
   settings[SETTINGS_INITIAL_WINDOW_SIZE] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, initial_window_size * 2);
-  scoped_ptr<SpdySerializedFrame> settings_frame_large(
+  std::unique_ptr<SpdySerializedFrame> settings_frame_large(
       spdy_util_.ConstructSpdySettings(settings));
 
   reads.push_back(CreateMockRead(*settings_frame_large, i++));
 
-  scoped_ptr<SpdySerializedFrame> session_window_update(
+  std::unique_ptr<SpdySerializedFrame> session_window_update(
       spdy_util_.ConstructSpdyWindowUpdate(0, kUploadDataSize));
   reads.push_back(CreateMockRead(*session_window_update, i++));
 
-  scoped_ptr<SpdySerializedFrame> settings_ack(
+  std::unique_ptr<SpdySerializedFrame> settings_ack(
       spdy_util_.ConstructSpdySettingsAck());
   writes.push_back(CreateMockWrite(*settings_ack, i++));
 
   writes.push_back(CreateMockWrite(*body3, i++));
 
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   reads.push_back(CreateMockRead(*reply, i++));
   reads.push_back(CreateMockRead(*body2, i++));
@@ -6698,10 +6706,10 @@
   SequencedSocketData data(reads.data(), reads.size(), writes.data(),
                            writes.size());
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   std::string upload_data_string(initial_window_size, 'a');
   upload_data_string.append(kUploadData, kUploadDataSize);
-  element_readers.push_back(make_scoped_ptr(new UploadBytesElementReader(
+  element_readers.push_back(base::WrapUnique(new UploadBytesElementReader(
       upload_data_string.c_str(), upload_data_string.size())));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
@@ -6762,20 +6770,20 @@
   // Construct content for a data frame of maximum size.
   std::string content(kMaxSpdyFrameChunkSize, 'a');
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       GetDefaultUrl(), 1, initial_window_size + kUploadDataSize, LOWEST, NULL,
       0));
 
   // Full frames.
-  scoped_ptr<SpdySerializedFrame> body1(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> body1(spdy_util_.ConstructSpdyBodyFrame(
       1, content.c_str(), content.size(), false));
 
   // Last frame to zero out the window size.
-  scoped_ptr<SpdySerializedFrame> body2(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> body2(spdy_util_.ConstructSpdyBodyFrame(
       1, content.c_str(), last_frame_size, false));
 
   // Data frame to be sent once SETTINGS frame is received.
-  scoped_ptr<SpdySerializedFrame> body3(
+  std::unique_ptr<SpdySerializedFrame> body3(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
   // Fill in mock reads/writes.
@@ -6794,26 +6802,26 @@
   SettingsMap new_settings;
   new_settings[SETTINGS_INITIAL_WINDOW_SIZE] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, initial_window_size / 2);
-  scoped_ptr<SpdySerializedFrame> settings_frame_small(
+  std::unique_ptr<SpdySerializedFrame> settings_frame_small(
       spdy_util_.ConstructSpdySettings(new_settings));
   // Construct read frames for WINDOW_UPDATE that makes the send_window_size
   // positive.
-  scoped_ptr<SpdySerializedFrame> session_window_update_init_size(
+  std::unique_ptr<SpdySerializedFrame> session_window_update_init_size(
       spdy_util_.ConstructSpdyWindowUpdate(0, initial_window_size));
-  scoped_ptr<SpdySerializedFrame> window_update_init_size(
+  std::unique_ptr<SpdySerializedFrame> window_update_init_size(
       spdy_util_.ConstructSpdyWindowUpdate(1, initial_window_size));
 
   reads.push_back(CreateMockRead(*settings_frame_small, i++));
   reads.push_back(CreateMockRead(*session_window_update_init_size, i++));
   reads.push_back(CreateMockRead(*window_update_init_size, i++));
 
-  scoped_ptr<SpdySerializedFrame> settings_ack(
+  std::unique_ptr<SpdySerializedFrame> settings_ack(
       spdy_util_.ConstructSpdySettingsAck());
   writes.push_back(CreateMockWrite(*settings_ack, i++));
 
   writes.push_back(CreateMockWrite(*body3, i++));
 
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   reads.push_back(CreateMockRead(*reply, i++));
   reads.push_back(CreateMockRead(*body2, i++));
@@ -6825,10 +6833,10 @@
   SequencedSocketData data(reads.data(), reads.size(), writes.data(),
                            writes.size());
 
-  std::vector<scoped_ptr<UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   std::string upload_data_string(initial_window_size, 'a');
   upload_data_string.append(kUploadData, kUploadDataSize);
-  element_readers.push_back(make_scoped_ptr(new UploadBytesElementReader(
+  element_readers.push_back(base::WrapUnique(new UploadBytesElementReader(
       upload_data_string.c_str(), upload_data_string.size())));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
@@ -6871,16 +6879,16 @@
 }
 
 TEST_P(SpdyNetworkTransactionTest, GoAwayOnOddPushStreamId) {
-  scoped_ptr<SpdyHeaderBlock> push_headers(new SpdyHeaderBlock);
+  std::unique_ptr<SpdyHeaderBlock> push_headers(new SpdyHeaderBlock);
   spdy_util_.AddUrlToHeaderBlock("http://www.example.org/a.dat",
                                  push_headers.get());
-  scoped_ptr<SpdySerializedFrame> push(
+  std::unique_ptr<SpdySerializedFrame> push(
       spdy_util_.ConstructInitialSpdyPushFrame(std::move(push_headers), 3, 1));
   MockRead reads[] = {CreateMockRead(*push, 1)};
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
       0, GOAWAY_PROTOCOL_ERROR, "Odd push stream id."));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*goaway, 2),
@@ -6896,21 +6904,21 @@
 
 TEST_P(SpdyNetworkTransactionTest,
        GoAwayOnPushStreamIdLesserOrEqualThanLastAccepted) {
-  scoped_ptr<SpdySerializedFrame> push_a(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> push_a(spdy_util_.ConstructSpdyPush(
       NULL, 0, 4, 1, GetDefaultUrlWithPath("/a.dat").c_str()));
-  scoped_ptr<SpdyHeaderBlock> push_b_headers(new SpdyHeaderBlock);
+  std::unique_ptr<SpdyHeaderBlock> push_b_headers(new SpdyHeaderBlock);
   spdy_util_.AddUrlToHeaderBlock(GetDefaultUrlWithPath("/b.dat"),
                                  push_b_headers.get());
-  scoped_ptr<SpdySerializedFrame> push_b(
+  std::unique_ptr<SpdySerializedFrame> push_b(
       spdy_util_.ConstructInitialSpdyPushFrame(std::move(push_b_headers), 2,
                                                1));
   MockRead reads[] = {
       CreateMockRead(*push_a, 1), CreateMockRead(*push_b, 2),
   };
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
       4, GOAWAY_PROTOCOL_ERROR,
       "New push stream id must be greater than the last accepted."));
   MockWrite writes[] = {
@@ -6936,18 +6944,18 @@
   request.url = GURL(GetDefaultUrl());
   request.extra_headers.SetHeader(kKey, kValue);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(GetDefaultUrl()));
   (*headers)[kKey] = kValue;
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, true));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -6968,9 +6976,9 @@
 
 // Regression test for https://crbug.com/535629: response header exceeds 16 kB.
 TEST_P(SpdyNetworkTransactionTest, LargeResponseHeader) {
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(GetDefaultUrl()));
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, true));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),
@@ -6983,9 +6991,9 @@
   const std::string kValue(16 * 1024, 'b');
   response_headers[1] = kValue.data();
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(response_headers, 1, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp, 1), CreateMockRead(*body, 2),
@@ -7011,15 +7019,16 @@
 class SpdyNetworkTransactionNoTLSUsageCheckTest
     : public SpdyNetworkTransactionTest {
  protected:
-  void RunNoTLSUsageCheckTest(scoped_ptr<SSLSocketDataProvider> ssl_provider) {
+  void RunNoTLSUsageCheckTest(
+      std::unique_ptr<SSLSocketDataProvider> ssl_provider) {
     // Construct the request.
-    scoped_ptr<SpdySerializedFrame> req(
+    std::unique_ptr<SpdySerializedFrame> req(
         spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
     MockWrite writes[] = {CreateMockWrite(*req, 0)};
 
-    scoped_ptr<SpdySerializedFrame> resp(
+    std::unique_ptr<SpdySerializedFrame> resp(
         spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
-    scoped_ptr<SpdySerializedFrame> body(
+    std::unique_ptr<SpdySerializedFrame> body(
         spdy_util_.ConstructSpdyBodyFrame(1, true));
     MockRead reads[] = {
         CreateMockRead(*resp, 1),
@@ -7056,7 +7065,7 @@
                                                        false)));
 
 TEST_P(SpdyNetworkTransactionNoTLSUsageCheckTest, TLSVersionTooOld) {
-  scoped_ptr<SSLSocketDataProvider> ssl_provider(
+  std::unique_ptr<SSLSocketDataProvider> ssl_provider(
       new SSLSocketDataProvider(ASYNC, OK));
   SSLConnectionStatusSetVersion(SSL_CONNECTION_VERSION_SSL3,
                                 &ssl_provider->connection_status);
@@ -7065,7 +7074,7 @@
 }
 
 TEST_P(SpdyNetworkTransactionNoTLSUsageCheckTest, TLSCipherSuiteSucky) {
-  scoped_ptr<SSLSocketDataProvider> ssl_provider(
+  std::unique_ptr<SSLSocketDataProvider> ssl_provider(
       new SSLSocketDataProvider(ASYNC, OK));
   // Set to TLS_RSA_WITH_NULL_MD5
   SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status);
@@ -7076,8 +7085,9 @@
 class SpdyNetworkTransactionTLSUsageCheckTest
     : public SpdyNetworkTransactionTest {
  protected:
-  void RunTLSUsageCheckTest(scoped_ptr<SSLSocketDataProvider> ssl_provider) {
-    scoped_ptr<SpdySerializedFrame> goaway(
+  void RunTLSUsageCheckTest(
+      std::unique_ptr<SSLSocketDataProvider> ssl_provider) {
+    std::unique_ptr<SpdySerializedFrame> goaway(
         spdy_util_.ConstructSpdyGoAway(0, GOAWAY_INADEQUATE_SECURITY, ""));
     MockWrite writes[] = {CreateMockWrite(*goaway)};
 
@@ -7104,7 +7114,7 @@
                                                        true)));
 
 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSVersionTooOld) {
-  scoped_ptr<SSLSocketDataProvider> ssl_provider(
+  std::unique_ptr<SSLSocketDataProvider> ssl_provider(
       new SSLSocketDataProvider(ASYNC, OK));
   SSLConnectionStatusSetVersion(SSL_CONNECTION_VERSION_SSL3,
                                 &ssl_provider->connection_status);
@@ -7113,7 +7123,7 @@
 }
 
 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) {
-  scoped_ptr<SSLSocketDataProvider> ssl_provider(
+  std::unique_ptr<SSLSocketDataProvider> ssl_provider(
       new SSLSocketDataProvider(ASYNC, OK));
   // Set to TLS_RSA_WITH_NULL_MD5
   SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status);
diff --git a/net/spdy/spdy_pinnable_buffer_piece.h b/net/spdy/spdy_pinnable_buffer_piece.h
index d0fe866c..01c9d9a 100644
--- a/net/spdy/spdy_pinnable_buffer_piece.h
+++ b/net/spdy/spdy_pinnable_buffer_piece.h
@@ -9,7 +9,6 @@
 
 #include <memory>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/net_export.h"
 
@@ -52,7 +51,7 @@
   const char * buffer_;
   size_t length_;
   // Null iff |buffer_| isn't pinned.
-  scoped_ptr<char[]> storage_;
+  std::unique_ptr<char[]> storage_;
 };
 
 }  // namespace net
diff --git a/net/spdy/spdy_protocol.h b/net/spdy/spdy_protocol.h
index e22f89c..baefbd8 100644
--- a/net/spdy/spdy_protocol.h
+++ b/net/spdy/spdy_protocol.h
@@ -14,12 +14,12 @@
 
 #include <limits>
 #include <map>
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "base/sys_byteorder.h"
 #include "net/base/net_export.h"
@@ -646,7 +646,7 @@
 
  private:
   // Used to store data that this SpdyDataIR should own.
-  scoped_ptr<std::string> data_store_;
+  std::unique_ptr<std::string> data_store_;
   base::StringPiece data_;
 
   bool padded_;
diff --git a/net/spdy/spdy_protocol_test.cc b/net/spdy/spdy_protocol_test.cc
index c224818..77a4ce5 100644
--- a/net/spdy/spdy_protocol_test.cc
+++ b/net/spdy/spdy_protocol_test.cc
@@ -5,8 +5,8 @@
 #include "net/spdy/spdy_protocol.h"
 
 #include <limits>
+#include <memory>
 
-#include "base/memory/scoped_ptr.h"
 #include "net/spdy/spdy_bitmasks.h"
 #include "net/spdy/spdy_framer.h"
 #include "net/test/gtest_util.h"
@@ -19,7 +19,7 @@
 namespace net {
 
 TEST(SpdyProtocolDeathTest, TestSpdySettingsAndIdOutOfBounds) {
-  scoped_ptr<SettingsFlagsAndId> flags_and_id;
+  std::unique_ptr<SettingsFlagsAndId> flags_and_id;
 
   EXPECT_DFATAL(flags_and_id.reset(new SettingsFlagsAndId(1, 0xffffffff)),
                 "SPDY setting ID too large.");
diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc
index 2d75c4c..068d8521 100644
--- a/net/spdy/spdy_proxy_client_socket.cc
+++ b/net/spdy/spdy_proxy_client_socket.cc
@@ -364,7 +364,7 @@
       base::Bind(&HttpRequestHeaders::NetLogCallback,
                  base::Unretained(&request_.extra_headers), &request_line));
 
-  scoped_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock());
+  std::unique_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock());
   CreateSpdyHeadersFromHttpRequest(request_, request_.extra_headers,
                                    spdy_stream_->GetProtocolVersion(), true,
                                    headers.get());
@@ -460,7 +460,7 @@
 }
 
 // Called when data is received or on EOF (if |buffer| is NULL).
-void SpdyProxyClientSocket::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
+void SpdyProxyClientSocket::OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) {
   if (buffer) {
     net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
                                   buffer->GetRemainingSize(),
@@ -525,7 +525,7 @@
     read_callback.Run(status);
   } else if (!read_callback_.is_null()) {
     // If we have a read_callback_, the we need to make sure we call it back.
-    OnDataReceived(scoped_ptr<SpdyBuffer>());
+    OnDataReceived(std::unique_ptr<SpdyBuffer>());
   }
   // This may have been deleted by read_callback_, so check first.
   if (weak_ptr.get() && !write_callback.is_null())
diff --git a/net/spdy/spdy_proxy_client_socket.h b/net/spdy/spdy_proxy_client_socket.h
index f773666ed..09c10e4 100644
--- a/net/spdy/spdy_proxy_client_socket.h
+++ b/net/spdy/spdy_proxy_client_socket.h
@@ -94,7 +94,7 @@
   void OnRequestHeadersSent() override;
   SpdyResponseHeadersStatus OnResponseHeadersUpdated(
       const SpdyHeaderBlock& response_headers) override;
-  void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+  void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override;
   void OnDataSent() override;
   void OnTrailers(const SpdyHeaderBlock& trailers) override;
   void OnClose(int status) override;
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc
index 6e83c39..78c8ce5 100644
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -134,14 +134,14 @@
   }
 
   SpdyTestUtil spdy_util_;
-  scoped_ptr<SpdyProxyClientSocket> sock_;
+  std::unique_ptr<SpdyProxyClientSocket> sock_;
   TestCompletionCallback read_callback_;
   TestCompletionCallback write_callback_;
-  scoped_ptr<SequencedSocketData> data_;
+  std::unique_ptr<SequencedSocketData> data_;
   BoundTestNetLog net_log_;
 
  private:
-  scoped_ptr<HttpNetworkSession> session_;
+  std::unique_ptr<HttpNetworkSession> session_;
   scoped_refptr<IOBuffer> read_buf_;
   SpdySessionDependencies session_deps_;
   MockConnect connect_data_;
@@ -396,12 +396,12 @@
 // ----------- Connect
 
 TEST_P(SpdyProxyClientSocketTest, ConnectSendsCorrectRequest) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2),
   };
@@ -416,12 +416,12 @@
 }
 
 TEST_P(SpdyProxyClientSocketTest, ConnectWithAuthRequested) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectAuthReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectAuthReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2),
   };
@@ -436,12 +436,12 @@
 }
 
 TEST_P(SpdyProxyClientSocketTest, ConnectWithAuthCredentials) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectAuthRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectAuthRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2),
   };
@@ -455,14 +455,15 @@
 }
 
 TEST_P(SpdyProxyClientSocketTest, ConnectRedirects) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
       CreateMockWrite(*conn, 0, SYNCHRONOUS), CreateMockWrite(*rst, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectRedirectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(
+      ConstructConnectRedirectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2),
   };
@@ -488,12 +489,12 @@
 }
 
 TEST_P(SpdyProxyClientSocketTest, ConnectFails) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
     MockRead(ASYNC, 0, 1),  // EOF
   };
@@ -510,14 +511,14 @@
 // ----------- WasEverUsed
 
 TEST_P(SpdyProxyClientSocketTest, WasEverUsedReturnsCorrectValues) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
       CreateMockWrite(*conn, 0, SYNCHRONOUS), CreateMockWrite(*rst, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2),
   };
@@ -537,12 +538,12 @@
 // ----------- GetPeerAddress
 
 TEST_P(SpdyProxyClientSocketTest, GetPeerAddressReturnsCorrectValues) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 2),
       MockRead(ASYNC, 0, 3),  // EOF
@@ -570,16 +571,16 @@
 // ----------- Write
 
 TEST_P(SpdyProxyClientSocketTest, WriteSendsDataInDataFrame) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
-  scoped_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
   MockWrite writes[] = {
       CreateMockWrite(*conn, 0, SYNCHRONOUS),
       CreateMockWrite(*msg1, 3, SYNCHRONOUS),
       CreateMockWrite(*msg2, 4, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2),
   };
@@ -594,15 +595,15 @@
 
 TEST_P(SpdyProxyClientSocketTest, WriteSplitsLargeDataIntoMultipleFrames) {
   std::string chunk_data(kMaxSpdyFrameChunkSize, 'x');
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
-  scoped_ptr<SpdySerializedFrame> chunk(
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> chunk(
       ConstructBodyFrame(chunk_data.data(), chunk_data.length()));
   MockWrite writes[] = {CreateMockWrite(*conn, 0, SYNCHRONOUS),
                         CreateMockWrite(*chunk, 3, SYNCHRONOUS),
                         CreateMockWrite(*chunk, 4, SYNCHRONOUS),
                         CreateMockWrite(*chunk, 5, SYNCHRONOUS)};
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2),
   };
@@ -623,13 +624,13 @@
 // ----------- Read
 
 TEST_P(SpdyProxyClientSocketTest, ReadReadsDataInDataFrame) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 2),
       CreateMockRead(*msg1, 3, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 4),
@@ -645,14 +646,14 @@
 }
 
 TEST_P(SpdyProxyClientSocketTest, ReadDataFromBufferedFrames) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
-  scoped_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 2),
       CreateMockRead(*msg1, 3, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 4),
@@ -672,14 +673,14 @@
 }
 
 TEST_P(SpdyProxyClientSocketTest, ReadDataMultipleBufferedFrames) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
-  scoped_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC),
       MockRead(ASYNC, ERR_IO_PENDING, 2),
@@ -701,14 +702,14 @@
 
 TEST_P(SpdyProxyClientSocketTest,
        LargeReadWillMergeDataFromDifferentFrames) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
-  scoped_ptr<SpdySerializedFrame> msg3(ConstructBodyFrame(kMsg3, kLen3));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> msg3(ConstructBodyFrame(kMsg3, kLen3));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC),
       MockRead(ASYNC, ERR_IO_PENDING, 2),
@@ -730,15 +731,15 @@
 }
 
 TEST_P(SpdyProxyClientSocketTest, MultipleShortReadsThenMoreRead) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
-  scoped_ptr<SpdySerializedFrame> msg3(ConstructBodyFrame(kMsg3, kLen3));
-  scoped_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> msg3(ConstructBodyFrame(kMsg3, kLen3));
+  std::unique_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC),
       MockRead(ASYNC, ERR_IO_PENDING, 2),
@@ -764,15 +765,16 @@
 }
 
 TEST_P(SpdyProxyClientSocketTest, ReadWillSplitDataFromLargeFrame) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
-  scoped_ptr<SpdySerializedFrame> msg33(ConstructBodyFrame(kMsg33, kLen33));
-  scoped_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> msg33(
+      ConstructBodyFrame(kMsg33, kLen33));
+  std::unique_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC),
       MockRead(ASYNC, ERR_IO_PENDING, 2),
@@ -796,13 +798,14 @@
 }
 
 TEST_P(SpdyProxyClientSocketTest, MultipleReadsFromSameLargeFrame) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg333(ConstructBodyFrame(kMsg333, kLen333));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg333(
+      ConstructBodyFrame(kMsg333, kLen333));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 2),
       CreateMockRead(*msg333, 3, ASYNC),
@@ -827,14 +830,14 @@
 }
 
 TEST_P(SpdyProxyClientSocketTest, ReadAuthResponseBody) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectAuthReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
-  scoped_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectAuthReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC),
       MockRead(ASYNC, ERR_IO_PENDING, 2),
@@ -855,14 +858,14 @@
 }
 
 TEST_P(SpdyProxyClientSocketTest, ReadErrorResponseBody) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectErrorReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
-  scoped_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectErrorReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
   MockRead reads[] = {
     CreateMockRead(*resp, 1, ASYNC),
     CreateMockRead(*msg1, 2, ASYNC),
@@ -878,16 +881,16 @@
 // ----------- Reads and Writes
 
 TEST_P(SpdyProxyClientSocketTest, AsyncReadAroundWrite) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
-  scoped_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
   MockWrite writes[] = {
       CreateMockWrite(*conn, 0, SYNCHRONOUS),
       CreateMockWrite(*msg2, 4, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
-  scoped_ptr<SpdySerializedFrame> msg3(ConstructBodyFrame(kMsg3, kLen3));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> msg3(ConstructBodyFrame(kMsg3, kLen3));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC),
       MockRead(ASYNC, ERR_IO_PENDING, 2),
@@ -916,16 +919,16 @@
 }
 
 TEST_P(SpdyProxyClientSocketTest, AsyncWriteAroundReads) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
-  scoped_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> msg2(ConstructBodyFrame(kMsg2, kLen2));
   MockWrite writes[] = {
       CreateMockWrite(*conn, 0, SYNCHRONOUS),
       MockWrite(ASYNC, ERR_IO_PENDING, 7), CreateMockWrite(*msg2, 8, ASYNC),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
-  scoped_ptr<SpdySerializedFrame> msg3(ConstructBodyFrame(kMsg3, kLen3));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> msg3(ConstructBodyFrame(kMsg3, kLen3));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 2),
       CreateMockRead(*msg1, 3, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 4),
@@ -954,12 +957,12 @@
 
 // Reading from an already closed socket should return 0
 TEST_P(SpdyProxyClientSocketTest, ReadOnClosedSocketReturnsZero) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 2),
       MockRead(ASYNC, 0, 3),  // EOF
@@ -980,12 +983,12 @@
 
 // Read pending when socket is closed should return 0
 TEST_P(SpdyProxyClientSocketTest, PendingReadOnCloseReturnsZero) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 2),
       MockRead(ASYNC, 0, 3),  // EOF
@@ -1005,14 +1008,14 @@
 // Reading from a disconnected socket is an error
 TEST_P(SpdyProxyClientSocketTest,
        ReadOnDisconnectSocketReturnsNotConnected) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
       CreateMockWrite(*conn, 0, SYNCHRONOUS), CreateMockWrite(*rst, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2),
   };
@@ -1033,13 +1036,13 @@
 // Reading buffered data from an already closed socket should return
 // buffered data, then 0.
 TEST_P(SpdyProxyClientSocketTest, ReadOnClosedSocketReturnsBufferedData) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 2),
       CreateMockRead(*msg1, 3, ASYNC), MockRead(ASYNC, 0, 4),  // EOF
@@ -1065,13 +1068,13 @@
 
 // Calling Write() on a closed socket is an error
 TEST_P(SpdyProxyClientSocketTest, WriteOnClosedStream) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 2),
       MockRead(ASYNC, 0, 3),  // EOF
@@ -1090,15 +1093,15 @@
 
 // Calling Write() on a disconnected socket is an error.
 TEST_P(SpdyProxyClientSocketTest, WriteOnDisconnectedSocket) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
       CreateMockWrite(*conn, 0, SYNCHRONOUS), CreateMockWrite(*rst, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2),
   };
@@ -1120,13 +1123,13 @@
 // If the socket is closed with a pending Write(), the callback
 // should be called with ERR_CONNECTION_CLOSED.
 TEST_P(SpdyProxyClientSocketTest, WritePendingOnClose) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
       CreateMockWrite(*conn, 0, SYNCHRONOUS),
       MockWrite(SYNCHRONOUS, ERR_IO_PENDING, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2),
   };
@@ -1151,14 +1154,14 @@
 // If the socket is Disconnected with a pending Write(), the callback
 // should not be called.
 TEST_P(SpdyProxyClientSocketTest, DisconnectWithWritePending) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
       CreateMockWrite(*conn, 0, SYNCHRONOUS), CreateMockWrite(*rst, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2),
   };
@@ -1185,14 +1188,14 @@
 // If the socket is Disconnected with a pending Read(), the callback
 // should not be called.
 TEST_P(SpdyProxyClientSocketTest, DisconnectWithReadPending) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
       CreateMockWrite(*conn, 0, SYNCHRONOUS), CreateMockWrite(*rst, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2),
   };
@@ -1219,13 +1222,13 @@
 // If the socket is Reset when both a read and write are pending,
 // both should be called back.
 TEST_P(SpdyProxyClientSocketTest, RstWithReadAndWritePending) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 2),
@@ -1261,15 +1264,15 @@
 // Makes sure the proxy client socket's source gets the expected NetLog events
 // and only the expected NetLog events (No SpdySession events).
 TEST_P(SpdyProxyClientSocketTest, NetLog) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
       CreateMockWrite(*conn, 0, SYNCHRONOUS), CreateMockWrite(*rst, 5),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> msg1(ConstructBodyFrame(kMsg1, kLen1));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 2),
       CreateMockRead(*msg1, 3, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 4),
@@ -1321,11 +1324,10 @@
 // deleted when Run is invoked.
 class DeleteSockCallback : public TestCompletionCallbackBase {
  public:
-  explicit DeleteSockCallback(scoped_ptr<SpdyProxyClientSocket>* sock)
+  explicit DeleteSockCallback(std::unique_ptr<SpdyProxyClientSocket>* sock)
       : sock_(sock),
         callback_(base::Bind(&DeleteSockCallback::OnComplete,
-                             base::Unretained(this))) {
-  }
+                             base::Unretained(this))) {}
 
   ~DeleteSockCallback() override {}
 
@@ -1337,7 +1339,7 @@
     SetResult(result);
   }
 
-  scoped_ptr<SpdyProxyClientSocket>* sock_;
+  std::unique_ptr<SpdyProxyClientSocket>* sock_;
   CompletionCallback callback_;
 
   DISALLOW_COPY_AND_ASSIGN(DeleteSockCallback);
@@ -1347,13 +1349,13 @@
 // read callback causes the socket to be deleted, the write callback should
 // not be called.
 TEST_P(SpdyProxyClientSocketTest, RstWithReadAndWritePendingDelete) {
-  scoped_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
+  std::unique_ptr<SpdySerializedFrame> conn(ConstructConnectRequestFrame());
   MockWrite writes[] = {
     CreateMockWrite(*conn, 0, SYNCHRONOUS),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> resp(ConstructConnectReplyFrame());
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockRead reads[] = {
       CreateMockRead(*resp, 1, ASYNC), MockRead(ASYNC, ERR_IO_PENDING, 2),
diff --git a/net/spdy/spdy_read_queue.cc b/net/spdy/spdy_read_queue.cc
index 627bf5b..7948ff4 100644
--- a/net/spdy/spdy_read_queue.cc
+++ b/net/spdy/spdy_read_queue.cc
@@ -25,7 +25,7 @@
   return total_size_;
 }
 
-void SpdyReadQueue::Enqueue(scoped_ptr<SpdyBuffer> buffer) {
+void SpdyReadQueue::Enqueue(std::unique_ptr<SpdyBuffer> buffer) {
   DCHECK_GT(buffer->GetRemainingSize(), 0u);
   total_size_ += buffer->GetRemainingSize();
   queue_.push_back(buffer.release());
diff --git a/net/spdy/spdy_read_queue.h b/net/spdy/spdy_read_queue.h
index 7c4172c..bf85afb 100644
--- a/net/spdy/spdy_read_queue.h
+++ b/net/spdy/spdy_read_queue.h
@@ -7,9 +7,9 @@
 
 #include <cstddef>
 #include <deque>
+#include <memory>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
@@ -30,7 +30,7 @@
   size_t GetTotalSize() const;
 
   // Enqueues the bytes in |buffer|.
-  void Enqueue(scoped_ptr<SpdyBuffer> buffer);
+  void Enqueue(std::unique_ptr<SpdyBuffer> buffer);
 
   // Dequeues up to |len| (which must be positive) bytes into
   // |out|. Returns the number of bytes dequeued.
diff --git a/net/spdy/spdy_read_queue_unittest.cc b/net/spdy/spdy_read_queue_unittest.cc
index 7281f68..468764d 100644
--- a/net/spdy/spdy_read_queue_unittest.cc
+++ b/net/spdy/spdy_read_queue_unittest.cc
@@ -6,9 +6,9 @@
 
 #include <algorithm>
 #include <cstddef>
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "net/spdy/spdy_buffer.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -30,8 +30,8 @@
   size_t old_total_size = queue->GetTotalSize();
   for (size_t i = 0; i < data.size();) {
     size_t buffer_size = std::min(data.size() - i, max_buffer_size);
-    queue->Enqueue(
-        scoped_ptr<SpdyBuffer>(new SpdyBuffer(data.data() + i, buffer_size)));
+    queue->Enqueue(std::unique_ptr<SpdyBuffer>(
+        new SpdyBuffer(data.data() + i, buffer_size)));
     i += buffer_size;
     EXPECT_FALSE(queue->IsEmpty());
     EXPECT_EQ(old_total_size + i, queue->GetTotalSize());
@@ -46,7 +46,7 @@
   // Pad the buffer so we can detect out-of-bound writes.
   size_t padding = std::max(static_cast<size_t>(4096), queue->GetTotalSize());
   size_t buffer_size_with_padding = padding + max_buffer_size + padding;
-  scoped_ptr<char[]> buffer(new char[buffer_size_with_padding]);
+  std::unique_ptr<char[]> buffer(new char[buffer_size_with_padding]);
   std::memset(buffer.get(), 0, buffer_size_with_padding);
   char* buffer_data = buffer.get() + padding;
 
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index d4c6f06..4358e61c 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -61,10 +61,10 @@
 // Minimum seconds that unclaimed pushed streams will be kept in memory.
 const int kMinPushedStreamLifetimeSeconds = 300;
 
-scoped_ptr<base::ListValue> SpdyHeaderBlockToListValue(
+std::unique_ptr<base::ListValue> SpdyHeaderBlockToListValue(
     const SpdyHeaderBlock& headers,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::ListValue> headers_list(new base::ListValue());
+  std::unique_ptr<base::ListValue> headers_list(new base::ListValue());
   for (SpdyHeaderBlock::const_iterator it = headers.begin();
        it != headers.end(); ++it) {
     headers_list->AppendString(
@@ -75,14 +75,14 @@
   return headers_list;
 }
 
-scoped_ptr<base::Value> NetLogSpdySynStreamSentCallback(
+std::unique_ptr<base::Value> NetLogSpdySynStreamSentCallback(
     const SpdyHeaderBlock* headers,
     bool fin,
     bool unidirectional,
     SpdyPriority spdy_priority,
     SpdyStreamId stream_id,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->Set("headers", SpdyHeaderBlockToListValue(*headers, capture_mode));
   dict->SetBoolean("fin", fin);
   dict->SetBoolean("unidirectional", unidirectional);
@@ -91,7 +91,7 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdyHeadersSentCallback(
+std::unique_ptr<base::Value> NetLogSpdyHeadersSentCallback(
     const SpdyHeaderBlock* headers,
     bool fin,
     SpdyStreamId stream_id,
@@ -100,7 +100,7 @@
     SpdyStreamId parent_stream_id,
     bool exclusive,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->Set("headers", SpdyHeaderBlockToListValue(*headers, capture_mode));
   dict->SetBoolean("fin", fin);
   dict->SetInteger("stream_id", stream_id);
@@ -113,7 +113,7 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdySynStreamReceivedCallback(
+std::unique_ptr<base::Value> NetLogSpdySynStreamReceivedCallback(
     const SpdyHeaderBlock* headers,
     bool fin,
     bool unidirectional,
@@ -121,7 +121,7 @@
     SpdyStreamId stream_id,
     SpdyStreamId associated_stream,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->Set("headers", SpdyHeaderBlockToListValue(*headers, capture_mode));
   dict->SetBoolean("fin", fin);
   dict->SetBoolean("unidirectional", unidirectional);
@@ -131,42 +131,42 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdySynReplyOrHeadersReceivedCallback(
+std::unique_ptr<base::Value> NetLogSpdySynReplyOrHeadersReceivedCallback(
     const SpdyHeaderBlock* headers,
     bool fin,
     SpdyStreamId stream_id,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->Set("headers", SpdyHeaderBlockToListValue(*headers, capture_mode));
   dict->SetBoolean("fin", fin);
   dict->SetInteger("stream_id", stream_id);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdySessionCloseCallback(
+std::unique_ptr<base::Value> NetLogSpdySessionCloseCallback(
     int net_error,
     const std::string* description,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("net_error", net_error);
   dict->SetString("description", *description);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdySessionCallback(
+std::unique_ptr<base::Value> NetLogSpdySessionCallback(
     const HostPortProxyPair* host_pair,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("host", host_pair->first.ToString());
   dict->SetString("proxy", host_pair->second.ToPacString());
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdyInitializedCallback(
+std::unique_ptr<base::Value> NetLogSpdyInitializedCallback(
     NetLog::Source source,
     const NextProto protocol_version,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   if (source.IsValid()) {
     source.AddToEventParameters(dict.get());
   }
@@ -175,23 +175,23 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdySettingsCallback(
+std::unique_ptr<base::Value> NetLogSpdySettingsCallback(
     const HostPortPair& host_port_pair,
     bool clear_persisted,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("host", host_port_pair.ToString());
   dict->SetBoolean("clear_persisted", clear_persisted);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdySettingCallback(
+std::unique_ptr<base::Value> NetLogSpdySettingCallback(
     SpdySettingsIds id,
     const SpdyMajorVersion protocol_version,
     SpdySettingsFlags flags,
     uint32_t value,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("id",
                    SpdyConstants::SerializeSettingId(protocol_version, id));
   dict->SetInteger("flags", flags);
@@ -199,12 +199,12 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdySendSettingsCallback(
+std::unique_ptr<base::Value> NetLogSpdySendSettingsCallback(
     const SettingsMap* settings,
     const SpdyMajorVersion protocol_version,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
-  scoped_ptr<base::ListValue> settings_list(new base::ListValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::ListValue> settings_list(new base::ListValue());
   for (SettingsMap::const_iterator it = settings->begin();
        it != settings->end(); ++it) {
     const SpdySettingsIds id = it->first;
@@ -220,70 +220,70 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdyWindowUpdateFrameCallback(
+std::unique_ptr<base::Value> NetLogSpdyWindowUpdateFrameCallback(
     SpdyStreamId stream_id,
     uint32_t delta,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", static_cast<int>(stream_id));
   dict->SetInteger("delta", delta);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdySessionWindowUpdateCallback(
+std::unique_ptr<base::Value> NetLogSpdySessionWindowUpdateCallback(
     int32_t delta,
     int32_t window_size,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("delta", delta);
   dict->SetInteger("window_size", window_size);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdyDataCallback(
+std::unique_ptr<base::Value> NetLogSpdyDataCallback(
     SpdyStreamId stream_id,
     int size,
     bool fin,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", static_cast<int>(stream_id));
   dict->SetInteger("size", size);
   dict->SetBoolean("fin", fin);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdyRstCallback(
+std::unique_ptr<base::Value> NetLogSpdyRstCallback(
     SpdyStreamId stream_id,
     int status,
     const std::string* description,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", static_cast<int>(stream_id));
   dict->SetInteger("status", status);
   dict->SetString("description", *description);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdyPingCallback(
+std::unique_ptr<base::Value> NetLogSpdyPingCallback(
     SpdyPingId unique_id,
     bool is_ack,
     const char* type,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("unique_id", static_cast<int>(unique_id));
   dict->SetString("type", type);
   dict->SetBoolean("is_ack", is_ack);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdyGoAwayCallback(
+std::unique_ptr<base::Value> NetLogSpdyGoAwayCallback(
     SpdyStreamId last_stream_id,
     int active_streams,
     int unclaimed_streams,
     SpdyGoAwayStatus status,
     StringPiece debug_data,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("last_accepted_stream_id",
                    static_cast<int>(last_stream_id));
   dict->SetInteger("active_streams", active_streams);
@@ -294,23 +294,23 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdyPushPromiseReceivedCallback(
+std::unique_ptr<base::Value> NetLogSpdyPushPromiseReceivedCallback(
     const SpdyHeaderBlock* headers,
     SpdyStreamId stream_id,
     SpdyStreamId promised_stream_id,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->Set("headers", SpdyHeaderBlockToListValue(*headers, capture_mode));
   dict->SetInteger("id", stream_id);
   dict->SetInteger("promised_stream_id", promised_stream_id);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdyAdoptedPushStreamCallback(
+std::unique_ptr<base::Value> NetLogSpdyAdoptedPushStreamCallback(
     SpdyStreamId stream_id,
     const GURL* url,
     NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", stream_id);
   dict->SetString("url", url->spec());
   return std::move(dict);
@@ -770,7 +770,7 @@
 }
 
 void SpdySession::InitializeWithSocket(
-    scoped_ptr<ClientSocketHandle> connection,
+    std::unique_ptr<ClientSocketHandle> connection,
     SpdySessionPool* pool,
     bool is_secure,
     int certificate_error_code) {
@@ -946,7 +946,7 @@
     return ERR_CONNECTION_CLOSED;
   }
 
-  scoped_ptr<SpdyStream> new_stream(
+  std::unique_ptr<SpdyStream> new_stream(
       new SpdyStream(request.type(), GetWeakPtr(), request.url(),
                      request.priority(), stream_initial_send_window_size_,
                      stream_max_recv_window_size_, request.net_log()));
@@ -1083,14 +1083,14 @@
 void SpdySession::EnqueueStreamWrite(
     const base::WeakPtr<SpdyStream>& stream,
     SpdyFrameType frame_type,
-    scoped_ptr<SpdyBufferProducer> producer) {
+    std::unique_ptr<SpdyBufferProducer> producer) {
   DCHECK(frame_type == HEADERS ||
          frame_type == DATA ||
          frame_type == SYN_STREAM);
   EnqueueWrite(stream->priority(), frame_type, std::move(producer), stream);
 }
 
-scoped_ptr<SpdySerializedFrame> SpdySession::CreateSynStream(
+std::unique_ptr<SpdySerializedFrame> SpdySession::CreateSynStream(
     SpdyStreamId stream_id,
     RequestPriority priority,
     SpdyControlFlags flags,
@@ -1105,7 +1105,7 @@
   SpdyPriority spdy_priority =
       ConvertRequestPriorityToSpdyPriority(priority, GetProtocolVersion());
 
-  scoped_ptr<SpdySerializedFrame> syn_frame;
+  std::unique_ptr<SpdySerializedFrame> syn_frame;
   // TODO(hkhalil): Avoid copy of |block|.
   if (GetProtocolVersion() <= SPDY3) {
     SpdySynStreamIR syn_stream(stream_id);
@@ -1158,12 +1158,13 @@
   return syn_frame;
 }
 
-scoped_ptr<SpdyBuffer> SpdySession::CreateDataBuffer(SpdyStreamId stream_id,
-                                                     IOBuffer* data,
-                                                     int len,
-                                                     SpdyDataFlags flags) {
+std::unique_ptr<SpdyBuffer> SpdySession::CreateDataBuffer(
+    SpdyStreamId stream_id,
+    IOBuffer* data,
+    int len,
+    SpdyDataFlags flags) {
   if (availability_state_ == STATE_DRAINING) {
-    return scoped_ptr<SpdyBuffer>();
+    return std::unique_ptr<SpdyBuffer>();
   }
 
   ActiveStreamMap::const_iterator it = active_streams_.find(stream_id);
@@ -1173,7 +1174,7 @@
 
   if (len < 0) {
     NOTREACHED();
-    return scoped_ptr<SpdyBuffer>();
+    return std::unique_ptr<SpdyBuffer>();
   }
 
   int effective_len = std::min(len, kMaxSpdyFrameChunkSize);
@@ -1213,7 +1214,7 @@
     net_log().AddEvent(
         NetLog::TYPE_HTTP2_SESSION_STREAM_STALLED_BY_STREAM_SEND_WINDOW,
         NetLog::IntCallback("stream_id", stream_id));
-    return scoped_ptr<SpdyBuffer>();
+    return std::unique_ptr<SpdyBuffer>();
   }
 
   effective_len = std::min(effective_len, stream->send_window_size());
@@ -1225,7 +1226,7 @@
     net_log().AddEvent(
         NetLog::TYPE_HTTP2_SESSION_STREAM_STALLED_BY_SESSION_SEND_WINDOW,
         NetLog::IntCallback("stream_id", stream_id));
-    return scoped_ptr<SpdyBuffer>();
+    return std::unique_ptr<SpdyBuffer>();
   }
 
   effective_len = std::min(effective_len, session_send_window_size_);
@@ -1249,10 +1250,12 @@
 
   // TODO(mbelshe): reduce memory copies here.
   DCHECK(buffered_spdy_framer_.get());
-  scoped_ptr<SpdySerializedFrame> frame(buffered_spdy_framer_->CreateDataFrame(
-      stream_id, data->data(), static_cast<uint32_t>(effective_len), flags));
+  std::unique_ptr<SpdySerializedFrame> frame(
+      buffered_spdy_framer_->CreateDataFrame(
+          stream_id, data->data(), static_cast<uint32_t>(effective_len),
+          flags));
 
-  scoped_ptr<SpdyBuffer> data_buffer(new SpdyBuffer(std::move(frame)));
+  std::unique_ptr<SpdyBuffer> data_buffer(new SpdyBuffer(std::move(frame)));
 
   // Send window size is based on payload size, so nothing to do if this is
   // just a FIN with no payload.
@@ -1321,7 +1324,7 @@
   // TODO(mbelshe): We should send a RST_STREAM control frame here
   //                so that the server can cancel a large send.
 
-  scoped_ptr<SpdyStream> owned_stream(it->second.stream);
+  std::unique_ptr<SpdyStream> owned_stream(it->second.stream);
   active_streams_.erase(it);
   if (priority_dependencies_enabled_)
     priority_dependency_state_.OnStreamDestruction(owned_stream->stream_id());
@@ -1352,7 +1355,7 @@
 
 void SpdySession::CloseCreatedStreamIterator(CreatedStreamSet::iterator it,
                                              int status) {
-  scoped_ptr<SpdyStream> owned_stream(*it);
+  std::unique_ptr<SpdyStream> owned_stream(*it);
   created_streams_.erase(it);
   DeleteStream(std::move(owned_stream), status);
 }
@@ -1382,7 +1385,7 @@
       base::Bind(&NetLogSpdyRstCallback, stream_id, status, &description));
 
   DCHECK(buffered_spdy_framer_.get());
-  scoped_ptr<SpdySerializedFrame> rst_frame(
+  std::unique_ptr<SpdySerializedFrame> rst_frame(
       buffered_spdy_framer_->CreateRstStream(stream_id, status));
 
   EnqueueSessionWrite(priority, RST_STREAM, std::move(rst_frame));
@@ -1573,7 +1576,7 @@
   } else {
     // Grab the next frame to send.
     SpdyFrameType frame_type = DATA;
-    scoped_ptr<SpdyBufferProducer> producer;
+    std::unique_ptr<SpdyBufferProducer> producer;
     base::WeakPtr<SpdyStream> stream;
     if (!write_queue_.Dequeue(&frame_type, &producer, &stream)) {
       write_state_ = WRITE_STATE_IDLE;
@@ -1588,7 +1591,7 @@
     if (frame_type == SYN_STREAM) {
       CHECK(stream.get());
       CHECK_EQ(stream->stream_id(), 0u);
-      scoped_ptr<SpdyStream> owned_stream =
+      std::unique_ptr<SpdyStream> owned_stream =
           ActivateCreatedStream(stream.get());
       InsertActivatedStream(std::move(owned_stream));
 
@@ -1781,9 +1784,10 @@
     SpdyGoAwayIR goaway_ir(last_accepted_push_stream_id_,
                            MapNetErrorToGoAwayStatus(err),
                            description);
-    EnqueueSessionWrite(HIGHEST, GOAWAY,
-                        scoped_ptr<SpdySerializedFrame>(new SpdySerializedFrame(
-                            buffered_spdy_framer_->SerializeFrame(goaway_ir))));
+    EnqueueSessionWrite(
+        HIGHEST, GOAWAY,
+        std::unique_ptr<SpdySerializedFrame>(new SpdySerializedFrame(
+            buffered_spdy_framer_->SerializeFrame(goaway_ir))));
   }
 
   availability_state_ = STATE_DRAINING;
@@ -1850,14 +1854,14 @@
   }
 }
 
-scoped_ptr<base::Value> SpdySession::GetInfoAsValue() const {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+std::unique_ptr<base::Value> SpdySession::GetInfoAsValue() const {
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetInteger("source_id", net_log_.source().id);
 
   dict->SetString("host_port_pair", host_port_pair().ToString());
   if (!pooled_aliases_.empty()) {
-    scoped_ptr<base::ListValue> alias_list(new base::ListValue());
+    std::unique_ptr<base::ListValue> alias_list(new base::ListValue());
     for (const auto& alias : pooled_aliases_) {
       alias_list->AppendString(alias.host_port_pair().ToString());
     }
@@ -1941,21 +1945,23 @@
   return rv;
 }
 
-void SpdySession::EnqueueSessionWrite(RequestPriority priority,
-                                      SpdyFrameType frame_type,
-                                      scoped_ptr<SpdySerializedFrame> frame) {
+void SpdySession::EnqueueSessionWrite(
+    RequestPriority priority,
+    SpdyFrameType frame_type,
+    std::unique_ptr<SpdySerializedFrame> frame) {
   DCHECK(frame_type == RST_STREAM || frame_type == SETTINGS ||
          frame_type == WINDOW_UPDATE || frame_type == PING ||
          frame_type == GOAWAY);
-  EnqueueWrite(priority, frame_type,
-               scoped_ptr<SpdyBufferProducer>(new SimpleBufferProducer(
-                   scoped_ptr<SpdyBuffer>(new SpdyBuffer(std::move(frame))))),
-               base::WeakPtr<SpdyStream>());
+  EnqueueWrite(
+      priority, frame_type,
+      std::unique_ptr<SpdyBufferProducer>(new SimpleBufferProducer(
+          std::unique_ptr<SpdyBuffer>(new SpdyBuffer(std::move(frame))))),
+      base::WeakPtr<SpdyStream>());
 }
 
 void SpdySession::EnqueueWrite(RequestPriority priority,
                                SpdyFrameType frame_type,
-                               scoped_ptr<SpdyBufferProducer> producer,
+                               std::unique_ptr<SpdyBufferProducer> producer,
                                const base::WeakPtr<SpdyStream>& stream) {
   if (availability_state_ == STATE_DRAINING)
     return;
@@ -1975,22 +1981,23 @@
   }
 }
 
-void SpdySession::InsertCreatedStream(scoped_ptr<SpdyStream> stream) {
+void SpdySession::InsertCreatedStream(std::unique_ptr<SpdyStream> stream) {
   CHECK_EQ(stream->stream_id(), 0u);
   CHECK(created_streams_.find(stream.get()) == created_streams_.end());
   created_streams_.insert(stream.release());
 }
 
-scoped_ptr<SpdyStream> SpdySession::ActivateCreatedStream(SpdyStream* stream) {
+std::unique_ptr<SpdyStream> SpdySession::ActivateCreatedStream(
+    SpdyStream* stream) {
   CHECK_EQ(stream->stream_id(), 0u);
   CHECK(created_streams_.find(stream) != created_streams_.end());
   stream->set_stream_id(GetNewStreamId());
-  scoped_ptr<SpdyStream> owned_stream(stream);
+  std::unique_ptr<SpdyStream> owned_stream(stream);
   created_streams_.erase(stream);
   return owned_stream;
 }
 
-void SpdySession::InsertActivatedStream(scoped_ptr<SpdyStream> stream) {
+void SpdySession::InsertActivatedStream(std::unique_ptr<SpdyStream> stream) {
   SpdyStreamId stream_id = stream->stream_id();
   CHECK_NE(stream_id, 0u);
   std::pair<ActiveStreamMap::iterator, bool> result =
@@ -2000,7 +2007,7 @@
   ignore_result(stream.release());
 }
 
-void SpdySession::DeleteStream(scoped_ptr<SpdyStream> stream, int status) {
+void SpdySession::DeleteStream(std::unique_ptr<SpdyStream> stream, int status) {
   if (in_flight_write_stream_.get() == stream.get()) {
     // If we're deleting the stream for the in-flight write, we still
     // need to let the write complete, so we clear
@@ -2120,7 +2127,7 @@
   // |unacked_recv_window_bytes_| properly even when the stream is
   // inactive (since the other side has still reduced its session send
   // window).
-  scoped_ptr<SpdyBuffer> buffer;
+  std::unique_ptr<SpdyBuffer> buffer;
   if (data) {
     DCHECK_GT(len, 0u);
     CHECK_LE(len, static_cast<size_t>(kReadBufferSize));
@@ -2198,7 +2205,7 @@
     settings_ir.set_is_ack(true);
     EnqueueSessionWrite(
         HIGHEST, SETTINGS,
-        scoped_ptr<SpdySerializedFrame>(new SpdySerializedFrame(
+        std::unique_ptr<SpdySerializedFrame>(new SpdySerializedFrame(
             buffered_spdy_framer_->SerializeFrame(settings_ir))));
   }
 }
@@ -2492,7 +2499,7 @@
   CHECK_EQ(it->second.stream->stream_id(), stream_id);
 
   if (status == 0) {
-    it->second.stream->OnDataReceived(scoped_ptr<SpdyBuffer>());
+    it->second.stream->OnDataReceived(std::unique_ptr<SpdyBuffer>());
   } else if (status == RST_STREAM_REFUSED_STREAM) {
     CloseActiveStreamIterator(it, ERR_SPDY_SERVER_REFUSED_STREAM);
   } else if (status == RST_STREAM_HTTP_1_1_REQUIRED) {
@@ -2767,7 +2774,7 @@
     return false;
   }
 
-  scoped_ptr<SpdyStream> stream(
+  std::unique_ptr<SpdyStream> stream(
       new SpdyStream(SPDY_PUSH_STREAM, GetWeakPtr(), gurl, request_priority,
                      stream_initial_send_window_size_,
                      stream_max_recv_window_size_, net_log_));
@@ -2834,7 +2841,7 @@
 
   if (send_connection_header_prefix_) {
     DCHECK_EQ(protocol_, kProtoHTTP2);
-    scoped_ptr<SpdySerializedFrame> connection_header_prefix_frame(
+    std::unique_ptr<SpdySerializedFrame> connection_header_prefix_frame(
         new SpdySerializedFrame(const_cast<char*>(kHttp2ConnectionHeaderPrefix),
                                 kHttp2ConnectionHeaderPrefixSize,
                                 false /* take_ownership */));
@@ -2902,7 +2909,7 @@
       base::Bind(&NetLogSpdySendSettingsCallback, &settings, protocol_version));
   // Create the SETTINGS frame and send it.
   DCHECK(buffered_spdy_framer_.get());
-  scoped_ptr<SpdySerializedFrame> settings_frame(
+  std::unique_ptr<SpdySerializedFrame> settings_frame(
       buffered_spdy_framer_->CreateSettings(settings));
   sent_settings_ = true;
   EnqueueSessionWrite(HIGHEST, SETTINGS, std::move(settings_frame));
@@ -2977,14 +2984,14 @@
                                delta_window_size));
 
   DCHECK(buffered_spdy_framer_.get());
-  scoped_ptr<SpdySerializedFrame> window_update_frame(
+  std::unique_ptr<SpdySerializedFrame> window_update_frame(
       buffered_spdy_framer_->CreateWindowUpdate(stream_id, delta_window_size));
   EnqueueSessionWrite(priority, WINDOW_UPDATE, std::move(window_update_frame));
 }
 
 void SpdySession::WritePingFrame(SpdyPingId unique_id, bool is_ack) {
   DCHECK(buffered_spdy_framer_.get());
-  scoped_ptr<SpdySerializedFrame> ping_frame(
+  std::unique_ptr<SpdySerializedFrame> ping_frame(
       buffered_spdy_framer_->CreatePingFrame(unique_id, is_ack));
   EnqueueSessionWrite(HIGHEST, PING, std::move(ping_frame));
 
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index d99ae0b..738f526 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -10,6 +10,7 @@
 
 #include <deque>
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
@@ -17,7 +18,6 @@
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "net/base/host_port_pair.h"
@@ -338,7 +338,7 @@
   // The session begins reading from |connection| on a subsequent event loop
   // iteration, so the SpdySession may close immediately afterwards if the first
   // read of |connection| fails.
-  void InitializeWithSocket(scoped_ptr<ClientSocketHandle> connection,
+  void InitializeWithSocket(std::unique_ptr<ClientSocketHandle> connection,
                             SpdySessionPool* pool,
                             bool is_secure,
                             int certificate_error_code);
@@ -364,10 +364,10 @@
   // producer is used to produce its frame.
   void EnqueueStreamWrite(const base::WeakPtr<SpdyStream>& stream,
                           SpdyFrameType frame_type,
-                          scoped_ptr<SpdyBufferProducer> producer);
+                          std::unique_ptr<SpdyBufferProducer> producer);
 
   // Creates and returns a SYN frame for |stream_id|.
-  scoped_ptr<SpdySerializedFrame> CreateSynStream(
+  std::unique_ptr<SpdySerializedFrame> CreateSynStream(
       SpdyStreamId stream_id,
       RequestPriority priority,
       SpdyControlFlags flags,
@@ -375,10 +375,10 @@
 
   // Creates and returns a SpdyBuffer holding a data frame with the
   // given data. May return NULL if stalled by flow control.
-  scoped_ptr<SpdyBuffer> CreateDataBuffer(SpdyStreamId stream_id,
-                                          IOBuffer* data,
-                                          int len,
-                                          SpdyDataFlags flags);
+  std::unique_ptr<SpdyBuffer> CreateDataBuffer(SpdyStreamId stream_id,
+                                               IOBuffer* data,
+                                               int len,
+                                               SpdyDataFlags flags);
 
   // Close the stream with the given ID, which must exist and be
   // active. Note that that stream may hold the last reference to the
@@ -454,7 +454,7 @@
 
   // Retrieves information on the current state of the SPDY session as a
   // Value.
-  scoped_ptr<base::Value> GetInfoAsValue() const;
+  std::unique_ptr<base::Value> GetInfoAsValue() const;
 
   // Indicates whether the session is being reused after having successfully
   // used to send/receive data in the past or if the underlying socket was idle
@@ -790,29 +790,29 @@
   // queue for the session.
   void EnqueueSessionWrite(RequestPriority priority,
                            SpdyFrameType frame_type,
-                           scoped_ptr<SpdySerializedFrame> frame);
+                           std::unique_ptr<SpdySerializedFrame> frame);
 
   // Puts |producer| associated with |stream| onto the write queue
   // with the given priority.
   void EnqueueWrite(RequestPriority priority,
                     SpdyFrameType frame_type,
-                    scoped_ptr<SpdyBufferProducer> producer,
+                    std::unique_ptr<SpdyBufferProducer> producer,
                     const base::WeakPtr<SpdyStream>& stream);
 
   // Inserts a newly-created stream into |created_streams_|.
-  void InsertCreatedStream(scoped_ptr<SpdyStream> stream);
+  void InsertCreatedStream(std::unique_ptr<SpdyStream> stream);
 
   // Activates |stream| (which must be in |created_streams_|) by
   // assigning it an ID and returns it.
-  scoped_ptr<SpdyStream> ActivateCreatedStream(SpdyStream* stream);
+  std::unique_ptr<SpdyStream> ActivateCreatedStream(SpdyStream* stream);
 
   // Inserts a newly-activated stream into |active_streams_|.
-  void InsertActivatedStream(scoped_ptr<SpdyStream> stream);
+  void InsertActivatedStream(std::unique_ptr<SpdyStream> stream);
 
   // Remove all internal references to |stream|, call OnClose() on it,
   // and process any pending stream requests before deleting it.  Note
   // that |stream| may hold the last reference to the session.
-  void DeleteStream(scoped_ptr<SpdyStream> stream, int status);
+  void DeleteStream(std::unique_ptr<SpdyStream> stream, int status);
 
   // Check if we have a pending pushed-stream for this url
   // Returns the stream if found (and returns it from the pending
@@ -1022,7 +1022,7 @@
   TransportSecurityState* transport_security_state_;
 
   // The socket handle for this session.
-  scoped_ptr<ClientSocketHandle> connection_;
+  std::unique_ptr<ClientSocketHandle> connection_;
 
   // The read buffer used to read data from the socket.
   scoped_refptr<IOBuffer> read_buffer_;
@@ -1072,7 +1072,7 @@
   // Data for the frame we are currently sending.
 
   // The buffer we're currently writing.
-  scoped_ptr<SpdyBuffer> in_flight_write_;
+  std::unique_ptr<SpdyBuffer> in_flight_write_;
   // The type of the frame in |in_flight_write_|.
   SpdyFrameType in_flight_write_frame_type_;
   // The size of the frame in |in_flight_write_|.
@@ -1088,7 +1088,7 @@
   int certificate_error_code_;
 
   // Spdy Frame state.
-  scoped_ptr<BufferedSpdyFramer> buffered_spdy_framer_;
+  std::unique_ptr<BufferedSpdyFramer> buffered_spdy_framer_;
 
   // The state variables.
   AvailabilityState availability_state_;
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index 1875224e..31565a9 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -85,7 +85,7 @@
 
 base::WeakPtr<SpdySession> SpdySessionPool::CreateAvailableSessionFromSocket(
     const SpdySessionKey& key,
-    scoped_ptr<ClientSocketHandle> connection,
+    std::unique_ptr<ClientSocketHandle> connection,
     const BoundNetLog& net_log,
     int certificate_error_code,
     bool is_secure) {
@@ -96,7 +96,7 @@
   UMA_HISTOGRAM_ENUMERATION(
       "Net.SpdySessionGet", IMPORTED_FROM_SOCKET, SPDY_SESSION_GET_MAX);
 
-  scoped_ptr<SpdySession> new_session(new SpdySession(
+  std::unique_ptr<SpdySession> new_session(new SpdySession(
       key, http_server_properties_, transport_security_state_,
       verify_domain_authentication_, enable_sending_initial_data_,
       enable_ping_based_connection_checking_, enable_priority_dependencies_,
@@ -254,7 +254,7 @@
 
   SessionSet::iterator it = sessions_.find(unavailable_session.get());
   CHECK(it != sessions_.end());
-  scoped_ptr<SpdySession> owned_session(*it);
+  std::unique_ptr<SpdySession> owned_session(*it);
   sessions_.erase(it);
 }
 
@@ -326,8 +326,9 @@
   DCHECK_EQ(1u, removed);
 }
 
-scoped_ptr<base::Value> SpdySessionPool::SpdySessionPoolInfoToValue() const {
-  scoped_ptr<base::ListValue> list(new base::ListValue());
+std::unique_ptr<base::Value> SpdySessionPool::SpdySessionPoolInfoToValue()
+    const {
+  std::unique_ptr<base::ListValue> list(new base::ListValue());
 
   for (AvailableSessionMap::const_iterator it = available_sessions_.begin();
        it != available_sessions_.end(); ++it) {
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h
index eeae314..13664dc 100644
--- a/net/spdy/spdy_session_pool.h
+++ b/net/spdy/spdy_session_pool.h
@@ -86,7 +86,7 @@
   // immediately afterwards if the first read of |connection| fails.
   base::WeakPtr<SpdySession> CreateAvailableSessionFromSocket(
       const SpdySessionKey& key,
-      scoped_ptr<ClientSocketHandle> connection,
+      std::unique_ptr<ClientSocketHandle> connection,
       const BoundNetLog& net_log,
       int certificate_error_code,
       bool is_secure);
@@ -131,7 +131,7 @@
                                        SpdySession* spdy_session);
 
   // Creates a Value summary of the state of the spdy session pool.
-  scoped_ptr<base::Value> SpdySessionPoolInfoToValue() const;
+  std::unique_ptr<base::Value> SpdySessionPoolInfoToValue() const;
 
   base::WeakPtr<HttpServerProperties> http_server_properties() {
     return http_server_properties_;
diff --git a/net/spdy/spdy_session_pool_unittest.cc b/net/spdy/spdy_session_pool_unittest.cc
index 4d34869f..1f339737 100644
--- a/net/spdy/spdy_session_pool_unittest.cc
+++ b/net/spdy/spdy_session_pool_unittest.cc
@@ -5,11 +5,11 @@
 #include "net/spdy/spdy_session_pool.h"
 
 #include <cstddef>
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/dns/host_cache.h"
 #include "net/http/http_network_session.h"
 #include "net/socket/client_socket_handle.h"
@@ -43,7 +43,7 @@
   void RunIPPoolingTest(SpdyPoolCloseSessionsType close_sessions_type);
 
   SpdySessionDependencies session_deps_;
-  scoped_ptr<HttpNetworkSession> http_session_;
+  std::unique_ptr<HttpNetworkSession> http_session_;
   SpdySessionPool* spdy_session_pool_;
 };
 
@@ -69,7 +69,7 @@
     return RESPONSE_HEADERS_ARE_COMPLETE;
   }
 
-  void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override {}
+  void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override {}
 
   void OnDataSent() override {}
 
@@ -526,7 +526,7 @@
   MockRead reads[] = {
       MockRead(SYNCHRONOUS, ERR_IO_PENDING)  // Stall forever.
   };
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util.ConstructSpdyGet("http://www.a.com", 1, MEDIUM));
   MockWrite writes[] = {CreateMockWrite(*req, 1)};
 
@@ -554,7 +554,7 @@
   test::StreamDelegateDoNothing delegateA(spdy_streamA);
   spdy_streamA->SetDelegate(&delegateA);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util.ConstructGetHeaderBlock(urlA.spec()));
   spdy_streamA->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_streamA->HasUrlFromHeaders());
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index 0cd890f..12ea9d74 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -4,12 +4,12 @@
 
 #include "net/spdy/spdy_session.h"
 
+#include <memory>
 #include <utility>
 
 #include "base/base64.h"
 #include "base/bind.h"
 #include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/test/histogram_tester.h"
 #include "net/base/host_port_pair.h"
@@ -206,7 +206,7 @@
 
   SpdyTestUtil spdy_util_;
   SpdySessionDependencies session_deps_;
-  scoped_ptr<HttpNetworkSession> http_session_;
+  std::unique_ptr<HttpNetworkSession> http_session_;
   base::WeakPtr<SpdySession> session_;
   SpdySessionPool* spdy_session_pool_;
   GURL test_url_;
@@ -244,7 +244,7 @@
 
   ~StreamRequestDestroyingCallback() override {}
 
-  void SetRequestToDestroy(scoped_ptr<SpdyStreamRequest> request) {
+  void SetRequestToDestroy(std::unique_ptr<SpdyStreamRequest> request) {
     request_ = std::move(request);
   }
 
@@ -259,7 +259,7 @@
     SetResult(result);
   }
 
-  scoped_ptr<SpdyStreamRequest> request_;
+  std::unique_ptr<SpdyStreamRequest> request_;
 };
 
 }  // namespace
@@ -287,7 +287,7 @@
   }
 
   SpdyStreamRequest request1;
-  scoped_ptr<SpdyStreamRequest> request2(new SpdyStreamRequest);
+  std::unique_ptr<SpdyStreamRequest> request2(new SpdyStreamRequest);
 
   StreamRequestDestroyingCallback callback1;
   ASSERT_EQ(
@@ -312,7 +312,8 @@
 TEST_P(SpdySessionTest, GoAwayWithNoActiveStreams) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(1));
+  std::unique_ptr<SpdySerializedFrame> goaway(
+      spdy_util_.ConstructSpdyGoAway(1));
   MockRead reads[] = {
     CreateMockRead(*goaway, 0),
   };
@@ -337,7 +338,8 @@
 TEST_P(SpdySessionTest, GoAwayImmediatelyWithNoActiveStreams) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(1));
+  std::unique_ptr<SpdySerializedFrame> goaway(
+      spdy_util_.ConstructSpdyGoAway(1));
   MockRead reads[] = {
       CreateMockRead(*goaway, 0, SYNCHRONOUS), MockRead(ASYNC, 0, 1)  // EOF
   };
@@ -360,16 +362,17 @@
 TEST_P(SpdySessionTest, GoAwayWithActiveStreams) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(1));
+  std::unique_ptr<SpdySerializedFrame> goaway(
+      spdy_util_.ConstructSpdyGoAway(1));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 2),
       CreateMockRead(*goaway, 3),
       MockRead(ASYNC, ERR_IO_PENDING, 4),
       MockRead(ASYNC, 0, 5)  // EOF
   };
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
@@ -393,9 +396,9 @@
   test::StreamDelegateDoNothing delegate2(spdy_stream2);
   spdy_stream2->SetDelegate(&delegate2);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
-  scoped_ptr<SpdyHeaderBlock> headers2(new SpdyHeaderBlock(*headers));
+  std::unique_ptr<SpdyHeaderBlock> headers2(new SpdyHeaderBlock(*headers));
 
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -435,13 +438,14 @@
 TEST_P(SpdySessionTest, GoAwayWithActiveAndCreatedStream) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(0));
+  std::unique_ptr<SpdySerializedFrame> goaway(
+      spdy_util_.ConstructSpdyGoAway(0));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 1), CreateMockRead(*goaway, 2),
   };
 
   // No |req2|, because the second stream will never get activated.
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   MockWrite writes[] = {
       CreateMockWrite(*req1, 0),
@@ -458,7 +462,7 @@
       SPDY_REQUEST_RESPONSE_STREAM, session_, test_url_, MEDIUM, BoundNetLog());
   test::StreamDelegateDoNothing delegate1(spdy_stream1);
   spdy_stream1->SetDelegate(&delegate1);
-  scoped_ptr<SpdyHeaderBlock> headers1(
+  std::unique_ptr<SpdyHeaderBlock> headers1(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers1), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -493,8 +497,10 @@
 TEST_P(SpdySessionTest, GoAwayTwice) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> goaway1(spdy_util_.ConstructSpdyGoAway(1));
-  scoped_ptr<SpdySerializedFrame> goaway2(spdy_util_.ConstructSpdyGoAway(0));
+  std::unique_ptr<SpdySerializedFrame> goaway1(
+      spdy_util_.ConstructSpdyGoAway(1));
+  std::unique_ptr<SpdySerializedFrame> goaway2(
+      spdy_util_.ConstructSpdyGoAway(0));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 2),
       CreateMockRead(*goaway1, 3),
@@ -503,9 +509,9 @@
       MockRead(ASYNC, ERR_IO_PENDING, 6),
       MockRead(ASYNC, 0, 7)  // EOF
   };
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
@@ -529,9 +535,9 @@
   test::StreamDelegateDoNothing delegate2(spdy_stream2);
   spdy_stream2->SetDelegate(&delegate2);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
-  scoped_ptr<SpdyHeaderBlock> headers2(new SpdyHeaderBlock(*headers));
+  std::unique_ptr<SpdyHeaderBlock> headers2(new SpdyHeaderBlock(*headers));
 
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -569,16 +575,17 @@
 TEST_P(SpdySessionTest, GoAwayWithActiveStreamsThenClose) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(1));
+  std::unique_ptr<SpdySerializedFrame> goaway(
+      spdy_util_.ConstructSpdyGoAway(1));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 2),
       CreateMockRead(*goaway, 3),
       MockRead(ASYNC, ERR_IO_PENDING, 4),
       MockRead(ASYNC, 0, 5)  // EOF
   };
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
@@ -602,9 +609,9 @@
   test::StreamDelegateDoNothing delegate2(spdy_stream2);
   spdy_stream2->SetDelegate(&delegate2);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
-  scoped_ptr<SpdyHeaderBlock> headers2(new SpdyHeaderBlock(*headers));
+  std::unique_ptr<SpdyHeaderBlock> headers2(new SpdyHeaderBlock(*headers));
 
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -643,21 +650,22 @@
 TEST_P(SpdySessionTest, GoAwayWhileDraining) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> goaway(
+      spdy_util_.ConstructSpdyGoAway(1));
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   size_t joint_size = goaway->size() * 2 + body->size();
 
   // Compose interleaved |goaway| and |body| frames into a single read.
-  scoped_ptr<char[]> buffer(new char[joint_size]);
+  std::unique_ptr<char[]> buffer(new char[joint_size]);
   {
     size_t out = 0;
     memcpy(&buffer[out], goaway->data(), goaway->size());
@@ -686,7 +694,7 @@
   test::StreamDelegateDoNothing delegate(spdy_stream);
   spdy_stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream->HasUrlFromHeaders());
@@ -705,14 +713,15 @@
 TEST_P(SpdySessionTest, CreateStreamAfterGoAway) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(1));
+  std::unique_ptr<SpdySerializedFrame> goaway(
+      spdy_util_.ConstructSpdyGoAway(1));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 1),
       CreateMockRead(*goaway, 2),
       MockRead(ASYNC, ERR_IO_PENDING, 3),
       MockRead(ASYNC, 0, 4)  // EOF
   };
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req, 0),
@@ -730,7 +739,7 @@
   test::StreamDelegateDoNothing delegate(spdy_stream);
   spdy_stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream->HasUrlFromHeaders());
@@ -765,8 +774,9 @@
 TEST_P(SpdySessionTest, SynStreamAfterGoAway) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(1));
-  scoped_ptr<SpdySerializedFrame> push(
+  std::unique_ptr<SpdySerializedFrame> goaway(
+      spdy_util_.ConstructSpdyGoAway(1));
+  std::unique_ptr<SpdySerializedFrame> push(
       spdy_util_.ConstructSpdyPush(nullptr, 0, 2, 1, kDefaultURL));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 1),
@@ -775,9 +785,9 @@
       CreateMockRead(*push, 4),
       MockRead(ASYNC, 0, 6)  // EOF
   };
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_REFUSED_STREAM));
   MockWrite writes[] = {CreateMockWrite(*req, 0), CreateMockWrite(*rst, 5)};
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
@@ -793,7 +803,7 @@
   test::StreamDelegateDoNothing delegate(spdy_stream);
   spdy_stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream->HasUrlFromHeaders());
@@ -826,7 +836,7 @@
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 1), MockRead(ASYNC, 0, 2)  // EOF
   };
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
@@ -844,7 +854,7 @@
   test::StreamDelegateDoNothing delegate(spdy_stream);
   spdy_stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
 
   spdy_stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
@@ -885,14 +895,14 @@
   session_deps_.enable_ping = true;
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> read_ping(
+  std::unique_ptr<SpdySerializedFrame> read_ping(
       spdy_util_.ConstructSpdyPing(1, true));
   MockRead reads[] = {
       CreateMockRead(*read_ping, 1),
       MockRead(ASYNC, ERR_IO_PENDING, 2),
       MockRead(ASYNC, 0, 3)  // EOF
   };
-  scoped_ptr<SpdySerializedFrame> write_ping(
+  std::unique_ptr<SpdySerializedFrame> write_ping(
       spdy_util_.ConstructSpdyPing(1, false));
   MockWrite writes[] = {
     CreateMockWrite(*write_ping, 0),
@@ -938,13 +948,13 @@
 TEST_P(SpdySessionTest, ServerPing) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> read_ping(
+  std::unique_ptr<SpdySerializedFrame> read_ping(
       spdy_util_.ConstructSpdyPing(2, false));
   MockRead reads[] = {
     CreateMockRead(*read_ping),
     MockRead(SYNCHRONOUS, 0, 0)  // EOF
   };
-  scoped_ptr<SpdySerializedFrame> write_ping(
+  std::unique_ptr<SpdySerializedFrame> write_ping(
       spdy_util_.ConstructSpdyPing(2, true));
   MockWrite writes[] = {
     CreateMockWrite(*write_ping),
@@ -979,9 +989,9 @@
   session_deps_.enable_ping = true;
   session_deps_.time_func = TheNearFuture;
 
-  scoped_ptr<SpdySerializedFrame> write_ping(
+  std::unique_ptr<SpdySerializedFrame> write_ping(
       spdy_util_.ConstructSpdyPing(1, false));
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
     CreateMockWrite(*req, 0),
@@ -1005,7 +1015,7 @@
   test::StreamDelegateDoNothing delegate(spdy_stream);
   spdy_stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
 
@@ -1031,23 +1041,23 @@
   // stalled streams are aborted. Also verify the activated streams complete,
   // at which point the session closes.
 
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, kLastStreamId - 2, MEDIUM, true));
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, kLastStreamId, MEDIUM, true));
 
   MockWrite writes[] = {
       CreateMockWrite(*req1, 0), CreateMockWrite(*req2, 1),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, kLastStreamId - 2));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, kLastStreamId));
 
-  scoped_ptr<SpdySerializedFrame> body1(
+  std::unique_ptr<SpdySerializedFrame> body1(
       spdy_util_.ConstructSpdyBodyFrame(kLastStreamId - 2, true));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(kLastStreamId, true));
 
   MockRead reads[] = {
@@ -1100,7 +1110,7 @@
 
   // Activate stream 1. One ID remains available.
   stream1->SendRequestHeaders(
-      scoped_ptr<SpdyHeaderBlock>(
+      std::unique_ptr<SpdyHeaderBlock>(
           spdy_util_.ConstructGetHeaderBlock(kDefaultURL)),
       NO_MORE_DATA_TO_SEND);
   base::RunLoop().RunUntilIdle();
@@ -1112,7 +1122,7 @@
 
   // Activate stream 2. ID space is exhausted.
   stream2->SendRequestHeaders(
-      scoped_ptr<SpdyHeaderBlock>(
+      std::unique_ptr<SpdyHeaderBlock>(
           spdy_util_.ConstructGetHeaderBlock(kDefaultURL)),
       NO_MORE_DATA_TO_SEND);
   base::RunLoop().RunUntilIdle();
@@ -1151,13 +1161,13 @@
   SettingsMap settings_zero;
   settings_zero[SETTINGS_MAX_CONCURRENT_STREAMS] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, 0);
-  scoped_ptr<SpdySerializedFrame> settings_frame_zero(
+  std::unique_ptr<SpdySerializedFrame> settings_frame_zero(
       spdy_util_.ConstructSpdySettings(settings_zero));
   reads.push_back(CreateMockRead(*settings_frame_zero, seq++));
 
   // Acknowledge it.
   std::vector<MockWrite> writes;
-  scoped_ptr<SpdySerializedFrame> settings_ack0;
+  std::unique_ptr<SpdySerializedFrame> settings_ack0;
   if (GetProtocol() == kProtoHTTP2) {
     settings_ack0.reset(spdy_util_.ConstructSpdySettingsAck());
     writes.push_back(CreateMockWrite(*settings_ack0, seq++));
@@ -1170,27 +1180,27 @@
   SettingsMap settings_one;
   settings_one[SETTINGS_MAX_CONCURRENT_STREAMS] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, 1);
-  scoped_ptr<SpdySerializedFrame> settings_frame_one(
+  std::unique_ptr<SpdySerializedFrame> settings_frame_one(
       spdy_util_.ConstructSpdySettings(settings_one));
   reads.push_back(CreateMockRead(*settings_frame_one, seq++));
 
   // Acknowledge it.
-  scoped_ptr<SpdySerializedFrame> settings_ack1;
+  std::unique_ptr<SpdySerializedFrame> settings_ack1;
   if (GetProtocol() == kProtoHTTP2) {
     settings_ack1.reset(spdy_util_.ConstructSpdySettingsAck());
     writes.push_back(CreateMockWrite(*settings_ack1, seq++));
   }
 
   // Request and response.
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   writes.push_back(CreateMockWrite(*req, seq++));
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
   reads.push_back(CreateMockRead(*resp, seq++));
 
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   reads.push_back(CreateMockRead(*body, seq++));
 
@@ -1235,7 +1245,7 @@
   base::WeakPtr<SpdyStream> stream = request.ReleaseStream();
   test::StreamDelegateDoNothing delegate(stream);
   stream->SetDelegate(&delegate);
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(stream->HasUrlFromHeaders());
@@ -1313,19 +1323,19 @@
   session_deps_.host_resolver->set_synchronous_mode(true);
   session_deps_.time_func = TheNearFuture;
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_REFUSED_STREAM));
   MockWrite writes[] = {CreateMockWrite(*req, 0), CreateMockWrite(*rst, 5)};
 
-  scoped_ptr<SpdySerializedFrame> push_a(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> push_a(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 2, 1, "http://www.example.org/a.dat"));
-  scoped_ptr<SpdySerializedFrame> push_a_body(
+  std::unique_ptr<SpdySerializedFrame> push_a_body(
       spdy_util_.ConstructSpdyBodyFrame(2, false));
   // In ascii "0" < "a". We use it to verify that we properly handle std::map
   // iterators inside. See http://crbug.com/443490
-  scoped_ptr<SpdySerializedFrame> push_b(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> push_b(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 4, 1, "http://www.example.org/0.dat"));
   MockRead reads[] = {
       CreateMockRead(*push_a, 1),
@@ -1348,7 +1358,7 @@
   test::StreamDelegateDoNothing delegate(spdy_stream);
   spdy_stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
 
@@ -1394,9 +1404,9 @@
   MockRead reads[] = {
       MockRead(SYNCHRONOUS, ERR_IO_PENDING)  // Stall forever.
   };
-  scoped_ptr<SpdySerializedFrame> write_ping(
+  std::unique_ptr<SpdySerializedFrame> write_ping(
       spdy_util_.ConstructSpdyPing(1, false));
-  scoped_ptr<SpdySerializedFrame> goaway(
+  std::unique_ptr<SpdySerializedFrame> goaway(
       spdy_util_.ConstructSpdyGoAway(0, GOAWAY_PROTOCOL_ERROR, "Failed ping."));
   MockWrite writes[] = {CreateMockWrite(*write_ping), CreateMockWrite(*goaway)};
 
@@ -1452,7 +1462,7 @@
 
   int seq = 0;
   std::vector<MockWrite> writes;
-  scoped_ptr<SpdySerializedFrame> settings_ack(
+  std::unique_ptr<SpdySerializedFrame> settings_ack(
       spdy_util_.ConstructSpdySettingsAck());
   if (GetProtocol() == kProtoHTTP2) {
     writes.push_back(CreateMockWrite(*settings_ack, ++seq));
@@ -1462,7 +1472,7 @@
   const uint32_t max_concurrent_streams = kInitialMaxConcurrentStreams + 1;
   new_settings[kSpdySettingsIds] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, max_concurrent_streams);
-  scoped_ptr<SpdySerializedFrame> settings_frame(
+  std::unique_ptr<SpdySerializedFrame> settings_frame(
       spdy_util_.ConstructSpdySettings(new_settings));
   MockRead reads[] = {
       CreateMockRead(*settings_frame, 0),
@@ -1519,7 +1529,7 @@
   const uint32_t max_concurrent_streams = kInitialMaxConcurrentStreams + 1;
   new_settings[SETTINGS_MAX_CONCURRENT_STREAMS] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, max_concurrent_streams);
-  scoped_ptr<SpdySerializedFrame> settings_frame(
+  std::unique_ptr<SpdySerializedFrame> settings_frame(
       spdy_util_.ConstructSpdySettings(new_settings));
   uint8_t flags = SETTINGS_FLAG_CLEAR_PREVIOUSLY_PERSISTED_SETTINGS;
   test::SetFrameFlags(settings_frame.get(), flags, spdy_util_.spdy_version());
@@ -1620,7 +1630,7 @@
 
   // Use scoped_ptr to let us invalidate the memory when we want to, to trigger
   // a valgrind error if the callback is invoked when it's not supposed to be.
-  scoped_ptr<TestCompletionCallback> callback(new TestCompletionCallback);
+  std::unique_ptr<TestCompletionCallback> callback(new TestCompletionCallback);
 
   SpdyStreamRequest request;
   ASSERT_EQ(ERR_IO_PENDING,
@@ -1648,7 +1658,7 @@
   SettingsMap settings;
   settings[SETTINGS_MAX_CONCURRENT_STREAMS] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, kMaxConcurrentPushedStreams);
-  scoped_ptr<SpdySerializedFrame> settings_frame(
+  std::unique_ptr<SpdySerializedFrame> settings_frame(
       spdy_util_.ConstructSpdySettings(settings));
   std::vector<MockWrite> writes;
   if (GetProtocol() == kProtoHTTP2) {
@@ -1664,7 +1674,7 @@
   server_settings[SETTINGS_MAX_CONCURRENT_STREAMS] =
       SettingsFlagsAndValue(SETTINGS_FLAG_PERSISTED,
                             initial_max_concurrent_streams);
-  scoped_ptr<SpdySerializedFrame> server_settings_frame(
+  std::unique_ptr<SpdySerializedFrame> server_settings_frame(
       spdy_util_.ConstructSpdySettings(server_settings));
   if (GetProtocol() == kProtoSPDY31) {
     writes.push_back(CreateMockWrite(*server_settings_frame));
@@ -1746,7 +1756,7 @@
 TEST_P(SpdySessionTest, NetLogOnSessionGoaway) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> goaway(
+  std::unique_ptr<SpdySerializedFrame> goaway(
       spdy_util_.ConstructSpdyGoAway(42, GOAWAY_ENHANCE_YOUR_CALM, "foo"));
   MockRead reads[] = {
     CreateMockRead(*goaway),
@@ -1842,7 +1852,7 @@
 }
 
 TEST_P(SpdySessionTest, SynCompressionHistograms) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req, 0),
@@ -1861,7 +1871,7 @@
   test::StreamDelegateDoNothing delegate(spdy_stream);
   spdy_stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream->HasUrlFromHeaders());
@@ -1896,22 +1906,22 @@
 // first.
 TEST_P(SpdySessionTest, OutOfOrderSynStreams) {
   // Construct the request.
-  scoped_ptr<SpdySerializedFrame> req_highest(
+  std::unique_ptr<SpdySerializedFrame> req_highest(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, HIGHEST, true));
-  scoped_ptr<SpdySerializedFrame> req_lowest(
+  std::unique_ptr<SpdySerializedFrame> req_lowest(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
   MockWrite writes[] = {
     CreateMockWrite(*req_highest, 0),
     CreateMockWrite(*req_lowest, 1),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp_highest(
+  std::unique_ptr<SpdySerializedFrame> resp_highest(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body_highest(
+  std::unique_ptr<SpdySerializedFrame> body_highest(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> resp_lowest(
+  std::unique_ptr<SpdySerializedFrame> resp_lowest(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body_lowest(
+  std::unique_ptr<SpdySerializedFrame> body_lowest(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
   MockRead reads[] = {
     CreateMockRead(*resp_highest, 2),
@@ -1946,13 +1956,13 @@
 
   // Queue the lower priority one first.
 
-  scoped_ptr<SpdyHeaderBlock> headers_lowest(
+  std::unique_ptr<SpdyHeaderBlock> headers_lowest(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream_lowest->SendRequestHeaders(std::move(headers_lowest),
                                          NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream_lowest->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers_highest(
+  std::unique_ptr<SpdyHeaderBlock> headers_highest(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream_highest->SendRequestHeaders(std::move(headers_highest),
                                           NO_MORE_DATA_TO_SEND);
@@ -1969,15 +1979,15 @@
 TEST_P(SpdySessionTest, CancelStream) {
   // Request 1, at HIGHEST priority, will be cancelled before it writes data.
   // Request 2, at LOWEST priority, will be a full request and will be id 1.
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
     CreateMockWrite(*req2, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       CreateMockRead(*resp2, 1),
@@ -2009,12 +2019,12 @@
   test::StreamDelegateDoNothing delegate2(spdy_stream2);
   spdy_stream2->SetDelegate(&delegate2);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers2(
+  std::unique_ptr<SpdyHeaderBlock> headers2(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream2->SendRequestHeaders(std::move(headers2), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream2->HasUrlFromHeaders());
@@ -2072,12 +2082,12 @@
   test::ClosingDelegate delegate2(spdy_stream2);
   spdy_stream2->SetDelegate(&delegate2);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers2(
+  std::unique_ptr<SpdyHeaderBlock> headers2(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream2->SendRequestHeaders(std::move(headers2), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream2->HasUrlFromHeaders());
@@ -2128,12 +2138,12 @@
   test::ClosingDelegate delegate2(spdy_stream1);
   spdy_stream2->SetDelegate(&delegate2);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers2(
+  std::unique_ptr<SpdyHeaderBlock> headers2(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream2->SendRequestHeaders(std::move(headers2), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream2->HasUrlFromHeaders());
@@ -2160,9 +2170,9 @@
 TEST_P(SpdySessionTest, CloseSessionWithTwoActivatedSelfClosingStreams) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
@@ -2195,12 +2205,12 @@
   test::ClosingDelegate delegate2(spdy_stream2);
   spdy_stream2->SetDelegate(&delegate2);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers2(
+  std::unique_ptr<SpdyHeaderBlock> headers2(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream2->SendRequestHeaders(std::move(headers2), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream2->HasUrlFromHeaders());
@@ -2234,9 +2244,9 @@
 TEST_P(SpdySessionTest, CloseSessionWithTwoActivatedMutuallyClosingStreams) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
@@ -2271,12 +2281,12 @@
   test::ClosingDelegate delegate2(spdy_stream1);
   spdy_stream2->SetDelegate(&delegate2);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers2(
+  std::unique_ptr<SpdyHeaderBlock> headers2(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream2->SendRequestHeaders(std::move(headers2), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream2->HasUrlFromHeaders());
@@ -2328,11 +2338,11 @@
 TEST_P(SpdySessionTest, CloseActivatedStreamThatClosesSession) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
-  scoped_ptr<SpdySerializedFrame> goaway(
+  std::unique_ptr<SpdySerializedFrame> goaway(
       spdy_util_.ConstructSpdyGoAway(0, GOAWAY_PROTOCOL_ERROR, "Error"));
   // The GOAWAY has higher-priority than the RST_STREAM, and is written first
   // despite being queued second.
@@ -2359,7 +2369,7 @@
   SessionClosingDelegate delegate(spdy_stream, session_);
   spdy_stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream->HasUrlFromHeaders());
@@ -2451,15 +2461,15 @@
   new_settings[kSpdySettingsIds1] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, max_concurrent_streams);
 
-  scoped_ptr<SpdySerializedFrame> settings_ack(
+  std::unique_ptr<SpdySerializedFrame> settings_ack(
       spdy_util_.ConstructSpdySettingsAck());
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   spdy_util_.UpdateWithStreamDestruction(1);
-  scoped_ptr<SpdySerializedFrame> req2(
+  std::unique_ptr<SpdySerializedFrame> req2(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 3, LOWEST, true));
   spdy_util_.UpdateWithStreamDestruction(3);
-  scoped_ptr<SpdySerializedFrame> req3(
+  std::unique_ptr<SpdySerializedFrame> req3(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 5, LOWEST, true));
   MockWrite writes[] = {
     CreateMockWrite(*settings_ack, 1),
@@ -2470,22 +2480,22 @@
 
   // Set up the socket so we read a SETTINGS frame that sets max concurrent
   // streams to 1.
-  scoped_ptr<SpdySerializedFrame> settings_frame(
+  std::unique_ptr<SpdySerializedFrame> settings_frame(
       spdy_util_.ConstructSpdySettings(new_settings));
 
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body1(
+  std::unique_ptr<SpdySerializedFrame> body1(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
 
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 3));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, true));
 
-  scoped_ptr<SpdySerializedFrame> resp3(
+  std::unique_ptr<SpdySerializedFrame> resp3(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 5));
-  scoped_ptr<SpdySerializedFrame> body3(
+  std::unique_ptr<SpdySerializedFrame> body3(
       spdy_util_.ConstructSpdyBodyFrame(5, true));
 
   MockRead reads[] = {
@@ -2534,7 +2544,7 @@
   EXPECT_EQ(1u, session_->num_created_streams());
   EXPECT_EQ(2u, session_->pending_create_stream_queue_size(LOWEST));
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -2559,7 +2569,7 @@
   base::WeakPtr<SpdyStream> stream2 = request2.ReleaseStream();
   test::StreamDelegateDoNothing delegate2(stream2);
   stream2->SetDelegate(&delegate2);
-  scoped_ptr<SpdyHeaderBlock> headers2(
+  std::unique_ptr<SpdyHeaderBlock> headers2(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   stream2->SendRequestHeaders(std::move(headers2), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(stream2->HasUrlFromHeaders());
@@ -2584,7 +2594,7 @@
   base::WeakPtr<SpdyStream> stream3 = request3.ReleaseStream();
   test::StreamDelegateDoNothing delegate3(stream3);
   stream3->SetDelegate(&delegate3);
-  scoped_ptr<SpdyHeaderBlock> headers3(
+  std::unique_ptr<SpdyHeaderBlock> headers3(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   stream3->SendRequestHeaders(std::move(headers3), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(stream3->HasUrlFromHeaders());
@@ -2683,7 +2693,7 @@
 
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
@@ -2699,12 +2709,12 @@
   char* payload_data = payload->data();
   test_stream.GetBytes(payload_data, kPayloadSize);
 
-  scoped_ptr<SpdySerializedFrame> partial_data_frame(
+  std::unique_ptr<SpdySerializedFrame> partial_data_frame(
       framer.CreateDataFrame(1, payload_data, kPayloadSize, DATA_FLAG_NONE));
-  scoped_ptr<SpdySerializedFrame> finish_data_frame(
+  std::unique_ptr<SpdySerializedFrame> finish_data_frame(
       framer.CreateDataFrame(1, payload_data, kPayloadSize - 1, DATA_FLAG_FIN));
 
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
 
   // Write 1 byte less than kMaxReadBytes to check that DoRead reads up to 32k
@@ -2733,7 +2743,7 @@
   test::StreamDelegateDoNothing delegate1(spdy_stream1);
   spdy_stream1->SetDelegate(&delegate1);
 
-  scoped_ptr<SpdyHeaderBlock> headers1(
+  std::unique_ptr<SpdyHeaderBlock> headers1(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers1), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -2770,13 +2780,13 @@
 
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   MockWrite writes[] = {
       CreateMockWrite(*req1, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
 
   MockRead reads[] = {
@@ -2797,7 +2807,7 @@
   test::StreamDelegateDoNothing delegate1(spdy_stream1);
   spdy_stream1->SetDelegate(&delegate1);
 
-  scoped_ptr<SpdyHeaderBlock> headers1(
+  std::unique_ptr<SpdyHeaderBlock> headers1(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers1), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -2831,18 +2841,18 @@
 
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   MockWrite writes[] = {
       CreateMockWrite(*req1, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> partial_data_frame(
+  std::unique_ptr<SpdySerializedFrame> partial_data_frame(
       framer.CreateDataFrame(1, "foo ", 4, DATA_FLAG_NONE));
-  scoped_ptr<SpdySerializedFrame> finish_data_frame(
+  std::unique_ptr<SpdySerializedFrame> finish_data_frame(
       framer.CreateDataFrame(1, "bar", 3, DATA_FLAG_FIN));
 
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
 
   MockRead reads[] = {
@@ -2868,7 +2878,7 @@
   test::StreamDelegateDoNothing delegate1(spdy_stream1);
   spdy_stream1->SetDelegate(&delegate1);
 
-  scoped_ptr<SpdyHeaderBlock> headers1(
+  std::unique_ptr<SpdyHeaderBlock> headers1(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers1), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -2899,7 +2909,7 @@
 
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
@@ -2915,12 +2925,12 @@
   char* payload_data = payload->data();
   test_stream.GetBytes(payload_data, kPayloadSize);
 
-  scoped_ptr<SpdySerializedFrame> partial_data_frame(
+  std::unique_ptr<SpdySerializedFrame> partial_data_frame(
       framer.CreateDataFrame(1, payload_data, kPayloadSize, DATA_FLAG_NONE));
-  scoped_ptr<SpdySerializedFrame> finish_data_frame(
+  std::unique_ptr<SpdySerializedFrame> finish_data_frame(
       framer.CreateDataFrame(1, "h", 1, DATA_FLAG_FIN));
 
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
 
   // Write 1 byte more than kMaxReadBytes to check that DoRead yields.
@@ -2949,7 +2959,7 @@
   test::StreamDelegateDoNothing delegate1(spdy_stream1);
   spdy_stream1->SetDelegate(&delegate1);
 
-  scoped_ptr<SpdyHeaderBlock> headers1(
+  std::unique_ptr<SpdyHeaderBlock> headers1(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers1), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -2993,7 +3003,7 @@
 
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
@@ -3016,14 +3026,14 @@
   char* twok_payload_data = twok_payload->data();
   test_stream2.GetBytes(twok_payload_data, kTwoKPayloadSize);
 
-  scoped_ptr<SpdySerializedFrame> eightk_data_frame(framer.CreateDataFrame(
+  std::unique_ptr<SpdySerializedFrame> eightk_data_frame(framer.CreateDataFrame(
       1, eightk_payload_data, kEightKPayloadSize, DATA_FLAG_NONE));
-  scoped_ptr<SpdySerializedFrame> twok_data_frame(framer.CreateDataFrame(
+  std::unique_ptr<SpdySerializedFrame> twok_data_frame(framer.CreateDataFrame(
       1, twok_payload_data, kTwoKPayloadSize, DATA_FLAG_NONE));
-  scoped_ptr<SpdySerializedFrame> finish_data_frame(
+  std::unique_ptr<SpdySerializedFrame> finish_data_frame(
       framer.CreateDataFrame(1, "h", 1, DATA_FLAG_FIN));
 
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
 
   MockRead reads[] = {
@@ -3056,7 +3066,7 @@
   test::StreamDelegateDoNothing delegate1(spdy_stream1);
   spdy_stream1->SetDelegate(&delegate1);
 
-  scoped_ptr<SpdyHeaderBlock> headers1(
+  std::unique_ptr<SpdyHeaderBlock> headers1(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers1), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -3092,17 +3102,17 @@
 
   BufferedSpdyFramer framer(spdy_util_.spdy_version());
 
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body1(
+  std::unique_ptr<SpdySerializedFrame> body1(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway());
+  std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway());
 
   MockRead reads[] = {
       CreateMockRead(*resp1, 1),
@@ -3125,7 +3135,7 @@
   ASSERT_TRUE(spdy_stream1.get() != nullptr);
   EXPECT_EQ(0u, spdy_stream1->stream_id());
 
-  scoped_ptr<SpdyHeaderBlock> headers1(
+  std::unique_ptr<SpdyHeaderBlock> headers1(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers1), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -3201,7 +3211,7 @@
   scoped_refptr<TransportSocketParams> params2(new TransportSocketParams(
       host_port2, false, OnHostResolutionCallback(),
       TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
-  scoped_ptr<ClientSocketHandle> connection2(new ClientSocketHandle);
+  std::unique_ptr<ClientSocketHandle> connection2(new ClientSocketHandle);
   EXPECT_EQ(ERR_IO_PENDING,
             connection2->Init(host_port2.ToString(), params2, DEFAULT_PRIORITY,
                               ClientSocketPool::RespectLimits::ENABLED,
@@ -3276,7 +3286,7 @@
   scoped_refptr<TransportSocketParams> params3(new TransportSocketParams(
       host_port3, false, OnHostResolutionCallback(),
       TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
-  scoped_ptr<ClientSocketHandle> connection3(new ClientSocketHandle);
+  std::unique_ptr<ClientSocketHandle> connection3(new ClientSocketHandle);
   EXPECT_EQ(ERR_IO_PENDING,
             connection3->Init(host_port3.ToString(), params3, DEFAULT_PRIORITY,
                               ClientSocketPool::RespectLimits::ENABLED,
@@ -3302,9 +3312,9 @@
   MockRead reads[] = {
     MockRead(SYNCHRONOUS, ERR_IO_PENDING)  // Stall forever.
   };
-  scoped_ptr<SpdySerializedFrame> req1(
+  std::unique_ptr<SpdySerializedFrame> req1(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> cancel1(
+  std::unique_ptr<SpdySerializedFrame> cancel1(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 1),
@@ -3342,7 +3352,7 @@
   test::StreamDelegateDoNothing delegate1(spdy_stream1);
   spdy_stream1->SetDelegate(&delegate1);
 
-  scoped_ptr<SpdyHeaderBlock> headers1(
+  std::unique_ptr<SpdyHeaderBlock> headers1(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   EXPECT_EQ(ERR_IO_PENDING, spdy_stream1->SendRequestHeaders(
                                 std::move(headers1), NO_MORE_DATA_TO_SEND));
@@ -3357,7 +3367,7 @@
   scoped_refptr<TransportSocketParams> params2(new TransportSocketParams(
       host_port2, false, OnHostResolutionCallback(),
       TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
-  scoped_ptr<ClientSocketHandle> connection2(new ClientSocketHandle);
+  std::unique_ptr<ClientSocketHandle> connection2(new ClientSocketHandle);
   EXPECT_EQ(ERR_IO_PENDING,
             connection2->Init(host_port2.ToString(), params2, DEFAULT_PRIORITY,
                               ClientSocketPool::RespectLimits::ENABLED,
@@ -3444,13 +3454,13 @@
 TEST_P(SpdySessionTest, CreateStreamOnStreamReset) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, MEDIUM, true));
   MockWrite writes[] = {
     CreateMockWrite(*req, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_REFUSED_STREAM));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 1),
@@ -3472,7 +3482,7 @@
   StreamCreatingDelegate delegate(spdy_stream, session_);
   spdy_stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream->HasUrlFromHeaders());
@@ -3508,7 +3518,7 @@
 
   // Set up the socket so we read a SETTINGS frame that sets
   // INITIAL_WINDOW_SIZE.
-  scoped_ptr<SpdySerializedFrame> settings_frame(
+  std::unique_ptr<SpdySerializedFrame> settings_frame(
       spdy_util_.ConstructSpdySettings(new_settings));
   MockRead reads[] = {
       CreateMockRead(*settings_frame, 0),
@@ -3516,7 +3526,7 @@
       MockRead(ASYNC, 0, 2)  // EOF
   };
 
-  scoped_ptr<SpdySerializedFrame> settings_ack(
+  std::unique_ptr<SpdySerializedFrame> settings_ack(
       spdy_util_.ConstructSpdySettingsAck());
   MockWrite writes[] = {
       CreateMockWrite(*settings_ack, 3),
@@ -3571,7 +3581,7 @@
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 1), MockRead(ASYNC, 0, 2)  // EOF
   };
-  scoped_ptr<SpdySerializedFrame> window_update(
+  std::unique_ptr<SpdySerializedFrame> window_update(
       spdy_util_.ConstructSpdyWindowUpdate(
           kSessionFlowControlStreamId,
           initial_window_size + delta_window_size));
@@ -3649,7 +3659,7 @@
 TEST_P(SpdySessionTest, SessionFlowControlInactiveStream) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyBodyFrame(1, false));
   MockRead reads[] = {
       CreateMockRead(*resp, 0),
@@ -3688,7 +3698,7 @@
   session_deps_.host_resolver->set_synchronous_mode(true);
 
   const int padding_length = 42;
-  scoped_ptr<SpdySerializedFrame> resp(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> resp(spdy_util_.ConstructSpdyBodyFrame(
       1, kUploadData, kUploadDataSize, false, padding_length));
   MockRead reads[] = {
       CreateMockRead(*resp, 0),
@@ -3722,19 +3732,20 @@
   const int32_t stream_max_recv_window_size = 1024;
   const int32_t data_frame_size = 2 * stream_max_recv_window_size;
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_FLOW_CONTROL_ERROR));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 4),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
   const std::string payload(data_frame_size, 'a');
-  scoped_ptr<SpdySerializedFrame> data_frame(spdy_util_.ConstructSpdyBodyFrame(
-      1, payload.data(), data_frame_size, false));
+  std::unique_ptr<SpdySerializedFrame> data_frame(
+      spdy_util_.ConstructSpdyBodyFrame(1, payload.data(), data_frame_size,
+                                        false));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
       MockRead(ASYNC, ERR_IO_PENDING, 2),
@@ -3758,7 +3769,7 @@
   test::StreamDelegateDoNothing delegate(spdy_stream);
   spdy_stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   EXPECT_EQ(ERR_IO_PENDING, spdy_stream->SendRequestHeaders(
                                 std::move(headers), NO_MORE_DATA_TO_SEND));
@@ -3797,7 +3808,7 @@
 
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
       0, GOAWAY_FLOW_CONTROL_ERROR,
       "delta_window_size is 400 in DecreaseRecvWindowSize, which is larger "
       "than the receive window size of 500"));
@@ -3806,10 +3817,10 @@
   };
 
   const std::string first_data_frame(first_data_frame_size, 'a');
-  scoped_ptr<SpdySerializedFrame> first(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> first(spdy_util_.ConstructSpdyBodyFrame(
       1, first_data_frame.data(), first_data_frame_size, false));
   const std::string second_data_frame(second_data_frame_size, 'b');
-  scoped_ptr<SpdySerializedFrame> second(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> second(spdy_util_.ConstructSpdyBodyFrame(
       1, second_data_frame.data(), second_data_frame_size, false));
   MockRead reads[] = {
       CreateMockRead(*first, 0),
@@ -3856,21 +3867,21 @@
   ASSERT_LT(stream_max_recv_window_size,
             first_data_frame_size + second_data_frame_size);
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_FLOW_CONTROL_ERROR));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 6),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
   const std::string first_data_frame(first_data_frame_size, 'a');
-  scoped_ptr<SpdySerializedFrame> first(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> first(spdy_util_.ConstructSpdyBodyFrame(
       1, first_data_frame.data(), first_data_frame_size, false));
   const std::string second_data_frame(second_data_frame_size, 'b');
-  scoped_ptr<SpdySerializedFrame> second(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> second(spdy_util_.ConstructSpdyBodyFrame(
       1, second_data_frame.data(), second_data_frame_size, false));
   MockRead reads[] = {
       CreateMockRead(*resp, 1),
@@ -3896,7 +3907,7 @@
   test::StreamDelegateDoNothing delegate(spdy_stream);
   spdy_stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   EXPECT_EQ(ERR_IO_PENDING, spdy_stream->SendRequestHeaders(
                                 std::move(headers), NO_MORE_DATA_TO_SEND));
@@ -3940,7 +3951,7 @@
   ~DropReceivedDataDelegate() override {}
 
   // Drop any received data.
-  void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override {}
+  void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override {}
 };
 
 // Send data back and forth but use a delegate that drops its received
@@ -3950,20 +3961,20 @@
   const int32_t kMsgDataSize = 100;
   const std::string msg_data(kMsgDataSize, 'a');
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       kDefaultURL, 1, kMsgDataSize, MEDIUM, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> msg(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> msg(spdy_util_.ConstructSpdyBodyFrame(
       1, msg_data.data(), kMsgDataSize, false));
   MockWrite writes[] = {
     CreateMockWrite(*req, 0),
     CreateMockWrite(*msg, 2),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> echo(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> echo(spdy_util_.ConstructSpdyBodyFrame(
       1, msg_data.data(), kMsgDataSize, false));
-  scoped_ptr<SpdySerializedFrame> window_update(
+  std::unique_ptr<SpdySerializedFrame> window_update(
       spdy_util_.ConstructSpdyWindowUpdate(kSessionFlowControlStreamId,
                                            kMsgDataSize));
   MockRead reads[] = {
@@ -3989,7 +4000,7 @@
   DropReceivedDataDelegate delegate(stream, msg_data);
   stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructPostHeaderBlock(kDefaultURL, kMsgDataSize));
   EXPECT_EQ(ERR_IO_PENDING,
             stream->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND));
@@ -4025,13 +4036,13 @@
   const int32_t kMsgDataSize = 100;
   const std::string msg_data(kMsgDataSize, 'a');
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       kDefaultURL, 1, kMsgDataSize, MEDIUM, nullptr, 0));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 1),
@@ -4055,7 +4066,7 @@
   test::StreamDelegateSendImmediate delegate(stream, msg_data);
   stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructPostHeaderBlock(kDefaultURL, kMsgDataSize));
   EXPECT_EQ(ERR_IO_PENDING,
             stream->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND));
@@ -4098,20 +4109,20 @@
   const int32_t kMsgDataSize = 100;
   const std::string msg_data(kMsgDataSize, 'a');
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       kDefaultURL, 1, kMsgDataSize, MEDIUM, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> msg(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> msg(spdy_util_.ConstructSpdyBodyFrame(
       1, msg_data.data(), kMsgDataSize, false));
   MockWrite writes[] = {
     CreateMockWrite(*req, 0),
     CreateMockWrite(*msg, 2),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> echo(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> echo(spdy_util_.ConstructSpdyBodyFrame(
       1, msg_data.data(), kMsgDataSize, false));
-  scoped_ptr<SpdySerializedFrame> window_update(
+  std::unique_ptr<SpdySerializedFrame> window_update(
       spdy_util_.ConstructSpdyWindowUpdate(kSessionFlowControlStreamId,
                                            kMsgDataSize));
   MockRead reads[] = {
@@ -4140,7 +4151,7 @@
   test::StreamDelegateSendImmediate delegate(stream, msg_data);
   stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructPostHeaderBlock(kDefaultURL, kMsgDataSize));
   EXPECT_EQ(ERR_IO_PENDING,
             stream->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND));
@@ -4208,18 +4219,18 @@
     const base::Callback<void(SpdyStream*, int32_t)>& unstall_function) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       kDefaultURL, 1, kBodyDataSize, LOWEST, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, kBodyData, kBodyDataSize, true));
   MockWrite writes[] = {
     CreateMockWrite(*req, 0),
     CreateMockWrite(*body, 1),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> echo(
+  std::unique_ptr<SpdySerializedFrame> echo(
       spdy_util_.ConstructSpdyBodyFrame(1, kBodyData, kBodyDataSize, false));
   MockRead reads[] = {
       CreateMockRead(*resp, 2), MockRead(ASYNC, 0, 3)  // EOF
@@ -4241,7 +4252,7 @@
   EXPECT_FALSE(stream->HasUrlFromHeaders());
   EXPECT_FALSE(stream->send_stalled_by_flow_control());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructPostHeaderBlock(kDefaultURL, kBodyDataSize));
   EXPECT_EQ(ERR_IO_PENDING,
             stream->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND));
@@ -4326,13 +4337,13 @@
 TEST_P(SpdySessionTest, ResumeByPriorityAfterSendWindowSizeIncrease) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> req1(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req1(spdy_util_.ConstructSpdyPost(
       kDefaultURL, 1, kBodyDataSize, LOWEST, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> req2(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req2(spdy_util_.ConstructSpdyPost(
       kDefaultURL, 3, kBodyDataSize, MEDIUM, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> body1(
+  std::unique_ptr<SpdySerializedFrame> body1(
       spdy_util_.ConstructSpdyBodyFrame(1, kBodyData, kBodyDataSize, true));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, kBodyData, kBodyDataSize, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
@@ -4341,9 +4352,9 @@
     CreateMockWrite(*body1, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp1(
+  std::unique_ptr<SpdySerializedFrame> resp1(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 3));
   MockRead reads[] = {
       CreateMockRead(*resp1, 4),
@@ -4380,7 +4391,7 @@
 
   StallSessionSend();
 
-  scoped_ptr<SpdyHeaderBlock> headers1(
+  std::unique_ptr<SpdyHeaderBlock> headers1(
       spdy_util_.ConstructPostHeaderBlock(kDefaultURL, kBodyDataSize));
   EXPECT_EQ(ERR_IO_PENDING, stream1->SendRequestHeaders(std::move(headers1),
                                                         MORE_DATA_TO_SEND));
@@ -4391,7 +4402,7 @@
   EXPECT_EQ(1u, stream1->stream_id());
   EXPECT_TRUE(stream1->send_stalled_by_flow_control());
 
-  scoped_ptr<SpdyHeaderBlock> headers2(
+  std::unique_ptr<SpdyHeaderBlock> headers2(
       spdy_util_.ConstructPostHeaderBlock(kDefaultURL, kBodyDataSize));
   EXPECT_EQ(ERR_IO_PENDING, stream2->SendRequestHeaders(std::move(headers2),
                                                         MORE_DATA_TO_SEND));
@@ -4467,13 +4478,13 @@
 TEST_P(SpdySessionTest, SendWindowSizeIncreaseWithDeletedStreams) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> req1(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req1(spdy_util_.ConstructSpdyPost(
       kDefaultURL, 1, kBodyDataSize, LOWEST, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> req2(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req2(spdy_util_.ConstructSpdyPost(
       kDefaultURL, 3, kBodyDataSize, LOWEST, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> req3(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req3(spdy_util_.ConstructSpdyPost(
       kDefaultURL, 5, kBodyDataSize, LOWEST, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> body2(
+  std::unique_ptr<SpdySerializedFrame> body2(
       spdy_util_.ConstructSpdyBodyFrame(3, kBodyData, kBodyDataSize, true));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
@@ -4482,7 +4493,7 @@
     CreateMockWrite(*body2, 3),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp2(
+  std::unique_ptr<SpdySerializedFrame> resp2(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 3));
   MockRead reads[] = {
       CreateMockRead(*resp2, 4),
@@ -4529,7 +4540,7 @@
 
   StallSessionSend();
 
-  scoped_ptr<SpdyHeaderBlock> headers1(
+  std::unique_ptr<SpdyHeaderBlock> headers1(
       spdy_util_.ConstructPostHeaderBlock(kDefaultURL, kBodyDataSize));
   EXPECT_EQ(ERR_IO_PENDING, stream1->SendRequestHeaders(std::move(headers1),
                                                         MORE_DATA_TO_SEND));
@@ -4540,7 +4551,7 @@
   EXPECT_EQ(1u, stream1->stream_id());
   EXPECT_TRUE(stream1->send_stalled_by_flow_control());
 
-  scoped_ptr<SpdyHeaderBlock> headers2(
+  std::unique_ptr<SpdyHeaderBlock> headers2(
       spdy_util_.ConstructPostHeaderBlock(kDefaultURL, kBodyDataSize));
   EXPECT_EQ(ERR_IO_PENDING, stream2->SendRequestHeaders(std::move(headers2),
                                                         MORE_DATA_TO_SEND));
@@ -4551,7 +4562,7 @@
   EXPECT_EQ(3u, stream2->stream_id());
   EXPECT_TRUE(stream2->send_stalled_by_flow_control());
 
-  scoped_ptr<SpdyHeaderBlock> headers3(
+  std::unique_ptr<SpdyHeaderBlock> headers3(
       spdy_util_.ConstructPostHeaderBlock(kDefaultURL, kBodyDataSize));
   EXPECT_EQ(ERR_IO_PENDING, stream3->SendRequestHeaders(std::move(headers3),
                                                         MORE_DATA_TO_SEND));
@@ -4614,11 +4625,11 @@
 TEST_P(SpdySessionTest, SendWindowSizeIncreaseWithDeletedSession) {
   session_deps_.host_resolver->set_synchronous_mode(true);
 
-  scoped_ptr<SpdySerializedFrame> req1(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req1(spdy_util_.ConstructSpdyPost(
       kDefaultURL, 1, kBodyDataSize, LOWEST, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> req2(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req2(spdy_util_.ConstructSpdyPost(
       kDefaultURL, 3, kBodyDataSize, LOWEST, nullptr, 0));
-  scoped_ptr<SpdySerializedFrame> body1(
+  std::unique_ptr<SpdySerializedFrame> body1(
       spdy_util_.ConstructSpdyBodyFrame(1, kBodyData, kBodyDataSize, false));
   MockWrite writes[] = {
     CreateMockWrite(*req1, 0),
@@ -4658,7 +4669,7 @@
 
   StallSessionSend();
 
-  scoped_ptr<SpdyHeaderBlock> headers1(
+  std::unique_ptr<SpdyHeaderBlock> headers1(
       spdy_util_.ConstructPostHeaderBlock(kDefaultURL, kBodyDataSize));
   EXPECT_EQ(ERR_IO_PENDING, stream1->SendRequestHeaders(std::move(headers1),
                                                         MORE_DATA_TO_SEND));
@@ -4669,7 +4680,7 @@
   EXPECT_EQ(1u, stream1->stream_id());
   EXPECT_TRUE(stream1->send_stalled_by_flow_control());
 
-  scoped_ptr<SpdyHeaderBlock> headers2(
+  std::unique_ptr<SpdyHeaderBlock> headers2(
       spdy_util_.ConstructPostHeaderBlock(kDefaultURL, kBodyDataSize));
   EXPECT_EQ(ERR_IO_PENDING, stream2->SendRequestHeaders(std::move(headers2),
                                                         MORE_DATA_TO_SEND));
@@ -4707,9 +4718,9 @@
 }
 
 TEST_P(SpdySessionTest, GoAwayOnSessionFlowControlError) {
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
+  std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway(
       0, GOAWAY_FLOW_CONTROL_ERROR,
       "delta_window_size is 6 in DecreaseRecvWindowSize, which is larger than "
       "the receive window size of 1"));
@@ -4717,9 +4728,9 @@
       CreateMockWrite(*req, 0), CreateMockWrite(*goaway, 4),
   };
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(nullptr, 0, 1));
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, true));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 1),
@@ -4739,7 +4750,7 @@
   test::StreamDelegateDoNothing delegate(spdy_stream);
   spdy_stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
 
@@ -4786,9 +4797,9 @@
   SettingsMap new_settings;
   new_settings[SETTINGS_MAX_CONCURRENT_STREAMS] =
       SettingsFlagsAndValue(SETTINGS_FLAG_NONE, 2);
-  scoped_ptr<SpdySerializedFrame> settings_frame(
+  std::unique_ptr<SpdySerializedFrame> settings_frame(
       spdy_util_.ConstructSpdySettings(new_settings));
-  scoped_ptr<SpdySerializedFrame> pushed(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> pushed(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 2, 1, "http://www.example.org/a.dat"));
   MockRead reads[] = {
       CreateMockRead(*settings_frame, 0),
@@ -4798,9 +4809,9 @@
       MockRead(ASYNC, 0, 6),
   };
 
-  scoped_ptr<SpdySerializedFrame> settings_ack(
+  std::unique_ptr<SpdySerializedFrame> settings_ack(
       spdy_util_.ConstructSpdySettingsAck());
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   MockWrite writes[] = {
       CreateMockWrite(*settings_ack, 1), CreateMockWrite(*req, 2),
@@ -4827,7 +4838,7 @@
   EXPECT_EQ(0u, session_->num_pushed_streams());
   EXPECT_EQ(0u, session_->num_active_pushed_streams());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -4867,9 +4878,9 @@
 }
 
 TEST_P(SpdySessionTest, RejectPushedStreamExceedingConcurrencyLimit) {
-  scoped_ptr<SpdySerializedFrame> push_a(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> push_a(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 2, 1, "http://www.example.org/a.dat"));
-  scoped_ptr<SpdySerializedFrame> push_b(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> push_b(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 4, 1, "http://www.example.org/b.dat"));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 1),
@@ -4880,9 +4891,9 @@
       MockRead(ASYNC, 0, 7),
   };
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(4, RST_STREAM_REFUSED_STREAM));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 5),
@@ -4907,7 +4918,7 @@
   EXPECT_EQ(0u, session_->num_pushed_streams());
   EXPECT_EQ(0u, session_->num_active_pushed_streams());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -4953,11 +4964,11 @@
 
   // cross_origin_push contains HTTP resource for an origin different from the
   // origin of kDefaultURL, and should be accepted.
-  scoped_ptr<SpdySerializedFrame> cross_origin_push(
+  std::unique_ptr<SpdySerializedFrame> cross_origin_push(
       spdy_util_.ConstructSpdyPush(nullptr, 0, 2, 1,
                                    kHttpURLFromAnotherOrigin));
   // cross_origin_https_push contains HTTPS resource, and should be refused.
-  scoped_ptr<SpdySerializedFrame> cross_origin_https_push(
+  std::unique_ptr<SpdySerializedFrame> cross_origin_https_push(
       spdy_util_.ConstructSpdyPush(nullptr, 0, 4, 1,
                                    kHttpsURLFromAnotherOrigin));
   MockRead reads[] = {
@@ -4969,9 +4980,9 @@
       MockRead(ASYNC, 0, 7),
   };
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(4, RST_STREAM_REFUSED_STREAM));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 5),
@@ -4980,7 +4991,7 @@
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
   session_deps_.socket_factory->AddSocketDataProvider(&data);
 
-  scoped_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
+  std::unique_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate());
   proxy_delegate->set_trusted_spdy_proxy(
       net::ProxyServer(net::ProxyServer::SCHEME_HTTPS,
                        HostPortPair(GURL(kDefaultURL).host(), 80)));
@@ -5001,7 +5012,7 @@
   EXPECT_EQ(0u, session_->num_pushed_streams());
   EXPECT_EQ(0u, session_->num_active_pushed_streams());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream->HasUrlFromHeaders());
@@ -5046,7 +5057,7 @@
 
   // cross_origin_push contains resource for an origin different from the
   // origin of kDefaultURL, and should be refused.
-  scoped_ptr<SpdySerializedFrame> cross_origin_push(
+  std::unique_ptr<SpdySerializedFrame> cross_origin_push(
       spdy_util_.ConstructSpdyPush(nullptr, 0, 2, 1,
                                    kHttpURLFromAnotherOrigin));
   MockRead reads[] = {
@@ -5054,9 +5065,9 @@
       MockRead(ASYNC, 0, 4),
   };
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_REFUSED_STREAM));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 3),
@@ -5080,7 +5091,7 @@
   EXPECT_EQ(0u, session_->num_pushed_streams());
   EXPECT_EQ(0u, session_->num_active_pushed_streams());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream->HasUrlFromHeaders());
@@ -5105,14 +5116,14 @@
   if (spdy_util_.spdy_version() < HTTP2)
     return;
 
-  scoped_ptr<SpdySerializedFrame> push_a(spdy_util_.ConstructSpdyPush(
+  std::unique_ptr<SpdySerializedFrame> push_a(spdy_util_.ConstructSpdyPush(
       nullptr, 0, 2, 1, "http://www.example.org/a.dat"));
-  scoped_ptr<SpdyHeaderBlock> push_headers(new SpdyHeaderBlock);
+  std::unique_ptr<SpdyHeaderBlock> push_headers(new SpdyHeaderBlock);
   spdy_util_.AddUrlToHeaderBlock("http://www.example.org/b.dat",
                                  push_headers.get());
-  scoped_ptr<SpdySerializedFrame> push_b(
+  std::unique_ptr<SpdySerializedFrame> push_b(
       spdy_util_.ConstructInitialSpdyPushFrame(std::move(push_headers), 4, 1));
-  scoped_ptr<SpdySerializedFrame> headers_b(
+  std::unique_ptr<SpdySerializedFrame> headers_b(
       spdy_util_.ConstructSpdyPushHeaders(4, nullptr, 0));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 1),
@@ -5125,9 +5136,9 @@
       MockRead(ASYNC, 0, 9),
   };
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(4, RST_STREAM_REFUSED_STREAM));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 7),
@@ -5152,7 +5163,7 @@
   EXPECT_EQ(0u, session_->num_pushed_streams());
   EXPECT_EQ(0u, session_->num_active_pushed_streams());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
@@ -5203,11 +5214,11 @@
     return;
 
   const char kPushedUrl[] = "http://www.example.org/a.dat";
-  scoped_ptr<SpdyHeaderBlock> push_headers(new SpdyHeaderBlock);
+  std::unique_ptr<SpdyHeaderBlock> push_headers(new SpdyHeaderBlock);
   spdy_util_.AddUrlToHeaderBlock(kPushedUrl, push_headers.get());
-  scoped_ptr<SpdySerializedFrame> push_promise(
+  std::unique_ptr<SpdySerializedFrame> push_promise(
       spdy_util_.ConstructInitialSpdyPushFrame(std::move(push_headers), 2, 1));
-  scoped_ptr<SpdySerializedFrame> headers_frame(
+  std::unique_ptr<SpdySerializedFrame> headers_frame(
       spdy_util_.ConstructSpdyPushHeaders(2, nullptr, 0));
   MockRead reads[] = {
       MockRead(ASYNC, ERR_IO_PENDING, 1),
@@ -5218,9 +5229,9 @@
       MockRead(ASYNC, 0, 7),
   };
 
-  scoped_ptr<SpdySerializedFrame> req(
+  std::unique_ptr<SpdySerializedFrame> req(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_CANCEL));
   MockWrite writes[] = {
       CreateMockWrite(*req, 0), CreateMockWrite(*rst, 5),
@@ -5244,7 +5255,7 @@
   EXPECT_EQ(0u, session_->num_pushed_streams());
   EXPECT_EQ(0u, session_->num_active_pushed_streams());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kDefaultURL));
   spdy_stream1->SendRequestHeaders(std::move(headers), NO_MORE_DATA_TO_SEND);
   EXPECT_TRUE(spdy_stream1->HasUrlFromHeaders());
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index 2fdcb31..090fa188 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -26,24 +26,24 @@
 
 namespace {
 
-scoped_ptr<base::Value> NetLogSpdyStreamErrorCallback(
+std::unique_ptr<base::Value> NetLogSpdyStreamErrorCallback(
     SpdyStreamId stream_id,
     int status,
     const std::string* description,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", static_cast<int>(stream_id));
   dict->SetInteger("status", status);
   dict->SetString("description", *description);
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> NetLogSpdyStreamWindowUpdateCallback(
+std::unique_ptr<base::Value> NetLogSpdyStreamWindowUpdateCallback(
     SpdyStreamId stream_id,
     int32_t delta,
     int32_t window_size,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", stream_id);
   dict->SetInteger("delta", delta);
   dict->SetInteger("window_size", window_size);
@@ -68,13 +68,13 @@
 
   ~SynStreamBufferProducer() override {}
 
-  scoped_ptr<SpdyBuffer> ProduceBuffer() override {
+  std::unique_ptr<SpdyBuffer> ProduceBuffer() override {
     if (!stream_.get()) {
       NOTREACHED();
-      return scoped_ptr<SpdyBuffer>();
+      return std::unique_ptr<SpdyBuffer>();
     }
     DCHECK_GT(stream_->stream_id(), 0u);
-    return scoped_ptr<SpdyBuffer>(
+    return std::unique_ptr<SpdyBuffer>(
         new SpdyBuffer(stream_->ProduceSynStreamFrame()));
   }
 
@@ -177,7 +177,7 @@
 
   while (!pending_recv_data_.empty()) {
     // Take ownership of the first element of |pending_recv_data_|.
-    scoped_ptr<SpdyBuffer> buffer = std::move(pending_recv_data_.at(0));
+    std::unique_ptr<SpdyBuffer> buffer = std::move(pending_recv_data_.at(0));
     pending_recv_data_.erase(pending_recv_data_.begin());
 
     bool eof = (buffer == NULL);
@@ -199,7 +199,7 @@
   }
 }
 
-scoped_ptr<SpdySerializedFrame> SpdyStream::ProduceSynStreamFrame() {
+std::unique_ptr<SpdySerializedFrame> SpdyStream::ProduceSynStreamFrame() {
   CHECK_EQ(io_state_, STATE_IDLE);
   CHECK(request_headers_);
   CHECK_GT(stream_id_, 0u);
@@ -207,7 +207,7 @@
   SpdyControlFlags flags =
       (pending_send_status_ == NO_MORE_DATA_TO_SEND) ?
       CONTROL_FLAG_FIN : CONTROL_FLAG_NONE;
-  scoped_ptr<SpdySerializedFrame> frame(session_->CreateSynStream(
+  std::unique_ptr<SpdySerializedFrame> frame(session_->CreateSynStream(
       stream_id_, priority_, flags, *request_headers_));
   send_time_ = base::TimeTicks::Now();
   return frame;
@@ -473,7 +473,7 @@
   request_headers_.reset(new SpdyHeaderBlock(headers));
 }
 
-void SpdyStream::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
+void SpdyStream::OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) {
   DCHECK(session_->IsStreamActive(stream_id_));
 
   // If we're still buffering data for a push stream, we will do the
@@ -684,8 +684,9 @@
   return weak_ptr_factory_.GetWeakPtr();
 }
 
-int SpdyStream::SendRequestHeaders(scoped_ptr<SpdyHeaderBlock> request_headers,
-                                   SpdySendStatus send_status) {
+int SpdyStream::SendRequestHeaders(
+    std::unique_ptr<SpdyHeaderBlock> request_headers,
+    SpdySendStatus send_status) {
   CHECK_NE(type_, SPDY_PUSH_STREAM);
   CHECK_EQ(pending_send_status_, MORE_DATA_TO_SEND);
   CHECK(!request_headers_);
@@ -693,10 +694,9 @@
   CHECK_EQ(io_state_, STATE_IDLE);
   request_headers_ = std::move(request_headers);
   pending_send_status_ = send_status;
-  session_->EnqueueStreamWrite(
-      GetWeakPtr(), SYN_STREAM,
-      scoped_ptr<SpdyBufferProducer>(
-          new SynStreamBufferProducer(GetWeakPtr())));
+  session_->EnqueueStreamWrite(GetWeakPtr(), SYN_STREAM,
+                               std::unique_ptr<SpdyBufferProducer>(
+                                   new SynStreamBufferProducer(GetWeakPtr())));
   return ERR_IO_PENDING;
 }
 
@@ -832,11 +832,9 @@
   SpdyDataFlags flags =
       (pending_send_status_ == NO_MORE_DATA_TO_SEND) ?
       DATA_FLAG_FIN : DATA_FLAG_NONE;
-  scoped_ptr<SpdyBuffer> data_buffer(
-      session_->CreateDataBuffer(stream_id_,
-                                 pending_send_data_.get(),
-                                 pending_send_data_->BytesRemaining(),
-                                 flags));
+  std::unique_ptr<SpdyBuffer> data_buffer(
+      session_->CreateDataBuffer(stream_id_, pending_send_data_.get(),
+                                 pending_send_data_->BytesRemaining(), flags));
   // We'll get called again by PossiblyResumeIfSendStalled().
   if (!data_buffer)
     return;
@@ -860,7 +858,7 @@
 
   session_->EnqueueStreamWrite(
       GetWeakPtr(), DATA,
-      scoped_ptr<SpdyBufferProducer>(
+      std::unique_ptr<SpdyBufferProducer>(
           new SimpleBufferProducer(std::move(data_buffer))));
 }
 
diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h
index 742f248..499372a9 100644
--- a/net/spdy/spdy_stream.h
+++ b/net/spdy/spdy_stream.h
@@ -9,12 +9,12 @@
 #include <stdint.h>
 
 #include <deque>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "net/base/io_buffer.h"
 #include "net/base/net_export.h"
@@ -138,7 +138,7 @@
     // a network error code otherwise.
     //
     // May cause the stream to be closed.
-    virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) = 0;
+    virtual void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) = 0;
 
     // Called when data is sent. Must not cause the stream to be
     // closed.
@@ -321,7 +321,7 @@
   //
   // |length| is the number of bytes received (at most 2^24 - 1) or 0 if
   //          the stream is being closed.
-  void OnDataReceived(scoped_ptr<SpdyBuffer> buffer);
+  void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer);
 
   // Called by the SpdySession when padding is consumed to allow for the stream
   // receiving window to be updated.
@@ -373,7 +373,7 @@
   // bidirectional streams; for request/response streams, it must be
   // MORE_DATA_TO_SEND if the request has data to upload, or
   // NO_MORE_DATA_TO_SEND if not.
-  int SendRequestHeaders(scoped_ptr<SpdyHeaderBlock> request_headers,
+  int SendRequestHeaders(std::unique_ptr<SpdyHeaderBlock> request_headers,
                          SpdySendStatus send_status);
 
   // Sends a DATA frame. The delegate will be notified via
@@ -481,12 +481,12 @@
 
   // Produces the SYN_STREAM frame for the stream. The stream must
   // already be activated.
-  scoped_ptr<SpdySerializedFrame> ProduceSynStreamFrame();
+  std::unique_ptr<SpdySerializedFrame> ProduceSynStreamFrame();
 
   // Produce the initial HEADER frame for the stream with the given
   // block. The stream must already be activated.
-  scoped_ptr<SpdySerializedFrame> ProduceHeaderFrame(
-      scoped_ptr<SpdyHeaderBlock> header_block);
+  std::unique_ptr<SpdySerializedFrame> ProduceHeaderFrame(
+      std::unique_ptr<SpdyHeaderBlock> header_block);
 
   // Queues the send for next frame of the remaining data in
   // |pending_send_data_|. Must be called only when
@@ -536,7 +536,7 @@
   //
   // TODO(akalin): Hang onto this only until we send it. This
   // necessitates stashing the URL separately.
-  scoped_ptr<SpdyHeaderBlock> request_headers_;
+  std::unique_ptr<SpdyHeaderBlock> request_headers_;
 
   // Data waiting to be sent, and the close state of the local endpoint
   // after the data is fully written.
@@ -547,7 +547,7 @@
   // after the data is fully read. Specifically, data received before the
   // delegate is attached must be buffered and later replayed. A remote FIN
   // is represented by a final, zero-length buffer.
-  std::vector<scoped_ptr<SpdyBuffer>> pending_recv_data_;
+  std::vector<std::unique_ptr<SpdyBuffer>> pending_recv_data_;
 
   // The time at which the request was made that resulted in this response.
   // For cached responses, this time could be "far" in the past.
diff --git a/net/spdy/spdy_stream_test_util.cc b/net/spdy/spdy_stream_test_util.cc
index e0d8e69..e052b88 100644
--- a/net/spdy/spdy_stream_test_util.cc
+++ b/net/spdy/spdy_stream_test_util.cc
@@ -30,7 +30,7 @@
   return RESPONSE_HEADERS_ARE_COMPLETE;
 }
 
-void ClosingDelegate::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {}
+void ClosingDelegate::OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) {}
 
 void ClosingDelegate::OnDataSent() {}
 
@@ -65,7 +65,7 @@
   return RESPONSE_HEADERS_ARE_COMPLETE;
 }
 
-void StreamDelegateBase::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
+void StreamDelegateBase::OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) {
   if (buffer)
     received_data_queue_.Enqueue(std::move(buffer));
 }
diff --git a/net/spdy/spdy_stream_test_util.h b/net/spdy/spdy_stream_test_util.h
index 9c260ea..ef3617f 100644
--- a/net/spdy/spdy_stream_test_util.h
+++ b/net/spdy/spdy_stream_test_util.h
@@ -5,9 +5,10 @@
 #ifndef NET_SPDY_SPDY_STREAM_TEST_UTIL_H_
 #define NET_SPDY_SPDY_STREAM_TEST_UTIL_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "net/base/io_buffer.h"
 #include "net/base/test_completion_callback.h"
@@ -29,7 +30,7 @@
   void OnRequestHeadersSent() override;
   SpdyResponseHeadersStatus OnResponseHeadersUpdated(
       const SpdyHeaderBlock& response_headers) override;
-  void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+  void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override;
   void OnDataSent() override;
   void OnTrailers(const SpdyHeaderBlock& trailers) override;
   void OnClose(int status) override;
@@ -51,7 +52,7 @@
   void OnRequestHeadersSent() override;
   SpdyResponseHeadersStatus OnResponseHeadersUpdated(
       const SpdyHeaderBlock& response_headers) override;
-  void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+  void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override;
   void OnDataSent() override;
   void OnTrailers(const SpdyHeaderBlock& trailers) override;
   void OnClose(int status) override;
diff --git a/net/spdy/spdy_stream_unittest.cc b/net/spdy/spdy_stream_unittest.cc
index e9867dc1..05c01d5 100644
--- a/net/spdy/spdy_stream_unittest.cc
+++ b/net/spdy/spdy_stream_unittest.cc
@@ -5,14 +5,15 @@
 #include "net/spdy/spdy_stream.h"
 
 #include <stdint.h>
+
 #include <cstddef>
 #include <limits>
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/string_piece.h"
 #include "net/base/completion_callback.h"
@@ -136,7 +137,7 @@
 
   SpdyTestUtil spdy_util_;
   SpdySessionDependencies session_deps_;
-  scoped_ptr<HttpNetworkSession> session_;
+  std::unique_ptr<HttpNetworkSession> session_;
 
  private:
   // Used by Add{Read,Write}() above.
@@ -154,19 +155,19 @@
 TEST_P(SpdyStreamTest, SendDataAfterOpen) {
   GURL url(kStreamUrl);
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       kStreamUrl, 1, kPostBodyLength, LOWEST, NULL, 0));
   AddWrite(*req);
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   AddRead(*resp);
 
-  scoped_ptr<SpdySerializedFrame> msg(
+  std::unique_ptr<SpdySerializedFrame> msg(
       spdy_util_.ConstructSpdyBodyFrame(1, kPostBody, kPostBodyLength, false));
   AddWrite(*msg);
 
-  scoped_ptr<SpdySerializedFrame> echo(
+  std::unique_ptr<SpdySerializedFrame> echo(
       spdy_util_.ConstructSpdyBodyFrame(1, kPostBody, kPostBodyLength, false));
   AddRead(*echo);
 
@@ -191,7 +192,7 @@
 
   EXPECT_FALSE(stream->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructPostHeaderBlock(kStreamUrl, kPostBodyLength));
   EXPECT_EQ(ERR_IO_PENDING,
             stream->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND));
@@ -230,25 +231,25 @@
 TEST_P(SpdyStreamTest, Trailers) {
   GURL url(kStreamUrl);
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       kStreamUrl, 1, kPostBodyLength, LOWEST, NULL, 0));
   AddWrite(*req);
 
-  scoped_ptr<SpdySerializedFrame> msg(
+  std::unique_ptr<SpdySerializedFrame> msg(
       spdy_util_.ConstructSpdyBodyFrame(1, kPostBody, kPostBodyLength, true));
   AddWrite(*msg);
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   AddRead(*resp);
 
-  scoped_ptr<SpdySerializedFrame> echo(
+  std::unique_ptr<SpdySerializedFrame> echo(
       spdy_util_.ConstructSpdyBodyFrame(1, kPostBody, kPostBodyLength, false));
   AddRead(*echo);
 
   SpdyHeaderBlock late_headers;
   late_headers["foo"] = "bar";
-  scoped_ptr<SpdySerializedFrame> trailers(
+  std::unique_ptr<SpdySerializedFrame> trailers(
       spdy_util_.ConstructSpdyResponseHeaders(1, late_headers, false));
   AddRead(*trailers);
 
@@ -272,7 +273,7 @@
 
   EXPECT_FALSE(stream->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructPostHeaderBlock(kStreamUrl, kPostBodyLength));
   EXPECT_EQ(ERR_IO_PENDING,
             stream->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND));
@@ -346,19 +347,19 @@
 TEST_P(SpdyStreamTest, StreamError) {
   GURL url(kStreamUrl);
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       kStreamUrl, 1, kPostBodyLength, LOWEST, NULL, 0));
   AddWrite(*req);
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   AddRead(*resp);
 
-  scoped_ptr<SpdySerializedFrame> msg(
+  std::unique_ptr<SpdySerializedFrame> msg(
       spdy_util_.ConstructSpdyBodyFrame(1, kPostBody, kPostBodyLength, false));
   AddWrite(*msg);
 
-  scoped_ptr<SpdySerializedFrame> echo(
+  std::unique_ptr<SpdySerializedFrame> echo(
       spdy_util_.ConstructSpdyBodyFrame(1, kPostBody, kPostBodyLength, false));
   AddRead(*echo);
 
@@ -385,7 +386,7 @@
 
   EXPECT_FALSE(stream->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructPostHeaderBlock(kStreamUrl, kPostBodyLength));
   EXPECT_EQ(ERR_IO_PENDING,
             stream->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND));
@@ -422,21 +423,22 @@
 TEST_P(SpdyStreamTest, SendLargeDataAfterOpenRequestResponse) {
   GURL url(kStreamUrl);
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       kStreamUrl, 1, kPostBodyLength, LOWEST, NULL, 0));
   AddWrite(*req);
 
   std::string chunk_data(kMaxSpdyFrameChunkSize, 'x');
-  scoped_ptr<SpdySerializedFrame> chunk(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> chunk(spdy_util_.ConstructSpdyBodyFrame(
       1, chunk_data.data(), chunk_data.length(), false));
   AddWrite(*chunk);
   AddWrite(*chunk);
 
-  scoped_ptr<SpdySerializedFrame> last_chunk(spdy_util_.ConstructSpdyBodyFrame(
-      1, chunk_data.data(), chunk_data.length(), true));
+  std::unique_ptr<SpdySerializedFrame> last_chunk(
+      spdy_util_.ConstructSpdyBodyFrame(1, chunk_data.data(),
+                                        chunk_data.length(), true));
   AddWrite(*last_chunk);
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   AddRead(*resp);
 
@@ -462,7 +464,7 @@
 
   EXPECT_FALSE(stream->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructPostHeaderBlock(kStreamUrl, kPostBodyLength));
   EXPECT_EQ(ERR_IO_PENDING,
             stream->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND));
@@ -483,16 +485,16 @@
 TEST_P(SpdyStreamTest, SendLargeDataAfterOpenBidirectional) {
   GURL url(kStreamUrl);
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       kStreamUrl, 1, kPostBodyLength, LOWEST, NULL, 0));
   AddWrite(*req);
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
   AddRead(*resp);
 
   std::string chunk_data(kMaxSpdyFrameChunkSize, 'x');
-  scoped_ptr<SpdySerializedFrame> chunk(spdy_util_.ConstructSpdyBodyFrame(
+  std::unique_ptr<SpdySerializedFrame> chunk(spdy_util_.ConstructSpdyBodyFrame(
       1, chunk_data.data(), chunk_data.length(), false));
   AddWrite(*chunk);
   AddWrite(*chunk);
@@ -520,7 +522,7 @@
 
   EXPECT_FALSE(stream->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructPostHeaderBlock(kStreamUrl, kPostBodyLength));
   EXPECT_EQ(ERR_IO_PENDING,
             stream->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND));
@@ -540,16 +542,16 @@
 TEST_P(SpdyStreamTest, UpperCaseHeaders) {
   GURL url(kStreamUrl);
 
-  scoped_ptr<SpdySerializedFrame> syn(
+  std::unique_ptr<SpdySerializedFrame> syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   AddWrite(*syn);
 
   const char* const kExtraHeaders[] = {"X-UpperCase", "yes"};
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyGetSynReply(kExtraHeaders, 1, 1));
   AddRead(*reply);
 
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_PROTOCOL_ERROR));
   AddWrite(*rst);
 
@@ -574,7 +576,7 @@
 
   EXPECT_FALSE(stream->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kStreamUrl));
   EXPECT_EQ(ERR_IO_PENDING, stream->SendRequestHeaders(std::move(headers),
                                                        NO_MORE_DATA_TO_SEND));
@@ -589,20 +591,20 @@
 TEST_P(SpdyStreamTest, UpperCaseHeadersOnPush) {
   GURL url(kStreamUrl);
 
-  scoped_ptr<SpdySerializedFrame> syn(
+  std::unique_ptr<SpdySerializedFrame> syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   AddWrite(*syn);
 
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   AddRead(*reply);
 
   const char* const extra_headers[] = {"X-UpperCase", "yes"};
-  scoped_ptr<SpdySerializedFrame> push(
+  std::unique_ptr<SpdySerializedFrame> push(
       spdy_util_.ConstructSpdyPush(extra_headers, 1, 2, 1, kStreamUrl));
   AddRead(*push);
 
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_PROTOCOL_ERROR));
   AddWrite(*rst);
 
@@ -629,7 +631,7 @@
 
   EXPECT_FALSE(stream->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kStreamUrl));
   EXPECT_EQ(ERR_IO_PENDING, stream->SendRequestHeaders(std::move(headers),
                                                        NO_MORE_DATA_TO_SEND));
@@ -652,15 +654,15 @@
 TEST_P(SpdyStreamTest, UpperCaseHeadersInHeadersFrame) {
   GURL url(kStreamUrl);
 
-  scoped_ptr<SpdySerializedFrame> syn(
+  std::unique_ptr<SpdySerializedFrame> syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   AddWrite(*syn);
 
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   AddRead(*reply);
 
-  scoped_ptr<SpdySerializedFrame> push(
+  std::unique_ptr<SpdySerializedFrame> push(
       spdy_util_.ConstructSpdyPush(NULL, 0, 2, 1, kStreamUrl));
   AddRead(*push);
 
@@ -668,13 +670,13 @@
 
   SpdyHeaderBlock late_headers;
   late_headers["X-UpperCase"] = "yes";
-  scoped_ptr<SpdySerializedFrame> headers_frame(
+  std::unique_ptr<SpdySerializedFrame> headers_frame(
       spdy_util_.ConstructSpdyReply(2, late_headers));
   AddRead(*headers_frame);
 
   AddWritePause();
 
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_PROTOCOL_ERROR));
   AddWrite(*rst);
 
@@ -699,7 +701,7 @@
 
   EXPECT_FALSE(stream->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kStreamUrl));
   EXPECT_EQ(ERR_IO_PENDING, stream->SendRequestHeaders(std::move(headers),
                                                        NO_MORE_DATA_TO_SEND));
@@ -728,15 +730,15 @@
 TEST_P(SpdyStreamTest, DuplicateHeaders) {
   GURL url(kStreamUrl);
 
-  scoped_ptr<SpdySerializedFrame> syn(
+  std::unique_ptr<SpdySerializedFrame> syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   AddWrite(*syn);
 
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   AddRead(*reply);
 
-  scoped_ptr<SpdySerializedFrame> push(
+  std::unique_ptr<SpdySerializedFrame> push(
       spdy_util_.ConstructSpdyPush(NULL, 0, 2, 1, kStreamUrl));
   AddRead(*push);
 
@@ -744,13 +746,13 @@
 
   SpdyHeaderBlock late_headers;
   late_headers[spdy_util_.GetStatusKey()] = "500 Server Error";
-  scoped_ptr<SpdySerializedFrame> headers_frame(
+  std::unique_ptr<SpdySerializedFrame> headers_frame(
       spdy_util_.ConstructSpdyReply(2, late_headers));
   AddRead(*headers_frame);
 
   AddReadPause();
 
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_PROTOCOL_ERROR));
   AddWrite(*rst);
 
@@ -775,7 +777,7 @@
 
   EXPECT_FALSE(stream->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kStreamUrl));
   EXPECT_EQ(ERR_IO_PENDING, stream->SendRequestHeaders(std::move(headers),
                                                        NO_MORE_DATA_TO_SEND));
@@ -803,7 +805,7 @@
 // to overflow an int32_t. The SpdyStream should handle that case
 // gracefully.
 TEST_P(SpdyStreamTest, IncreaseSendWindowSizeOverflow) {
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       kStreamUrl, 1, kPostBodyLength, LOWEST, NULL, 0));
   AddWrite(*req);
 
@@ -811,7 +813,7 @@
 
   // Triggered by the overflowing call to IncreaseSendWindowSize
   // below.
-  scoped_ptr<SpdySerializedFrame> rst(
+  std::unique_ptr<SpdySerializedFrame> rst(
       spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_FLOW_CONTROL_ERROR));
   AddWrite(*rst);
 
@@ -836,7 +838,7 @@
   StreamDelegateSendImmediate delegate(stream, kPostBodyStringPiece);
   stream->SetDelegate(&delegate);
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructPostHeaderBlock(kStreamUrl, kPostBodyLength));
   EXPECT_EQ(ERR_IO_PENDING,
             stream->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND));
@@ -895,15 +897,15 @@
     const UnstallFunction& unstall_function) {
   GURL url(kStreamUrl);
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       kStreamUrl, 1, kPostBodyLength, LOWEST, NULL, 0));
   AddWrite(*req);
 
-  scoped_ptr<SpdySerializedFrame> body(
+  std::unique_ptr<SpdySerializedFrame> body(
       spdy_util_.ConstructSpdyBodyFrame(1, kPostBody, kPostBodyLength, true));
   AddWrite(*body);
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   AddRead(*resp);
 
@@ -929,7 +931,7 @@
   EXPECT_FALSE(stream->HasUrlFromHeaders());
   EXPECT_FALSE(stream->send_stalled_by_flow_control());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructPostHeaderBlock(kStreamUrl, kPostBodyLength));
   EXPECT_EQ(ERR_IO_PENDING,
             stream->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND));
@@ -971,21 +973,21 @@
     const UnstallFunction& unstall_function) {
   GURL url(kStreamUrl);
 
-  scoped_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
+  std::unique_ptr<SpdySerializedFrame> req(spdy_util_.ConstructSpdyPost(
       kStreamUrl, 1, kPostBodyLength, LOWEST, NULL, 0));
   AddWrite(*req);
 
   AddReadPause();
 
-  scoped_ptr<SpdySerializedFrame> resp(
+  std::unique_ptr<SpdySerializedFrame> resp(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   AddRead(*resp);
 
-  scoped_ptr<SpdySerializedFrame> msg(
+  std::unique_ptr<SpdySerializedFrame> msg(
       spdy_util_.ConstructSpdyBodyFrame(1, kPostBody, kPostBodyLength, false));
   AddWrite(*msg);
 
-  scoped_ptr<SpdySerializedFrame> echo(
+  std::unique_ptr<SpdySerializedFrame> echo(
       spdy_util_.ConstructSpdyBodyFrame(1, kPostBody, kPostBodyLength, false));
   AddRead(*echo);
 
@@ -1010,7 +1012,7 @@
 
   EXPECT_FALSE(stream->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructPostHeaderBlock(kStreamUrl, kPostBodyLength));
   EXPECT_EQ(ERR_IO_PENDING,
             stream->SendRequestHeaders(std::move(headers), MORE_DATA_TO_SEND));
@@ -1055,19 +1057,19 @@
 TEST_P(SpdyStreamTest, ReceivedBytes) {
   GURL url(kStreamUrl);
 
-  scoped_ptr<SpdySerializedFrame> syn(
+  std::unique_ptr<SpdySerializedFrame> syn(
       spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true));
   AddWrite(*syn);
 
   AddReadPause();
 
-  scoped_ptr<SpdySerializedFrame> reply(
+  std::unique_ptr<SpdySerializedFrame> reply(
       spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
   AddRead(*reply);
 
   AddReadPause();
 
-  scoped_ptr<SpdySerializedFrame> msg(
+  std::unique_ptr<SpdySerializedFrame> msg(
       spdy_util_.ConstructSpdyBodyFrame(1, kPostBody, kPostBodyLength, false));
   AddRead(*msg);
 
@@ -1094,7 +1096,7 @@
 
   EXPECT_FALSE(stream->HasUrlFromHeaders());
 
-  scoped_ptr<SpdyHeaderBlock> headers(
+  std::unique_ptr<SpdyHeaderBlock> headers(
       spdy_util_.ConstructGetHeaderBlock(kStreamUrl));
   EXPECT_EQ(ERR_IO_PENDING, stream->SendRequestHeaders(std::move(headers),
                                                        NO_MORE_DATA_TO_SEND));
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index 9778458..33b57b4 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -5,12 +5,14 @@
 #include "net/spdy/spdy_test_util_common.h"
 
 #include <stdint.h>
+
 #include <cstddef>
+#include <memory>
 #include <utility>
 
 #include "base/compiler_specific.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_split.h"
 #include "net/base/host_port_pair.h"
@@ -368,7 +370,7 @@
 
 SpdySessionDependencies::SpdySessionDependencies(
     NextProto protocol,
-    scoped_ptr<ProxyService> proxy_service)
+    std::unique_ptr<ProxyService> proxy_service)
     : host_resolver(new MockHostResolver),
       cert_verifier(new MockCertVerifier),
       channel_id_service(nullptr),
@@ -400,11 +402,12 @@
 SpdySessionDependencies::~SpdySessionDependencies() {}
 
 // static
-scoped_ptr<HttpNetworkSession> SpdySessionDependencies::SpdyCreateSession(
+std::unique_ptr<HttpNetworkSession> SpdySessionDependencies::SpdyCreateSession(
     SpdySessionDependencies* session_deps) {
   HttpNetworkSession::Params params = CreateSessionParams(session_deps);
   params.client_socket_factory = session_deps->socket_factory.get();
-  scoped_ptr<HttpNetworkSession> http_session(new HttpNetworkSession(params));
+  std::unique_ptr<HttpNetworkSession> http_session(
+      new HttpNetworkSession(params));
   SpdySessionPoolPeer pool_peer(http_session->spdy_session_pool());
   pool_peer.SetEnableSendingInitialData(false);
   return http_session;
@@ -454,17 +457,18 @@
     : storage_(this) {
   DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol;
 
-  storage_.set_host_resolver(scoped_ptr<HostResolver>(new MockHostResolver));
-  storage_.set_cert_verifier(make_scoped_ptr(new MockCertVerifier));
+  storage_.set_host_resolver(
+      std::unique_ptr<HostResolver>(new MockHostResolver));
+  storage_.set_cert_verifier(base::WrapUnique(new MockCertVerifier));
   storage_.set_transport_security_state(
-      make_scoped_ptr(new TransportSecurityState));
+      base::WrapUnique(new TransportSecurityState));
   storage_.set_proxy_service(ProxyService::CreateDirect());
   storage_.set_ssl_config_service(new SSLConfigServiceDefaults);
   storage_.set_http_auth_handler_factory(
       HttpAuthHandlerFactory::CreateDefault(host_resolver()));
   storage_.set_http_server_properties(
-      scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
-  storage_.set_job_factory(make_scoped_ptr(new URLRequestJobFactoryImpl()));
+      std::unique_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
+  storage_.set_job_factory(base::WrapUnique(new URLRequestJobFactoryImpl()));
   HttpNetworkSession::Params params;
   params.client_socket_factory = &socket_factory_;
   params.host_resolver = host_resolver();
@@ -477,11 +481,11 @@
   params.spdy_default_protocol = protocol;
   params.http_server_properties = http_server_properties();
   storage_.set_http_network_session(
-      make_scoped_ptr(new HttpNetworkSession(params)));
+      base::WrapUnique(new HttpNetworkSession(params)));
   SpdySessionPoolPeer pool_peer(
       storage_.http_network_session()->spdy_session_pool());
   pool_peer.SetEnableSendingInitialData(false);
-  storage_.set_http_transaction_factory(make_scoped_ptr(
+  storage_.set_http_transaction_factory(base::WrapUnique(
       new HttpCache(storage_.http_network_session(),
                     HttpCache::DefaultBackend::InMemory(0), false)));
 }
@@ -509,7 +513,7 @@
           key.host_port_pair(), false, OnHostResolutionCallback(),
           TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
 
-  scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
+  std::unique_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
   TestCompletionCallback callback;
 
   int rv = ERR_UNEXPECTED;
@@ -642,9 +646,10 @@
     Error expected_status) {
   EXPECT_NE(expected_status, ERR_IO_PENDING);
   EXPECT_FALSE(HasSpdySession(pool, key));
-  scoped_ptr<ClientSocketHandle> handle(new ClientSocketHandle());
-  handle->SetSocket(scoped_ptr<StreamSocket>(new FakeSpdySessionClientSocket(
-      expected_status == OK ? ERR_IO_PENDING : expected_status)));
+  std::unique_ptr<ClientSocketHandle> handle(new ClientSocketHandle());
+  handle->SetSocket(
+      std::unique_ptr<StreamSocket>(new FakeSpdySessionClientSocket(
+          expected_status == OK ? ERR_IO_PENDING : expected_status)));
   base::WeakPtr<SpdySession> spdy_session =
       pool->CreateAvailableSessionFromSocket(
           key, std::move(handle), BoundNetLog(), OK, true /* is_secure */);
@@ -714,30 +719,30 @@
   (*headers)[GetPathKey()] = path;
 }
 
-scoped_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructGetHeaderBlock(
+std::unique_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructGetHeaderBlock(
     base::StringPiece url) const {
   return ConstructHeaderBlock("GET", url, NULL);
 }
 
-scoped_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructGetHeaderBlockForProxy(
+std::unique_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructGetHeaderBlockForProxy(
     base::StringPiece url) const {
-  scoped_ptr<SpdyHeaderBlock> headers(ConstructGetHeaderBlock(url));
+  std::unique_ptr<SpdyHeaderBlock> headers(ConstructGetHeaderBlock(url));
   return headers;
 }
 
-scoped_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructHeadHeaderBlock(
+std::unique_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructHeadHeaderBlock(
     base::StringPiece url,
     int64_t content_length) const {
   return ConstructHeaderBlock("HEAD", url, nullptr);
 }
 
-scoped_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructPostHeaderBlock(
+std::unique_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructPostHeaderBlock(
     base::StringPiece url,
     int64_t content_length) const {
   return ConstructHeaderBlock("POST", url, &content_length);
 }
 
-scoped_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructPutHeaderBlock(
+std::unique_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructPutHeaderBlock(
     base::StringPiece url,
     int64_t content_length) const {
   return ConstructHeaderBlock("PUT", url, &content_length);
@@ -745,7 +750,7 @@
 
 SpdySerializedFrame* SpdyTestUtil::ConstructSpdyFrame(
     const SpdyHeaderInfo& header_info,
-    scoped_ptr<SpdyHeaderBlock> headers) const {
+    std::unique_ptr<SpdyHeaderBlock> headers) const {
   BufferedSpdyFramer framer(spdy_version_);
   SpdySerializedFrame* frame = NULL;
   switch (header_info.kind) {
@@ -787,7 +792,7 @@
     int extra_header_count,
     const char* const tail_headers[],
     int tail_header_count) const {
-  scoped_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock());
+  std::unique_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock());
   AppendToHeaderBlock(extra_headers, extra_header_count, headers.get());
   if (tail_headers && tail_header_count)
     AppendToHeaderBlock(tail_headers, tail_header_count, headers.get());
@@ -892,7 +897,7 @@
     const char* const url,
     SpdyStreamId stream_id,
     RequestPriority request_priority) {
-  scoped_ptr<SpdyHeaderBlock> block(ConstructGetHeaderBlock(url));
+  std::unique_ptr<SpdyHeaderBlock> block(ConstructGetHeaderBlock(url));
   return ConstructSpdySyn(stream_id, *block, request_priority, true);
 }
 
@@ -963,7 +968,7 @@
         response_spdy_framer_.SerializeFrame(headers));
 
     int joint_data_size = push_promise_frame.size() + headers_frame.size();
-    scoped_ptr<char[]> data(new char[joint_data_size]);
+    std::unique_ptr<char[]> data(new char[joint_data_size]);
     const SpdySerializedFrame* frames[2] = {
         &push_promise_frame, &headers_frame,
     };
@@ -1010,7 +1015,7 @@
         response_spdy_framer_.SerializeFrame(headers));
 
     int joint_data_size = push_promise_frame.size() + headers_frame.size();
-    scoped_ptr<char[]> data(new char[joint_data_size]);
+    std::unique_ptr<char[]> data(new char[joint_data_size]);
     const SpdySerializedFrame* frames[2] = {
         &push_promise_frame, &headers_frame,
     };
@@ -1022,7 +1027,7 @@
 }
 
 SpdySerializedFrame* SpdyTestUtil::ConstructInitialSpdyPushFrame(
-    scoped_ptr<SpdyHeaderBlock> headers,
+    std::unique_ptr<SpdyHeaderBlock> headers,
     int stream_id,
     int associated_stream_id) {
   if (spdy_version() < HTTP2) {
@@ -1172,7 +1177,7 @@
     RequestPriority priority,
     const char* const extra_headers[],
     int extra_header_count) {
-  scoped_ptr<SpdyHeaderBlock> block(
+  std::unique_ptr<SpdyHeaderBlock> block(
       ConstructPostHeaderBlock(url, content_length));
   AppendToHeaderBlock(extra_headers, extra_header_count, block.get());
   return ConstructSpdySyn(stream_id, *block, priority, false);
@@ -1228,7 +1233,7 @@
 }
 
 SpdySerializedFrame* SpdyTestUtil::ConstructWrappedSpdyFrame(
-    const scoped_ptr<SpdySerializedFrame>& frame,
+    const std::unique_ptr<SpdySerializedFrame>& frame,
     int stream_id) {
   return ConstructSpdyBodyFrame(stream_id, frame->data(),
                                 frame->size(), false);
@@ -1275,13 +1280,13 @@
   return ":path";
 }
 
-scoped_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructHeaderBlock(
+std::unique_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructHeaderBlock(
     base::StringPiece method,
     base::StringPiece url,
     int64_t* content_length) const {
   std::string scheme, host, path;
   ParseUrl(url.data(), &scheme, &host, &path);
-  scoped_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock());
+  std::unique_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock());
   if (include_version_header()) {
     (*headers)[GetVersionKey()] = "HTTP/1.1";
   }
diff --git a/net/spdy/spdy_test_util_common.h b/net/spdy/spdy_test_util_common.h
index c25fa96..5614671 100644
--- a/net/spdy/spdy_test_util_common.h
+++ b/net/spdy/spdy_test_util_common.h
@@ -8,12 +8,12 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "crypto/ec_private_key.h"
 #include "crypto/ec_signature_creator.h"
 #include "net/base/completion_callback.h"
@@ -175,24 +175,24 @@
 
   // Custom proxy service dependency.
   SpdySessionDependencies(NextProto protocol,
-                          scoped_ptr<ProxyService> proxy_service);
+                          std::unique_ptr<ProxyService> proxy_service);
 
   ~SpdySessionDependencies();
 
-  static scoped_ptr<HttpNetworkSession> SpdyCreateSession(
+  static std::unique_ptr<HttpNetworkSession> SpdyCreateSession(
       SpdySessionDependencies* session_deps);
   static HttpNetworkSession::Params CreateSessionParams(
       SpdySessionDependencies* session_deps);
 
   // NOTE: host_resolver must be ordered before http_auth_handler_factory.
-  scoped_ptr<MockHostResolverBase> host_resolver;
-  scoped_ptr<CertVerifier> cert_verifier;
-  scoped_ptr<ChannelIDService> channel_id_service;
-  scoped_ptr<TransportSecurityState> transport_security_state;
-  scoped_ptr<ProxyService> proxy_service;
+  std::unique_ptr<MockHostResolverBase> host_resolver;
+  std::unique_ptr<CertVerifier> cert_verifier;
+  std::unique_ptr<ChannelIDService> channel_id_service;
+  std::unique_ptr<TransportSecurityState> transport_security_state;
+  std::unique_ptr<ProxyService> proxy_service;
   scoped_refptr<SSLConfigService> ssl_config_service;
-  scoped_ptr<MockClientSocketFactory> socket_factory;
-  scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory;
+  std::unique_ptr<MockClientSocketFactory> socket_factory;
+  std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory;
   HttpServerPropertiesImpl http_server_properties;
   bool enable_ip_pooling;
   bool enable_ping;
@@ -205,7 +205,7 @@
   size_t session_max_recv_window_size;
   size_t stream_max_recv_window_size;
   SpdySession::TimeFunc time_func;
-  scoped_ptr<ProxyDelegate> proxy_delegate;
+  std::unique_ptr<ProxyDelegate> proxy_delegate;
   bool parse_alternative_services;
   bool enable_alternative_service_with_different_host;
   NetLog* net_log;
@@ -291,17 +291,17 @@
   void AddUrlToHeaderBlock(base::StringPiece url,
                            SpdyHeaderBlock* headers) const;
 
-  scoped_ptr<SpdyHeaderBlock> ConstructGetHeaderBlock(
+  std::unique_ptr<SpdyHeaderBlock> ConstructGetHeaderBlock(
       base::StringPiece url) const;
-  scoped_ptr<SpdyHeaderBlock> ConstructGetHeaderBlockForProxy(
+  std::unique_ptr<SpdyHeaderBlock> ConstructGetHeaderBlockForProxy(
       base::StringPiece url) const;
-  scoped_ptr<SpdyHeaderBlock> ConstructHeadHeaderBlock(
+  std::unique_ptr<SpdyHeaderBlock> ConstructHeadHeaderBlock(
       base::StringPiece url,
       int64_t content_length) const;
-  scoped_ptr<SpdyHeaderBlock> ConstructPostHeaderBlock(
+  std::unique_ptr<SpdyHeaderBlock> ConstructPostHeaderBlock(
       base::StringPiece url,
       int64_t content_length) const;
-  scoped_ptr<SpdyHeaderBlock> ConstructPutHeaderBlock(
+  std::unique_ptr<SpdyHeaderBlock> ConstructPutHeaderBlock(
       base::StringPiece url,
       int64_t content_length) const;
 
@@ -310,7 +310,7 @@
   // frame.
   SpdySerializedFrame* ConstructSpdyFrame(
       const SpdyHeaderInfo& header_info,
-      scoped_ptr<SpdyHeaderBlock> headers) const;
+      std::unique_ptr<SpdyHeaderBlock> headers) const;
 
   // Construct a SPDY frame.  If it is a SYN_STREAM or SYN_REPLY frame (as
   // specified in header_info.kind), the headers provided in extra_headers and
@@ -407,7 +407,7 @@
                                          const char* location);
 
   SpdySerializedFrame* ConstructInitialSpdyPushFrame(
-      scoped_ptr<SpdyHeaderBlock> headers,
+      std::unique_ptr<SpdyHeaderBlock> headers,
       int stream_id,
       int associated_stream_id);
 
@@ -509,7 +509,7 @@
 
   // Wraps |frame| in the payload of a data frame in stream |stream_id|.
   SpdySerializedFrame* ConstructWrappedSpdyFrame(
-      const scoped_ptr<SpdySerializedFrame>& frame,
+      const std::unique_ptr<SpdySerializedFrame>& frame,
       int stream_id);
 
   // Called when necessary (when it will affect stream dependency specification
@@ -541,7 +541,7 @@
  private:
   // |content_length| may be NULL, in which case the content-length
   // header will be omitted.
-  scoped_ptr<SpdyHeaderBlock> ConstructHeaderBlock(
+  std::unique_ptr<SpdyHeaderBlock> ConstructHeaderBlock(
       base::StringPiece method,
       base::StringPiece url,
       int64_t* content_length) const;
diff --git a/net/spdy/spdy_test_utils.cc b/net/spdy/spdy_test_utils.cc
index acc61c1..76ad5de 100644
--- a/net/spdy/spdy_test_utils.cc
+++ b/net/spdy/spdy_test_utils.cc
@@ -5,11 +5,11 @@
 #include "net/spdy/spdy_test_utils.h"
 
 #include <cstring>
+#include <memory>
 #include <vector>
 
 #include "base/base64.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/sys_byteorder.h"
 #include "net/http/transport_security_state.h"
@@ -68,7 +68,7 @@
                                    const int expected_len) {
   const int min_len = std::min(actual_len, expected_len);
   const int max_len = std::max(actual_len, expected_len);
-  scoped_ptr<bool[]> marks(new bool[max_len]);
+  std::unique_ptr<bool[]> marks(new bool[max_len]);
   bool identical = (actual_len == expected_len);
   for (int i = 0; i < min_len; ++i) {
     if (actual[i] != expected[i]) {
diff --git a/net/spdy/spdy_write_queue.cc b/net/spdy/spdy_write_queue.cc
index a8e65532..b49573c 100644
--- a/net/spdy/spdy_write_queue.cc
+++ b/net/spdy/spdy_write_queue.cc
@@ -46,7 +46,7 @@
 
 void SpdyWriteQueue::Enqueue(RequestPriority priority,
                              SpdyFrameType frame_type,
-                             scoped_ptr<SpdyBufferProducer> frame_producer,
+                             std::unique_ptr<SpdyBufferProducer> frame_producer,
                              const base::WeakPtr<SpdyStream>& stream) {
   CHECK(!removing_writes_);
   CHECK_GE(priority, MINIMUM_PRIORITY);
@@ -57,9 +57,10 @@
       PendingWrite(frame_type, frame_producer.release(), stream));
 }
 
-bool SpdyWriteQueue::Dequeue(SpdyFrameType* frame_type,
-                             scoped_ptr<SpdyBufferProducer>* frame_producer,
-                             base::WeakPtr<SpdyStream>* stream) {
+bool SpdyWriteQueue::Dequeue(
+    SpdyFrameType* frame_type,
+    std::unique_ptr<SpdyBufferProducer>* frame_producer,
+    base::WeakPtr<SpdyStream>* stream) {
   CHECK(!removing_writes_);
   for (int i = MAXIMUM_PRIORITY; i >= MINIMUM_PRIORITY; --i) {
     if (!queue_[i].empty()) {
diff --git a/net/spdy/spdy_write_queue.h b/net/spdy/spdy_write_queue.h
index 8383e7a..ebc8157 100644
--- a/net/spdy/spdy_write_queue.h
+++ b/net/spdy/spdy_write_queue.h
@@ -6,9 +6,9 @@
 #define NET_SPDY_SPDY_WRITE_QUEUE_H_
 
 #include <deque>
+#include <memory>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "net/base/net_export.h"
 #include "net/base/request_priority.h"
@@ -38,7 +38,7 @@
   // must remain non-NULL until the write is dequeued or removed.
   void Enqueue(RequestPriority priority,
                SpdyFrameType frame_type,
-               scoped_ptr<SpdyBufferProducer> frame_producer,
+               std::unique_ptr<SpdyBufferProducer> frame_producer,
                const base::WeakPtr<SpdyStream>& stream);
 
   // Dequeues the frame producer with the highest priority that was
@@ -46,7 +46,7 @@
   // fills in |frame_type|, |frame_producer|, and |stream| if
   // successful -- otherwise, just returns false.
   bool Dequeue(SpdyFrameType* frame_type,
-               scoped_ptr<SpdyBufferProducer>* frame_producer,
+               std::unique_ptr<SpdyBufferProducer>* frame_producer,
                base::WeakPtr<SpdyStream>* stream);
 
   // Removes all pending writes for the given stream, which must be
diff --git a/net/spdy/spdy_write_queue_unittest.cc b/net/spdy/spdy_write_queue_unittest.cc
index da9d9877..9ffacc8 100644
--- a/net/spdy/spdy_write_queue_unittest.cc
+++ b/net/spdy/spdy_write_queue_unittest.cc
@@ -6,11 +6,11 @@
 
 #include <cstddef>
 #include <cstring>
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_number_conversions.h"
 #include "net/base/request_priority.h"
 #include "net/log/net_log.h"
@@ -32,17 +32,18 @@
 
 // Makes a SpdyFrameProducer producing a frame with the data in the
 // given string.
-scoped_ptr<SpdyBufferProducer> StringToProducer(const std::string& s) {
-  scoped_ptr<char[]> data(new char[s.size()]);
+std::unique_ptr<SpdyBufferProducer> StringToProducer(const std::string& s) {
+  std::unique_ptr<char[]> data(new char[s.size()]);
   std::memcpy(data.get(), s.data(), s.size());
-  return scoped_ptr<SpdyBufferProducer>(new SimpleBufferProducer(
-      scoped_ptr<SpdyBuffer>(new SpdyBuffer(scoped_ptr<SpdySerializedFrame>(
-          new SpdySerializedFrame(data.release(), s.size(), true))))));
+  return std::unique_ptr<SpdyBufferProducer>(
+      new SimpleBufferProducer(std::unique_ptr<SpdyBuffer>(
+          new SpdyBuffer(std::unique_ptr<SpdySerializedFrame>(
+              new SpdySerializedFrame(data.release(), s.size(), true))))));
 }
 
 // Makes a SpdyBufferProducer producing a frame with the data in the
 // given int (converted to a string).
-scoped_ptr<SpdyBufferProducer> IntToProducer(int i) {
+std::unique_ptr<SpdyBufferProducer> IntToProducer(int i) {
   return StringToProducer(base::IntToString(i));
 }
 
@@ -56,13 +57,15 @@
         base::Bind(RequeingBufferProducer::ConsumeCallback, queue));
   }
 
-  scoped_ptr<SpdyBuffer> ProduceBuffer() override { return std::move(buffer_); }
+  std::unique_ptr<SpdyBuffer> ProduceBuffer() override {
+    return std::move(buffer_);
+  }
 
   static void ConsumeCallback(SpdyWriteQueue* queue,
                               size_t size,
                               SpdyBuffer::ConsumeSource source) {
-    scoped_ptr<SpdyBufferProducer> producer(
-        new SimpleBufferProducer(scoped_ptr<SpdyBuffer>(
+    std::unique_ptr<SpdyBufferProducer> producer(
+        new SimpleBufferProducer(std::unique_ptr<SpdyBuffer>(
             new SpdyBuffer(kRequeued, arraysize(kRequeued)))));
 
     queue->Enqueue(MEDIUM, RST_STREAM, std::move(producer),
@@ -70,19 +73,19 @@
   }
 
  private:
-  scoped_ptr<SpdyBuffer> buffer_;
+  std::unique_ptr<SpdyBuffer> buffer_;
 };
 
 // Produces a frame with the given producer and returns a copy of its
 // data as a string.
-std::string ProducerToString(scoped_ptr<SpdyBufferProducer> producer) {
-  scoped_ptr<SpdyBuffer> buffer = producer->ProduceBuffer();
+std::string ProducerToString(std::unique_ptr<SpdyBufferProducer> producer) {
+  std::unique_ptr<SpdyBuffer> buffer = producer->ProduceBuffer();
   return std::string(buffer->GetRemainingData(), buffer->GetRemainingSize());
 }
 
 // Produces a frame with the given producer and returns a copy of its
 // data as an int (converted from a string).
-int ProducerToInt(scoped_ptr<SpdyBufferProducer> producer) {
+int ProducerToInt(std::unique_ptr<SpdyBufferProducer> producer) {
   int i = 0;
   EXPECT_TRUE(base::StringToInt(ProducerToString(std::move(producer)), &i));
   return i;
@@ -102,12 +105,14 @@
 TEST_F(SpdyWriteQueueTest, DequeuesByPriority) {
   SpdyWriteQueue write_queue;
 
-  scoped_ptr<SpdyBufferProducer> producer_low = StringToProducer("LOW");
-  scoped_ptr<SpdyBufferProducer> producer_medium = StringToProducer("MEDIUM");
-  scoped_ptr<SpdyBufferProducer> producer_highest = StringToProducer("HIGHEST");
+  std::unique_ptr<SpdyBufferProducer> producer_low = StringToProducer("LOW");
+  std::unique_ptr<SpdyBufferProducer> producer_medium =
+      StringToProducer("MEDIUM");
+  std::unique_ptr<SpdyBufferProducer> producer_highest =
+      StringToProducer("HIGHEST");
 
-  scoped_ptr<SpdyStream> stream_medium(MakeTestStream(MEDIUM));
-  scoped_ptr<SpdyStream> stream_highest(MakeTestStream(HIGHEST));
+  std::unique_ptr<SpdyStream> stream_medium(MakeTestStream(MEDIUM));
+  std::unique_ptr<SpdyStream> stream_highest(MakeTestStream(HIGHEST));
 
   // A NULL stream should still work.
   write_queue.Enqueue(LOW, SYN_STREAM, std::move(producer_low),
@@ -118,7 +123,7 @@
                       stream_highest->GetWeakPtr());
 
   SpdyFrameType frame_type = DATA;
-  scoped_ptr<SpdyBufferProducer> frame_producer;
+  std::unique_ptr<SpdyBufferProducer> frame_producer;
   base::WeakPtr<SpdyStream> stream;
   ASSERT_TRUE(write_queue.Dequeue(&frame_type, &frame_producer, &stream));
   EXPECT_EQ(RST_STREAM, frame_type);
@@ -143,13 +148,13 @@
 TEST_F(SpdyWriteQueueTest, DequeuesFIFO) {
   SpdyWriteQueue write_queue;
 
-  scoped_ptr<SpdyBufferProducer> producer1 = IntToProducer(1);
-  scoped_ptr<SpdyBufferProducer> producer2 = IntToProducer(2);
-  scoped_ptr<SpdyBufferProducer> producer3 = IntToProducer(3);
+  std::unique_ptr<SpdyBufferProducer> producer1 = IntToProducer(1);
+  std::unique_ptr<SpdyBufferProducer> producer2 = IntToProducer(2);
+  std::unique_ptr<SpdyBufferProducer> producer3 = IntToProducer(3);
 
-  scoped_ptr<SpdyStream> stream1(MakeTestStream(DEFAULT_PRIORITY));
-  scoped_ptr<SpdyStream> stream2(MakeTestStream(DEFAULT_PRIORITY));
-  scoped_ptr<SpdyStream> stream3(MakeTestStream(DEFAULT_PRIORITY));
+  std::unique_ptr<SpdyStream> stream1(MakeTestStream(DEFAULT_PRIORITY));
+  std::unique_ptr<SpdyStream> stream2(MakeTestStream(DEFAULT_PRIORITY));
+  std::unique_ptr<SpdyStream> stream3(MakeTestStream(DEFAULT_PRIORITY));
 
   write_queue.Enqueue(DEFAULT_PRIORITY, SYN_STREAM, std::move(producer1),
                       stream1->GetWeakPtr());
@@ -159,7 +164,7 @@
                       stream3->GetWeakPtr());
 
   SpdyFrameType frame_type = DATA;
-  scoped_ptr<SpdyBufferProducer> frame_producer;
+  std::unique_ptr<SpdyBufferProducer> frame_producer;
   base::WeakPtr<SpdyStream> stream;
   ASSERT_TRUE(write_queue.Dequeue(&frame_type, &frame_producer, &stream));
   EXPECT_EQ(SYN_STREAM, frame_type);
@@ -185,8 +190,8 @@
 TEST_F(SpdyWriteQueueTest, RemovePendingWritesForStream) {
   SpdyWriteQueue write_queue;
 
-  scoped_ptr<SpdyStream> stream1(MakeTestStream(DEFAULT_PRIORITY));
-  scoped_ptr<SpdyStream> stream2(MakeTestStream(DEFAULT_PRIORITY));
+  std::unique_ptr<SpdyStream> stream1(MakeTestStream(DEFAULT_PRIORITY));
+  std::unique_ptr<SpdyStream> stream2(MakeTestStream(DEFAULT_PRIORITY));
 
   for (int i = 0; i < 100; ++i) {
     base::WeakPtr<SpdyStream> stream =
@@ -198,7 +203,7 @@
 
   for (int i = 0; i < 100; i += 3) {
     SpdyFrameType frame_type = DATA;
-    scoped_ptr<SpdyBufferProducer> frame_producer;
+    std::unique_ptr<SpdyBufferProducer> frame_producer;
     base::WeakPtr<SpdyStream> stream;
     ASSERT_TRUE(write_queue.Dequeue(&frame_type, &frame_producer, &stream));
     EXPECT_EQ(SYN_STREAM, frame_type);
@@ -207,7 +212,7 @@
   }
 
   SpdyFrameType frame_type = DATA;
-  scoped_ptr<SpdyBufferProducer> frame_producer;
+  std::unique_ptr<SpdyBufferProducer> frame_producer;
   base::WeakPtr<SpdyStream> stream;
   EXPECT_FALSE(write_queue.Dequeue(&frame_type, &frame_producer, &stream));
 }
@@ -219,14 +224,14 @@
 TEST_F(SpdyWriteQueueTest, RemovePendingWritesForStreamsAfter) {
   SpdyWriteQueue write_queue;
 
-  scoped_ptr<SpdyStream> stream1(MakeTestStream(DEFAULT_PRIORITY));
+  std::unique_ptr<SpdyStream> stream1(MakeTestStream(DEFAULT_PRIORITY));
   stream1->set_stream_id(1);
-  scoped_ptr<SpdyStream> stream2(MakeTestStream(DEFAULT_PRIORITY));
+  std::unique_ptr<SpdyStream> stream2(MakeTestStream(DEFAULT_PRIORITY));
   stream2->set_stream_id(3);
-  scoped_ptr<SpdyStream> stream3(MakeTestStream(DEFAULT_PRIORITY));
+  std::unique_ptr<SpdyStream> stream3(MakeTestStream(DEFAULT_PRIORITY));
   stream3->set_stream_id(5);
   // No stream id assigned.
-  scoped_ptr<SpdyStream> stream4(MakeTestStream(DEFAULT_PRIORITY));
+  std::unique_ptr<SpdyStream> stream4(MakeTestStream(DEFAULT_PRIORITY));
   base::WeakPtr<SpdyStream> streams[] = {
     stream1->GetWeakPtr(), stream2->GetWeakPtr(),
     stream3->GetWeakPtr(), stream4->GetWeakPtr()
@@ -241,7 +246,7 @@
 
   for (int i = 0; i < 100; i += arraysize(streams)) {
     SpdyFrameType frame_type = DATA;
-    scoped_ptr<SpdyBufferProducer> frame_producer;
+    std::unique_ptr<SpdyBufferProducer> frame_producer;
     base::WeakPtr<SpdyStream> stream;
     ASSERT_TRUE(write_queue.Dequeue(&frame_type, &frame_producer, &stream))
         << "Unable to Dequeue i: " << i;
@@ -251,7 +256,7 @@
   }
 
   SpdyFrameType frame_type = DATA;
-  scoped_ptr<SpdyBufferProducer> frame_producer;
+  std::unique_ptr<SpdyBufferProducer> frame_producer;
   base::WeakPtr<SpdyStream> stream;
   EXPECT_FALSE(write_queue.Dequeue(&frame_type, &frame_producer, &stream));
 }
@@ -270,7 +275,7 @@
   write_queue.Clear();
 
   SpdyFrameType frame_type = DATA;
-  scoped_ptr<SpdyBufferProducer> frame_producer;
+  std::unique_ptr<SpdyBufferProducer> frame_producer;
   base::WeakPtr<SpdyStream> stream;
   EXPECT_FALSE(write_queue.Dequeue(&frame_type, &frame_producer, &stream));
 }
@@ -278,13 +283,12 @@
 TEST_F(SpdyWriteQueueTest, RequeingProducerWithoutReentrance) {
   SpdyWriteQueue queue;
   queue.Enqueue(
-      DEFAULT_PRIORITY,
-      SYN_STREAM,
-      scoped_ptr<SpdyBufferProducer>(new RequeingBufferProducer(&queue)),
+      DEFAULT_PRIORITY, SYN_STREAM,
+      std::unique_ptr<SpdyBufferProducer>(new RequeingBufferProducer(&queue)),
       base::WeakPtr<SpdyStream>());
   {
     SpdyFrameType frame_type;
-    scoped_ptr<SpdyBufferProducer> producer;
+    std::unique_ptr<SpdyBufferProducer> producer;
     base::WeakPtr<SpdyStream> stream;
 
     EXPECT_TRUE(queue.Dequeue(&frame_type, &producer, &stream));
@@ -295,7 +299,7 @@
   EXPECT_FALSE(queue.IsEmpty());
 
   SpdyFrameType frame_type;
-  scoped_ptr<SpdyBufferProducer> producer;
+  std::unique_ptr<SpdyBufferProducer> producer;
   base::WeakPtr<SpdyStream> stream;
 
   EXPECT_TRUE(queue.Dequeue(&frame_type, &producer, &stream));
@@ -305,16 +309,15 @@
 TEST_F(SpdyWriteQueueTest, ReentranceOnClear) {
   SpdyWriteQueue queue;
   queue.Enqueue(
-      DEFAULT_PRIORITY,
-      SYN_STREAM,
-      scoped_ptr<SpdyBufferProducer>(new RequeingBufferProducer(&queue)),
+      DEFAULT_PRIORITY, SYN_STREAM,
+      std::unique_ptr<SpdyBufferProducer>(new RequeingBufferProducer(&queue)),
       base::WeakPtr<SpdyStream>());
 
   queue.Clear();
   EXPECT_FALSE(queue.IsEmpty());
 
   SpdyFrameType frame_type;
-  scoped_ptr<SpdyBufferProducer> producer;
+  std::unique_ptr<SpdyBufferProducer> producer;
   base::WeakPtr<SpdyStream> stream;
 
   EXPECT_TRUE(queue.Dequeue(&frame_type, &producer, &stream));
@@ -322,21 +325,20 @@
 }
 
 TEST_F(SpdyWriteQueueTest, ReentranceOnRemovePendingWritesAfter) {
-  scoped_ptr<SpdyStream> stream(MakeTestStream(DEFAULT_PRIORITY));
+  std::unique_ptr<SpdyStream> stream(MakeTestStream(DEFAULT_PRIORITY));
   stream->set_stream_id(2);
 
   SpdyWriteQueue queue;
   queue.Enqueue(
-      DEFAULT_PRIORITY,
-      SYN_STREAM,
-      scoped_ptr<SpdyBufferProducer>(new RequeingBufferProducer(&queue)),
+      DEFAULT_PRIORITY, SYN_STREAM,
+      std::unique_ptr<SpdyBufferProducer>(new RequeingBufferProducer(&queue)),
       stream->GetWeakPtr());
 
   queue.RemovePendingWritesForStreamsAfter(1);
   EXPECT_FALSE(queue.IsEmpty());
 
   SpdyFrameType frame_type;
-  scoped_ptr<SpdyBufferProducer> producer;
+  std::unique_ptr<SpdyBufferProducer> producer;
   base::WeakPtr<SpdyStream> weak_stream;
 
   EXPECT_TRUE(queue.Dequeue(&frame_type, &producer, &weak_stream));
@@ -344,21 +346,20 @@
 }
 
 TEST_F(SpdyWriteQueueTest, ReentranceOnRemovePendingWritesForStream) {
-  scoped_ptr<SpdyStream> stream(MakeTestStream(DEFAULT_PRIORITY));
+  std::unique_ptr<SpdyStream> stream(MakeTestStream(DEFAULT_PRIORITY));
   stream->set_stream_id(2);
 
   SpdyWriteQueue queue;
   queue.Enqueue(
-      DEFAULT_PRIORITY,
-      SYN_STREAM,
-      scoped_ptr<SpdyBufferProducer>(new RequeingBufferProducer(&queue)),
+      DEFAULT_PRIORITY, SYN_STREAM,
+      std::unique_ptr<SpdyBufferProducer>(new RequeingBufferProducer(&queue)),
       stream->GetWeakPtr());
 
   queue.RemovePendingWritesForStream(stream->GetWeakPtr());
   EXPECT_FALSE(queue.IsEmpty());
 
   SpdyFrameType frame_type;
-  scoped_ptr<SpdyBufferProducer> producer;
+  std::unique_ptr<SpdyBufferProducer> producer;
   base::WeakPtr<SpdyStream> weak_stream;
 
   EXPECT_TRUE(queue.Dequeue(&frame_type, &producer, &weak_stream));
diff --git a/net/test/net_test_suite.h b/net/test/net_test_suite.h
index 92f079c..6b154a8 100644
--- a/net/test/net_test_suite.h
+++ b/net/test/net_test_suite.h
@@ -5,6 +5,8 @@
 #ifndef NET_TEST_NET_TEST_SUITE_H_
 #define NET_TEST_NET_TEST_SUITE_H_
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
 #include "base/test/test_suite.h"
 #include "build/build_config.h"
@@ -41,8 +43,8 @@
   void InitializeTestThreadNoNetworkChangeNotifier();
 
  private:
-  scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
-  scoped_ptr<base::MessageLoop> message_loop_;
+  std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier_;
+  std::unique_ptr<base::MessageLoop> message_loop_;
   scoped_refptr<net::RuleBasedHostResolverProc> host_resolver_proc_;
   net::ScopedDefaultHostResolverProc scoped_host_resolver_proc_;
 };
diff --git a/net/tools/quic/quic_time_wait_list_manager.h b/net/tools/quic/quic_time_wait_list_manager.h
index 52e1d62..d29910fb 100644
--- a/net/tools/quic/quic_time_wait_list_manager.h
+++ b/net/tools/quic/quic_time_wait_list_manager.h
@@ -12,6 +12,7 @@
 #include <stddef.h>
 
 #include <deque>
+#include <memory>
 
 #include "base/macros.h"
 #include "net/base/linked_hash_map.h"
@@ -182,7 +183,7 @@
 
   // Alarm to clean up connection_ids that have out lived their duration in
   // time wait state.
-  scoped_ptr<QuicAlarm> connection_id_clean_up_alarm_;
+  std::unique_ptr<QuicAlarm> connection_id_clean_up_alarm_;
 
   // Clock to efficiently measure approximate time.
   const QuicClock* clock_;
diff --git a/net/url_request/certificate_report_sender.cc b/net/url_request/certificate_report_sender.cc
index 5db24578..672e291 100644
--- a/net/url_request/certificate_report_sender.cc
+++ b/net/url_request/certificate_report_sender.cc
@@ -38,7 +38,7 @@
 
 void CertificateReportSender::Send(const GURL& report_uri,
                                    const std::string& report) {
-  scoped_ptr<URLRequest> url_request =
+  std::unique_ptr<URLRequest> url_request =
       request_context_->CreateRequest(report_uri, DEFAULT_PRIORITY, this);
 
   int load_flags =
@@ -50,7 +50,7 @@
 
   url_request->set_method("POST");
 
-  scoped_ptr<UploadElementReader> reader(
+  std::unique_ptr<UploadElementReader> reader(
       UploadOwnedBytesElementReader::CreateWithString(report));
   url_request->set_upload(
       ElementsUploadDataStream::CreateWithReader(std::move(reader), 0));
diff --git a/net/url_request/certificate_report_sender.h b/net/url_request/certificate_report_sender.h
index a5b686c..f71fbe4 100644
--- a/net/url_request/certificate_report_sender.h
+++ b/net/url_request/certificate_report_sender.h
@@ -5,12 +5,12 @@
 #ifndef NET_URL_REQUEST_CERTIFICATE_REPORT_SENDER_H_
 #define NET_URL_REQUEST_CERTIFICATE_REPORT_SENDER_H_
 
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/http/transport_security_state.h"
 #include "net/url_request/url_request.h"
 
diff --git a/net/url_request/certificate_report_sender_unittest.cc b/net/url_request/certificate_report_sender_unittest.cc
index 98e7ac8b..cea4d34 100644
--- a/net/url_request/certificate_report_sender_unittest.cc
+++ b/net/url_request/certificate_report_sender_unittest.cc
@@ -227,7 +227,7 @@
 
   EXPECT_EQ(0u, network_delegate_.num_requests());
 
-  scoped_ptr<CertificateReportSender> reporter(new CertificateReportSender(
+  std::unique_ptr<CertificateReportSender> reporter(new CertificateReportSender(
       context(), CertificateReportSender::DO_NOT_SEND_COOKIES));
   reporter->Send(url, kDummyReport);
   reporter.reset();
diff --git a/net/url_request/ftp_protocol_handler.h b/net/url_request/ftp_protocol_handler.h
index d13bf0b0..8e40225 100644
--- a/net/url_request/ftp_protocol_handler.h
+++ b/net/url_request/ftp_protocol_handler.h
@@ -5,9 +5,10 @@
 #ifndef NET_URL_REQUEST_FTP_PROTOCOL_HANDLER_H_
 #define NET_URL_REQUEST_FTP_PROTOCOL_HANDLER_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/url_request/url_request_job_factory.h"
 
 namespace net {
@@ -31,7 +32,7 @@
   friend class FtpTestURLRequestContext;
 
   FtpTransactionFactory* ftp_transaction_factory_;
-  scoped_ptr<FtpAuthCache> ftp_auth_cache_;
+  std::unique_ptr<FtpAuthCache> ftp_auth_cache_;
 
   DISALLOW_COPY_AND_ASSIGN(FtpProtocolHandler);
 };
diff --git a/net/url_request/sdch_dictionary_fetcher.h b/net/url_request/sdch_dictionary_fetcher.h
index 7b18980..695121b 100644
--- a/net/url_request/sdch_dictionary_fetcher.h
+++ b/net/url_request/sdch_dictionary_fetcher.h
@@ -11,11 +11,11 @@
 #ifndef NET_URL_REQUEST_SDCH_DICTIONARY_FETCHER_H_
 #define NET_URL_REQUEST_SDCH_DICTIONARY_FETCHER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "net/base/sdch_manager.h"
 #include "net/url_request/url_fetcher_delegate.h"
@@ -99,11 +99,11 @@
   bool in_loop_;
 
   // A queue of URLs that are being used to download dictionaries.
-  scoped_ptr<UniqueFetchQueue> fetch_queue_;
+  std::unique_ptr<UniqueFetchQueue> fetch_queue_;
 
   // The request, buffer, and consumer supplied data used for getting
   // the current dictionary.  All are null when a fetch is not in progress.
-  scoped_ptr<URLRequest> current_request_;
+  std::unique_ptr<URLRequest> current_request_;
   scoped_refptr<IOBuffer> buffer_;
   OnDictionaryFetchedCallback current_callback_;
 
diff --git a/net/url_request/sdch_dictionary_fetcher_unittest.cc b/net/url_request/sdch_dictionary_fetcher_unittest.cc
index e676a25..eddc0607 100644
--- a/net/url_request/sdch_dictionary_fetcher_unittest.cc
+++ b/net/url_request/sdch_dictionary_fetcher_unittest.cc
@@ -121,7 +121,7 @@
   // SpecifiedResponseJobInterceptor (i.e. until Unregister() is called).
   static void RegisterWithFilter(HttpResponseInfo* http_response_info,
                                  const LifecycleCallback& lifecycle_callback) {
-    scoped_ptr<SpecifiedResponseJobInterceptor> interceptor(
+    std::unique_ptr<SpecifiedResponseJobInterceptor> interceptor(
         new SpecifiedResponseJobInterceptor(http_response_info,
                                             lifecycle_callback));
 
@@ -264,9 +264,9 @@
   // currently used for ensuring that certain loads are marked only-from-cache.
   int last_load_flags_seen_;
 
-  scoped_ptr<base::RunLoop> run_loop_;
-  scoped_ptr<TestURLRequestContext> context_;
-  scoped_ptr<SdchDictionaryFetcher> fetcher_;
+  std::unique_ptr<base::RunLoop> run_loop_;
+  std::unique_ptr<TestURLRequestContext> context_;
+  std::unique_ptr<SdchDictionaryFetcher> fetcher_;
   std::vector<DictionaryAdditions> dictionary_additions_;
 
   // The request_time and response_time fields are filled in by the constructor
diff --git a/net/url_request/test_url_fetcher_factory.cc b/net/url_request/test_url_fetcher_factory.cc
index a22c13a..16a93b3 100644
--- a/net/url_request/test_url_fetcher_factory.cc
+++ b/net/url_request/test_url_fetcher_factory.cc
@@ -170,7 +170,7 @@
 }
 
 void TestURLFetcher::SaveResponseWithWriter(
-    scoped_ptr<URLFetcherResponseWriter> response_writer) {
+    std::unique_ptr<URLFetcherResponseWriter> response_writer) {
   // In class URLFetcherCore this method is called by all three:
   // GetResponseAsString() / SaveResponseToFileAtPath() /
   // SaveResponseToTemporaryFile(). But here (in TestURLFetcher), this method
@@ -331,7 +331,7 @@
 
 TestURLFetcherFactory::~TestURLFetcherFactory() {}
 
-scoped_ptr<URLFetcher> TestURLFetcherFactory::CreateURLFetcher(
+std::unique_ptr<URLFetcher> TestURLFetcherFactory::CreateURLFetcher(
     int id,
     const GURL& url,
     URLFetcher::RequestType request_type,
@@ -341,7 +341,7 @@
     fetcher->set_owner(this);
   fetcher->SetDelegateForTests(delegate_for_tests_);
   fetchers_[id] = fetcher;
-  return scoped_ptr<URLFetcher>(fetcher);
+  return std::unique_ptr<URLFetcher>(fetcher);
 }
 
 TestURLFetcher* TestURLFetcherFactory::GetFetcherByID(int id) const {
@@ -427,19 +427,20 @@
       default_factory_(default_factory) {
 }
 
-scoped_ptr<FakeURLFetcher> FakeURLFetcherFactory::DefaultFakeURLFetcherCreator(
-      const GURL& url,
-      URLFetcherDelegate* delegate,
-      const std::string& response_data,
-      HttpStatusCode response_code,
-      URLRequestStatus::Status status) {
-  return scoped_ptr<FakeURLFetcher>(
+std::unique_ptr<FakeURLFetcher>
+FakeURLFetcherFactory::DefaultFakeURLFetcherCreator(
+    const GURL& url,
+    URLFetcherDelegate* delegate,
+    const std::string& response_data,
+    HttpStatusCode response_code,
+    URLRequestStatus::Status status) {
+  return std::unique_ptr<FakeURLFetcher>(
       new FakeURLFetcher(url, delegate, response_data, response_code, status));
 }
 
 FakeURLFetcherFactory::~FakeURLFetcherFactory() {}
 
-scoped_ptr<URLFetcher> FakeURLFetcherFactory::CreateURLFetcher(
+std::unique_ptr<URLFetcher> FakeURLFetcherFactory::CreateURLFetcher(
     int id,
     const GURL& url,
     URLFetcher::RequestType request_type,
@@ -455,7 +456,7 @@
     }
   }
 
-  scoped_ptr<URLFetcher> fake_fetcher =
+  std::unique_ptr<URLFetcher> fake_fetcher =
       creator_.Run(url, d, it->second.response_data, it->second.response_code,
                    it->second.status);
   return fake_fetcher;
@@ -482,12 +483,12 @@
 
 URLFetcherImplFactory::~URLFetcherImplFactory() {}
 
-scoped_ptr<URLFetcher> URLFetcherImplFactory::CreateURLFetcher(
+std::unique_ptr<URLFetcher> URLFetcherImplFactory::CreateURLFetcher(
     int id,
     const GURL& url,
     URLFetcher::RequestType request_type,
     URLFetcherDelegate* d) {
-  return scoped_ptr<URLFetcher>(new URLFetcherImpl(url, request_type, d));
+  return std::unique_ptr<URLFetcher>(new URLFetcherImpl(url, request_type, d));
 }
 
 }  // namespace net
diff --git a/net/url_request/test_url_fetcher_factory.h b/net/url_request/test_url_fetcher_factory.h
index c8d7867..8f345f5 100644
--- a/net/url_request/test_url_fetcher_factory.h
+++ b/net/url_request/test_url_fetcher_factory.h
@@ -9,6 +9,7 @@
 
 #include <list>
 #include <map>
+#include <memory>
 #include <string>
 #include <utility>
 
@@ -16,7 +17,6 @@
 #include "base/compiler_specific.h"
 #include "base/files/file_path.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "net/http/http_request_headers.h"
@@ -130,7 +130,7 @@
   void SaveResponseToTemporaryFile(
       scoped_refptr<base::SequencedTaskRunner> file_task_runner) override;
   void SaveResponseWithWriter(
-      scoped_ptr<URLFetcherResponseWriter> response_writer) override;
+      std::unique_ptr<URLFetcherResponseWriter> response_writer) override;
   HttpResponseHeaders* GetResponseHeaders() const override;
   HostPortPair GetSocketAddress() const override;
   bool WasFetchedViaProxy() const override;
@@ -237,7 +237,7 @@
   HttpRequestHeaders fake_extra_request_headers_;
   int fake_max_retries_;
   base::TimeDelta fake_backoff_delay_;
-  scoped_ptr<URLFetcherResponseWriter> response_writer_;
+  std::unique_ptr<URLFetcherResponseWriter> response_writer_;
 
   DISALLOW_COPY_AND_ASSIGN(TestURLFetcher);
 };
@@ -254,10 +254,11 @@
   TestURLFetcherFactory();
   ~TestURLFetcherFactory() override;
 
-  scoped_ptr<URLFetcher> CreateURLFetcher(int id,
-                                          const GURL& url,
-                                          URLFetcher::RequestType request_type,
-                                          URLFetcherDelegate* d) override;
+  std::unique_ptr<URLFetcher> CreateURLFetcher(
+      int id,
+      const GURL& url,
+      URLFetcher::RequestType request_type,
+      URLFetcherDelegate* d) override;
   TestURLFetcher* GetFetcherByID(int id) const;
   void RemoveFetcherFromMap(int id);
   void SetDelegateForTests(TestURLFetcherDelegateForTests* delegate_for_tests);
@@ -384,12 +385,13 @@
   // These arguments should by default be used in instantiating FakeURLFetcher
   // like so:
   // new FakeURLFetcher(url, delegate, response_data, response_code, status)
-  typedef base::Callback<scoped_ptr<FakeURLFetcher>(
+  typedef base::Callback<std::unique_ptr<FakeURLFetcher>(
       const GURL&,
       URLFetcherDelegate*,
       const std::string&,
       HttpStatusCode,
-      URLRequestStatus::Status)> FakeURLFetcherCreator;
+      URLRequestStatus::Status)>
+      FakeURLFetcherCreator;
 
   // |default_factory|, which can be NULL, is a URLFetcherFactory that
   // will be used to construct a URLFetcher in case the URL being created
@@ -414,10 +416,11 @@
   // NULL.
   // Otherwise, it will return a URLFetcher object which will respond with the
   // pre-baked response that the client has set by calling SetFakeResponse().
-  scoped_ptr<URLFetcher> CreateURLFetcher(int id,
-                                          const GURL& url,
-                                          URLFetcher::RequestType request_type,
-                                          URLFetcherDelegate* d) override;
+  std::unique_ptr<URLFetcher> CreateURLFetcher(
+      int id,
+      const GURL& url,
+      URLFetcher::RequestType request_type,
+      URLFetcherDelegate* d) override;
 
   // Sets the fake response for a given URL. The |response_data| may be empty.
   // The |response_code| may be any HttpStatusCode. For instance, HTTP_OK will
@@ -447,7 +450,7 @@
   FakeResponseMap fake_responses_;
   URLFetcherFactory* const default_factory_;
 
-  static scoped_ptr<FakeURLFetcher> DefaultFakeURLFetcherCreator(
+  static std::unique_ptr<FakeURLFetcher> DefaultFakeURLFetcherCreator(
       const GURL& url,
       URLFetcherDelegate* delegate,
       const std::string& response_data,
@@ -466,10 +469,11 @@
   ~URLFetcherImplFactory() override;
 
   // This method will create a real URLFetcher.
-  scoped_ptr<URLFetcher> CreateURLFetcher(int id,
-                                          const GURL& url,
-                                          URLFetcher::RequestType request_type,
-                                          URLFetcherDelegate* d) override;
+  std::unique_ptr<URLFetcher> CreateURLFetcher(
+      int id,
+      const GURL& url,
+      URLFetcher::RequestType request_type,
+      URLFetcherDelegate* d) override;
 };
 
 }  // namespace net
diff --git a/net/url_request/test_url_request_interceptor.cc b/net/url_request/test_url_request_interceptor.cc
index 7b098f6..4cd00693 100644
--- a/net/url_request/test_url_request_interceptor.cc
+++ b/net/url_request/test_url_request_interceptor.cc
@@ -59,7 +59,7 @@
 
   void Register() {
     URLRequestFilter::GetInstance()->AddHostnameInterceptor(
-        scheme_, hostname_, scoped_ptr<URLRequestInterceptor>(this));
+        scheme_, hostname_, std::unique_ptr<URLRequestInterceptor>(this));
   }
 
   static void Unregister(const std::string& scheme,
diff --git a/net/url_request/url_fetcher.cc b/net/url_request/url_fetcher.cc
index d4bd8200..1d13e45 100644
--- a/net/url_request/url_fetcher.cc
+++ b/net/url_request/url_fetcher.cc
@@ -12,21 +12,23 @@
 URLFetcher::~URLFetcher() {}
 
 // static
-scoped_ptr<URLFetcher> URLFetcher::Create(const GURL& url,
-                                          URLFetcher::RequestType request_type,
-                                          URLFetcherDelegate* d) {
+std::unique_ptr<URLFetcher> URLFetcher::Create(
+    const GURL& url,
+    URLFetcher::RequestType request_type,
+    URLFetcherDelegate* d) {
   return URLFetcher::Create(0, url, request_type, d);
 }
 
 // static
-scoped_ptr<URLFetcher> URLFetcher::Create(int id,
-                                          const GURL& url,
-                                          URLFetcher::RequestType request_type,
-                                          URLFetcherDelegate* d) {
+std::unique_ptr<URLFetcher> URLFetcher::Create(
+    int id,
+    const GURL& url,
+    URLFetcher::RequestType request_type,
+    URLFetcherDelegate* d) {
   URLFetcherFactory* factory = URLFetcherImpl::factory();
-  return factory
-             ? factory->CreateURLFetcher(id, url, request_type, d)
-             : scoped_ptr<URLFetcher>(new URLFetcherImpl(url, request_type, d));
+  return factory ? factory->CreateURLFetcher(id, url, request_type, d)
+                 : std::unique_ptr<URLFetcher>(
+                       new URLFetcherImpl(url, request_type, d));
 }
 
 // static
diff --git a/net/url_request/url_fetcher.h b/net/url_request/url_fetcher.h
index 3536f0b..0bf2b9cf 100644
--- a/net/url_request/url_fetcher.h
+++ b/net/url_request/url_fetcher.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback_forward.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/supports_user_data.h"
 #include "net/base/net_export.h"
 #include "net/url_request/url_request.h"
@@ -38,7 +38,7 @@
 
 // To use this class, create an instance with the desired URL and a pointer to
 // the object to be notified when the URL has been loaded:
-//   scoped_ptr<URLFetcher> fetcher =
+//   std::unique_ptr<URLFetcher> fetcher =
 //       URLFetcher::Create(GURL("http://www.google.com"),
 //                          URLFetcher::GET,
 //                          this);
@@ -95,7 +95,7 @@
 
   // Used by SetUploadStreamFactory. The callback should assign a fresh upload
   // data stream every time it's called.
-  typedef base::Callback<scoped_ptr<UploadDataStream>()>
+  typedef base::Callback<std::unique_ptr<UploadDataStream>()>
       CreateUploadStreamCallback;
 
   virtual ~URLFetcher();
@@ -103,17 +103,19 @@
   // |url| is the URL to send the request to.
   // |request_type| is the type of request to make.
   // |d| the object that will receive the callback on fetch completion.
-  static scoped_ptr<URLFetcher> Create(const GURL& url,
-                                       URLFetcher::RequestType request_type,
-                                       URLFetcherDelegate* d);
+  static std::unique_ptr<URLFetcher> Create(
+      const GURL& url,
+      URLFetcher::RequestType request_type,
+      URLFetcherDelegate* d);
 
   // Like above, but if there's a URLFetcherFactory registered with the
   // implementation it will be used. |id| may be used during testing to identify
   // who is creating the URLFetcher.
-  static scoped_ptr<URLFetcher> Create(int id,
-                                       const GURL& url,
-                                       URLFetcher::RequestType request_type,
-                                       URLFetcherDelegate* d);
+  static std::unique_ptr<URLFetcher> Create(
+      int id,
+      const GURL& url,
+      URLFetcher::RequestType request_type,
+      URLFetcherDelegate* d);
 
   // Cancels all existing URLFetchers.  Will notify the URLFetcherDelegates.
   // Note that any new URLFetchers created while this is running will not be
@@ -268,7 +270,7 @@
   // By default, the response is saved in a string. Call this method to use the
   // specified writer to save the response. Must be called before Start().
   virtual void SaveResponseWithWriter(
-      scoped_ptr<URLFetcherResponseWriter> response_writer) = 0;
+      std::unique_ptr<URLFetcherResponseWriter> response_writer) = 0;
 
   // Retrieve the response headers from the request.  Must only be called after
   // the OnURLFetchComplete callback has run.
diff --git a/net/url_request/url_fetcher_core.cc b/net/url_request/url_fetcher_core.cc
index 3b1e1cc..1ea2c0b0 100644
--- a/net/url_request/url_fetcher_core.cc
+++ b/net/url_request/url_fetcher_core.cc
@@ -288,19 +288,19 @@
     const base::FilePath& file_path,
     scoped_refptr<base::SequencedTaskRunner> file_task_runner) {
   DCHECK(delegate_task_runner_->BelongsToCurrentThread());
-  SaveResponseWithWriter(scoped_ptr<URLFetcherResponseWriter>(
+  SaveResponseWithWriter(std::unique_ptr<URLFetcherResponseWriter>(
       new URLFetcherFileWriter(file_task_runner, file_path)));
 }
 
 void URLFetcherCore::SaveResponseToTemporaryFile(
     scoped_refptr<base::SequencedTaskRunner> file_task_runner) {
   DCHECK(delegate_task_runner_->BelongsToCurrentThread());
-  SaveResponseWithWriter(scoped_ptr<URLFetcherResponseWriter>(
+  SaveResponseWithWriter(std::unique_ptr<URLFetcherResponseWriter>(
       new URLFetcherFileWriter(file_task_runner, base::FilePath())));
 }
 
 void URLFetcherCore::SaveResponseWithWriter(
-    scoped_ptr<URLFetcherResponseWriter> response_writer) {
+    std::unique_ptr<URLFetcherResponseWriter> response_writer) {
   DCHECK(delegate_task_runner_->BelongsToCurrentThread());
   response_writer_ = std::move(response_writer);
 }
@@ -594,21 +594,19 @@
                                          upload_content_type_);
       }
       if (!upload_content_.empty()) {
-        scoped_ptr<UploadElementReader> reader(new UploadBytesElementReader(
-            upload_content_.data(), upload_content_.size()));
+        std::unique_ptr<UploadElementReader> reader(
+            new UploadBytesElementReader(upload_content_.data(),
+                                         upload_content_.size()));
         request_->set_upload(
             ElementsUploadDataStream::CreateWithReader(std::move(reader), 0));
       } else if (!upload_file_path_.empty()) {
-        scoped_ptr<UploadElementReader> reader(
-            new UploadFileElementReader(upload_file_task_runner_.get(),
-                                        upload_file_path_,
-                                        upload_range_offset_,
-                                        upload_range_length_,
-                                        base::Time()));
+        std::unique_ptr<UploadElementReader> reader(new UploadFileElementReader(
+            upload_file_task_runner_.get(), upload_file_path_,
+            upload_range_offset_, upload_range_length_, base::Time()));
         request_->set_upload(
             ElementsUploadDataStream::CreateWithReader(std::move(reader), 0));
       } else if (!upload_stream_factory_.is_null()) {
-        scoped_ptr<UploadDataStream> stream = upload_stream_factory_.Run();
+        std::unique_ptr<UploadDataStream> stream = upload_stream_factory_.Run();
         DCHECK(stream);
         request_->set_upload(std::move(stream));
       }
diff --git a/net/url_request/url_fetcher_core.h b/net/url_request/url_fetcher_core.h
index 1f3d7fdd..243de0a 100644
--- a/net/url_request/url_fetcher_core.h
+++ b/net/url_request/url_fetcher_core.h
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <set>
 #include <string>
 
@@ -16,7 +17,6 @@
 #include "base/lazy_instance.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/timer/timer.h"
 #include "net/base/chunked_upload_data_stream.h"
 #include "net/base/host_port_pair.h"
@@ -111,7 +111,7 @@
   void SaveResponseToTemporaryFile(
       scoped_refptr<base::SequencedTaskRunner> file_task_runner);
   void SaveResponseWithWriter(
-      scoped_ptr<URLFetcherResponseWriter> response_writer);
+      std::unique_ptr<URLFetcherResponseWriter> response_writer);
   HttpResponseHeaders* GetResponseHeaders() const;
   HostPortPair GetSocketAddress() const;
   bool WasFetchedViaProxy() const;
@@ -240,7 +240,7 @@
   scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
   // Task runner for upload file access.
   scoped_refptr<base::TaskRunner> upload_file_task_runner_;
-  scoped_ptr<URLRequest> request_;   // The actual request this wraps
+  std::unique_ptr<URLRequest> request_;  // The actual request this wraps
   int load_flags_;                   // Flags for the load operation
   int response_code_;                // HTTP status code for the request
   scoped_refptr<IOBuffer> buffer_;
@@ -277,10 +277,10 @@
   // Used to write to |chunked_stream|, even after ownership has been passed to
   // the URLRequest. Continues to be valid even after the request deletes its
   // upload data.
-  scoped_ptr<ChunkedUploadDataStream::Writer> chunked_stream_writer_;
+  std::unique_ptr<ChunkedUploadDataStream::Writer> chunked_stream_writer_;
 
   // Temporary storage of ChunkedUploadDataStream, before request is created.
-  scoped_ptr<ChunkedUploadDataStream> chunked_stream_;
+  std::unique_ptr<ChunkedUploadDataStream> chunked_stream_;
 
   // Used to determine how long to wait before making a request or doing a
   // retry.
@@ -305,7 +305,7 @@
   bool was_cancelled_;
 
   // Writer object to write response to the destination like file and string.
-  scoped_ptr<URLFetcherResponseWriter> response_writer_;
+  std::unique_ptr<URLFetcherResponseWriter> response_writer_;
 
   // By default any server-initiated redirects are automatically followed. If
   // this flag is set to true, however, a redirect will halt the fetch and call
@@ -339,7 +339,7 @@
 
   // Timer to poll the progress of uploading for POST and PUT requests.
   // When crbug.com/119629 is fixed, scoped_ptr is not necessary here.
-  scoped_ptr<base::RepeatingTimer> upload_progress_checker_timer_;
+  std::unique_ptr<base::RepeatingTimer> upload_progress_checker_timer_;
   // Number of bytes sent so far.
   int64_t current_upload_bytes_;
   // Number of bytes received so far.
diff --git a/net/url_request/url_fetcher_delegate.h b/net/url_request/url_fetcher_delegate.h
index 1f5eb5dbe..192e70ac 100644
--- a/net/url_request/url_fetcher_delegate.h
+++ b/net/url_request/url_fetcher_delegate.h
@@ -7,9 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
diff --git a/net/url_request/url_fetcher_factory.h b/net/url_request/url_fetcher_factory.h
index 2cf024e..1eadec4 100644
--- a/net/url_request/url_fetcher_factory.h
+++ b/net/url_request/url_fetcher_factory.h
@@ -14,7 +14,7 @@
 // URLFetcher. Factory is intended for testing.
 class URLFetcherFactory {
  public:
-  virtual scoped_ptr<URLFetcher> CreateURLFetcher(
+  virtual std::unique_ptr<URLFetcher> CreateURLFetcher(
       int id,
       const GURL& url,
       URLFetcher::RequestType request_type,
diff --git a/net/url_request/url_fetcher_impl.cc b/net/url_request/url_fetcher_impl.cc
index 37a77ff..1168b5f 100644
--- a/net/url_request/url_fetcher_impl.cc
+++ b/net/url_request/url_fetcher_impl.cc
@@ -139,7 +139,7 @@
 }
 
 void URLFetcherImpl::SaveResponseWithWriter(
-    scoped_ptr<URLFetcherResponseWriter> response_writer) {
+    std::unique_ptr<URLFetcherResponseWriter> response_writer) {
   core_->SaveResponseWithWriter(std::move(response_writer));
 }
 
diff --git a/net/url_request/url_fetcher_impl.h b/net/url_request/url_fetcher_impl.h
index 107982a..64eee5c2 100644
--- a/net/url_request/url_fetcher_impl.h
+++ b/net/url_request/url_fetcher_impl.h
@@ -77,7 +77,7 @@
   void SaveResponseToTemporaryFile(
       scoped_refptr<base::SequencedTaskRunner> file_task_runner) override;
   void SaveResponseWithWriter(
-      scoped_ptr<URLFetcherResponseWriter> response_writer) override;
+      std::unique_ptr<URLFetcherResponseWriter> response_writer) override;
   HttpResponseHeaders* GetResponseHeaders() const override;
   HostPortPair GetSocketAddress() const override;
   bool WasFetchedViaProxy() const override;
diff --git a/net/url_request/url_fetcher_impl_unittest.cc b/net/url_request/url_fetcher_impl_unittest.cc
index 6775fa2..1f83e1d 100644
--- a/net/url_request/url_fetcher_impl_unittest.cc
+++ b/net/url_request/url_fetcher_impl_unittest.cc
@@ -9,6 +9,7 @@
 
 #include <algorithm>
 #include <limits>
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
@@ -17,7 +18,7 @@
 #include "base/files/scoped_temp_dir.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
@@ -155,7 +156,7 @@
  private:
   bool did_complete_;
 
-  scoped_ptr<URLFetcherImpl> fetcher_;
+  std::unique_ptr<URLFetcherImpl> fetcher_;
   base::RunLoop run_loop_;
 
   DISALLOW_COPY_AND_ASSIGN(WaitingURLFetcherDelegate);
@@ -172,9 +173,9 @@
     mock_resolver_->rules()->AddRule(hanging_domain, "127.0.0.1");
     // Pass ownership to ContextStorage to ensure correct destruction order.
     context_storage_.set_host_resolver(
-        scoped_ptr<HostResolver>(mock_resolver_));
+        std::unique_ptr<HostResolver>(mock_resolver_));
     context_storage_.set_throttler_manager(
-        make_scoped_ptr(new URLRequestThrottlerManager()));
+        base::WrapUnique(new URLRequestThrottlerManager()));
     Init();
   }
 
@@ -293,7 +294,7 @@
   scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
   const std::string hanging_domain_;
 
-  scoped_ptr<FetcherTestURLRequestContext> context_;
+  std::unique_ptr<FetcherTestURLRequestContext> context_;
   bool shutting_down_;
 
   base::Closure on_destruction_callback_;
@@ -338,13 +339,13 @@
   }
 
   // Callback passed to URLFetcher to create upload stream by some tests.
-  scoped_ptr<UploadDataStream> CreateUploadStream() {
+  std::unique_ptr<UploadDataStream> CreateUploadStream() {
     ++num_upload_streams_created_;
     std::vector<char> buffer(
         kCreateUploadStreamBody,
         kCreateUploadStreamBody + strlen(kCreateUploadStreamBody));
     return ElementsUploadDataStream::CreateWithReader(
-        scoped_ptr<UploadElementReader>(
+        std::unique_ptr<UploadElementReader>(
             new UploadOwnedBytesElementReader(&buffer)),
         0);
   }
@@ -363,7 +364,7 @@
                     bool save_to_temporary_file,
                     const base::FilePath& requested_out_path,
                     bool take_ownership) {
-    scoped_ptr<WaitingURLFetcherDelegate> delegate(
+    std::unique_ptr<WaitingURLFetcherDelegate> delegate(
         new WaitingURLFetcherDelegate());
     delegate->CreateFetcher(
         test_server_->GetURL(std::string(kTestServerFilePrefix) +
@@ -445,9 +446,9 @@
 
   // Network thread for cross-thread tests.  Most threads just use the main
   // thread for network activity.
-  scoped_ptr<base::Thread> network_thread_;
+  std::unique_ptr<base::Thread> network_thread_;
 
-  scoped_ptr<EmbeddedTestServer> test_server_;
+  std::unique_ptr<EmbeddedTestServer> test_server_;
   GURL hanging_url_;
 
   size_t num_upload_streams_created_;
diff --git a/net/url_request/url_fetcher_response_writer.h b/net/url_request/url_fetcher_response_writer.h
index 891123a6..f739502b 100644
--- a/net/url_request/url_fetcher_response_writer.h
+++ b/net/url_request/url_fetcher_response_writer.h
@@ -5,12 +5,12 @@
 #ifndef NET_URL_REQUEST_URL_FETCHER_RESPONSE_WRITER_H_
 #define NET_URL_REQUEST_URL_FETCHER_RESPONSE_WRITER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
@@ -131,7 +131,7 @@
   // True when this instance is responsible to delete the file at |file_path_|.
   bool owns_file_;
 
-  scoped_ptr<FileStream> file_stream_;
+  std::unique_ptr<FileStream> file_stream_;
 
   // Callbacks are created for use with base::FileUtilProxy.
   base::WeakPtrFactory<URLFetcherFileWriter> weak_factory_;
diff --git a/net/url_request/url_fetcher_response_writer_unittest.cc b/net/url_request/url_fetcher_response_writer_unittest.cc
index e6c1696..1cd4cc7 100644
--- a/net/url_request/url_fetcher_response_writer_unittest.cc
+++ b/net/url_request/url_fetcher_response_writer_unittest.cc
@@ -28,7 +28,7 @@
     buf_ = new StringIOBuffer(kData);
   }
 
-  scoped_ptr<URLFetcherStringWriter> writer_;
+  std::unique_ptr<URLFetcherStringWriter> writer_;
   scoped_refptr<StringIOBuffer> buf_;
 };
 
@@ -64,7 +64,7 @@
 
   base::ScopedTempDir temp_dir_;
   base::FilePath file_path_;
-  scoped_ptr<URLFetcherFileWriter> writer_;
+  std::unique_ptr<URLFetcherFileWriter> writer_;
   scoped_refptr<StringIOBuffer> buf_;
 };
 
@@ -150,7 +150,7 @@
     buf_ = new StringIOBuffer(kData);
   }
 
-  scoped_ptr<URLFetcherFileWriter> writer_;
+  std::unique_ptr<URLFetcherFileWriter> writer_;
   scoped_refptr<StringIOBuffer> buf_;
 };
 
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 2ace1d2..d6582e3 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -190,7 +190,7 @@
   net_log_.EndEventWithNetErrorCode(NetLog::TYPE_REQUEST_ALIVE, net_error);
 }
 
-void URLRequest::set_upload(scoped_ptr<UploadDataStream> upload) {
+void URLRequest::set_upload(std::unique_ptr<UploadDataStream> upload) {
   upload_data_stream_ = std::move(upload);
 }
 
@@ -261,12 +261,12 @@
                             base::string16());
 }
 
-scoped_ptr<base::Value> URLRequest::GetStateAsValue() const {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+std::unique_ptr<base::Value> URLRequest::GetStateAsValue() const {
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("url", original_url().possibly_invalid_spec());
 
   if (url_chain_.size() > 1) {
-    scoped_ptr<base::ListValue> list(new base::ListValue());
+    std::unique_ptr<base::ListValue> list(new base::ListValue());
     for (const GURL& url : url_chain_) {
       list->AppendString(url.possibly_invalid_spec());
     }
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index fcbc445..745160ea 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -7,13 +7,13 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/debug/leak_tracker.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "base/supports_user_data.h"
 #include "base/threading/non_thread_safe.h"
@@ -338,7 +338,7 @@
   void set_delegate(Delegate* delegate);
 
   // Sets the upload data.
-  void set_upload(scoped_ptr<UploadDataStream> upload);
+  void set_upload(std::unique_ptr<UploadDataStream> upload);
 
   // Gets the upload data.
   const UploadDataStream* get_upload() const;
@@ -396,7 +396,7 @@
 
   // Returns a partial representation of the request's state as a value, for
   // debugging.
-  scoped_ptr<base::Value> GetStateAsValue() const;
+  std::unique_ptr<base::Value> GetStateAsValue() const;
 
   // Logs information about the what external object currently blocking the
   // request.  LogUnblocked must be called before resuming the request.  This
@@ -770,8 +770,8 @@
   // Tracks the time spent in various load states throughout this request.
   BoundNetLog net_log_;
 
-  scoped_ptr<URLRequestJob> job_;
-  scoped_ptr<UploadDataStream> upload_data_stream_;
+  std::unique_ptr<URLRequestJob> job_;
+  std::unique_ptr<UploadDataStream> upload_data_stream_;
 
   std::vector<GURL> url_chain_;
   GURL first_party_for_cookies_;
@@ -871,7 +871,7 @@
   // The proxy server used for this request, if any.
   HostPortPair proxy_server_;
 
-  scoped_ptr<const base::debug::StackTrace> stack_trace_;
+  std::unique_ptr<const base::debug::StackTrace> stack_trace_;
 
   DISALLOW_COPY_AND_ASSIGN(URLRequest);
 };
diff --git a/net/url_request/url_request_backoff_manager_unittest.cc b/net/url_request/url_request_backoff_manager_unittest.cc
index 21a892e..a41a537 100644
--- a/net/url_request/url_request_backoff_manager_unittest.cc
+++ b/net/url_request/url_request_backoff_manager_unittest.cc
@@ -4,7 +4,8 @@
 
 #include "net/url_request/url_request_backoff_manager.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/strings/stringprintf.h"
 #include "base/time/time.h"
 #include "net/http/http_response_headers.h"
@@ -30,7 +31,7 @@
     manager_->UpdateWithResponse(url, headers.get(), request_time);
   }
 
-  scoped_ptr<URLRequestBackoffManager> manager_;
+  std::unique_ptr<URLRequestBackoffManager> manager_;
 };
 }  // namespace
 
diff --git a/net/url_request/url_request_context.cc b/net/url_request/url_request_context.cc
index e52021c6..ed0aba3 100644
--- a/net/url_request/url_request_context.cc
+++ b/net/url_request/url_request_context.cc
@@ -7,6 +7,7 @@
 #include "base/compiler_specific.h"
 #include "base/debug/alias.h"
 #include "base/debug/stack_trace.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_util.h"
 #include "net/cookies/cookie_store.h"
 #include "net/dns/host_resolver.h"
@@ -75,11 +76,11 @@
   return &network_session->params();
 }
 
-scoped_ptr<URLRequest> URLRequestContext::CreateRequest(
+std::unique_ptr<URLRequest> URLRequestContext::CreateRequest(
     const GURL& url,
     RequestPriority priority,
     URLRequest::Delegate* delegate) const {
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new URLRequest(url, priority, delegate, this, network_delegate_));
 }
 
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h
index ee165b4..045905a 100644
--- a/net/url_request/url_request_context.h
+++ b/net/url_request/url_request_context.h
@@ -10,12 +10,12 @@
 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
 
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "net/base/net_export.h"
@@ -62,9 +62,10 @@
   // session.
   const HttpNetworkSession::Params* GetNetworkSessionParams() const;
 
-  scoped_ptr<URLRequest> CreateRequest(const GURL& url,
-                                       RequestPriority priority,
-                                       URLRequest::Delegate* delegate) const;
+  std::unique_ptr<URLRequest> CreateRequest(
+      const GURL& url,
+      RequestPriority priority,
+      URLRequest::Delegate* delegate) const;
 
   NetLog* net_log() const {
     return net_log_;
@@ -267,7 +268,7 @@
   // be added to CopyFrom.
   // ---------------------------------------------------------------------------
 
-  scoped_ptr<std::set<const URLRequest*> > url_requests_;
+  std::unique_ptr<std::set<const URLRequest*>> url_requests_;
   bool has_known_mismatched_cookie_store_;
 
   DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index e612ab81..a2f4770 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -11,6 +11,7 @@
 #include "base/compiler_specific.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_util.h"
 #include "base/thread_task_runner_handle.h"
@@ -151,17 +152,18 @@
   }
 
   void set_transport_security_persister(
-      scoped_ptr<TransportSecurityPersister> transport_security_persister) {
+      std::unique_ptr<TransportSecurityPersister>
+          transport_security_persister) {
     transport_security_persister_ = std::move(transport_security_persister);
   }
 
  private:
   // The thread should be torn down last.
-  scoped_ptr<base::Thread> file_thread_;
+  std::unique_ptr<base::Thread> file_thread_;
   scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
 
   URLRequestContextStorage storage_;
-  scoped_ptr<TransportSecurityPersister> transport_security_persister_;
+  std::unique_ptr<TransportSecurityPersister> transport_security_persister_;
 
   DISALLOW_COPY_AND_ASSIGN(ContainerURLRequestContext);
 };
@@ -248,18 +250,19 @@
 }
 
 void URLRequestContextBuilder::SetCertVerifier(
-    scoped_ptr<CertVerifier> cert_verifier) {
+    std::unique_ptr<CertVerifier> cert_verifier) {
   cert_verifier_ = std::move(cert_verifier);
 }
 
 void URLRequestContextBuilder::SetInterceptors(
-    std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors) {
+    std::vector<std::unique_ptr<URLRequestInterceptor>>
+        url_request_interceptors) {
   url_request_interceptors_ = std::move(url_request_interceptors);
 }
 
 void URLRequestContextBuilder::SetCookieAndChannelIdStores(
-    scoped_ptr<CookieStore> cookie_store,
-    scoped_ptr<ChannelIDService> channel_id_service) {
+    std::unique_ptr<CookieStore> cookie_store,
+    std::unique_ptr<ChannelIDService> channel_id_service) {
   cookie_store_set_by_client_ = true;
   // If |cookie_store| is NULL, |channel_id_service| must be NULL too.
   DCHECK(cookie_store || !channel_id_service);
@@ -274,27 +277,27 @@
 
 void URLRequestContextBuilder::SetProtocolHandler(
     const std::string& scheme,
-    scoped_ptr<URLRequestJobFactory::ProtocolHandler> protocol_handler) {
+    std::unique_ptr<URLRequestJobFactory::ProtocolHandler> protocol_handler) {
   DCHECK(protocol_handler);
   protocol_handlers_[scheme] = std::move(protocol_handler);
 }
 
 void URLRequestContextBuilder::SetHttpAuthHandlerFactory(
-    scoped_ptr<HttpAuthHandlerFactory> factory) {
+    std::unique_ptr<HttpAuthHandlerFactory> factory) {
   http_auth_handler_factory_ = std::move(factory);
 }
 
 void URLRequestContextBuilder::SetHttpServerProperties(
-    scoped_ptr<HttpServerProperties> http_server_properties) {
+    std::unique_ptr<HttpServerProperties> http_server_properties) {
   http_server_properties_ = std::move(http_server_properties);
 }
 
-scoped_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
-  scoped_ptr<ContainerURLRequestContext> context(
+std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
+  std::unique_ptr<ContainerURLRequestContext> context(
       new ContainerURLRequestContext(file_task_runner_));
   URLRequestContextStorage* storage = context->storage();
 
-  storage->set_http_user_agent_settings(make_scoped_ptr(
+  storage->set_http_user_agent_settings(base::WrapUnique(
       new StaticHttpUserAgentSettings(accept_language_, user_agent_)));
 
   if (!network_delegate_)
@@ -306,7 +309,7 @@
     // builder or resulting context.
     context->set_net_log(net_log_);
   } else {
-    storage->set_net_log(make_scoped_ptr(new NetLog));
+    storage->set_net_log(base::WrapUnique(new NetLog));
   }
 
   if (!host_resolver_) {
@@ -344,10 +347,11 @@
     storage->set_cookie_store(std::move(cookie_store_));
     storage->set_channel_id_service(std::move(channel_id_service_));
   } else {
-    scoped_ptr<CookieStore> cookie_store(new CookieMonster(nullptr, nullptr));
+    std::unique_ptr<CookieStore> cookie_store(
+        new CookieMonster(nullptr, nullptr));
     // TODO(mmenke):  This always creates a file thread, even when it ends up
     // not being used.  Consider lazily creating the thread.
-    scoped_ptr<ChannelIDService> channel_id_service(new ChannelIDService(
+    std::unique_ptr<ChannelIDService> channel_id_service(new ChannelIDService(
         new DefaultChannelIDStore(NULL), context->GetFileTaskRunner()));
     cookie_store->SetChannelIDServiceID(channel_id_service->GetUniqueID());
     storage->set_cookie_store(std::move(cookie_store));
@@ -355,14 +359,15 @@
   }
 
   if (sdch_enabled_) {
-    storage->set_sdch_manager(scoped_ptr<net::SdchManager>(new SdchManager()));
+    storage->set_sdch_manager(
+        std::unique_ptr<net::SdchManager>(new SdchManager()));
   }
 
   storage->set_transport_security_state(
-      make_scoped_ptr(new TransportSecurityState()));
+      base::WrapUnique(new TransportSecurityState()));
   if (!transport_security_persister_path_.empty()) {
     context->set_transport_security_persister(
-        make_scoped_ptr<TransportSecurityPersister>(
+        base::WrapUnique<TransportSecurityPersister>(
             new TransportSecurityPersister(context->transport_security_state(),
                                            transport_security_persister_path_,
                                            context->GetFileTaskRunner(),
@@ -373,7 +378,7 @@
     storage->set_http_server_properties(std::move(http_server_properties_));
   } else {
     storage->set_http_server_properties(
-        scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
+        std::unique_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
   }
 
   if (cert_verifier_) {
@@ -384,12 +389,12 @@
 
   if (throttling_enabled_) {
     storage->set_throttler_manager(
-        make_scoped_ptr(new URLRequestThrottlerManager()));
+        base::WrapUnique(new URLRequestThrottlerManager()));
   }
 
   if (backoff_enabled_) {
     storage->set_backoff_manager(
-        make_scoped_ptr(new URLRequestBackoffManager()));
+        base::WrapUnique(new URLRequestBackoffManager()));
   }
 
   HttpNetworkSession::Params network_session_params;
@@ -445,11 +450,11 @@
   }
 
   storage->set_http_network_session(
-      make_scoped_ptr(new HttpNetworkSession(network_session_params)));
+      base::WrapUnique(new HttpNetworkSession(network_session_params)));
 
-  scoped_ptr<HttpTransactionFactory> http_transaction_factory;
+  std::unique_ptr<HttpTransactionFactory> http_transaction_factory;
   if (http_cache_enabled_) {
-    scoped_ptr<HttpCache::BackendFactory> http_cache_backend;
+    std::unique_ptr<HttpCache::BackendFactory> http_cache_backend;
     if (http_cache_params_.type != HttpCacheParams::IN_MEMORY) {
       BackendType backend_type =
           http_cache_params_.type == HttpCacheParams::DISK
@@ -482,13 +487,13 @@
 
   if (data_enabled_)
     job_factory->SetProtocolHandler("data",
-                                    make_scoped_ptr(new DataProtocolHandler));
+                                    base::WrapUnique(new DataProtocolHandler));
 
 #if !defined(DISABLE_FILE_SUPPORT)
   if (file_enabled_) {
     job_factory->SetProtocolHandler(
-        "file",
-        make_scoped_ptr(new FileProtocolHandler(context->GetFileTaskRunner())));
+        "file", base::WrapUnique(
+                    new FileProtocolHandler(context->GetFileTaskRunner())));
   }
 #endif  // !defined(DISABLE_FILE_SUPPORT)
 
@@ -497,12 +502,12 @@
     ftp_transaction_factory_.reset(
         new FtpNetworkLayer(context->host_resolver()));
     job_factory->SetProtocolHandler(
-        "ftp", make_scoped_ptr(
+        "ftp", base::WrapUnique(
                    new FtpProtocolHandler(ftp_transaction_factory_.get())));
   }
 #endif  // !defined(DISABLE_FTP_SUPPORT)
 
-  scoped_ptr<net::URLRequestJobFactory> top_job_factory(job_factory);
+  std::unique_ptr<net::URLRequestJobFactory> top_job_factory(job_factory);
   if (!url_request_interceptors_.empty()) {
     // Set up interceptors in the reverse order.
 
diff --git a/net/url_request/url_request_context_builder.h b/net/url_request/url_request_context_builder.h
index c570d60..2aa534f 100644
--- a/net/url_request/url_request_context_builder.h
+++ b/net/url_request/url_request_context_builder.h
@@ -15,7 +15,9 @@
 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
 
 #include <stdint.h>
+
 #include <map>
+#include <memory>
 #include <string>
 #include <unordered_map>
 #include <utility>
@@ -24,7 +26,6 @@
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "build/build_config.h"
 #include "net/base/net_export.h"
 #include "net/base/network_delegate.h"
@@ -122,10 +123,10 @@
   // These functions are mutually exclusive.  The ProxyConfigService, if
   // set, will be used to construct a ProxyService.
   void set_proxy_config_service(
-      scoped_ptr<ProxyConfigService> proxy_config_service) {
+      std::unique_ptr<ProxyConfigService> proxy_config_service) {
     proxy_config_service_ = std::move(proxy_config_service);
   }
-  void set_proxy_service(scoped_ptr<ProxyService> proxy_service) {
+  void set_proxy_service(std::unique_ptr<ProxyService> proxy_service) {
     proxy_service_ = std::move(proxy_service);
   }
 
@@ -162,7 +163,7 @@
   // A ProtocolHandler already exists for |scheme| will be overwritten.
   void SetProtocolHandler(
       const std::string& scheme,
-      scoped_ptr<URLRequestJobFactory::ProtocolHandler> protocol_handler);
+      std::unique_ptr<URLRequestJobFactory::ProtocolHandler> protocol_handler);
 
   // Unlike the other setters, the builder does not take ownership of the
   // NetLog.
@@ -171,20 +172,20 @@
   void set_net_log(NetLog* net_log) { net_log_ = net_log; }
 
   // By default host_resolver is constructed with CreateDefaultResolver.
-  void set_host_resolver(scoped_ptr<HostResolver> host_resolver) {
+  void set_host_resolver(std::unique_ptr<HostResolver> host_resolver) {
     host_resolver_ = std::move(host_resolver);
   }
 
   // Uses BasicNetworkDelegate by default. Note that calling Build will unset
   // any custom delegate in builder, so this must be called each time before
   // Build is called.
-  void set_network_delegate(scoped_ptr<NetworkDelegate> delegate) {
+  void set_network_delegate(std::unique_ptr<NetworkDelegate> delegate) {
     network_delegate_ = std::move(delegate);
   }
 
   // Temporarily stores a ProxyDelegate. Ownership is transferred to
   // UrlRequestContextStorage during Build.
-  void set_proxy_delegate(scoped_ptr<ProxyDelegate> delegate) {
+  void set_proxy_delegate(std::unique_ptr<ProxyDelegate> delegate) {
     proxy_delegate_ = std::move(delegate);
   }
 
@@ -194,7 +195,8 @@
   // URLRequestContext. Note that since Build will transfer ownership, the
   // custom factory will be unset and this must be called before the next Build
   // to set another custom one.
-  void SetHttpAuthHandlerFactory(scoped_ptr<HttpAuthHandlerFactory> factory);
+  void SetHttpAuthHandlerFactory(
+      std::unique_ptr<HttpAuthHandlerFactory> factory);
 
   // By default HttpCache is enabled with a default constructed HttpCacheParams.
   void EnableHttpCache(const HttpCacheParams& params);
@@ -291,10 +293,10 @@
     backoff_enabled_ = backoff_enabled;
   }
 
-  void SetCertVerifier(scoped_ptr<CertVerifier> cert_verifier);
+  void SetCertVerifier(std::unique_ptr<CertVerifier> cert_verifier);
 
-  void SetInterceptors(
-      std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors);
+  void SetInterceptors(std::vector<std::unique_ptr<URLRequestInterceptor>>
+                           url_request_interceptors);
 
   // Override the default in-memory cookie store and channel id service.
   // If both |cookie_store| and |channel_id_service| are NULL, CookieStore and
@@ -306,8 +308,8 @@
   // multiple channel-id stores (or used both with and without a channel id
   // store).
   void SetCookieAndChannelIdStores(
-      scoped_ptr<CookieStore> cookie_store,
-      scoped_ptr<ChannelIDService> channel_id_service);
+      std::unique_ptr<CookieStore> cookie_store,
+      std::unique_ptr<ChannelIDService> channel_id_service);
 
   // Sets the task runner used to perform file operations. If not set, one will
   // be created.
@@ -324,9 +326,9 @@
   // Sets a specific HttpServerProperties for use in the
   // URLRequestContext rather than creating a default HttpServerPropertiesImpl.
   void SetHttpServerProperties(
-      scoped_ptr<HttpServerProperties> http_server_properties);
+      std::unique_ptr<HttpServerProperties> http_server_properties);
 
-  scoped_ptr<URLRequestContext> Build();
+  std::unique_ptr<URLRequestContext> Build();
 
  private:
   std::string accept_language_;
@@ -352,21 +354,21 @@
   HttpNetworkSessionParams http_network_session_params_;
   base::FilePath transport_security_persister_path_;
   NetLog* net_log_;
-  scoped_ptr<HostResolver> host_resolver_;
-  scoped_ptr<ChannelIDService> channel_id_service_;
-  scoped_ptr<ProxyConfigService> proxy_config_service_;
-  scoped_ptr<ProxyService> proxy_service_;
-  scoped_ptr<NetworkDelegate> network_delegate_;
-  scoped_ptr<ProxyDelegate> proxy_delegate_;
-  scoped_ptr<CookieStore> cookie_store_;
+  std::unique_ptr<HostResolver> host_resolver_;
+  std::unique_ptr<ChannelIDService> channel_id_service_;
+  std::unique_ptr<ProxyConfigService> proxy_config_service_;
+  std::unique_ptr<ProxyService> proxy_service_;
+  std::unique_ptr<NetworkDelegate> network_delegate_;
+  std::unique_ptr<ProxyDelegate> proxy_delegate_;
+  std::unique_ptr<CookieStore> cookie_store_;
 #if !defined(DISABLE_FTP_SUPPORT)
-  scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_;
+  std::unique_ptr<FtpTransactionFactory> ftp_transaction_factory_;
 #endif
-  scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_;
-  scoped_ptr<CertVerifier> cert_verifier_;
-  std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_;
-  scoped_ptr<HttpServerProperties> http_server_properties_;
-  std::map<std::string, scoped_ptr<URLRequestJobFactory::ProtocolHandler>>
+  std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_;
+  std::unique_ptr<CertVerifier> cert_verifier_;
+  std::vector<std::unique_ptr<URLRequestInterceptor>> url_request_interceptors_;
+  std::unique_ptr<HttpServerProperties> http_server_properties_;
+  std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>>
       protocol_handlers_;
 
   DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
diff --git a/net/url_request/url_request_context_builder_unittest.cc b/net/url_request/url_request_context_builder_unittest.cc
index a2706d4..2f39ef80 100644
--- a/net/url_request/url_request_context_builder_unittest.cc
+++ b/net/url_request/url_request_context_builder_unittest.cc
@@ -4,7 +4,9 @@
 
 #include "net/url_request/url_request_context_builder.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
 #include "build/build_config.h"
 #include "net/base/request_priority.h"
 #include "net/http/http_auth_challenge_tokenizer.h"
@@ -39,7 +41,7 @@
                         CreateReason reason,
                         int nonce_count,
                         const BoundNetLog& net_log,
-                        scoped_ptr<HttpAuthHandler>* handler) override {
+                        std::unique_ptr<HttpAuthHandler>* handler) override {
     handler->reset();
 
     return challenge->scheme() == supported_scheme_
@@ -58,7 +60,7 @@
     test_server_.AddDefaultHandlers(
         base::FilePath(FILE_PATH_LITERAL("net/data/url_request_unittest")));
 #if defined(OS_LINUX) || defined(OS_ANDROID)
-    builder_.set_proxy_config_service(make_scoped_ptr(
+    builder_.set_proxy_config_service(base::WrapUnique(
         new ProxyConfigServiceFixed(ProxyConfig::CreateDirect())));
 #endif  // defined(OS_LINUX) || defined(OS_ANDROID)
   }
@@ -70,9 +72,9 @@
 TEST_F(URLRequestContextBuilderTest, DefaultSettings) {
   ASSERT_TRUE(test_server_.Start());
 
-  scoped_ptr<URLRequestContext> context(builder_.Build());
+  std::unique_ptr<URLRequestContext> context(builder_.Build());
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request(context->CreateRequest(
+  std::unique_ptr<URLRequest> request(context->CreateRequest(
       test_server_.GetURL("/echoheader?Foo"), DEFAULT_PRIORITY, &delegate));
   request->set_method("GET");
   request->SetExtraRequestHeaderByName("Foo", "Bar", false);
@@ -85,9 +87,9 @@
   ASSERT_TRUE(test_server_.Start());
 
   builder_.set_user_agent("Bar");
-  scoped_ptr<URLRequestContext> context(builder_.Build());
+  std::unique_ptr<URLRequestContext> context(builder_.Build());
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request(
+  std::unique_ptr<URLRequest> request(
       context->CreateRequest(test_server_.GetURL("/echoheader?User-Agent"),
                              DEFAULT_PRIORITY, &delegate));
   request->set_method("GET");
@@ -98,8 +100,8 @@
 
 TEST_F(URLRequestContextBuilderTest, DefaultHttpAuthHandlerFactory) {
   GURL gurl("www.google.com");
-  scoped_ptr<HttpAuthHandler> handler;
-  scoped_ptr<URLRequestContext> context(builder_.Build());
+  std::unique_ptr<HttpAuthHandler> handler;
+  std::unique_ptr<URLRequestContext> context(builder_.Build());
   SSLInfo null_ssl_info;
 
   // Verify that the default basic handler is present
@@ -112,10 +114,10 @@
 TEST_F(URLRequestContextBuilderTest, CustomHttpAuthHandlerFactory) {
   GURL gurl("www.google.com");
   const int kBasicReturnCode = OK;
-  scoped_ptr<HttpAuthHandler> handler;
-  builder_.SetHttpAuthHandlerFactory(make_scoped_ptr(
+  std::unique_ptr<HttpAuthHandler> handler;
+  builder_.SetHttpAuthHandlerFactory(base::WrapUnique(
       new MockHttpAuthHandlerFactory("ExtraScheme", kBasicReturnCode)));
-  scoped_ptr<URLRequestContext> context(builder_.Build());
+  std::unique_ptr<URLRequestContext> context(builder_.Build());
   SSLInfo null_ssl_info;
   // Verify that a handler is returned for a custom scheme.
   EXPECT_EQ(kBasicReturnCode,
diff --git a/net/url_request/url_request_context_storage.cc b/net/url_request/url_request_context_storage.cc
index ed3f905..65cfba6 100644
--- a/net/url_request/url_request_context_storage.cc
+++ b/net/url_request/url_request_context_storage.cc
@@ -34,37 +34,37 @@
 
 URLRequestContextStorage::~URLRequestContextStorage() {}
 
-void URLRequestContextStorage::set_net_log(scoped_ptr<NetLog> net_log) {
+void URLRequestContextStorage::set_net_log(std::unique_ptr<NetLog> net_log) {
   context_->set_net_log(net_log.get());
   net_log_ = std::move(net_log);
 }
 
 void URLRequestContextStorage::set_host_resolver(
-    scoped_ptr<HostResolver> host_resolver) {
+    std::unique_ptr<HostResolver> host_resolver) {
   context_->set_host_resolver(host_resolver.get());
   host_resolver_ = std::move(host_resolver);
 }
 
 void URLRequestContextStorage::set_cert_verifier(
-    scoped_ptr<CertVerifier> cert_verifier) {
+    std::unique_ptr<CertVerifier> cert_verifier) {
   context_->set_cert_verifier(cert_verifier.get());
   cert_verifier_ = std::move(cert_verifier);
 }
 
 void URLRequestContextStorage::set_channel_id_service(
-    scoped_ptr<ChannelIDService> channel_id_service) {
+    std::unique_ptr<ChannelIDService> channel_id_service) {
   context_->set_channel_id_service(channel_id_service.get());
   channel_id_service_ = std::move(channel_id_service);
 }
 
 void URLRequestContextStorage::set_http_auth_handler_factory(
-    scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory) {
+    std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory) {
   context_->set_http_auth_handler_factory(http_auth_handler_factory.get());
   http_auth_handler_factory_ = std::move(http_auth_handler_factory);
 }
 
 void URLRequestContextStorage::set_proxy_service(
-    scoped_ptr<ProxyService> proxy_service) {
+    std::unique_ptr<ProxyService> proxy_service) {
   context_->set_proxy_service(proxy_service.get());
   proxy_service_ = std::move(proxy_service);
 }
@@ -76,71 +76,71 @@
 }
 
 void URLRequestContextStorage::set_network_delegate(
-    scoped_ptr<NetworkDelegate> network_delegate) {
+    std::unique_ptr<NetworkDelegate> network_delegate) {
   context_->set_network_delegate(network_delegate.get());
   network_delegate_ = std::move(network_delegate);
 }
 
 void URLRequestContextStorage::set_proxy_delegate(
-    scoped_ptr<ProxyDelegate> proxy_delegate) {
+    std::unique_ptr<ProxyDelegate> proxy_delegate) {
   proxy_delegate_ = std::move(proxy_delegate);
 }
 
 void URLRequestContextStorage::set_http_server_properties(
-    scoped_ptr<HttpServerProperties> http_server_properties) {
+    std::unique_ptr<HttpServerProperties> http_server_properties) {
   http_server_properties_ = std::move(http_server_properties);
   context_->set_http_server_properties(http_server_properties_->GetWeakPtr());
 }
 
 void URLRequestContextStorage::set_cookie_store(
-    scoped_ptr<CookieStore> cookie_store) {
+    std::unique_ptr<CookieStore> cookie_store) {
   context_->set_cookie_store(cookie_store.get());
   cookie_store_ = std::move(cookie_store);
 }
 
 void URLRequestContextStorage::set_transport_security_state(
-    scoped_ptr<TransportSecurityState> transport_security_state) {
+    std::unique_ptr<TransportSecurityState> transport_security_state) {
   context_->set_transport_security_state(transport_security_state.get());
   transport_security_state_ = std::move(transport_security_state);
 }
 
 void URLRequestContextStorage::set_http_network_session(
-    scoped_ptr<HttpNetworkSession> http_network_session) {
+    std::unique_ptr<HttpNetworkSession> http_network_session) {
   http_network_session_ = std::move(http_network_session);
 }
 
 void URLRequestContextStorage::set_http_transaction_factory(
-    scoped_ptr<HttpTransactionFactory> http_transaction_factory) {
+    std::unique_ptr<HttpTransactionFactory> http_transaction_factory) {
   context_->set_http_transaction_factory(http_transaction_factory.get());
   http_transaction_factory_ = std::move(http_transaction_factory);
 }
 
 void URLRequestContextStorage::set_job_factory(
-    scoped_ptr<URLRequestJobFactory> job_factory) {
+    std::unique_ptr<URLRequestJobFactory> job_factory) {
   context_->set_job_factory(job_factory.get());
   job_factory_ = std::move(job_factory);
 }
 
 void URLRequestContextStorage::set_throttler_manager(
-    scoped_ptr<URLRequestThrottlerManager> throttler_manager) {
+    std::unique_ptr<URLRequestThrottlerManager> throttler_manager) {
   context_->set_throttler_manager(throttler_manager.get());
   throttler_manager_ = std::move(throttler_manager);
 }
 
 void URLRequestContextStorage::set_backoff_manager(
-    scoped_ptr<URLRequestBackoffManager> backoff_manager) {
+    std::unique_ptr<URLRequestBackoffManager> backoff_manager) {
   context_->set_backoff_manager(backoff_manager.get());
   backoff_manager_ = std::move(backoff_manager);
 }
 
 void URLRequestContextStorage::set_http_user_agent_settings(
-    scoped_ptr<HttpUserAgentSettings> http_user_agent_settings) {
+    std::unique_ptr<HttpUserAgentSettings> http_user_agent_settings) {
   context_->set_http_user_agent_settings(http_user_agent_settings.get());
   http_user_agent_settings_ = std::move(http_user_agent_settings);
 }
 
 void URLRequestContextStorage::set_sdch_manager(
-    scoped_ptr<SdchManager> sdch_manager) {
+    std::unique_ptr<SdchManager> sdch_manager) {
   context_->set_sdch_manager(sdch_manager.get());
   sdch_manager_ = std::move(sdch_manager);
 }
diff --git a/net/url_request/url_request_context_storage.h b/net/url_request/url_request_context_storage.h
index b888fb0..8807749 100644
--- a/net/url_request/url_request_context_storage.h
+++ b/net/url_request/url_request_context_storage.h
@@ -5,9 +5,10 @@
 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_
 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
@@ -47,33 +48,34 @@
   // These setters will set both the member variables and call the setter on the
   // URLRequestContext object. In all cases, ownership is passed to |this|.
 
-  void set_net_log(scoped_ptr<NetLog> net_log);
-  void set_host_resolver(scoped_ptr<HostResolver> host_resolver);
-  void set_cert_verifier(scoped_ptr<CertVerifier> cert_verifier);
-  void set_channel_id_service(scoped_ptr<ChannelIDService> channel_id_service);
+  void set_net_log(std::unique_ptr<NetLog> net_log);
+  void set_host_resolver(std::unique_ptr<HostResolver> host_resolver);
+  void set_cert_verifier(std::unique_ptr<CertVerifier> cert_verifier);
+  void set_channel_id_service(
+      std::unique_ptr<ChannelIDService> channel_id_service);
   void set_http_auth_handler_factory(
-      scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory);
-  void set_proxy_service(scoped_ptr<ProxyService> proxy_service);
+      std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory);
+  void set_proxy_service(std::unique_ptr<ProxyService> proxy_service);
   void set_ssl_config_service(SSLConfigService* ssl_config_service);
-  void set_network_delegate(scoped_ptr<NetworkDelegate> network_delegate);
-  void set_proxy_delegate(scoped_ptr<ProxyDelegate> proxy_delegate);
+  void set_network_delegate(std::unique_ptr<NetworkDelegate> network_delegate);
+  void set_proxy_delegate(std::unique_ptr<ProxyDelegate> proxy_delegate);
   void set_http_server_properties(
-      scoped_ptr<HttpServerProperties> http_server_properties);
-  void set_cookie_store(scoped_ptr<CookieStore> cookie_store);
+      std::unique_ptr<HttpServerProperties> http_server_properties);
+  void set_cookie_store(std::unique_ptr<CookieStore> cookie_store);
   void set_transport_security_state(
-      scoped_ptr<TransportSecurityState> transport_security_state);
+      std::unique_ptr<TransportSecurityState> transport_security_state);
   void set_http_network_session(
-      scoped_ptr<HttpNetworkSession> http_network_session);
+      std::unique_ptr<HttpNetworkSession> http_network_session);
   void set_http_transaction_factory(
-      scoped_ptr<HttpTransactionFactory> http_transaction_factory);
-  void set_job_factory(scoped_ptr<URLRequestJobFactory> job_factory);
+      std::unique_ptr<HttpTransactionFactory> http_transaction_factory);
+  void set_job_factory(std::unique_ptr<URLRequestJobFactory> job_factory);
   void set_throttler_manager(
-      scoped_ptr<URLRequestThrottlerManager> throttler_manager);
+      std::unique_ptr<URLRequestThrottlerManager> throttler_manager);
   void set_backoff_manager(
-      scoped_ptr<URLRequestBackoffManager> backoff_manager);
+      std::unique_ptr<URLRequestBackoffManager> backoff_manager);
   void set_http_user_agent_settings(
-      scoped_ptr<HttpUserAgentSettings> http_user_agent_settings);
-  void set_sdch_manager(scoped_ptr<SdchManager> sdch_manager);
+      std::unique_ptr<HttpUserAgentSettings> http_user_agent_settings);
+  void set_sdch_manager(std::unique_ptr<SdchManager> sdch_manager);
 
   // Everything else can be access through the URLRequestContext, but this
   // cannot.  Having an accessor for it makes usage a little cleaner.
@@ -88,31 +90,31 @@
   URLRequestContext* const context_;
 
   // Owned members.
-  scoped_ptr<NetLog> net_log_;
-  scoped_ptr<HostResolver> host_resolver_;
-  scoped_ptr<CertVerifier> cert_verifier_;
+  std::unique_ptr<NetLog> net_log_;
+  std::unique_ptr<HostResolver> host_resolver_;
+  std::unique_ptr<CertVerifier> cert_verifier_;
   // The ChannelIDService must outlive the HttpTransactionFactory.
-  scoped_ptr<ChannelIDService> channel_id_service_;
-  scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_;
-  scoped_ptr<ProxyService> proxy_service_;
+  std::unique_ptr<ChannelIDService> channel_id_service_;
+  std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_;
+  std::unique_ptr<ProxyService> proxy_service_;
   // TODO(willchan): Remove refcounting on these members.
   scoped_refptr<SSLConfigService> ssl_config_service_;
-  scoped_ptr<NetworkDelegate> network_delegate_;
-  scoped_ptr<ProxyDelegate> proxy_delegate_;
-  scoped_ptr<HttpServerProperties> http_server_properties_;
-  scoped_ptr<HttpUserAgentSettings> http_user_agent_settings_;
-  scoped_ptr<CookieStore> cookie_store_;
-  scoped_ptr<TransportSecurityState> transport_security_state_;
+  std::unique_ptr<NetworkDelegate> network_delegate_;
+  std::unique_ptr<ProxyDelegate> proxy_delegate_;
+  std::unique_ptr<HttpServerProperties> http_server_properties_;
+  std::unique_ptr<HttpUserAgentSettings> http_user_agent_settings_;
+  std::unique_ptr<CookieStore> cookie_store_;
+  std::unique_ptr<TransportSecurityState> transport_security_state_;
 
   // Not actually pointed at by the URLRequestContext, but may be used (but not
   // owned) by the HttpTransactionFactory.
-  scoped_ptr<HttpNetworkSession> http_network_session_;
+  std::unique_ptr<HttpNetworkSession> http_network_session_;
 
-  scoped_ptr<HttpTransactionFactory> http_transaction_factory_;
-  scoped_ptr<URLRequestJobFactory> job_factory_;
-  scoped_ptr<URLRequestThrottlerManager> throttler_manager_;
-  scoped_ptr<URLRequestBackoffManager> backoff_manager_;
-  scoped_ptr<SdchManager> sdch_manager_;
+  std::unique_ptr<HttpTransactionFactory> http_transaction_factory_;
+  std::unique_ptr<URLRequestJobFactory> job_factory_;
+  std::unique_ptr<URLRequestThrottlerManager> throttler_manager_;
+  std::unique_ptr<URLRequestBackoffManager> backoff_manager_;
+  std::unique_ptr<SdchManager> sdch_manager_;
 
   DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage);
 };
diff --git a/net/url_request/url_request_file_dir_job_unittest.cc b/net/url_request/url_request_file_dir_job_unittest.cc
index 5701b3e3..079bb83 100644
--- a/net/url_request/url_request_file_dir_job_unittest.cc
+++ b/net/url_request/url_request_file_dir_job_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "net/url_request/url_request_file_dir_job.h"
 
+#include <memory>
 #include <string>
 
 #include "base/files/file_path.h"
@@ -11,7 +12,6 @@
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "net/base/filename_util.h"
 #include "net/base/io_buffer.h"
@@ -106,7 +106,7 @@
   ASSERT_TRUE(directory.CreateUniqueTempDir());
   TestJobFactory factory(directory.path());
   context_.set_job_factory(&factory);
-  scoped_ptr<URLRequest> request(context_.CreateRequest(
+  std::unique_ptr<URLRequest> request(context_.CreateRequest(
       FilePathToFileURL(
           directory.path().AppendASCII("this_path_does_not_exist")),
       DEFAULT_PRIORITY, &delegate_));
@@ -139,7 +139,7 @@
   TestJobFactory factory(directory.path());
   context_.set_job_factory(&factory);
 
-  scoped_ptr<URLRequest> request(context_.CreateRequest(
+  std::unique_ptr<URLRequest> request(context_.CreateRequest(
       FilePathToFileURL(path), DEFAULT_PRIORITY, &delegate_));
   request->Start();
   EXPECT_TRUE(request->is_pending());
@@ -175,7 +175,7 @@
   context_.set_job_factory(&factory);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request(context_.CreateRequest(
+  std::unique_ptr<URLRequest> request(context_.CreateRequest(
       FilePathToFileURL(path), DEFAULT_PRIORITY, &delegate));
   request->Start();
   EXPECT_TRUE(request->is_pending());
@@ -207,7 +207,7 @@
   context_.set_job_factory(&factory);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request(context_.CreateRequest(
+  std::unique_ptr<URLRequest> request(context_.CreateRequest(
       FilePathToFileURL(path), DEFAULT_PRIORITY, &delegate));
   request->Start();
   EXPECT_TRUE(request->is_pending());
@@ -233,7 +233,7 @@
   context_.set_job_factory(&factory);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request(context_.CreateRequest(
+  std::unique_ptr<URLRequest> request(context_.CreateRequest(
       FilePathToFileURL(directory.path()), DEFAULT_PRIORITY, &delegate));
   request->Start();
   EXPECT_TRUE(request->is_pending());
diff --git a/net/url_request/url_request_file_job.h b/net/url_request/url_request_file_job.h
index 6aa2bbe..d39336e 100644
--- a/net/url_request/url_request_file_job.h
+++ b/net/url_request/url_request_file_job.h
@@ -97,7 +97,7 @@
   // Callback after data is asynchronously read from the file into |buf|.
   void DidRead(scoped_refptr<IOBuffer> buf, int result);
 
-  scoped_ptr<FileStream> stream_;
+  std::unique_ptr<FileStream> stream_;
   FileMetaInfo meta_info_;
   const scoped_refptr<base::TaskRunner> file_task_runner_;
 
diff --git a/net/url_request/url_request_file_job_unittest.cc b/net/url_request/url_request_file_job_unittest.cc
index da43aab..c664213 100644
--- a/net/url_request/url_request_file_job_unittest.cc
+++ b/net/url_request/url_request_file_job_unittest.cc
@@ -4,10 +4,11 @@
 
 #include "net/url_request/url_request_file_job.h"
 
+#include <memory>
+
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
 #include "base/thread_task_runner_handle.h"
@@ -187,7 +188,7 @@
     TestJobFactory factory(path, &seek_position, &observed_content);
     context_.set_job_factory(&factory);
 
-    scoped_ptr<URLRequest> request(context_.CreateRequest(
+    std::unique_ptr<URLRequest> request(context_.CreateRequest(
         FilePathToFileURL(path), DEFAULT_PRIORITY, &delegate_));
     if (range) {
       ASSERT_GE(range->start, 0);
diff --git a/net/url_request/url_request_filter.cc b/net/url_request/url_request_filter.cc
index 83248e2..0371d91 100644
--- a/net/url_request/url_request_filter.cc
+++ b/net/url_request/url_request_filter.cc
@@ -49,7 +49,7 @@
 void URLRequestFilter::AddHostnameInterceptor(
     const std::string& scheme,
     const std::string& hostname,
-    scoped_ptr<URLRequestInterceptor> interceptor) {
+    std::unique_ptr<URLRequestInterceptor> interceptor) {
   DCHECK(OnMessageLoopForInterceptorAddition());
   DCHECK_EQ(0u, hostname_interceptor_map_.count(make_pair(scheme, hostname)));
   hostname_interceptor_map_[make_pair(scheme, hostname)] =
@@ -81,7 +81,7 @@
 
 bool URLRequestFilter::AddUrlInterceptor(
     const GURL& url,
-    scoped_ptr<URLRequestInterceptor> interceptor) {
+    std::unique_ptr<URLRequestInterceptor> interceptor) {
   DCHECK(OnMessageLoopForInterceptorAddition());
   if (!url.is_valid())
     return false;
diff --git a/net/url_request/url_request_filter.h b/net/url_request/url_request_filter.h
index d72aa75..ff70275 100644
--- a/net/url_request/url_request_filter.h
+++ b/net/url_request/url_request_filter.h
@@ -5,12 +5,12 @@
 #define NET_URL_REQUEST_URL_REQUEST_FILTER_H_
 
 #include <map>
+#include <memory>
 #include <string>
 
 #include "base/containers/hash_tables.h"
 #include "base/containers/scoped_ptr_hash_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/url_request/url_request_interceptor.h"
 
@@ -47,14 +47,14 @@
   void AddHostnameInterceptor(
       const std::string& scheme,
       const std::string& hostname,
-      scoped_ptr<URLRequestInterceptor> interceptor);
+      std::unique_ptr<URLRequestInterceptor> interceptor);
   void RemoveHostnameHandler(const std::string& scheme,
                              const std::string& hostname);
 
   // Returns true if we successfully added the URL handler.  This will replace
   // old handlers for the URL if one existed.
   bool AddUrlInterceptor(const GURL& url,
-                         scoped_ptr<URLRequestInterceptor> interceptor);
+                         std::unique_ptr<URLRequestInterceptor> interceptor);
 
   void RemoveUrlHandler(const GURL& url);
 
@@ -72,11 +72,13 @@
 
  private:
   // scheme,hostname -> URLRequestInterceptor
-  using HostnameInterceptorMap = std::map<std::pair<std::string, std::string>,
-                                          scoped_ptr<URLRequestInterceptor>>;
+  using HostnameInterceptorMap =
+      std::map<std::pair<std::string, std::string>,
+               std::unique_ptr<URLRequestInterceptor>>;
   // URL -> URLRequestInterceptor
   using URLInterceptorMap =
-      base::ScopedPtrHashMap<std::string, scoped_ptr<URLRequestInterceptor>>;
+      base::ScopedPtrHashMap<std::string,
+                             std::unique_ptr<URLRequestInterceptor>>;
 
   URLRequestFilter();
   ~URLRequestFilter() override;
diff --git a/net/url_request/url_request_filter_unittest.cc b/net/url_request/url_request_filter_unittest.cc
index 784f9a6..17259e00 100644
--- a/net/url_request/url_request_filter_unittest.cc
+++ b/net/url_request/url_request_filter_unittest.cc
@@ -4,8 +4,9 @@
 
 #include "net/url_request/url_request_filter.h"
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/request_priority.h"
 #include "net/url_request/url_request.h"
 #include "net/url_request/url_request_context.h"
@@ -49,25 +50,25 @@
   URLRequestFilter* filter = URLRequestFilter::GetInstance();
 
   const GURL kUrl1("http://foo.com/");
-  scoped_ptr<URLRequest> request1(
+  std::unique_ptr<URLRequest> request1(
       request_context.CreateRequest(kUrl1, DEFAULT_PRIORITY, &delegate));
 
   const GURL kUrl2("http://bar.com/");
-  scoped_ptr<URLRequest> request2(
+  std::unique_ptr<URLRequest> request2(
       request_context.CreateRequest(kUrl2, DEFAULT_PRIORITY, &delegate));
 
   // Check AddUrlInterceptor checks for invalid URLs.
   EXPECT_FALSE(filter->AddUrlInterceptor(
       GURL(),
-      scoped_ptr<URLRequestInterceptor>(new TestURLRequestInterceptor())));
+      std::unique_ptr<URLRequestInterceptor>(new TestURLRequestInterceptor())));
 
   // Check URLRequestInterceptor URL matching.
   filter->ClearHandlers();
   TestURLRequestInterceptor* interceptor = new TestURLRequestInterceptor();
   EXPECT_TRUE(filter->AddUrlInterceptor(
-      kUrl1, scoped_ptr<URLRequestInterceptor>(interceptor)));
+      kUrl1, std::unique_ptr<URLRequestInterceptor>(interceptor)));
   {
-    scoped_ptr<URLRequestJob> found(
+    std::unique_ptr<URLRequestJob> found(
         filter->MaybeInterceptRequest(request1.get(), NULL));
     EXPECT_TRUE(interceptor->WasLastJobCreated(found.get()));
   }
@@ -88,9 +89,9 @@
   interceptor = new TestURLRequestInterceptor();
   filter->AddHostnameInterceptor(
       kUrl1.scheme(), kUrl1.host(),
-      scoped_ptr<URLRequestInterceptor>(interceptor));
+      std::unique_ptr<URLRequestInterceptor>(interceptor));
   {
-    scoped_ptr<URLRequestJob> found(
+    std::unique_ptr<URLRequestJob> found(
         filter->MaybeInterceptRequest(request1.get(), NULL));
     EXPECT_TRUE(interceptor->WasLastJobCreated(found.get()));
   }
diff --git a/net/url_request/url_request_ftp_job.h b/net/url_request/url_request_ftp_job.h
index 227a33b..35d6593 100644
--- a/net/url_request/url_request_ftp_job.h
+++ b/net/url_request/url_request_ftp_job.h
@@ -83,10 +83,10 @@
   ProxyService::PacRequest* pac_request_;
 
   FtpRequestInfo ftp_request_info_;
-  scoped_ptr<FtpTransaction> ftp_transaction_;
+  std::unique_ptr<FtpTransaction> ftp_transaction_;
 
   HttpRequestInfo http_request_info_;
-  scoped_ptr<HttpTransaction> http_transaction_;
+  std::unique_ptr<HttpTransaction> http_transaction_;
   const HttpResponseInfo* http_response_info_;
 
   bool read_in_progress_;
diff --git a/net/url_request/url_request_ftp_job_unittest.cc b/net/url_request/url_request_ftp_job_unittest.cc
index cb31ecf..d6917fb 100644
--- a/net/url_request/url_request_ftp_job_unittest.cc
+++ b/net/url_request/url_request_ftp_job_unittest.cc
@@ -4,11 +4,12 @@
 
 #include "net/url_request/url_request_ftp_job.h"
 
+#include <memory>
 #include <utility>
 #include <vector>
 
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "net/base/host_port_pair.h"
 #include "net/base/load_states.h"
@@ -40,11 +41,11 @@
 
   int CreateProxyResolver(
       const scoped_refptr<ProxyResolverScriptData>& pac_script,
-      scoped_ptr<ProxyResolver>* resolver,
+      std::unique_ptr<ProxyResolver>* resolver,
       const CompletionCallback& callback,
-      scoped_ptr<Request>* request) override {
+      std::unique_ptr<Request>* request) override {
     EXPECT_FALSE(resolver_);
-    scoped_ptr<MockAsyncProxyResolver> owned_resolver(
+    std::unique_ptr<MockAsyncProxyResolver> owned_resolver(
         new MockAsyncProxyResolver());
     resolver_ = owned_resolver.get();
     *resolver = std::move(owned_resolver);
@@ -62,7 +63,7 @@
 class FtpTestURLRequestContext : public TestURLRequestContext {
  public:
   FtpTestURLRequestContext(ClientSocketFactory* socket_factory,
-                           scoped_ptr<ProxyService> proxy_service,
+                           std::unique_ptr<ProxyService> proxy_service,
                            NetworkDelegate* network_delegate,
                            FtpTransactionFactory* ftp_transaction_factory)
       : TestURLRequestContext(true),
@@ -70,10 +71,10 @@
     set_client_socket_factory(socket_factory);
     context_storage_.set_proxy_service(std::move(proxy_service));
     set_network_delegate(network_delegate);
-    scoped_ptr<URLRequestJobFactoryImpl> job_factory =
-        make_scoped_ptr(new URLRequestJobFactoryImpl);
+    std::unique_ptr<URLRequestJobFactoryImpl> job_factory =
+        base::WrapUnique(new URLRequestJobFactoryImpl);
     job_factory->SetProtocolHandler("ftp",
-                                    make_scoped_ptr(ftp_protocol_handler_));
+                                    base::WrapUnique(ftp_protocol_handler_));
     context_storage_.set_job_factory(std::move(job_factory));
     Init();
   }
@@ -82,7 +83,7 @@
     return ftp_protocol_handler_->ftp_auth_cache_.get();
   }
 
-  void set_proxy_service(scoped_ptr<ProxyService> proxy_service) {
+  void set_proxy_service(std::unique_ptr<ProxyService> proxy_service) {
     context_storage_.set_proxy_service(std::move(proxy_service));
   }
 
@@ -142,8 +143,8 @@
 
 class MockFtpTransactionFactory : public FtpTransactionFactory {
  public:
-  scoped_ptr<FtpTransaction> CreateTransaction() override {
-    return scoped_ptr<FtpTransaction>();
+  std::unique_ptr<FtpTransaction> CreateTransaction() override {
+    return std::unique_ptr<FtpTransaction>();
   }
 
   void Suspend(bool suspend) override {}
@@ -154,7 +155,7 @@
 class URLRequestFtpJobPriorityTest : public testing::Test {
  protected:
   URLRequestFtpJobPriorityTest()
-      : proxy_service_(make_scoped_ptr(new SimpleProxyConfigService),
+      : proxy_service_(base::WrapUnique(new SimpleProxyConfigService),
                        NULL,
                        NULL),
         req_(context_.CreateRequest(GURL("ftp://ftp.example.com"),
@@ -170,13 +171,13 @@
   FtpAuthCache ftp_auth_cache_;
   TestURLRequestContext context_;
   TestDelegate delegate_;
-  scoped_ptr<URLRequest> req_;
+  std::unique_ptr<URLRequest> req_;
 };
 
 // Make sure that SetPriority actually sets the URLRequestFtpJob's
 // priority, both before and after start.
 TEST_F(URLRequestFtpJobPriorityTest, SetPriorityBasic) {
-  scoped_ptr<TestURLRequestFtpJob> job(
+  std::unique_ptr<TestURLRequestFtpJob> job(
       new TestURLRequestFtpJob(req_.get(), &ftp_factory_, &ftp_auth_cache_));
   EXPECT_EQ(DEFAULT_PRIORITY, job->priority());
 
@@ -196,7 +197,7 @@
 // Make sure that URLRequestFtpJob passes on its priority to its
 // transaction on start.
 TEST_F(URLRequestFtpJobPriorityTest, SetTransactionPriorityOnStart) {
-  scoped_ptr<TestURLRequestFtpJob> job(
+  std::unique_ptr<TestURLRequestFtpJob> job(
       new TestURLRequestFtpJob(req_.get(), &ftp_factory_, &ftp_auth_cache_));
   job->SetPriority(LOW);
 
@@ -211,7 +212,7 @@
 // Make sure that URLRequestFtpJob passes on its priority updates to
 // its transaction.
 TEST_F(URLRequestFtpJobPriorityTest, SetTransactionPriority) {
-  scoped_ptr<TestURLRequestFtpJob> job(
+  std::unique_ptr<TestURLRequestFtpJob> job(
       new TestURLRequestFtpJob(req_.get(), &ftp_factory_, &ftp_auth_cache_));
   job->SetPriority(LOW);
   job->Start();
@@ -225,7 +226,7 @@
 // Make sure that URLRequestFtpJob passes on its priority updates to
 // newly-created transactions after the first one.
 TEST_F(URLRequestFtpJobPriorityTest, SetSubsequentTransactionPriority) {
-  scoped_ptr<TestURLRequestFtpJob> job(
+  std::unique_ptr<TestURLRequestFtpJob> job(
       new TestURLRequestFtpJob(req_.get(), &ftp_factory_, &ftp_auth_cache_));
   job->Start();
 
@@ -246,8 +247,8 @@
  public:
   URLRequestFtpJobTest()
       : request_context_(&socket_factory_,
-                         make_scoped_ptr(new ProxyService(
-                             make_scoped_ptr(new SimpleProxyConfigService),
+                         base::WrapUnique(new ProxyService(
+                             base::WrapUnique(new SimpleProxyConfigService),
                              NULL,
                              NULL)),
                          &network_delegate_,
@@ -260,7 +261,7 @@
 
   void AddSocket(MockRead* reads, size_t reads_size,
                  MockWrite* writes, size_t writes_size) {
-    scoped_ptr<SequencedSocketData> socket_data(make_scoped_ptr(
+    std::unique_ptr<SequencedSocketData> socket_data(base::WrapUnique(
         new SequencedSocketData(reads, reads_size, writes, writes_size)));
     socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK));
     socket_factory_.AddSocketDataProvider(socket_data.get());
@@ -272,7 +273,7 @@
   TestNetworkDelegate* network_delegate() { return &network_delegate_; }
 
  private:
-  std::vector<scoped_ptr<SequencedSocketData>> socket_data_;
+  std::vector<std::unique_ptr<SequencedSocketData>> socket_data_;
   MockClientSocketFactory socket_factory_;
   TestNetworkDelegate network_delegate_;
   MockFtpTransactionFactory ftp_transaction_factory_;
@@ -295,7 +296,7 @@
   AddSocket(reads, arraysize(reads), writes, arraysize(writes));
 
   TestDelegate request_delegate;
-  scoped_ptr<URLRequest> url_request(request_context()->CreateRequest(
+  std::unique_ptr<URLRequest> url_request(request_context()->CreateRequest(
       GURL("ftp://ftp.example.com/"), DEFAULT_PRIORITY, &request_delegate));
   url_request->Start();
   ASSERT_TRUE(url_request->is_pending());
@@ -314,18 +315,18 @@
 
 // Regression test for http://crbug.com/237526.
 TEST_F(URLRequestFtpJobTest, FtpProxyRequestOrphanJob) {
-  scoped_ptr<MockProxyResolverFactory> owned_resolver_factory(
+  std::unique_ptr<MockProxyResolverFactory> owned_resolver_factory(
       new MockProxyResolverFactory());
   MockProxyResolverFactory* resolver_factory = owned_resolver_factory.get();
 
   // Use a PAC URL so that URLRequestFtpJob's |pac_request_| field is non-NULL.
-  request_context()->set_proxy_service(make_scoped_ptr(new ProxyService(
-      make_scoped_ptr(new ProxyConfigServiceFixed(
+  request_context()->set_proxy_service(base::WrapUnique(new ProxyService(
+      base::WrapUnique(new ProxyConfigServiceFixed(
           ProxyConfig::CreateFromCustomPacURL(GURL("http://foo")))),
       std::move(owned_resolver_factory), nullptr)));
 
   TestDelegate request_delegate;
-  scoped_ptr<URLRequest> url_request(request_context()->CreateRequest(
+  std::unique_ptr<URLRequest> url_request(request_context()->CreateRequest(
       GURL("ftp://ftp.example.com/"), DEFAULT_PRIORITY, &request_delegate));
   url_request->Start();
 
@@ -345,18 +346,18 @@
 // hang around a bit without being deleted in the cancellation case, so the
 // above test is not sufficient.
 TEST_F(URLRequestFtpJobTest, FtpProxyRequestCancelRequest) {
-  scoped_ptr<MockProxyResolverFactory> owned_resolver_factory(
+  std::unique_ptr<MockProxyResolverFactory> owned_resolver_factory(
       new MockProxyResolverFactory());
   MockProxyResolverFactory* resolver_factory = owned_resolver_factory.get();
 
   // Use a PAC URL so that URLRequestFtpJob's |pac_request_| field is non-NULL.
-  request_context()->set_proxy_service(make_scoped_ptr(new ProxyService(
-      make_scoped_ptr(new ProxyConfigServiceFixed(
+  request_context()->set_proxy_service(base::WrapUnique(new ProxyService(
+      base::WrapUnique(new ProxyConfigServiceFixed(
           ProxyConfig::CreateFromCustomPacURL(GURL("http://foo")))),
       std::move(owned_resolver_factory), nullptr)));
 
   TestDelegate request_delegate;
-  scoped_ptr<URLRequest> url_request(request_context()->CreateRequest(
+  std::unique_ptr<URLRequest> url_request(request_context()->CreateRequest(
       GURL("ftp://ftp.example.com/"), DEFAULT_PRIORITY, &request_delegate));
 
   // Verify PAC request is in progress.
@@ -391,7 +392,7 @@
   AddSocket(reads, arraysize(reads), writes, arraysize(writes));
 
   TestDelegate request_delegate;
-  scoped_ptr<URLRequest> url_request(request_context()->CreateRequest(
+  std::unique_ptr<URLRequest> url_request(request_context()->CreateRequest(
       GURL("ftp://ftp.example.com/"), DEFAULT_PRIORITY, &request_delegate));
   url_request->Start();
   ASSERT_TRUE(url_request->is_pending());
@@ -437,7 +438,7 @@
   TestDelegate request_delegate;
   request_delegate.set_credentials(
       AuthCredentials(ASCIIToUTF16("myuser"), ASCIIToUTF16("mypass")));
-  scoped_ptr<URLRequest> url_request(request_context()->CreateRequest(
+  std::unique_ptr<URLRequest> url_request(request_context()->CreateRequest(
       GURL("ftp://ftp.example.com/"), DEFAULT_PRIORITY, &request_delegate));
   url_request->Start();
   ASSERT_TRUE(url_request->is_pending());
@@ -470,7 +471,7 @@
   AddSocket(reads, arraysize(reads), writes, arraysize(writes));
 
   TestDelegate request_delegate;
-  scoped_ptr<URLRequest> url_request(request_context()->CreateRequest(
+  std::unique_ptr<URLRequest> url_request(request_context()->CreateRequest(
       GURL("ftp://ftp.example.com/"), DEFAULT_PRIORITY, &request_delegate));
   url_request->Start();
   ASSERT_TRUE(url_request->is_pending());
@@ -514,7 +515,7 @@
   TestDelegate request_delegate;
   request_delegate.set_credentials(
       AuthCredentials(ASCIIToUTF16("myuser"), ASCIIToUTF16("mypass")));
-  scoped_ptr<URLRequest> url_request(request_context()->CreateRequest(
+  std::unique_ptr<URLRequest> url_request(request_context()->CreateRequest(
       GURL("ftp://ftp.example.com/"), DEFAULT_PRIORITY, &request_delegate));
   url_request->Start();
   ASSERT_TRUE(url_request->is_pending());
@@ -579,7 +580,7 @@
 
   TestDelegate request_delegate;
   request_delegate.set_quit_on_auth_required(true);
-  scoped_ptr<URLRequest> url_request(request_context()->CreateRequest(
+  std::unique_ptr<URLRequest> url_request(request_context()->CreateRequest(
       url, DEFAULT_PRIORITY, &request_delegate));
   url_request->Start();
   ASSERT_TRUE(url_request->is_pending());
@@ -628,7 +629,7 @@
   AddSocket(reads, arraysize(reads), writes, arraysize(writes));
 
   TestDelegate request_delegate;
-  scoped_ptr<URLRequest> url_request(request_context()->CreateRequest(
+  std::unique_ptr<URLRequest> url_request(request_context()->CreateRequest(
       GURL("ftp://ftp.example.com/"), DEFAULT_PRIORITY, &request_delegate));
   url_request->Start();
   ASSERT_TRUE(url_request->is_pending());
@@ -661,7 +662,7 @@
   AddSocket(reads, arraysize(reads), writes, arraysize(writes));
 
   TestDelegate request_delegate;
-  scoped_ptr<URLRequest> url_request(request_context()->CreateRequest(
+  std::unique_ptr<URLRequest> url_request(request_context()->CreateRequest(
       GURL("ftp://ftp.example.com/"), DEFAULT_PRIORITY, &request_delegate));
   url_request->Start();
   EXPECT_TRUE(url_request->is_pending());
@@ -698,7 +699,7 @@
 
   TestDelegate request_delegate1;
 
-  scoped_ptr<URLRequest> url_request1(
+  std::unique_ptr<URLRequest> url_request1(
       request_context()->CreateRequest(GURL("ftp://ftp.example.com/first"),
                                        DEFAULT_PRIORITY, &request_delegate1));
   url_request1->Start();
@@ -716,7 +717,7 @@
   EXPECT_EQ("test1.html", request_delegate1.data_received());
 
   TestDelegate request_delegate2;
-  scoped_ptr<URLRequest> url_request2(
+  std::unique_ptr<URLRequest> url_request2(
       request_context()->CreateRequest(GURL("ftp://ftp.example.com/second"),
                                        DEFAULT_PRIORITY, &request_delegate2));
   url_request2->Start();
@@ -763,7 +764,7 @@
   AddSocket(reads2, arraysize(reads2), writes2, arraysize(writes2));
 
   TestDelegate request_delegate1;
-  scoped_ptr<URLRequest> url_request1(
+  std::unique_ptr<URLRequest> url_request1(
       request_context()->CreateRequest(GURL("ftp://ftp.example.com/first"),
                                        DEFAULT_PRIORITY, &request_delegate1));
   url_request1->Start();
@@ -779,7 +780,7 @@
   EXPECT_EQ("test1.html", request_delegate1.data_received());
 
   TestDelegate request_delegate2;
-  scoped_ptr<URLRequest> url_request2(
+  std::unique_ptr<URLRequest> url_request2(
       request_context()->CreateRequest(GURL("http://ftp.example.com/second"),
                                        DEFAULT_PRIORITY, &request_delegate2));
   url_request2->Start();
diff --git a/net/url_request/url_request_http_job.h b/net/url_request/url_request_http_job.h
index c914ff1..a15604f 100644
--- a/net/url_request/url_request_http_job.h
+++ b/net/url_request/url_request_http_job.h
@@ -8,12 +8,12 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "net/base/auth.h"
@@ -196,7 +196,7 @@
 
   bool read_in_progress_;
 
-  scoped_ptr<HttpTransaction> transaction_;
+  std::unique_ptr<HttpTransaction> transaction_;
 
   // This is used to supervise traffic and enforce exponential
   // back-off. May be NULL.
@@ -204,7 +204,7 @@
 
   // A handle to the SDCH dictionaries that were advertised in this request.
   // May be null.
-  scoped_ptr<SdchManager::DictionarySet> dictionaries_advertised_;
+  std::unique_ptr<SdchManager::DictionarySet> dictionaries_advertised_;
 
   // For SDCH latency experiments, when we are able to do SDCH, we may enable
   // either an SDCH latency test xor a pass through test. The following bools
@@ -248,7 +248,7 @@
   // When the transaction finished reading the request headers.
   base::TimeTicks receive_headers_end_;
 
-  scoped_ptr<HttpFilterContext> filter_context_;
+  std::unique_ptr<HttpFilterContext> filter_context_;
 
   CompletionCallback on_headers_received_callback_;
 
diff --git a/net/url_request/url_request_http_job_unittest.cc b/net/url_request/url_request_http_job_unittest.cc
index accf94c..8a8cdfe 100644
--- a/net/url_request/url_request_http_job_unittest.cc
+++ b/net/url_request/url_request_http_job_unittest.cc
@@ -7,10 +7,11 @@
 #include <stdint.h>
 
 #include <cstddef>
+#include <memory>
 
 #include "base/compiler_specific.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/string_split.h"
 #include "net/base/auth.h"
@@ -61,7 +62,7 @@
     // The |test_job_factory_| takes ownership of the interceptor.
     test_job_interceptor_ = new TestJobInterceptor();
     EXPECT_TRUE(test_job_factory_.SetProtocolHandler(
-        url::kHttpScheme, make_scoped_ptr(test_job_interceptor_)));
+        url::kHttpScheme, base::WrapUnique(test_job_interceptor_)));
     context_.set_job_factory(&test_job_factory_);
 
     context_.Init();
@@ -98,7 +99,7 @@
   }
 
   void EnableSdch() {
-    context_.SetSdchManager(scoped_ptr<SdchManager>(new SdchManager));
+    context_.SetSdchManager(std::unique_ptr<SdchManager>(new SdchManager));
   }
 
   MockNetworkLayer network_layer_;
@@ -109,7 +110,7 @@
 
   TestURLRequestContext context_;
   TestDelegate delegate_;
-  scoped_ptr<URLRequest> req_;
+  std::unique_ptr<URLRequest> req_;
 };
 
 class URLRequestHttpJobWithMockSocketsTest : public ::testing::Test {
@@ -125,7 +126,7 @@
   MockClientSocketFactory socket_factory_;
   TestNetworkDelegate network_delegate_;
   URLRequestBackoffManager manager_;
-  scoped_ptr<TestURLRequestContext> context_;
+  std::unique_ptr<TestURLRequestContext> context_;
 };
 
 const char kSimpleGetMockWrite[] =
@@ -148,7 +149,7 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request = context_->CreateRequest(
       GURL("http://www.example.com"), DEFAULT_PRIORITY, &delegate);
 
   request->Start();
@@ -177,7 +178,7 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request = context_->CreateRequest(
       GURL("http://www.example.com"), DEFAULT_PRIORITY, &delegate);
 
   request->Start();
@@ -208,7 +209,7 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request = context_->CreateRequest(
       GURL("http://www.example.com"), DEFAULT_PRIORITY, &delegate);
 
   request->Start();
@@ -240,7 +241,7 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request = context_->CreateRequest(
       GURL("http://www.example.com"), DEFAULT_PRIORITY, &delegate);
 
   delegate.set_cancel_in_received_data(true);
@@ -288,7 +289,7 @@
   socket_factory_.AddSocketDataProvider(&final_socket_data);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request = context_->CreateRequest(
       GURL("http://www.redirect.com"), DEFAULT_PRIORITY, &delegate);
 
   request->Start();
@@ -320,7 +321,7 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request = context_->CreateRequest(
       GURL("http://www.example.com"), DEFAULT_PRIORITY, &delegate);
 
   delegate.set_cancel_in_response_started(true);
@@ -345,7 +346,7 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request = context_->CreateRequest(
       GURL("http://www.example.com"), DEFAULT_PRIORITY, &delegate);
 
   request->Start();
@@ -378,7 +379,7 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   TestDelegate delegate1;
-  scoped_ptr<URLRequest> request1 = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request1 = context_->CreateRequest(
       GURL("https://www.example.com"), DEFAULT_PRIORITY, &delegate1);
 
   request1->Start();
@@ -392,7 +393,7 @@
 
   // Issue another request, and backoff logic should apply.
   TestDelegate delegate2;
-  scoped_ptr<URLRequest> request2 = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request2 = context_->CreateRequest(
       GURL("https://www.example.com"), DEFAULT_PRIORITY, &delegate2);
 
   request2->Start();
@@ -441,7 +442,7 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   TestDelegate delegate1;
-  scoped_ptr<URLRequest> request1 = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request1 = context_->CreateRequest(
       GURL("https://www.example.com"), DEFAULT_PRIORITY, &delegate1);
 
   request1->Start();
@@ -455,7 +456,7 @@
 
   // Issue a user-initiated request, backoff logic should not apply.
   TestDelegate delegate2;
-  scoped_ptr<URLRequest> request2 = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request2 = context_->CreateRequest(
       GURL("https://www.example.com"), DEFAULT_PRIORITY, &delegate2);
   request2->SetLoadFlags(request2->load_flags() | LOAD_MAYBE_USER_GESTURE);
 
@@ -483,7 +484,7 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request = context_->CreateRequest(
       GURL("http://www.example.com"), DEFAULT_PRIORITY, &delegate);
 
   request->Start();
@@ -517,7 +518,7 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   TestDelegate delegate1;
-  scoped_ptr<URLRequest> request1 = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request1 = context_->CreateRequest(
       GURL("https://www.example.com"), DEFAULT_PRIORITY, &delegate1);
 
   request1->Start();
@@ -532,7 +533,7 @@
   // Backoff logic does not apply to a second request, since it is fetched
   // from cache.
   TestDelegate delegate2;
-  scoped_ptr<URLRequest> request2 = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request2 = context_->CreateRequest(
       GURL("https://www.example.com"), DEFAULT_PRIORITY, &delegate2);
 
   request2->Start();
@@ -550,7 +551,7 @@
   context.Init();
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request = context.CreateRequest(
+  std::unique_ptr<URLRequest> request = context.CreateRequest(
       GURL("http://www.example.com"), DEFAULT_PRIORITY, &delegate);
 
   request->Start();
@@ -564,7 +565,8 @@
 // Make sure that SetPriority actually sets the URLRequestHttpJob's
 // priority, before start.  Other tests handle the after start case.
 TEST_F(URLRequestHttpJobTest, SetPriorityBasic) {
-  scoped_ptr<TestURLRequestHttpJob> job(new TestURLRequestHttpJob(req_.get()));
+  std::unique_ptr<TestURLRequestHttpJob> job(
+      new TestURLRequestHttpJob(req_.get()));
   EXPECT_EQ(DEFAULT_PRIORITY, job->priority());
 
   job->SetPriority(LOWEST);
@@ -578,7 +580,7 @@
 // transaction on start.
 TEST_F(URLRequestHttpJobTest, SetTransactionPriorityOnStart) {
   test_job_interceptor_->set_main_intercept_job(
-      make_scoped_ptr(new TestURLRequestHttpJob(req_.get())));
+      base::WrapUnique(new TestURLRequestHttpJob(req_.get())));
   req_->SetPriority(LOW);
 
   EXPECT_FALSE(network_layer_.last_transaction());
@@ -593,7 +595,7 @@
 // its transaction.
 TEST_F(URLRequestHttpJobTest, SetTransactionPriority) {
   test_job_interceptor_->set_main_intercept_job(
-      make_scoped_ptr(new TestURLRequestHttpJob(req_.get())));
+      base::WrapUnique(new TestURLRequestHttpJob(req_.get())));
   req_->SetPriority(LOW);
   req_->Start();
   ASSERT_TRUE(network_layer_.last_transaction());
@@ -608,7 +610,7 @@
   EnableSdch();
   req_->set_method("GET");  // Redundant with default.
   test_job_interceptor_->set_main_intercept_job(
-      make_scoped_ptr(new TestURLRequestHttpJob(req_.get())));
+      base::WrapUnique(new TestURLRequestHttpJob(req_.get())));
   req_->Start();
   EXPECT_TRUE(TransactionAcceptsSdchEncoding());
 }
@@ -618,7 +620,7 @@
   EnableSdch();
   req_->set_method("POST");
   test_job_interceptor_->set_main_intercept_job(
-      make_scoped_ptr(new TestURLRequestHttpJob(req_.get())));
+      base::WrapUnique(new TestURLRequestHttpJob(req_.get())));
   req_->Start();
   EXPECT_FALSE(TransactionAcceptsSdchEncoding());
 }
@@ -638,7 +640,7 @@
 class URLRequestHttpJobWithSdchSupportTest : public ::testing::Test {
  protected:
   URLRequestHttpJobWithSdchSupportTest() : context_(true) {
-    scoped_ptr<HttpNetworkSession::Params> params(
+    std::unique_ptr<HttpNetworkSession::Params> params(
         new HttpNetworkSession::Params);
     context_.set_http_network_session_params(std::move(params));
     context_.set_client_socket_factory(&socket_factory_);
@@ -678,7 +680,7 @@
   EXPECT_CALL(sdch_observer,
               OnGetDictionary(url, GURL("http://example.com/sdch.dict")));
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request =
+  std::unique_ptr<URLRequest> request =
       context_.CreateRequest(url, DEFAULT_PRIORITY, &delegate);
   request->Start();
   base::RunLoop().RunUntilIdle();
@@ -687,7 +689,7 @@
 
   // Second response should be from cache without notification of SdchObserver
   TestDelegate delegate2;
-  scoped_ptr<URLRequest> request2 =
+  std::unique_ptr<URLRequest> request2 =
       context_.CreateRequest(url, DEFAULT_PRIORITY, &delegate2);
   request2->Start();
   base::RunLoop().RunUntilIdle();
@@ -702,7 +704,7 @@
  protected:
   URLRequestHttpJobWithBrotliSupportTest()
       : context_(new TestURLRequestContext(true)) {
-    scoped_ptr<HttpNetworkSession::Params> params(
+    std::unique_ptr<HttpNetworkSession::Params> params(
         new HttpNetworkSession::Params);
     params->enable_brotli = true;
     context_->set_http_network_session_params(std::move(params));
@@ -711,7 +713,7 @@
   }
 
   MockClientSocketFactory socket_factory_;
-  scoped_ptr<TestURLRequestContext> context_;
+  std::unique_ptr<TestURLRequestContext> context_;
 };
 
 TEST_F(URLRequestHttpJobWithBrotliSupportTest, NoBrotliAdvertisementOverHttp) {
@@ -724,7 +726,7 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request = context_->CreateRequest(
       GURL("http://www.example.com"), DEFAULT_PRIORITY, &delegate);
   request->Start();
   base::RunLoop().RunUntilIdle();
@@ -759,7 +761,7 @@
   socket_factory_.AddSocketDataProvider(&socket_data);
 
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request = context_->CreateRequest(
+  std::unique_ptr<URLRequest> request = context_->CreateRequest(
       GURL("https://www.example.com"), DEFAULT_PRIORITY, &delegate);
   request->Start();
   base::RunLoop().RunUntilIdle();
@@ -805,7 +807,7 @@
   }
 
   TestDelegate delegate_;
-  scoped_ptr<URLRequest> req_;
+  std::unique_ptr<URLRequest> req_;
 };
 
 class MockCreateHelper : public WebSocketHandshakeStreamBase::CreateHelper {
@@ -813,7 +815,7 @@
   // GoogleMock does not appear to play nicely with move-only types like
   // scoped_ptr, so this forwarding method acts as a workaround.
   WebSocketHandshakeStreamBase* CreateBasicStream(
-      scoped_ptr<ClientSocketHandle> connection,
+      std::unique_ptr<ClientSocketHandle> connection,
       bool using_proxy) override {
     // Discard the arguments since we don't need them anyway.
     return CreateBasicStreamMock();
@@ -907,8 +909,8 @@
   HttpStream* RenewStreamForAuth() override { return nullptr; }
 
   // Fake implementation of WebSocketHandshakeStreamBase method(s)
-  scoped_ptr<WebSocketStream> Upgrade() override {
-    return scoped_ptr<WebSocketStream>();
+  std::unique_ptr<WebSocketStream> Upgrade() override {
+    return std::unique_ptr<WebSocketStream>();
   }
 
  private:
@@ -923,7 +925,7 @@
 }
 
 TEST_F(URLRequestHttpJobWebSocketTest, CreateHelperPassedThrough) {
-  scoped_ptr<MockCreateHelper> create_helper(
+  std::unique_ptr<MockCreateHelper> create_helper(
       new ::testing::StrictMock<MockCreateHelper>());
   FakeWebSocketHandshakeStream* fake_handshake_stream(
       new FakeWebSocketHandshakeStream);
diff --git a/net/url_request/url_request_intercepting_job_factory.cc b/net/url_request/url_request_intercepting_job_factory.cc
index 3ced003..add05c98 100644
--- a/net/url_request/url_request_intercepting_job_factory.cc
+++ b/net/url_request/url_request_intercepting_job_factory.cc
@@ -12,8 +12,8 @@
 namespace net {
 
 URLRequestInterceptingJobFactory::URLRequestInterceptingJobFactory(
-    scoped_ptr<URLRequestJobFactory> job_factory,
-    scoped_ptr<URLRequestInterceptor> interceptor)
+    std::unique_ptr<URLRequestJobFactory> job_factory,
+    std::unique_ptr<URLRequestInterceptor> interceptor)
     : job_factory_(std::move(job_factory)),
       interceptor_(std::move(interceptor)) {}
 
diff --git a/net/url_request/url_request_intercepting_job_factory.h b/net/url_request/url_request_intercepting_job_factory.h
index 7dcb353c..e4d616a 100644
--- a/net/url_request/url_request_intercepting_job_factory.h
+++ b/net/url_request/url_request_intercepting_job_factory.h
@@ -5,11 +5,11 @@
 #ifndef NET_URL_REQUEST_URL_REQUEST_INTERCEPTING_JOB_FACTORY_H_
 #define NET_URL_REQUEST_URL_REQUEST_INTERCEPTING_JOB_FACTORY_H_
 
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/url_request/url_request_job_factory.h"
 
@@ -33,8 +33,8 @@
     : public URLRequestJobFactory {
  public:
   URLRequestInterceptingJobFactory(
-      scoped_ptr<URLRequestJobFactory> job_factory,
-      scoped_ptr<URLRequestInterceptor> interceptor);
+      std::unique_ptr<URLRequestJobFactory> job_factory,
+      std::unique_ptr<URLRequestInterceptor> interceptor);
   ~URLRequestInterceptingJobFactory() override;
 
   // URLRequestJobFactory implementation
@@ -57,8 +57,8 @@
   bool IsSafeRedirectTarget(const GURL& location) const override;
 
  private:
-  scoped_ptr<URLRequestJobFactory> job_factory_;
-  scoped_ptr<URLRequestInterceptor> interceptor_;
+  std::unique_ptr<URLRequestJobFactory> job_factory_;
+  std::unique_ptr<URLRequestInterceptor> interceptor_;
 
   DISALLOW_COPY_AND_ASSIGN(URLRequestInterceptingJobFactory);
 };
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc
index 239ab4b..71f203a 100644
--- a/net/url_request/url_request_job.cc
+++ b/net/url_request/url_request_job.cc
@@ -34,10 +34,11 @@
 namespace {
 
 // Callback for TYPE_URL_REQUEST_FILTERS_SET net-internals event.
-scoped_ptr<base::Value> FiltersSetCallback(
+std::unique_ptr<base::Value> FiltersSetCallback(
     Filter* filter,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> event_params(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> event_params(
+      new base::DictionaryValue());
   event_params->SetString("filters", filter->OrderedFilterList());
   return std::move(event_params);
 }
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h
index 9555b67..29c330f 100644
--- a/net/url_request/url_request_job.h
+++ b/net/url_request/url_request_job.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/power_monitor/power_observer.h"
@@ -431,7 +431,7 @@
   int64_t postfilter_bytes_read_;
 
   // The data stream filter which is enabled on demand.
-  scoped_ptr<Filter> filter_;
+  std::unique_ptr<Filter> filter_;
 
   // If the filter filled its output buffer, then there is a change that it
   // still has internal data to emit, and this flag is set.
diff --git a/net/url_request/url_request_job_factory_impl.cc b/net/url_request/url_request_job_factory_impl.cc
index 58b97f5..f69db49 100644
--- a/net/url_request/url_request_job_factory_impl.cc
+++ b/net/url_request/url_request_job_factory_impl.cc
@@ -24,7 +24,7 @@
 
 bool URLRequestJobFactoryImpl::SetProtocolHandler(
     const std::string& scheme,
-    scoped_ptr<ProtocolHandler> protocol_handler) {
+    std::unique_ptr<ProtocolHandler> protocol_handler) {
   DCHECK(CalledOnValidThread());
 
   if (!protocol_handler) {
diff --git a/net/url_request/url_request_job_factory_impl.h b/net/url_request/url_request_job_factory_impl.h
index aee7368..a0d0c49 100644
--- a/net/url_request/url_request_job_factory_impl.h
+++ b/net/url_request/url_request_job_factory_impl.h
@@ -6,11 +6,11 @@
 #define NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_IMPL_H_
 
 #include <map>
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/url_request/url_request_job_factory.h"
 
@@ -26,7 +26,7 @@
   // Sets the ProtocolHandler for a scheme. Returns true on success, false on
   // failure (a ProtocolHandler already exists for |scheme|).
   bool SetProtocolHandler(const std::string& scheme,
-                          scoped_ptr<ProtocolHandler> protocol_handler);
+                          std::unique_ptr<ProtocolHandler> protocol_handler);
 
   // URLRequestJobFactory implementation
   URLRequestJob* MaybeCreateJobWithProtocolHandler(
@@ -51,7 +51,8 @@
   // For testing only.
   friend class URLRequestFilter;
 
-  typedef std::map<std::string, scoped_ptr<ProtocolHandler>> ProtocolHandlerMap;
+  typedef std::map<std::string, std::unique_ptr<ProtocolHandler>>
+      ProtocolHandlerMap;
 
   // Sets a global URLRequestInterceptor for testing purposes.  The interceptor
   // is given the chance to intercept any request before the corresponding
diff --git a/net/url_request/url_request_job_factory_impl_unittest.cc b/net/url_request/url_request_job_factory_impl_unittest.cc
index dbcc8ca..273d351 100644
--- a/net/url_request/url_request_job_factory_impl_unittest.cc
+++ b/net/url_request/url_request_job_factory_impl_unittest.cc
@@ -4,9 +4,11 @@
 
 #include "net/url_request/url_request_job_factory_impl.h"
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/location.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
@@ -56,7 +58,7 @@
 TEST(URLRequestJobFactoryTest, NoProtocolHandler) {
   TestDelegate delegate;
   TestURLRequestContext request_context;
-  scoped_ptr<URLRequest> request(request_context.CreateRequest(
+  std::unique_ptr<URLRequest> request(request_context.CreateRequest(
       GURL("foo://bar"), DEFAULT_PRIORITY, &delegate));
   request->Start();
 
@@ -71,8 +73,8 @@
   TestURLRequestContext request_context;
   request_context.set_job_factory(&job_factory);
   job_factory.SetProtocolHandler("foo",
-                                 make_scoped_ptr(new DummyProtocolHandler));
-  scoped_ptr<URLRequest> request(request_context.CreateRequest(
+                                 base::WrapUnique(new DummyProtocolHandler));
+  std::unique_ptr<URLRequest> request(request_context.CreateRequest(
       GURL("foo://bar"), DEFAULT_PRIORITY, &delegate));
   request->Start();
 
@@ -86,7 +88,7 @@
   TestURLRequestContext request_context;
   request_context.set_job_factory(&job_factory);
   job_factory.SetProtocolHandler("foo",
-                                 make_scoped_ptr(new DummyProtocolHandler));
+                                 base::WrapUnique(new DummyProtocolHandler));
   job_factory.SetProtocolHandler("foo", nullptr);
 }
 
diff --git a/net/url_request/url_request_job_unittest.cc b/net/url_request/url_request_job_unittest.cc
index 37a457f..99856b3 100644
--- a/net/url_request/url_request_job_unittest.cc
+++ b/net/url_request/url_request_job_unittest.cc
@@ -4,7 +4,8 @@
 
 #include "net/url_request/url_request_job.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/run_loop.h"
 #include "net/base/request_priority.h"
 #include "net/http/http_transaction_test_util.h"
@@ -152,7 +153,7 @@
   context.set_http_transaction_factory(&network_layer);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       context.CreateRequest(GURL(kGZip_Transaction.url), DEFAULT_PRIORITY, &d));
   AddMockTransaction(&kGZip_Transaction);
 
@@ -172,7 +173,7 @@
   context.set_http_transaction_factory(&network_layer);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       context.CreateRequest(GURL(kGZip_Transaction.url), DEFAULT_PRIORITY, &d));
   MockTransaction transaction(kGZip_Transaction);
   transaction.test_mode = TEST_MODE_SYNC_ALL;
@@ -195,7 +196,7 @@
   context.set_http_transaction_factory(&network_layer);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       context.CreateRequest(GURL(kGZip_Transaction.url), DEFAULT_PRIORITY, &d));
   MockTransaction transaction(kGZip_Transaction);
   transaction.test_mode = TEST_MODE_SYNC_ALL | TEST_MODE_SLOW_READ;
@@ -218,7 +219,7 @@
   context.set_http_transaction_factory(&network_layer);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(context.CreateRequest(
+  std::unique_ptr<URLRequest> req(context.CreateRequest(
       GURL(kRedirect_Transaction.url), DEFAULT_PRIORITY, &d));
   AddMockTransaction(&kRedirect_Transaction);
 
@@ -241,7 +242,7 @@
   context.set_network_delegate(&network_delegate);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       context.CreateRequest(GURL(kGZip_Transaction.url), DEFAULT_PRIORITY, &d));
   AddMockTransaction(&kGZip_Transaction);
 
@@ -264,7 +265,7 @@
   context.set_http_transaction_factory(&network_layer);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(context.CreateRequest(
+  std::unique_ptr<URLRequest> req(context.CreateRequest(
       GURL(kEmptyBodyGzip_Transaction.url), DEFAULT_PRIORITY, &d));
   AddMockTransaction(&kEmptyBodyGzip_Transaction);
 
@@ -288,7 +289,7 @@
   context.set_http_transaction_factory(&network_layer);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(context.CreateRequest(
+  std::unique_ptr<URLRequest> req(context.CreateRequest(
       GURL(kInvalidContentGZip_Transaction.url), DEFAULT_PRIORITY, &d));
   AddMockTransaction(&kInvalidContentGZip_Transaction);
 
@@ -316,7 +317,7 @@
   context.set_http_transaction_factory(&network_layer);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(context.CreateRequest(
+  std::unique_ptr<URLRequest> req(context.CreateRequest(
       GURL(kGzip_Slow_Transaction.url), DEFAULT_PRIORITY, &d));
   AddMockTransaction(&kGzip_Slow_Transaction);
 
@@ -339,7 +340,7 @@
   context.set_http_transaction_factory(&network_layer);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(context.CreateRequest(
+  std::unique_ptr<URLRequest> req(context.CreateRequest(
       GURL(kBrotli_Slow_Transaction.url), DEFAULT_PRIORITY, &d));
   AddMockTransaction(&kBrotli_Slow_Transaction);
 
diff --git a/net/url_request/url_request_netlog_params.cc b/net/url_request/url_request_netlog_params.cc
index f238b87e..ad7be23f 100644
--- a/net/url_request/url_request_netlog_params.cc
+++ b/net/url_request/url_request_netlog_params.cc
@@ -12,14 +12,14 @@
 
 namespace net {
 
-scoped_ptr<base::Value> NetLogURLRequestStartCallback(
+std::unique_ptr<base::Value> NetLogURLRequestStartCallback(
     const GURL* url,
     const std::string* method,
     int load_flags,
     RequestPriority priority,
     int64_t upload_id,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("url", url->possibly_invalid_spec());
   dict->SetString("method", *method);
   dict->SetInteger("load_flags", load_flags);
diff --git a/net/url_request/url_request_netlog_params.h b/net/url_request/url_request_netlog_params.h
index 13dd2d1..e3b92c6 100644
--- a/net/url_request/url_request_netlog_params.h
+++ b/net/url_request/url_request_netlog_params.h
@@ -22,7 +22,7 @@
 namespace net {
 
 // Returns a Value containing NetLog parameters for starting a URLRequest.
-NET_EXPORT scoped_ptr<base::Value> NetLogURLRequestStartCallback(
+NET_EXPORT std::unique_ptr<base::Value> NetLogURLRequestStartCallback(
     const GURL* url,
     const std::string* method,
     int load_flags,
diff --git a/net/url_request/url_request_simple_job_unittest.cc b/net/url_request/url_request_simple_job_unittest.cc
index f123bed..204693cda 100644
--- a/net/url_request/url_request_simple_job_unittest.cc
+++ b/net/url_request/url_request_simple_job_unittest.cc
@@ -2,9 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "net/url_request/url_request_simple_job.h"
+
+#include <memory>
+
 #include "base/bind_helpers.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
 #include "base/test/sequenced_worker_pool_owner.h"
@@ -13,7 +17,6 @@
 #include "net/url_request/url_request_job.h"
 #include "net/url_request/url_request_job_factory.h"
 #include "net/url_request/url_request_job_factory_impl.h"
-#include "net/url_request/url_request_simple_job.h"
 #include "net/url_request/url_request_test_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -87,7 +90,7 @@
   void WaitUntilHeadersReceived() const { run_loop_->Run(); }
 
  private:
-  scoped_ptr<base::RunLoop> run_loop_;
+  std::unique_ptr<base::RunLoop> run_loop_;
 
   DISALLOW_COPY_AND_ASSIGN(CancelAfterFirstReadURLRequestDelegate);
 };
@@ -123,7 +126,7 @@
                              base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)),
         context_(true) {
     job_factory_.SetProtocolHandler(
-        "data", make_scoped_ptr(new SimpleJobProtocolHandler(task_runner_)));
+        "data", base::WrapUnique(new SimpleJobProtocolHandler(task_runner_)));
     context_.set_job_factory(&job_factory_);
     context_.Init();
 
@@ -147,7 +150,7 @@
   TestURLRequestContext context_;
   URLRequestJobFactoryImpl job_factory_;
   TestDelegate delegate_;
-  scoped_ptr<URLRequest> request_;
+  std::unique_ptr<URLRequest> request_;
 };
 
 }  // namespace
diff --git a/net/url_request/url_request_test_job.cc b/net/url_request/url_request_test_job.cc
index bd1c9052..6411f2c 100644
--- a/net/url_request/url_request_test_job.cc
+++ b/net/url_request/url_request_test_job.cc
@@ -11,6 +11,7 @@
 #include "base/compiler_specific.h"
 #include "base/lazy_instance.h"
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_util.h"
 #include "base/thread_task_runner_handle.h"
@@ -111,9 +112,9 @@
 }
 
 // static
-scoped_ptr<URLRequestJobFactory::ProtocolHandler>
+std::unique_ptr<URLRequestJobFactory::ProtocolHandler>
 URLRequestTestJob::CreateProtocolHandler() {
-  return make_scoped_ptr(new TestJobProtocolHandler());
+  return base::WrapUnique(new TestJobProtocolHandler());
 }
 
 URLRequestTestJob::URLRequestTestJob(URLRequest* request,
diff --git a/net/url_request/url_request_test_job.h b/net/url_request/url_request_test_job.h
index e733d1c9..ef2e37e 100644
--- a/net/url_request/url_request_test_job.h
+++ b/net/url_request/url_request_test_job.h
@@ -107,7 +107,7 @@
   RequestPriority priority() const { return priority_; }
 
   // Create a protocol handler for callers that don't subclass.
-  static scoped_ptr<URLRequestJobFactory::ProtocolHandler>
+  static std::unique_ptr<URLRequestJobFactory::ProtocolHandler>
   CreateProtocolHandler();
 
   // Job functions
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index fbcc19b..f45c283 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -9,6 +9,7 @@
 #include "base/compiler_specific.h"
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
@@ -74,14 +75,14 @@
 
   if (!host_resolver())
     context_storage_.set_host_resolver(
-        scoped_ptr<HostResolver>(new MockCachingHostResolver()));
+        std::unique_ptr<HostResolver>(new MockCachingHostResolver()));
   if (!proxy_service())
     context_storage_.set_proxy_service(ProxyService::CreateDirect());
   if (!cert_verifier())
     context_storage_.set_cert_verifier(CertVerifier::CreateDefault());
   if (!transport_security_state())
     context_storage_.set_transport_security_state(
-        make_scoped_ptr(new TransportSecurityState()));
+        base::WrapUnique(new TransportSecurityState()));
   if (!ssl_config_service())
     context_storage_.set_ssl_config_service(new SSLConfigServiceDefaults());
   if (!http_auth_handler_factory()) {
@@ -90,7 +91,7 @@
   }
   if (!http_server_properties()) {
     context_storage_.set_http_server_properties(
-        scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
+        std::unique_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
   }
   if (http_transaction_factory()) {
     // Make sure we haven't been passed an object we're not going to use.
@@ -115,29 +116,29 @@
     params.net_log = net_log();
     params.channel_id_service = channel_id_service();
     context_storage_.set_http_network_session(
-        make_scoped_ptr(new HttpNetworkSession(params)));
-    context_storage_.set_http_transaction_factory(make_scoped_ptr(
+        base::WrapUnique(new HttpNetworkSession(params)));
+    context_storage_.set_http_transaction_factory(base::WrapUnique(
         new HttpCache(context_storage_.http_network_session(),
                       HttpCache::DefaultBackend::InMemory(0), false)));
   }
   // In-memory cookie store.
   if (!cookie_store()) {
     context_storage_.set_cookie_store(
-        make_scoped_ptr(new CookieMonster(nullptr, nullptr)));
+        base::WrapUnique(new CookieMonster(nullptr, nullptr)));
   }
   // In-memory Channel ID service.
   if (!channel_id_service()) {
-    context_storage_.set_channel_id_service(make_scoped_ptr(
+    context_storage_.set_channel_id_service(base::WrapUnique(
         new ChannelIDService(new DefaultChannelIDStore(nullptr),
                              base::WorkerPool::GetTaskRunner(true))));
   }
   if (!http_user_agent_settings()) {
-    context_storage_.set_http_user_agent_settings(make_scoped_ptr(
+    context_storage_.set_http_user_agent_settings(base::WrapUnique(
         new StaticHttpUserAgentSettings("en-us,fr", std::string())));
   }
   if (!job_factory()) {
     context_storage_.set_job_factory(
-        make_scoped_ptr(new URLRequestJobFactoryImpl()));
+        base::WrapUnique(new URLRequestJobFactoryImpl()));
   }
 }
 
@@ -149,7 +150,7 @@
 
 TestURLRequestContextGetter::TestURLRequestContextGetter(
     const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner,
-    scoped_ptr<TestURLRequestContext> context)
+    std::unique_ptr<TestURLRequestContext> context)
     : network_task_runner_(network_task_runner), context_(std::move(context)) {
   DCHECK(network_task_runner_.get());
 }
@@ -655,7 +656,8 @@
   return main_intercept_job_.release();
 }
 
-void TestJobInterceptor::set_main_intercept_job(scoped_ptr<URLRequestJob> job) {
+void TestJobInterceptor::set_main_intercept_job(
+    std::unique_ptr<URLRequestJob> job) {
   main_intercept_job_ = std::move(job);
 }
 
diff --git a/net/url_request/url_request_test_util.h b/net/url_request/url_request_test_util.h
index dc8d0e18..a18ef8c 100644
--- a/net/url_request/url_request_test_util.h
+++ b/net/url_request/url_request_test_util.h
@@ -7,13 +7,14 @@
 
 #include <stdint.h>
 #include <stdlib.h>
+
 #include <map>
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/compiler_specific.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/path_service.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string16.h"
@@ -76,11 +77,11 @@
   }
 
   void set_http_network_session_params(
-      scoped_ptr<HttpNetworkSession::Params> params) {
+      std::unique_ptr<HttpNetworkSession::Params> params) {
     http_network_session_params_ = std::move(params);
   }
 
-  void SetSdchManager(scoped_ptr<SdchManager> sdch_manager) {
+  void SetSdchManager(std::unique_ptr<SdchManager> sdch_manager) {
     context_storage_.set_sdch_manager(std::move(sdch_manager));
   }
 
@@ -95,7 +96,7 @@
   // Optional parameters to override default values.  Note that values that
   // point to other objects the TestURLRequestContext creates will be
   // overwritten.
-  scoped_ptr<HttpNetworkSession::Params> http_network_session_params_;
+  std::unique_ptr<HttpNetworkSession::Params> http_network_session_params_;
 
   // Not owned:
   ClientSocketFactory* client_socket_factory_;
@@ -121,7 +122,7 @@
   // Use to pass a pre-initialized |context|.
   TestURLRequestContextGetter(
       const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner,
-      scoped_ptr<TestURLRequestContext> context);
+      std::unique_ptr<TestURLRequestContext> context);
 
   // URLRequestContextGetter implementation.
   TestURLRequestContext* GetURLRequestContext() override;
@@ -133,7 +134,7 @@
 
  private:
   const scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
-  scoped_ptr<TestURLRequestContext> context_;
+  std::unique_ptr<TestURLRequestContext> context_;
 };
 
 //-----------------------------------------------------------------------------
@@ -417,10 +418,10 @@
   URLRequestJob* MaybeCreateJob(
       URLRequest* request,
       NetworkDelegate* network_delegate) const override;
-  void set_main_intercept_job(scoped_ptr<URLRequestJob> job);
+  void set_main_intercept_job(std::unique_ptr<URLRequestJob> job);
 
  private:
-  mutable scoped_ptr<URLRequestJob> main_intercept_job_;
+  mutable std::unique_ptr<URLRequestJob> main_intercept_job_;
 };
 
 }  // namespace net
diff --git a/net/url_request/url_request_throttler_entry.cc b/net/url_request/url_request_throttler_entry.cc
index 7c85edc..304d7d1 100644
--- a/net/url_request/url_request_throttler_entry.cc
+++ b/net/url_request/url_request_throttler_entry.cc
@@ -48,12 +48,12 @@
 const int URLRequestThrottlerEntry::kDefaultEntryLifetimeMs = 2 * 60 * 1000;
 
 // Returns NetLog parameters when a request is rejected by throttling.
-scoped_ptr<base::Value> NetLogRejectedRequestCallback(
+std::unique_ptr<base::Value> NetLogRejectedRequestCallback(
     const std::string* url_id,
     int num_failures,
     const base::TimeDelta& release_after,
     NetLogCaptureMode /* capture_mode */) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("url", *url_id);
   dict->SetInteger("num_failures", num_failures);
   dict->SetInteger("release_after_ms",
diff --git a/net/url_request/url_request_throttler_simulation_unittest.cc b/net/url_request/url_request_throttler_simulation_unittest.cc
index d5ef39a..a4465d2 100644
--- a/net/url_request/url_request_throttler_simulation_unittest.cc
+++ b/net/url_request/url_request_throttler_simulation_unittest.cc
@@ -14,11 +14,11 @@
 
 #include <cmath>
 #include <limits>
+#include <memory>
 #include <vector>
 
 #include "base/environment.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/rand_util.h"
 #include "base/time/time.h"
 #include "net/base/request_priority.h"
@@ -47,7 +47,7 @@
   static bool should_print = false;
   if (!have_checked_environment) {
     have_checked_environment = true;
-    scoped_ptr<base::Environment> env(base::Environment::Create());
+    std::unique_ptr<base::Environment> env(base::Environment::Create());
     if (env->HasVar(kShowSimulationVariableName))
       should_print = true;
   }
@@ -222,7 +222,7 @@
     if (num_ticks % ticks_per_column)
       ++num_columns;
     DCHECK_LE(num_columns, terminal_width);
-    scoped_ptr<int[]> columns(new int[num_columns]);
+    std::unique_ptr<int[]> columns(new int[num_columns]);
     for (int tx = 0; tx < num_ticks; ++tx) {
       int cx = tx / ticks_per_column;
       if (tx % ticks_per_column == 0)
@@ -293,7 +293,7 @@
   std::vector<int> requests_per_tick_;
 
   TestURLRequestContext context_;
-  scoped_ptr<URLRequest> mock_request_;
+  std::unique_ptr<URLRequest> mock_request_;
 
   DISALLOW_COPY_AND_ASSIGN(Server);
 };
@@ -489,7 +489,7 @@
   const size_t kNumClients = 50;
   DiscreteTimeSimulation simulation;
   URLRequestThrottlerManager manager;
-  std::vector<scoped_ptr<Requester>> requesters;
+  std::vector<std::unique_ptr<Requester>> requesters;
   for (size_t i = 0; i < kNumAttackers; ++i) {
     // Use a tiny time_between_requests so the attackers will ping the
     // server at every tick of the simulation.
@@ -498,9 +498,9 @@
     if (!enable_throttling)
       throttler_entry->DisableBackoffThrottling();
 
-    scoped_ptr<Requester> attacker(new Requester(throttler_entry.get(),
-                                                 TimeDelta::FromMilliseconds(1),
-                                                 server, attacker_results));
+    std::unique_ptr<Requester> attacker(
+        new Requester(throttler_entry.get(), TimeDelta::FromMilliseconds(1),
+                      server, attacker_results));
     attacker->SetStartupJitter(TimeDelta::FromSeconds(120));
     simulation.AddActor(attacker.get());
     requesters.push_back(std::move(attacker));
@@ -512,9 +512,9 @@
     if (!enable_throttling)
       throttler_entry->DisableBackoffThrottling();
 
-    scoped_ptr<Requester> client(new Requester(throttler_entry.get(),
-                                               TimeDelta::FromMinutes(2),
-                                               server, client_results));
+    std::unique_ptr<Requester> client(new Requester(throttler_entry.get(),
+                                                    TimeDelta::FromMinutes(2),
+                                                    server, client_results));
     client->SetStartupJitter(TimeDelta::FromSeconds(120));
     client->SetRequestJitter(TimeDelta::FromMinutes(1));
     simulation.AddActor(client.get());
diff --git a/net/url_request/url_request_throttler_unittest.cc b/net/url_request/url_request_throttler_unittest.cc
index 9fe582a34..beb443d 100644
--- a/net/url_request/url_request_throttler_unittest.cc
+++ b/net/url_request/url_request_throttler_unittest.cc
@@ -2,9 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "net/url_request/url_request_throttler_manager.h"
+#include <memory>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/metrics/histogram_samples.h"
 #include "base/pickle.h"
 #include "base/stl_util.h"
@@ -18,6 +17,7 @@
 #include "net/url_request/url_request.h"
 #include "net/url_request/url_request_context.h"
 #include "net/url_request/url_request_test_util.h"
+#include "net/url_request/url_request_throttler_manager.h"
 #include "net/url_request/url_request_throttler_test_support.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -174,7 +174,7 @@
   scoped_refptr<MockURLRequestThrottlerEntry> entry_;
 
   TestURLRequestContext context_;
-  scoped_ptr<URLRequest> request_;
+  std::unique_ptr<URLRequest> request_;
 };
 
 void URLRequestThrottlerEntryTest::SetUp() {
@@ -355,7 +355,7 @@
 
   // context_ must be declared before request_.
   TestURLRequestContext context_;
-  scoped_ptr<URLRequest> request_;
+  std::unique_ptr<URLRequest> request_;
 };
 
 TEST_F(URLRequestThrottlerManagerTest, IsUrlStandardised) {
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 620d8b8..334f328 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -2,8 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include <utility>
 
+#include "base/memory/ptr_util.h"
 #include "build/build_config.h"
 
 #if defined(OS_WIN)
@@ -26,7 +28,6 @@
 #include "base/json/json_reader.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/path_service.h"
@@ -321,8 +322,8 @@
   return it != haystack.end();
 }
 
-scoped_ptr<UploadDataStream> CreateSimpleUploadData(const char* data) {
-  scoped_ptr<UploadElementReader> reader(
+std::unique_ptr<UploadDataStream> CreateSimpleUploadData(const char* data) {
+  std::unique_ptr<UploadElementReader> reader(
       new UploadBytesElementReader(data, strlen(data)));
   return ElementsUploadDataStream::CreateWithReader(std::move(reader), 0);
 }
@@ -732,10 +733,10 @@
 
   virtual void SetUpFactory() {
     job_factory_impl_->SetProtocolHandler(
-        "data", make_scoped_ptr(new DataProtocolHandler));
+        "data", base::WrapUnique(new DataProtocolHandler));
 #if !defined(DISABLE_FILE_SUPPORT)
     job_factory_impl_->SetProtocolHandler(
-        "file", make_scoped_ptr(new FileProtocolHandler(
+        "file", base::WrapUnique(new FileProtocolHandler(
                     base::ThreadTaskRunnerHandle::Get())));
 #endif
   }
@@ -754,7 +755,7 @@
     TestJobInterceptor* protocol_handler_ = new TestJobInterceptor();
     job_factory_impl_->SetProtocolHandler("http", nullptr);
     job_factory_impl_->SetProtocolHandler("http",
-                                          make_scoped_ptr(protocol_handler_));
+                                          base::WrapUnique(protocol_handler_));
     return protocol_handler_;
   }
 
@@ -762,14 +763,14 @@
   TestNetLog net_log_;
   TestNetworkDelegate default_network_delegate_;  // Must outlive URLRequest.
   URLRequestJobFactoryImpl* job_factory_impl_;
-  scoped_ptr<URLRequestJobFactory> job_factory_;
+  std::unique_ptr<URLRequestJobFactory> job_factory_;
   TestURLRequestContext default_context_;
 };
 
 TEST_F(URLRequestTest, AboutBlankTest) {
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         GURL("about:blank"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -792,28 +793,27 @@
   TestDelegate d;
   {
     // Use our nice little Chrome logo.
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
-        GURL(
-            "data:image/png;base64,"
-            "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADVklEQVQ4jX2TfUwUB"
-            "BjG3w1y+HGcd9dxhXR8T4awOccJGgOSWclHImznLkTlSw0DDQXkrmgYgbUYnlQTqQ"
-            "xIEVxitD5UMCATRA1CEEg+Qjw3bWDxIauJv/5oumqs39/P827vnucRmYN0gyF01GI"
-            "5MpCVdW0gO7tvNC+vqSEtbZefk5NuLv1jdJ46p/zw0HeH4+PHr3h7c1mjoV2t5rKz"
-            "Mx1+fg9bAgK6zHq9cU5z+LpA3xOtx34+vTeT21onRuzssC3zxbbSwC13d/pFuC7Ck"
-            "IMDxQpF7r/MWq12UctI1dWWm99ypqSYmRUBdKem8MkrO/kgaTt1O7YzlpzE5GIVd0"
-            "WYUqt57yWf2McHTObYPbVD+ZwbtlLTVMZ3BW+TnLyXLaWtmEq6WJVbT3HBh3Svj2H"
-            "QQcm43XwmtoYM6vVKleh0uoWvnzW3v3MpidruPTQPf0bia7sJOtBM0ufTWNvus/nk"
-            "DFHF9ZS+uYVjRUasMeHUmyLYtcklTvzWGFZnNOXczThvpKIzjcahSqIzkvDLayDq6"
-            "D3eOjtBbNUEIZYyqsvj4V4wY92eNJ4IoyhTbxXX1T5xsV9tm9r4TQwHLiZw/pdDZJ"
-            "ea8TKmsmR/K0uLh/GwnCHghTja6lPhphezPfO5/5MrVvMzNaI3+ERHfrFzPKQukrQ"
-            "GI4d/3EFD/3E2mVNYvi4at7CXWREaxZGD+3hg28zD3gVMd6q5c8GdosynKmSeRuGz"
-            "pjyl1/9UDGtPR5HeaKT8Wjo17WXk579BXVUhN64ehF9fhRtq/uxxZKzNiZFGD0wRC"
-            "3NFROZ5mwIPL/96K/rKMMLrIzF9uhHr+/sYH7DAbwlgC4J+R2Z7FUx1qLnV7MGF40"
-            "smVSoJ/jvHRfYhQeUJd/SnYtGWhPHR0Sz+GE2F2yth0B36Vcz2KpnufBJbsysjjW4"
-            "kblBUiIjiURUWqJY65zxbnTy57GQyH58zgy0QBtTQv5gH15XMdKkYu+TGaJMnlm2O"
-            "34uI4b9tflqp1+QEFGzoW/ulmcofcpkZCYJhDfSpme7QcrHa+Xfji8paEQkTkSfmm"
-            "oRWRNZr/F1KfVMjW+IKEnv2FwZfKdzt0BQR6lClcZR0EfEXEfv/G6W9iLiIyCoReV"
-            "5EnhORIBHx+ufPj/gLB/zGI/G4Bk0AAAAASUVORK5CYII="),
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
+        GURL("data:image/png;base64,"
+             "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADVklEQVQ4jX2TfUwUB"
+             "BjG3w1y+HGcd9dxhXR8T4awOccJGgOSWclHImznLkTlSw0DDQXkrmgYgbUYnlQTqQ"
+             "xIEVxitD5UMCATRA1CEEg+Qjw3bWDxIauJv/5oumqs39/P827vnucRmYN0gyF01GI"
+             "5MpCVdW0gO7tvNC+vqSEtbZefk5NuLv1jdJ46p/zw0HeH4+PHr3h7c1mjoV2t5rKz"
+             "Mx1+fg9bAgK6zHq9cU5z+LpA3xOtx34+vTeT21onRuzssC3zxbbSwC13d/pFuC7Ck"
+             "IMDxQpF7r/MWq12UctI1dWWm99ypqSYmRUBdKem8MkrO/kgaTt1O7YzlpzE5GIVd0"
+             "WYUqt57yWf2McHTObYPbVD+ZwbtlLTVMZ3BW+TnLyXLaWtmEq6WJVbT3HBh3Svj2H"
+             "QQcm43XwmtoYM6vVKleh0uoWvnzW3v3MpidruPTQPf0bia7sJOtBM0ufTWNvus/nk"
+             "DFHF9ZS+uYVjRUasMeHUmyLYtcklTvzWGFZnNOXczThvpKIzjcahSqIzkvDLayDq6"
+             "D3eOjtBbNUEIZYyqsvj4V4wY92eNJ4IoyhTbxXX1T5xsV9tm9r4TQwHLiZw/pdDZJ"
+             "ea8TKmsmR/K0uLh/GwnCHghTja6lPhphezPfO5/5MrVvMzNaI3+ERHfrFzPKQukrQ"
+             "GI4d/3EFD/3E2mVNYvi4at7CXWREaxZGD+3hg28zD3gVMd6q5c8GdosynKmSeRuGz"
+             "pjyl1/9UDGtPR5HeaKT8Wjo17WXk579BXVUhN64ehF9fhRtq/uxxZKzNiZFGD0wRC"
+             "3NFROZ5mwIPL/96K/rKMMLrIzF9uhHr+/sYH7DAbwlgC4J+R2Z7FUx1qLnV7MGF40"
+             "smVSoJ/jvHRfYhQeUJd/SnYtGWhPHR0Sz+GE2F2yth0B36Vcz2KpnufBJbsysjjW4"
+             "kblBUiIjiURUWqJY65zxbnTy57GQyH58zgy0QBtTQv5gH15XMdKkYu+TGaJMnlm2O"
+             "34uI4b9tflqp1+QEFGzoW/ulmcofcpkZCYJhDfSpme7QcrHa+Xfji8paEQkTkSfmm"
+             "oRWRNZr/F1KfVMjW+IKEnv2FwZfKdzt0BQR6lClcZR0EfEXEfv/G6W9iLiIyCoReV"
+             "5EnhORIBHx+ufPj/gLB/zGI/G4Bk0AAAAASUVORK5CYII="),
         DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -848,7 +848,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(app_url, DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -878,7 +878,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(app_url, DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -892,7 +892,7 @@
 
 TEST_F(URLRequestTest, FileTestFullSpecifiedRange) {
   const size_t buffer_size = 4000;
-  scoped_ptr<char[]> buffer(new char[buffer_size]);
+  std::unique_ptr<char[]> buffer(new char[buffer_size]);
   FillBuffer(buffer.get(), buffer_size);
 
   base::FilePath temp_path;
@@ -911,7 +911,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(temp_url, DEFAULT_PRIORITY, &d));
 
     HttpRequestHeaders headers;
@@ -937,7 +937,7 @@
 
 TEST_F(URLRequestTest, FileTestHalfSpecifiedRange) {
   const size_t buffer_size = 4000;
-  scoped_ptr<char[]> buffer(new char[buffer_size]);
+  std::unique_ptr<char[]> buffer(new char[buffer_size]);
   FillBuffer(buffer.get(), buffer_size);
 
   base::FilePath temp_path;
@@ -956,7 +956,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(temp_url, DEFAULT_PRIORITY, &d));
 
     HttpRequestHeaders headers;
@@ -981,7 +981,7 @@
 
 TEST_F(URLRequestTest, FileTestMultipleRanges) {
   const size_t buffer_size = 400000;
-  scoped_ptr<char[]> buffer(new char[buffer_size]);
+  std::unique_ptr<char[]> buffer(new char[buffer_size]);
   FillBuffer(buffer.get(), buffer_size);
 
   base::FilePath temp_path;
@@ -994,7 +994,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(temp_url, DEFAULT_PRIORITY, &d));
 
     HttpRequestHeaders headers;
@@ -1024,7 +1024,7 @@
     TestNetworkDelegate network_delegate;
     network_delegate.set_can_access_files(true);
     default_context_.set_network_delegate(&network_delegate);
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(test_file_url, DEFAULT_PRIORITY, &d));
     r->Start();
     base::RunLoop().Run();
@@ -1037,7 +1037,7 @@
     TestNetworkDelegate network_delegate;
     network_delegate.set_can_access_files(false);
     default_context_.set_network_delegate(&network_delegate);
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(test_file_url, DEFAULT_PRIORITY, &d));
     r->Start();
     base::RunLoop().Run();
@@ -1058,7 +1058,7 @@
     file_path = file_path.Append(FILE_PATH_LITERAL("net"));
     file_path = file_path.Append(FILE_PATH_LITERAL("data"));
 
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         FilePathToFileURL(file_path), DEFAULT_PRIORITY, &d));
     req->Start();
     EXPECT_TRUE(req->is_pending());
@@ -1083,7 +1083,7 @@
   path = path.Append(kTestFilePath);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       FilePathToFileURL(path), DEFAULT_PRIORITY, &d));
   req->Start();
   base::RunLoop().Run();
@@ -1118,7 +1118,7 @@
   path = path.Append(kTestFilePath);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       FilePathToFileURL(path), DEFAULT_PRIORITY, &d));
   req->Start();
   base::RunLoop().Run();
@@ -1133,7 +1133,7 @@
 // Don't accept the url "file:///" on windows. See http://crbug.com/1474.
 TEST_F(URLRequestTest, FileDirRedirectSingleSlash) {
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       default_context_.CreateRequest(GURL("file:///"), DEFAULT_PRIORITY, &d));
   req->Start();
   base::RunLoop().Run();
@@ -1148,7 +1148,7 @@
 TEST_F(URLRequestTest, InvalidUrlTest) {
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         GURL("invalid url"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -1165,7 +1165,7 @@
   network_delegate.set_cancel_request_with_policy_violating_referrer(true);
   context.set_network_delegate(&network_delegate);
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       context.CreateRequest(GURL("http://localhost/"), DEFAULT_PRIORITY, &d));
   req->SetReferrer("https://somewhere.com/");
 
@@ -1199,7 +1199,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         FilePathToFileURL(base::FilePath(lnk_path)), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -1214,7 +1214,7 @@
                              FILE_SHARE_READ, NULL, OPEN_EXISTING,
                              FILE_ATTRIBUTE_NORMAL, NULL);
     EXPECT_NE(INVALID_HANDLE_VALUE, file);
-    scoped_ptr<char[]> buffer(new char[data.nFileSizeLow]);
+    std::unique_ptr<char[]> buffer(new char[data.nFileSizeLow]);
     DWORD read_size;
     BOOL result;
     result = ReadFile(file, buffer.get(), data.nFileSizeLow,
@@ -1566,7 +1566,7 @@
   void SetUpFactory() override {
     interceptor_ = new MockURLRequestInterceptor();
     job_factory_.reset(new URLRequestInterceptingJobFactory(
-        std::move(job_factory_), make_scoped_ptr(interceptor_)));
+        std::move(job_factory_), base::WrapUnique(interceptor_)));
   }
 
   MockURLRequestInterceptor* interceptor() const {
@@ -1583,7 +1583,7 @@
   interceptor()->set_main_headers(MockURLRequestInterceptor::ok_headers());
   interceptor()->set_main_data(MockURLRequestInterceptor::ok_data());
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context().CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context().CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   base::SupportsUserData::Data* user_data0 = new base::SupportsUserData::Data();
   base::SupportsUserData::Data* user_data1 = new base::SupportsUserData::Data();
@@ -1621,7 +1621,7 @@
   interceptor()->set_redirect_data(MockURLRequestInterceptor::ok_data());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context().CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context().CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   req->set_method("GET");
   req->Start();
@@ -1653,7 +1653,7 @@
   interceptor()->set_final_data(MockURLRequestInterceptor::ok_data());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context().CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context().CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   req->set_method("GET");
   req->Start();
@@ -1681,7 +1681,7 @@
   interceptor()->set_final_data(MockURLRequestInterceptor::ok_data());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context().CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context().CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   req->set_method("GET");
   req->Start();
@@ -1709,7 +1709,7 @@
   interceptor()->set_main_data(MockURLRequestInterceptor::ok_data());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context().CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context().CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   req->set_method("GET");
   req->Start();
@@ -1739,7 +1739,7 @@
   interceptor()->set_final_data(MockURLRequestInterceptor::ok_data());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context().CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context().CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   req->set_method("GET");
   req->Start();
@@ -1770,7 +1770,7 @@
   interceptor()->set_final_data(MockURLRequestInterceptor::ok_data());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context().CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context().CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   req->set_method("GET");
   req->Start();
@@ -1794,7 +1794,7 @@
   interceptor()->set_cancel_final_request(true);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context().CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context().CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   req->set_method("GET");
   req->Start();
@@ -1819,7 +1819,7 @@
   interceptor()->set_final_data(MockURLRequestInterceptor::ok_data());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context().CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context().CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   req->set_method("GET");
   req->Start();
@@ -1891,7 +1891,7 @@
   interceptor->set_intercept_main_request(true);
   interceptor->set_main_request_load_timing_info(job_load_timing);
   TestDelegate d;
-  scoped_ptr<URLRequest> req(context.CreateRequest(
+  std::unique_ptr<URLRequest> req(context.CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   req->Start();
   base::RunLoop().Run();
@@ -2108,9 +2108,9 @@
 TEST_F(URLRequestTest, Identifiers) {
   TestDelegate d;
   TestURLRequestContext context;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       context.CreateRequest(GURL("http://example.com"), DEFAULT_PRIORITY, &d));
-  scoped_ptr<URLRequest> other_req(
+  std::unique_ptr<URLRequest> other_req(
       context.CreateRequest(GURL("http://example.com"), DEFAULT_PRIORITY, &d));
 
   ASSERT_NE(req->identifier(), other_req->identifier());
@@ -2131,7 +2131,7 @@
   TestURLRequestContextWithProxy context("myproxy:70", &network_delegate);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       context.CreateRequest(GURL("http://example.com"), DEFAULT_PRIORITY, &d));
   req->set_method("GET");
 
@@ -2154,7 +2154,7 @@
 // content is empty.
 TEST_F(URLRequestTest, RequestCompletionForEmptyResponse) {
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       default_context_.CreateRequest(GURL("data:,"), DEFAULT_PRIORITY, &d));
   req->Start();
   base::RunLoop().Run();
@@ -2166,7 +2166,7 @@
 // correctly, both before and after start.
 TEST_F(URLRequestTest, SetPriorityBasic) {
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   EXPECT_EQ(DEFAULT_PRIORITY, req->priority());
 
@@ -2184,12 +2184,12 @@
 // Start on it.
 TEST_F(URLRequestTest, SetJobPriorityBeforeJobStart) {
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   EXPECT_EQ(DEFAULT_PRIORITY, req->priority());
 
   RequestPriority job_priority;
-  scoped_ptr<URLRequestJob> job(new PriorityMonitoringURLRequestJob(
+  std::unique_ptr<URLRequestJob> job(new PriorityMonitoringURLRequestJob(
       req.get(), &default_network_delegate_, &job_priority));
   AddTestInterceptor()->set_main_intercept_job(std::move(job));
   EXPECT_EQ(DEFAULT_PRIORITY, job_priority);
@@ -2204,11 +2204,11 @@
 // job.
 TEST_F(URLRequestTest, SetJobPriority) {
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
 
   RequestPriority job_priority;
-  scoped_ptr<URLRequestJob> job(new PriorityMonitoringURLRequestJob(
+  std::unique_ptr<URLRequestJob> job(new PriorityMonitoringURLRequestJob(
       req.get(), &default_network_delegate_, &job_priority));
   AddTestInterceptor()->set_main_intercept_job(std::move(job));
 
@@ -2225,12 +2225,12 @@
 // is MAXIMUM_PRIORITY.
 TEST_F(URLRequestTest, PriorityIgnoreLimits) {
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       GURL("http://test_intercept/foo"), MAXIMUM_PRIORITY, &d));
   EXPECT_EQ(MAXIMUM_PRIORITY, req->priority());
 
   RequestPriority job_priority;
-  scoped_ptr<URLRequestJob> job(new PriorityMonitoringURLRequestJob(
+  std::unique_ptr<URLRequestJob> job(new PriorityMonitoringURLRequestJob(
       req.get(), &default_network_delegate_, &job_priority));
   AddTestInterceptor()->set_main_intercept_job(std::move(job));
 
@@ -2264,7 +2264,7 @@
   ASSERT_TRUE(test_server.Start());
 
   TestURLRequestContext context;
-  scoped_ptr<DelayedCookieMonster> delayed_cm(new DelayedCookieMonster());
+  std::unique_ptr<DelayedCookieMonster> delayed_cm(new DelayedCookieMonster());
   context.set_cookie_store(delayed_cm.get());
 
   // Set up a cookie.
@@ -2272,7 +2272,7 @@
     TestNetworkDelegate network_delegate;
     context.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(context.CreateRequest(
+    std::unique_ptr<URLRequest> req(context.CreateRequest(
         test_server.GetURL("/set-cookie?CookieToNotSend=1"), DEFAULT_PRIORITY,
         &d));
     req->Start();
@@ -2287,7 +2287,7 @@
     TestNetworkDelegate network_delegate;
     context.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(context.CreateRequest(
+    std::unique_ptr<URLRequest> req(context.CreateRequest(
         test_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2308,7 +2308,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/set-cookie?CookieToNotSend=1"), DEFAULT_PRIORITY,
         &d));
     req->Start();
@@ -2322,7 +2322,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2338,7 +2338,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->SetLoadFlags(LOAD_DO_NOT_SEND_COOKIES);
     req->Start();
@@ -2362,7 +2362,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/set-cookie?CookieToNotUpdate=2"), DEFAULT_PRIORITY,
         &d));
     req->Start();
@@ -2378,7 +2378,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/set-cookie?CookieToNotSave=1&CookieToNotUpdate=1"),
         DEFAULT_PRIORITY, &d));
     req->SetLoadFlags(LOAD_DO_NOT_SAVE_COOKIES);
@@ -2397,7 +2397,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2422,7 +2422,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/set-cookie?CookieToNotSend=1"), DEFAULT_PRIORITY,
         &d));
     req->Start();
@@ -2437,7 +2437,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2455,7 +2455,7 @@
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
     network_delegate.set_cookie_options(TestNetworkDelegate::NO_GET_COOKIES);
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2483,7 +2483,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/set-cookie?CookieToNotUpdate=2"), DEFAULT_PRIORITY,
         &d));
     req->Start();
@@ -2499,7 +2499,7 @@
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
     network_delegate.set_cookie_options(TestNetworkDelegate::NO_SET_COOKIE);
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/set-cookie?CookieToNotSave=1&CookieToNotUpdate=1"),
         DEFAULT_PRIORITY, &d));
     req->Start();
@@ -2515,7 +2515,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2539,7 +2539,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/set-cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2559,7 +2559,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/set-cookie?CookieToNotSend=1"), DEFAULT_PRIORITY,
         &d));
     req->Start();
@@ -2574,7 +2574,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2592,7 +2592,7 @@
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
     network_delegate.set_cookie_options(TestNetworkDelegate::NO_GET_COOKIES);
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2614,7 +2614,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/set-cookie?CookieToNotUpdate=2"), DEFAULT_PRIORITY,
         &d));
     req->Start();
@@ -2630,7 +2630,7 @@
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
     network_delegate.set_cookie_options(TestNetworkDelegate::NO_SET_COOKIE);
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/set-cookie?CookieToNotSave=1&CookieToNotUpdate=1"),
         DEFAULT_PRIORITY, &d));
     req->Start();
@@ -2646,7 +2646,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2675,7 +2675,7 @@
   // Set up two 'SameSite' cookies on 'example.test'
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL(kHost,
                            "/set-cookie?StrictSameSiteCookie=1;SameSite=Strict&"
                            "LaxSameSiteCookie=1;SameSite=Lax"),
@@ -2690,7 +2690,7 @@
   // Verify that both cookies are sent for same-site requests.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL(kHost, "/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->set_first_party_for_cookies(test_server.GetURL(kHost, "/"));
     req->set_initiator(url::Origin(test_server.GetURL(kHost, "/")));
@@ -2707,7 +2707,7 @@
   // Verify that both cookies are sent for same-registrable-domain requests.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL(kHost, "/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->set_first_party_for_cookies(test_server.GetURL(kSubHost, "/"));
     req->set_initiator(url::Origin(test_server.GetURL(kSubHost, "/")));
@@ -2724,7 +2724,7 @@
   // Verify that neither cookie is not sent for cross-site requests.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL(kHost, "/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->set_first_party_for_cookies(test_server.GetURL(kCrossHost, "/"));
     req->set_initiator(url::Origin(test_server.GetURL(kCrossHost, "/")));
@@ -2742,7 +2742,7 @@
   // method is "safe".
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL(kHost, "/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->set_first_party_for_cookies(test_server.GetURL(kHost, "/"));
     req->set_initiator(url::Origin(test_server.GetURL(kCrossHost, "/")));
@@ -2761,7 +2761,7 @@
   // method is unsafe (e.g. POST).
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL(kHost, "/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->set_first_party_for_cookies(test_server.GetURL(kHost, "/"));
     req->set_initiator(url::Origin(test_server.GetURL(kCrossHost, "/")));
@@ -2796,7 +2796,7 @@
   // Try to set a Secure __Secure- cookie.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(context.CreateRequest(
+    std::unique_ptr<URLRequest> req(context.CreateRequest(
         http_server.GetURL("/set-cookie?__Secure-nonsecure-origin=1;Secure"),
         DEFAULT_PRIORITY, &d));
     req->Start();
@@ -2808,7 +2808,7 @@
   // Verify that the cookie is not set.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(context.CreateRequest(
+    std::unique_ptr<URLRequest> req(context.CreateRequest(
         https_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2834,7 +2834,7 @@
   // Try to set a non-Secure __Secure- cookie.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(
+    std::unique_ptr<URLRequest> req(
         context.CreateRequest(https_server.GetURL("/set-cookie?__Secure-foo=1"),
                               DEFAULT_PRIORITY, &d));
     req->Start();
@@ -2846,7 +2846,7 @@
   // Verify that the cookie is not set.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(context.CreateRequest(
+    std::unique_ptr<URLRequest> req(context.CreateRequest(
         https_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2871,7 +2871,7 @@
   // Try to set a Secure __Secure- cookie.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(context.CreateRequest(
+    std::unique_ptr<URLRequest> req(context.CreateRequest(
         https_server.GetURL("/set-cookie?__Secure-bar=1;Secure"),
         DEFAULT_PRIORITY, &d));
     req->Start();
@@ -2883,7 +2883,7 @@
   // Verify that the cookie is set.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(context.CreateRequest(
+    std::unique_ptr<URLRequest> req(context.CreateRequest(
         https_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2914,7 +2914,7 @@
   // Try to set a Secure cookie, with experimental features enabled.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(context.CreateRequest(
+    std::unique_ptr<URLRequest> req(context.CreateRequest(
         http_server.GetURL("/set-cookie?nonsecure-origin=1;Secure"),
         DEFAULT_PRIORITY, &d));
     req->Start();
@@ -2926,7 +2926,7 @@
   // Verify that the cookie is not set.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(context.CreateRequest(
+    std::unique_ptr<URLRequest> req(context.CreateRequest(
         https_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2953,7 +2953,7 @@
   // Try to set a Secure cookie, with experimental features enabled.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(context.CreateRequest(
+    std::unique_ptr<URLRequest> req(context.CreateRequest(
         https_server.GetURL("/set-cookie?secure-origin=1;Secure"),
         DEFAULT_PRIORITY, &d));
     req->Start();
@@ -2965,7 +2965,7 @@
   // Verify that the cookie is not set.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(context.CreateRequest(
+    std::unique_ptr<URLRequest> req(context.CreateRequest(
         https_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -2981,14 +2981,14 @@
 // the test server is affected by entering suspend mode on Android.
 TEST_F(URLRequestTest, CancelOnSuspend) {
   TestPowerMonitorSource* power_monitor_source = new TestPowerMonitorSource();
-  base::PowerMonitor power_monitor(make_scoped_ptr(power_monitor_source));
+  base::PowerMonitor power_monitor(base::WrapUnique(power_monitor_source));
 
   URLRequestFailedJob::AddUrlHandler();
 
   TestDelegate d;
   // Request that just hangs.
   GURL url(URLRequestFailedJob::GetMockHttpUrl(ERR_IO_PENDING));
-  scoped_ptr<URLRequest> r(
+  std::unique_ptr<URLRequest> r(
       default_context_.CreateRequest(url, DEFAULT_PRIORITY, &d));
   r->Start();
 
@@ -3059,7 +3059,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL(
             "/set-cookie?StillGood=1;expires=Mon,18-Apr-1977,22:50:13,GMT"),
         DEFAULT_PRIORITY, &d));
@@ -3071,7 +3071,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -3083,7 +3083,7 @@
     FixedDateNetworkDelegate network_delegate("18-Apr-1977 22:49:13 UTC");
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL(
             "/set-cookie?StillGood=1;expires=Mon,18-Apr-1977,22:50:13,GMT"),
         DEFAULT_PRIORITY, &d));
@@ -3095,7 +3095,7 @@
     TestNetworkDelegate network_delegate;
     default_context_.set_network_delegate(&network_delegate);
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Cookie"), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -3115,7 +3115,7 @@
   // only the latter shall be respected.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Referer"), DEFAULT_PRIORITY, &d));
     req->SetReferrer("http://foo.com/");
 
@@ -3133,7 +3133,7 @@
   // shall be sent in the header.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         test_server.GetURL("/echoheader?Referer"), DEFAULT_PRIORITY, &d));
 
     HttpRequestHeaders headers;
@@ -3166,7 +3166,7 @@
                               bool include_data) {
     static const char kData[] = "hello world";
     TestDelegate d;
-    scoped_ptr<URLRequest> req(
+    std::unique_ptr<URLRequest> req(
         default_context_.CreateRequest(redirect_url, DEFAULT_PRIORITY, &d));
     req->set_method(request_method);
     if (include_data) {
@@ -3212,7 +3212,7 @@
                                     const std::string& redirect_method,
                                     const std::string& origin_value) {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(
+    std::unique_ptr<URLRequest> req(
         default_context_.CreateRequest(redirect_url, DEFAULT_PRIORITY, &d));
     req->set_method(request_method);
     req->SetExtraRequestHeaderByName(HttpRequestHeaders::kOrigin,
@@ -3259,7 +3259,7 @@
 
     for (int i = 0; i < kIterations; ++i) {
       TestDelegate d;
-      scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+      std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
           test_server_.GetURL("/echo"), DEFAULT_PRIORITY, &d));
       r->set_method(method.c_str());
 
@@ -3282,7 +3282,7 @@
 
   bool DoManyCookiesRequest(int num_cookies) {
     TestDelegate d;
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         test_server_.GetURL("/set-many-cookies?" +
                             base::IntToString(num_cookies)),
         DEFAULT_PRIORITY, &d));
@@ -3308,7 +3308,7 @@
 
 namespace {
 
-scoped_ptr<test_server::HttpResponse> HandleRedirectConnect(
+std::unique_ptr<test_server::HttpResponse> HandleRedirectConnect(
     const test_server::HttpRequest& request) {
   if (request.headers.find("Host") == request.headers.end() ||
       request.headers.at("Host") != "www.redirect.com" ||
@@ -3316,7 +3316,7 @@
     return nullptr;
   }
 
-  scoped_ptr<test_server::BasicHttpResponse> http_response(
+  std::unique_ptr<test_server::BasicHttpResponse> http_response(
       new test_server::BasicHttpResponse);
   http_response->set_code(HTTP_FOUND);
   http_response->AddCustomHeader("Location",
@@ -3390,7 +3390,7 @@
   }
 
  protected:
-  scoped_ptr<ChannelIDService> channel_id_service_;
+  std::unique_ptr<ChannelIDService> channel_id_service_;
 };
 
 TEST_F(TokenBindingURLRequestTest, TokenBindingTest) {
@@ -3403,7 +3403,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         https_test_server.GetURL("tokbind-ekm"), DEFAULT_PRIORITY, &d));
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -3446,7 +3446,7 @@
   {
     GURL redirect_url =
         https_test_server.GetURL("forward-tokbind?/tokbind-ekm");
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(redirect_url, DEFAULT_PRIORITY, &d));
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -3499,7 +3499,7 @@
   {
     GURL redirect_url = http_server.GetURL(
         "forward-tokbind?" + https_test_server.GetURL("tokbind-ekm").spec());
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(redirect_url, DEFAULT_PRIORITY, &d));
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -3550,7 +3550,7 @@
   {
     GURL redirect_url = token_binding_test_server.GetURL(
         "forward-tokbind?" + https_test_server.GetURL("tokbind-ekm").spec());
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(redirect_url, DEFAULT_PRIORITY, &d));
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -3584,7 +3584,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(context.CreateRequest(
+    std::unique_ptr<URLRequest> r(context.CreateRequest(
         GURL("https://www.redirect.com/"), DEFAULT_PRIORITY, &d));
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -3612,7 +3612,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(context.CreateRequest(
+    std::unique_ptr<URLRequest> r(context.CreateRequest(
         GURL("https://www.redirect.com/"), DEFAULT_PRIORITY, &d));
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -3656,7 +3656,7 @@
   context.Init();
 
   {
-    scoped_ptr<URLRequest> r(context.CreateRequest(
+    std::unique_ptr<URLRequest> r(context.CreateRequest(
         http_test_server()->GetURL("/defaultresponse"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -3689,7 +3689,7 @@
       http_test_server()->host_port_pair().ToString(), &network_delegate);
 
   {
-    scoped_ptr<URLRequest> r(context.CreateRequest(
+    std::unique_ptr<URLRequest> r(context.CreateRequest(
         http_test_server()->GetURL("/"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -3722,7 +3722,8 @@
   context.Init();
 
   {
-    scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
+    std::unique_ptr<URLRequest> r(
+        context.CreateRequest(url, DEFAULT_PRIORITY, &d));
 
     r->Start();
     base::RunLoop().Run();
@@ -3800,7 +3801,7 @@
 
   {
     GURL original_url(http_test_server()->GetURL("/defaultresponse"));
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         context.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
 
     // Quit after hitting the redirect, so can check the headers.
@@ -3853,7 +3854,7 @@
 
   {
     GURL original_url(http_test_server()->GetURL("/defaultresponse"));
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         context.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
 
     // Quit after hitting the redirect, so can check the headers.
@@ -3909,7 +3910,7 @@
 
   {
     GURL original_url(http_test_server()->GetURL("/defaultresponse"));
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         context.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
     r->set_method("POST");
     r->set_upload(CreateSimpleUploadData(kData));
@@ -3966,7 +3967,7 @@
 
   {
     GURL original_url(http_test_server()->GetURL("/defaultresponse"));
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         context.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -4008,7 +4009,8 @@
 
   {
     GURL url(http_test_server()->GetURL("/auth-basic"));
-    scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
+    std::unique_ptr<URLRequest> r(
+        context.CreateRequest(url, DEFAULT_PRIORITY, &d));
     r->Start();
 
     base::RunLoop().Run();
@@ -4039,7 +4041,8 @@
 
   {
     GURL url(http_test_server()->GetURL("/auth-basic"));
-    scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
+    std::unique_ptr<URLRequest> r(
+        context.CreateRequest(url, DEFAULT_PRIORITY, &d));
     r->Start();
 
     {
@@ -4080,7 +4083,8 @@
 
   {
     GURL url(http_test_server()->GetURL("/auth-basic"));
-    scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
+    std::unique_ptr<URLRequest> r(
+        context.CreateRequest(url, DEFAULT_PRIORITY, &d));
     r->Start();
     base::RunLoop().Run();
 
@@ -4115,7 +4119,8 @@
 
   {
     GURL url(http_test_server()->GetURL("/auth-basic"));
-    scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
+    std::unique_ptr<URLRequest> r(
+        context.CreateRequest(url, DEFAULT_PRIORITY, &d));
     r->Start();
     base::RunLoop().Run();
 
@@ -4153,7 +4158,8 @@
 
   {
     GURL url(http_test_server()->GetURL("/auth-basic"));
-    scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
+    std::unique_ptr<URLRequest> r(
+        context.CreateRequest(url, DEFAULT_PRIORITY, &d));
     r->Start();
     base::RunLoop().Run();
 
@@ -4187,7 +4193,8 @@
 
   {
     GURL url(http_test_server()->GetURL("/auth-basic"));
-    scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
+    std::unique_ptr<URLRequest> r(
+        context.CreateRequest(url, DEFAULT_PRIORITY, &d));
     r->Start();
     base::RunLoop().Run();
 
@@ -4222,7 +4229,8 @@
 
   {
     GURL url(http_test_server()->GetURL("/auth-basic"));
-    scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
+    std::unique_ptr<URLRequest> r(
+        context.CreateRequest(url, DEFAULT_PRIORITY, &d));
     r->Start();
     base::RunLoop().Run();
 
@@ -4255,7 +4263,8 @@
 
   {
     GURL url(http_test_server()->GetURL("/auth-basic"));
-    scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
+    std::unique_ptr<URLRequest> r(
+        context.CreateRequest(url, DEFAULT_PRIORITY, &d));
     r->Start();
     base::RunLoop().Run();
 
@@ -4285,7 +4294,7 @@
   context.Init();
 
   {
-    scoped_ptr<URLRequest> r(context.CreateRequest(
+    std::unique_ptr<URLRequest> r(context.CreateRequest(
         http_test_server()->GetURL("/"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -4322,7 +4331,7 @@
   context.Init();
 
   {
-    scoped_ptr<URLRequest> r(context.CreateRequest(
+    std::unique_ptr<URLRequest> r(context.CreateRequest(
         http_test_server()->GetURL("/"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -4358,7 +4367,7 @@
   context.Init();
 
   {
-    scoped_ptr<URLRequest> r(context.CreateRequest(
+    std::unique_ptr<URLRequest> r(context.CreateRequest(
         http_test_server()->GetURL("/"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -4394,7 +4403,7 @@
   context.Init();
 
   {
-    scoped_ptr<URLRequest> r(context.CreateRequest(
+    std::unique_ptr<URLRequest> r(context.CreateRequest(
         http_test_server()->GetURL("/auth-basic"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -4416,7 +4425,7 @@
 
 namespace {
 
-scoped_ptr<test_server::HttpResponse> HandleServerAuthConnect(
+std::unique_ptr<test_server::HttpResponse> HandleServerAuthConnect(
     const test_server::HttpRequest& request) {
   if (request.headers.find("Host") == request.headers.end() ||
       request.headers.at("Host") != "www.server-auth.com" ||
@@ -4424,7 +4433,7 @@
     return nullptr;
   }
 
-  scoped_ptr<test_server::BasicHttpResponse> http_response(
+  std::unique_ptr<test_server::BasicHttpResponse> http_response(
       new test_server::BasicHttpResponse);
   http_response->set_code(HTTP_UNAUTHORIZED);
   http_response->AddCustomHeader("WWW-Authenticate",
@@ -4448,7 +4457,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(context.CreateRequest(
+    std::unique_ptr<URLRequest> r(context.CreateRequest(
         GURL("https://www.server-auth.com/"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -4468,7 +4477,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/defaultresponse"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -4535,7 +4544,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/defaultresponse"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -4559,7 +4568,7 @@
   TestDelegate d;
   {
     GURL test_url(http_test_server()->GetURL("/defaultresponse"));
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(test_url, DEFAULT_PRIORITY, &d));
 
     HttpRequestHeaders headers;
@@ -4588,7 +4597,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/defaultresponse"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -4644,7 +4653,7 @@
       context.set_network_delegate(&network_delegate);
       context.Init();
 
-      scoped_ptr<URLRequest> r(context.CreateRequest(
+      std::unique_ptr<URLRequest> r(context.CreateRequest(
           test_server.GetURL(test_file), DEFAULT_PRIORITY, &d));
       r->Start();
       EXPECT_TRUE(r->is_pending());
@@ -4676,7 +4685,7 @@
   GURL original_url =
       http_test_server()->GetURL("/server-redirect?" + destination_url.spec());
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
   req->Start();
   base::RunLoop().Run();
@@ -4717,7 +4726,7 @@
   GURL original_url = http_test_server()->GetURL("/server-redirect?" +
                                                  middle_redirect_url.spec());
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
   req->Start();
   base::RunLoop().Run();
@@ -5045,7 +5054,7 @@
   context.Init();
 
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         context.CreateRequest(http_test_server()->GetURL("/defaultresponse"),
                               DEFAULT_PRIORITY, &request_delegate));
     LoadStateWithParam load_state = r->GetLoadState();
@@ -5092,7 +5101,7 @@
   context.Init();
 
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         context.CreateRequest(http_test_server()->GetURL("/simple.html"),
                               DEFAULT_PRIORITY, &request_delegate));
     LoadStateWithParam load_state = r->GetLoadState();
@@ -5149,7 +5158,7 @@
   context.Init();
 
   {
-    scoped_ptr<URLRequest> r(context.CreateRequest(
+    std::unique_ptr<URLRequest> r(context.CreateRequest(
         http_test_server()->GetURL("/server-redirect?simple.html"),
         DEFAULT_PRIORITY, &request_delegate));
     LoadStateWithParam load_state = r->GetLoadState();
@@ -5231,7 +5240,7 @@
   context.Init();
 
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         context.CreateRequest(http_test_server()->GetURL("/auth-basic"),
                               DEFAULT_PRIORITY, &request_delegate));
     LoadStateWithParam load_state = r->GetLoadState();
@@ -5301,7 +5310,7 @@
     // body are ignored.  Since they are ignored, this test is robust against
     // the possibility of multiple reads being combined in the unlikely event
     // that it occurs.
-    scoped_ptr<URLRequest> r(context.CreateRequest(
+    std::unique_ptr<URLRequest> r(context.CreateRequest(
         test_server.GetURL("/chunked?waitBetweenChunks=20"), DEFAULT_PRIORITY,
         &request_delegate));
     LoadStateWithParam load_state = r->GetLoadState();
@@ -5355,7 +5364,7 @@
   context.Init();
 
   {
-    scoped_ptr<URLRequest> r(context.CreateRequest(
+    std::unique_ptr<URLRequest> r(context.CreateRequest(
         http_test_server()->GetURL("/server-redirect?simple.html"),
         DEFAULT_PRIORITY, &request_delegate));
     LoadStateWithParam load_state = r->GetLoadState();
@@ -5419,7 +5428,7 @@
     context.Init();
 
     {
-      scoped_ptr<URLRequest> r(context.CreateRequest(
+      std::unique_ptr<URLRequest> r(context.CreateRequest(
           http_test_server()->GetURL("/server-redirect?simple.html"),
           DEFAULT_PRIORITY, &request_delegate));
       LoadStateWithParam load_state = r->GetLoadState();
@@ -5487,7 +5496,7 @@
   GURL original_url =
       http_test_server()->GetURL("/server-redirect?" + destination_url.spec());
   RedirectWithAdditionalHeadersDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
   req->Start();
   base::RunLoop().Run();
@@ -5524,7 +5533,7 @@
   GURL original_url =
       http_test_server()->GetURL("/server-redirect?" + destination_url.spec());
   RedirectWithHeaderRemovalDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
   req->SetExtraRequestHeaderByName(kExtraHeaderToRemove, "dummy", false);
   req->Start();
@@ -5541,7 +5550,7 @@
 TEST_F(URLRequestTestHTTP, CancelTest) {
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         GURL("http://www.google.com/"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -5564,7 +5573,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/"), DEFAULT_PRIORITY, &d));
 
     d.set_cancel_in_response_started(true);
@@ -5586,7 +5595,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/"), DEFAULT_PRIORITY, &d));
 
     d.set_cancel_in_received_data(true);
@@ -5611,7 +5620,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -5638,7 +5647,7 @@
   // populate cache
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/cachetime"), DEFAULT_PRIORITY, &d));
     r->Start();
     base::RunLoop().Run();
@@ -5648,7 +5657,7 @@
   // cancel read from cache (see bug 990242)
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/cachetime"), DEFAULT_PRIORITY, &d));
     r->Start();
     r->Cancel();
@@ -5676,7 +5685,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/echo"), DEFAULT_PRIORITY, &d));
     r->set_method("POST");
 
@@ -5699,7 +5708,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/echo"), DEFAULT_PRIORITY, &d));
     r->set_method("POST");
 
@@ -5707,16 +5716,16 @@
     PathService::Get(base::DIR_EXE, &dir);
     base::SetCurrentDirectory(dir);
 
-    std::vector<scoped_ptr<UploadElementReader>> element_readers;
+    std::vector<std::unique_ptr<UploadElementReader>> element_readers;
 
     base::FilePath path;
     PathService::Get(base::DIR_SOURCE_ROOT, &path);
     path = path.Append(kTestFilePath);
     path = path.Append(FILE_PATH_LITERAL("with-headers.html"));
-    element_readers.push_back(make_scoped_ptr(new UploadFileElementReader(
+    element_readers.push_back(base::WrapUnique(new UploadFileElementReader(
         base::ThreadTaskRunnerHandle::Get().get(), path, 0,
         std::numeric_limits<uint64_t>::max(), base::Time())));
-    r->set_upload(make_scoped_ptr<UploadDataStream>(
+    r->set_upload(base::WrapUnique<UploadDataStream>(
         new ElementsUploadDataStream(std::move(element_readers), 0)));
 
     r->Start();
@@ -5728,7 +5737,7 @@
     ASSERT_EQ(true, base::GetFileSize(path, &size64));
     ASSERT_LE(size64, std::numeric_limits<int>::max());
     int size = static_cast<int>(size64);
-    scoped_ptr<char[]> buf(new char[size]);
+    std::unique_ptr<char[]> buf(new char[size]);
 
     ASSERT_EQ(size, base::ReadFile(path, buf.get(), size));
 
@@ -5748,18 +5757,18 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/echo"), DEFAULT_PRIORITY, &d));
     r->set_method("POST");
 
-    std::vector<scoped_ptr<UploadElementReader>> element_readers;
+    std::vector<std::unique_ptr<UploadElementReader>> element_readers;
 
-    element_readers.push_back(make_scoped_ptr(new UploadFileElementReader(
+    element_readers.push_back(base::WrapUnique(new UploadFileElementReader(
         base::ThreadTaskRunnerHandle::Get().get(),
         base::FilePath(FILE_PATH_LITERAL(
             "c:\\path\\to\\non\\existant\\file.randomness.12345")),
         0, std::numeric_limits<uint64_t>::max(), base::Time())));
-    r->set_upload(make_scoped_ptr<UploadDataStream>(
+    r->set_upload(base::WrapUnique<UploadDataStream>(
         new ElementsUploadDataStream(std::move(element_readers), 0)));
 
     r->Start();
@@ -5812,11 +5821,11 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/echo"), DEFAULT_PRIORITY, &d));
-    scoped_ptr<ChunkedUploadDataStream> upload_data_stream(
+    std::unique_ptr<ChunkedUploadDataStream> upload_data_stream(
         new ChunkedUploadDataStream(0));
-    scoped_ptr<ChunkedUploadDataStream::Writer> writer =
+    std::unique_ptr<ChunkedUploadDataStream::Writer> writer =
         upload_data_stream->CreateWriter();
     r->set_upload(std::move(upload_data_stream));
     r->set_method("POST");
@@ -5835,13 +5844,13 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/echo"), DEFAULT_PRIORITY, &d));
-    scoped_ptr<ChunkedUploadDataStream> upload_data_stream(
+    std::unique_ptr<ChunkedUploadDataStream> upload_data_stream(
         new ChunkedUploadDataStream(0));
-    scoped_ptr<ChunkedUploadDataStream::Writer> writer =
+    std::unique_ptr<ChunkedUploadDataStream::Writer> writer =
         upload_data_stream->CreateWriter();
-    r->set_upload(make_scoped_ptr(upload_data_stream.release()));
+    r->set_upload(base::WrapUnique(upload_data_stream.release()));
     r->set_method("POST");
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -5857,11 +5866,11 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/echo"), DEFAULT_PRIORITY, &d));
-    scoped_ptr<ChunkedUploadDataStream> upload_data_stream(
+    std::unique_ptr<ChunkedUploadDataStream> upload_data_stream(
         new ChunkedUploadDataStream(0));
-    scoped_ptr<ChunkedUploadDataStream::Writer> writer =
+    std::unique_ptr<ChunkedUploadDataStream::Writer> writer =
         upload_data_stream->CreateWriter();
     r->set_upload(std::move(upload_data_stream));
     r->set_method("POST");
@@ -5880,7 +5889,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/with-headers.html"), DEFAULT_PRIORITY, &d));
   req->Start();
   base::RunLoop().Run();
@@ -5918,7 +5927,7 @@
 
   std::string test_server_hostname = https_test_server.GetURL("/").host();
   TestDelegate d;
-  scoped_ptr<URLRequest> request(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> request(default_context_.CreateRequest(
       https_test_server.GetURL("/hsts-headers.html"), DEFAULT_PRIORITY, &d));
   request->Start();
   base::RunLoop().Run();
@@ -5953,7 +5962,7 @@
   std::string test_server_hostname = https_test_server.GetURL("/").host();
 
   TestDelegate d;
-  scoped_ptr<URLRequest> request(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> request(default_context_.CreateRequest(
       https_test_server.GetURL("/hsts-headers.html"), DEFAULT_PRIORITY, &d));
   request->Start();
   base::RunLoop().Run();
@@ -6000,7 +6009,7 @@
   std::string test_server_hostname = https_test_server.GetURL("/").host();
 
   TestDelegate d;
-  scoped_ptr<URLRequest> request(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> request(default_context_.CreateRequest(
       https_test_server.GetURL("/hpkp-headers.html"), DEFAULT_PRIORITY, &d));
   request->Start();
   base::RunLoop().Run();
@@ -6079,7 +6088,7 @@
 
   // Now send a request to trigger the violation.
   TestDelegate d;
-  scoped_ptr<URLRequest> violating_request(context.CreateRequest(
+  std::unique_ptr<URLRequest> violating_request(context.CreateRequest(
       https_test_server.GetURL("/simple.html"), DEFAULT_PRIORITY, &d));
   violating_request->Start();
   base::RunLoop().Run();
@@ -6087,7 +6096,7 @@
   // Check that a report was sent.
   EXPECT_EQ(report_uri, mock_report_sender.latest_report_uri());
   ASSERT_FALSE(mock_report_sender.latest_report().empty());
-  scoped_ptr<base::Value> value(
+  std::unique_ptr<base::Value> value(
       base::JSONReader::Read(mock_report_sender.latest_report()));
   ASSERT_TRUE(value);
   ASSERT_TRUE(value->IsType(base::Value::TYPE_DICTIONARY));
@@ -6141,7 +6150,7 @@
 
   // Now send a request to trigger the violation.
   TestDelegate d;
-  scoped_ptr<URLRequest> violating_request(context.CreateRequest(
+  std::unique_ptr<URLRequest> violating_request(context.CreateRequest(
       https_test_server.GetURL("/hpkp-headers-report-only.html"),
       DEFAULT_PRIORITY, &d));
   violating_request->Start();
@@ -6150,7 +6159,7 @@
   // Check that a report was sent.
   EXPECT_EQ(report_uri, mock_report_sender.latest_report_uri());
   ASSERT_FALSE(mock_report_sender.latest_report().empty());
-  scoped_ptr<base::Value> value(
+  std::unique_ptr<base::Value> value(
       base::JSONReader::Read(mock_report_sender.latest_report()));
   ASSERT_TRUE(value);
   ASSERT_TRUE(value->IsType(base::Value::TYPE_DICTIONARY));
@@ -6189,7 +6198,7 @@
 
   // Now send a request that does not trigger the violation.
   TestDelegate d;
-  scoped_ptr<URLRequest> request(context.CreateRequest(
+  std::unique_ptr<URLRequest> request(context.CreateRequest(
       https_test_server.GetURL("/hpkp-headers-report-only.html"),
       DEFAULT_PRIORITY, &d));
   request->Start();
@@ -6211,7 +6220,7 @@
   std::string test_server_hostname = https_test_server.GetURL("/").host();
 
   TestDelegate d;
-  scoped_ptr<URLRequest> request(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> request(default_context_.CreateRequest(
       https_test_server.GetURL("/hpkp-headers.html"), DEFAULT_PRIORITY, &d));
   request->Start();
   base::RunLoop().Run();
@@ -6234,7 +6243,7 @@
   std::string test_server_hostname = https_test_server.GetURL("/").host();
 
   TestDelegate d;
-  scoped_ptr<URLRequest> request(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> request(default_context_.CreateRequest(
       https_test_server.GetURL("/hsts-multiple-headers.html"), DEFAULT_PRIORITY,
       &d));
   request->Start();
@@ -6263,7 +6272,7 @@
   std::string test_server_hostname = https_test_server.GetURL("/").host();
 
   TestDelegate d;
-  scoped_ptr<URLRequest> request(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> request(default_context_.CreateRequest(
       https_test_server.GetURL("/hsts-and-hpkp-headers.html"), DEFAULT_PRIORITY,
       &d));
   request->Start();
@@ -6307,7 +6316,7 @@
   std::string test_server_hostname = https_test_server.GetURL("/").host();
 
   TestDelegate d;
-  scoped_ptr<URLRequest> request(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> request(default_context_.CreateRequest(
       https_test_server.GetURL("/hsts-and-hpkp-headers2.html"),
       DEFAULT_PRIORITY, &d));
   request->Start();
@@ -6444,7 +6453,7 @@
   GURL::Replacements replace_host;
   replace_host.SetHostStr(kExpectCTStaticHostname);
   url = url.ReplaceComponents(replace_host);
-  scoped_ptr<URLRequest> violating_request(
+  std::unique_ptr<URLRequest> violating_request(
       context.CreateRequest(url, DEFAULT_PRIORITY, &d));
   violating_request->Start();
   base::RunLoop().Run();
@@ -6458,7 +6467,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/content-type-normalization.html"),
       DEFAULT_PRIORITY, &d));
   req->Start();
@@ -6500,7 +6509,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/redirect-to-file.html"), DEFAULT_PRIORITY,
       &d));
   req->Start();
@@ -6515,7 +6524,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/redirect-to-data.html"), DEFAULT_PRIORITY,
       &d));
   req->Start();
@@ -6529,7 +6538,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/redirect-to-invalid-url.html"),
       DEFAULT_PRIORITY, &d));
   req->Start();
@@ -6547,7 +6556,7 @@
 
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(
+    std::unique_ptr<URLRequest> req(
         default_context_.CreateRequest(redirect_url, DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -6559,7 +6568,7 @@
   {
     TestDelegate d;
     d.set_quit_on_redirect(true);
-    scoped_ptr<URLRequest> req(
+    std::unique_ptr<URLRequest> req(
         default_context_.CreateRequest(redirect_url, DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -6591,7 +6600,7 @@
         redirect_to_url);
 
     TestDelegate d;
-    scoped_ptr<URLRequest> req(
+    std::unique_ptr<URLRequest> req(
         default_context_.CreateRequest(initial_url, DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -6602,7 +6611,7 @@
 
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(
+    std::unique_ptr<URLRequest> req(
         default_context_.CreateRequest(initial_url, DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -6625,7 +6634,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/whatever"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -6653,7 +6662,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/whatever"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -6678,7 +6687,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -6708,7 +6717,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -6737,7 +6746,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -6761,10 +6770,10 @@
   GURL redirect_url(http_test_server()->GetURL("/echo"));
 
   TestDelegate d;
-  scoped_ptr<URLRequest> r(
+  std::unique_ptr<URLRequest> r(
       default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
 
-  scoped_ptr<URLRequestRedirectJob> job(new URLRequestRedirectJob(
+  std::unique_ptr<URLRequestRedirectJob> job(new URLRequestRedirectJob(
       r.get(), &default_network_delegate_, redirect_url,
       URLRequestRedirectJob::REDIRECT_302_FOUND, "Very Good Reason"));
   AddTestInterceptor()->set_main_intercept_job(std::move(job));
@@ -6783,7 +6792,7 @@
 
   const std::string referrer("foobar://totally.legit.referrer");
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/echoheader?Referer"), DEFAULT_PRIORITY, &d));
   req->SetReferrer(referrer);
   req->Start();
@@ -6796,7 +6805,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/echoheader?Referer"), DEFAULT_PRIORITY, &d));
   req->SetReferrer("http://user:pass@foo.com/");
   req->Start();
@@ -6809,7 +6818,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/echoheader?Referer"), DEFAULT_PRIORITY, &d));
   req->SetReferrer("http://foo.com/test#fragment");
   req->Start();
@@ -6822,7 +6831,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/echoheader?Referer"), DEFAULT_PRIORITY, &d));
   req->SetReferrer("http://foo.com/test#fragment");
   req->SetReferrer("");
@@ -6841,7 +6850,7 @@
   {
     d.set_quit_on_network_start(true);
     GURL test_url(http_test_server()->GetURL("/echo"));
-    scoped_ptr<URLRequest> req(
+    std::unique_ptr<URLRequest> req(
         default_context_.CreateRequest(test_url, DEFAULT_PRIORITY, &d));
 
     req->Start();
@@ -6868,7 +6877,7 @@
   {
     d.set_quit_on_redirect(true);
     d.set_quit_on_network_start(true);
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         http_test_server()->GetURL("/server-redirect?echo"), DEFAULT_PRIORITY,
         &d));
 
@@ -6904,7 +6913,7 @@
   {
     d.set_quit_on_network_start(true);
     GURL test_url(http_test_server()->GetURL("/echo"));
-    scoped_ptr<URLRequest> req(
+    std::unique_ptr<URLRequest> req(
         default_context_.CreateRequest(test_url, DEFAULT_PRIORITY, &d));
 
     req->Start();
@@ -6928,7 +6937,7 @@
   TestDelegate d;
   {
     d.set_cancel_in_received_redirect(true);
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         http_test_server()->GetURL("/redirect-test.html"), DEFAULT_PRIORITY,
         &d));
     req->Start();
@@ -6948,7 +6957,7 @@
   {
     d.set_quit_on_redirect(true);
     GURL test_url(http_test_server()->GetURL("/redirect-test.html"));
-    scoped_ptr<URLRequest> req(
+    std::unique_ptr<URLRequest> req(
         default_context_.CreateRequest(test_url, DEFAULT_PRIORITY, &d));
 
     req->Start();
@@ -6981,7 +6990,7 @@
   {
     d.set_quit_on_redirect(true);
     GURL test_url(http_test_server()->GetURL("/redirect-test.html"));
-    scoped_ptr<URLRequest> req(
+    std::unique_ptr<URLRequest> req(
         default_context_.CreateRequest(test_url, DEFAULT_PRIORITY, &d));
 
     EXPECT_FALSE(d.have_full_request_headers());
@@ -7021,7 +7030,7 @@
   TestDelegate d;
   {
     d.set_quit_on_redirect(true);
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         http_test_server()->GetURL("/redirect-test.html"), DEFAULT_PRIORITY,
         &d));
     req->Start();
@@ -7045,7 +7054,7 @@
   // Populate the cache.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         http_test_server()->GetURL("/echoheadercache?foo"), DEFAULT_PRIORITY,
         &d));
     HttpRequestHeaders headers;
@@ -7062,7 +7071,7 @@
   // Expect a cache hit.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         http_test_server()->GetURL("/echoheadercache?foo"), DEFAULT_PRIORITY,
         &d));
     HttpRequestHeaders headers;
@@ -7081,7 +7090,7 @@
   // Expect a cache miss.
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
         http_test_server()->GetURL("/echoheadercache?foo"), DEFAULT_PRIORITY,
         &d));
     HttpRequestHeaders headers;
@@ -7106,7 +7115,7 @@
     TestDelegate d;
     d.set_credentials(AuthCredentials(kUser, kSecret));
 
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/auth-basic"), DEFAULT_PRIORITY, &d));
     r->Start();
 
@@ -7122,7 +7131,7 @@
     TestDelegate d;
     d.set_credentials(AuthCredentials(kUser, kSecret));
 
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/auth-basic"), DEFAULT_PRIORITY, &d));
     r->SetLoadFlags(LOAD_VALIDATE_CACHE);
     r->Start();
@@ -7155,7 +7164,7 @@
     TestDelegate d;
     d.set_credentials(AuthCredentials(kUser, kSecret));
 
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         context.CreateRequest(url_requiring_auth, DEFAULT_PRIORITY, &d));
     r->Start();
 
@@ -7183,7 +7192,7 @@
     replacements.SetPasswordStr("secret");
     GURL url_with_identity = url_requiring_auth.ReplaceComponents(replacements);
 
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         context.CreateRequest(url_with_identity, DEFAULT_PRIORITY, &d));
     r->Start();
 
@@ -7206,7 +7215,7 @@
     TestDelegate d;
     d.set_credentials(AuthCredentials(kUser, kSecret));
 
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/auth-basic"), DEFAULT_PRIORITY, &d));
     r->Start();
 
@@ -7238,7 +7247,7 @@
     TestDelegate d;
     d.set_credentials(AuthCredentials(kUser, kSecret));
 
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         http_test_server()->GetURL("/auth-basic"), DEFAULT_PRIORITY, &d));
     r->SetLoadFlags(LOAD_VALIDATE_CACHE);
     r->Start();
@@ -7268,7 +7277,7 @@
   const char kData[] = "hello world";
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/redirect-to-echoall"), DEFAULT_PRIORITY,
       &d));
   req->set_method("POST");
@@ -7408,7 +7417,7 @@
   TestDelegate d;
   const GURL url = http_test_server()->GetURL("/308-without-location-header");
 
-  scoped_ptr<URLRequest> request(
+  std::unique_ptr<URLRequest> request(
       default_context_.CreateRequest(url, DEFAULT_PRIORITY, &d));
 
   request->Start();
@@ -7429,7 +7438,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -7451,7 +7460,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(url, DEFAULT_PRIORITY, &d));
     r->set_first_party_for_cookies(first_party_url);
 
@@ -7474,7 +7483,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(url, DEFAULT_PRIORITY, &d));
     r->set_first_party_for_cookies(original_first_party_url);
     r->set_first_party_url_policy(
@@ -7496,7 +7505,7 @@
   const char kData[] = "hello world";
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/defaultresponse"), DEFAULT_PRIORITY, &d));
   req->set_method("POST");
   req->set_upload(CreateSimpleUploadData(kData));
@@ -7505,7 +7514,7 @@
                     base::SizeTToString(arraysize(kData) - 1));
   req->SetExtraRequestHeaders(headers);
 
-  scoped_ptr<URLRequestRedirectJob> job(new URLRequestRedirectJob(
+  std::unique_ptr<URLRequestRedirectJob> job(new URLRequestRedirectJob(
       req.get(), &default_network_delegate_,
       http_test_server()->GetURL("/echo"),
       URLRequestRedirectJob::REDIRECT_302_FOUND, "Very Good Reason"));
@@ -7522,7 +7531,7 @@
   const char kData[] = "hello world";
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/defaultresponse"), DEFAULT_PRIORITY, &d));
   req->set_method("POST");
   req->set_upload(CreateSimpleUploadData(kData));
@@ -7531,7 +7540,7 @@
                     base::SizeTToString(arraysize(kData) - 1));
   req->SetExtraRequestHeaders(headers);
 
-  scoped_ptr<URLRequestRedirectJob> job(new URLRequestRedirectJob(
+  std::unique_ptr<URLRequestRedirectJob> job(new URLRequestRedirectJob(
       req.get(), &default_network_delegate_,
       http_test_server()->GetURL("/echo"),
       URLRequestRedirectJob::REDIRECT_307_TEMPORARY_REDIRECT,
@@ -7556,7 +7565,7 @@
   context.Init();
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(context.CreateRequest(
+  std::unique_ptr<URLRequest> req(context.CreateRequest(
       http_test_server()->GetURL("/echoheader?Accept-Language"),
       DEFAULT_PRIORITY, &d));
   req->Start();
@@ -7579,7 +7588,7 @@
   context.set_http_user_agent_settings(&settings);
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(context.CreateRequest(
+  std::unique_ptr<URLRequest> req(context.CreateRequest(
       http_test_server()->GetURL("/echoheader?Accept-Language"),
       DEFAULT_PRIORITY, &d));
   req->Start();
@@ -7593,7 +7602,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/echoheader?Accept-Language"),
       DEFAULT_PRIORITY, &d));
   HttpRequestHeaders headers;
@@ -7609,7 +7618,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/echoheader?Accept-Encoding"),
       DEFAULT_PRIORITY, &d));
   HttpRequestHeaders headers;
@@ -7625,7 +7634,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/echoheader?Accept-Encoding"),
       DEFAULT_PRIORITY, &d));
   HttpRequestHeaders headers;
@@ -7642,7 +7651,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/echoheader?Accept-Charset"),
       DEFAULT_PRIORITY, &d));
   HttpRequestHeaders headers;
@@ -7658,7 +7667,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/echoheader?User-Agent"), DEFAULT_PRIORITY,
       &d));
   req->Start();
@@ -7679,7 +7688,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/echoheader?User-Agent"), DEFAULT_PRIORITY,
       &d));
   HttpRequestHeaders headers;
@@ -7713,7 +7722,7 @@
 
   for (size_t i = 0; i < arraysize(tests); i++) {
     TestDelegate d;
-    scoped_ptr<URLRequest> req(context.CreateRequest(
+    std::unique_ptr<URLRequest> req(context.CreateRequest(
         http_test_server()->GetURL(tests[i].request), DEFAULT_PRIORITY, &d));
     req->Start();
     base::RunLoop().Run();
@@ -7728,11 +7737,11 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/defaultresponse"), DEFAULT_PRIORITY, &d));
   EXPECT_EQ(DEFAULT_PRIORITY, req->priority());
 
-  scoped_ptr<URLRequestRedirectJob> redirect_job(new URLRequestRedirectJob(
+  std::unique_ptr<URLRequestRedirectJob> redirect_job(new URLRequestRedirectJob(
       req.get(), &default_network_delegate_,
       http_test_server()->GetURL("/echo"),
       URLRequestRedirectJob::REDIRECT_302_FOUND, "Very Good Reason"));
@@ -7743,7 +7752,7 @@
   EXPECT_TRUE(req->is_pending());
 
   RequestPriority job_priority;
-  scoped_ptr<URLRequestJob> job(new PriorityMonitoringURLRequestJob(
+  std::unique_ptr<URLRequestJob> job(new PriorityMonitoringURLRequestJob(
       req.get(), &default_network_delegate_, &job_priority));
   AddTestInterceptor()->set_main_intercept_job(std::move(job));
 
@@ -7757,7 +7766,7 @@
 // does not return an HttpTransaction.
 TEST_F(URLRequestTestHTTP, NetworkSuspendTest) {
   // Create a new HttpNetworkLayer that thinks it's suspended.
-  scoped_ptr<HttpNetworkLayer> network_layer(new HttpNetworkLayer(
+  std::unique_ptr<HttpNetworkLayer> network_layer(new HttpNetworkLayer(
       default_context_.http_transaction_factory()->GetSession()));
   network_layer->OnSuspend();
 
@@ -7769,7 +7778,7 @@
   context.Init();
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       context.CreateRequest(GURL("http://127.0.0.1/"), DEFAULT_PRIORITY, &d));
   req->Start();
   base::RunLoop().Run();
@@ -7791,7 +7800,7 @@
 
   // HttpTransactionFactory methods:
   int CreateTransaction(RequestPriority priority,
-                        scoped_ptr<HttpTransaction>* trans) override {
+                        std::unique_ptr<HttpTransaction>* trans) override {
     return ERR_FAILED;
   }
 
@@ -7823,7 +7832,7 @@
   context.Init();
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       context.CreateRequest(GURL("http://127.0.0.1/"), DEFAULT_PRIORITY, &d));
   // Don't send cookies (Collecting cookies is asynchronous, and need request to
   // try to create an HttpNetworkTransaction synchronously on start).
@@ -7848,7 +7857,7 @@
 
   TestDelegate d;
   GURL test_url(http_test_server()->GetURL("/"));
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       default_context_.CreateRequest(test_url, DEFAULT_PRIORITY, &d));
 
   req->Start();
@@ -7862,7 +7871,7 @@
 
   // Populate the cache.
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       http_test_server()->GetURL("/cachetime"), DEFAULT_PRIORITY, &d));
   req->Start();
   base::RunLoop().Run();
@@ -7886,7 +7895,7 @@
 
   TestDelegate d;
   GURL test_url(http_test_server()->GetURL("/"));
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       default_context_.CreateRequest(test_url, DEFAULT_PRIORITY, &d));
   req->SetLoadFlags(LOAD_ONLY_FROM_CACHE);
 
@@ -7907,7 +7916,7 @@
   void SetUpFactory() override {
     interceptor_ = new MockURLRequestInterceptor();
     job_factory_.reset(new URLRequestInterceptingJobFactory(
-        std::move(job_factory_), make_scoped_ptr(interceptor_)));
+        std::move(job_factory_), base::WrapUnique(interceptor_)));
   }
 
   MockURLRequestInterceptor* interceptor() const {
@@ -7927,7 +7936,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context().CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context().CreateRequest(
       http_test_server()->GetURL("/redirect-test.html"), DEFAULT_PRIORITY, &d));
   req->Start();
   base::RunLoop().Run();
@@ -7958,7 +7967,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context().CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context().CreateRequest(
       http_test_server()->GetURL("/two-content-lengths.html"), DEFAULT_PRIORITY,
       &d));
   req->set_method("GET");
@@ -7991,7 +8000,7 @@
   ASSERT_TRUE(http_test_server()->Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context().CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context().CreateRequest(
       http_test_server()->GetURL("/simple.html"), DEFAULT_PRIORITY, &d));
   req->set_method("GET");
   req->Start();
@@ -8061,7 +8070,7 @@
         origin_server_->GetURL("/server-redirect?" + destination_url.spec());
 
     TestDelegate d;
-    scoped_ptr<URLRequest> req(
+    std::unique_ptr<URLRequest> req(
         default_context_.CreateRequest(origin_url, DEFAULT_PRIORITY, &d));
     req->set_referrer_policy(policy);
     req->SetReferrer(referrer.spec());
@@ -8084,8 +8093,8 @@
   EmbeddedTestServer* origin_server() const { return origin_server_.get(); }
 
  private:
-  scoped_ptr<EmbeddedTestServer> origin_server_;
-  scoped_ptr<EmbeddedTestServer> destination_server_;
+  std::unique_ptr<EmbeddedTestServer> origin_server_;
+  std::unique_ptr<EmbeddedTestServer> destination_server_;
 };
 
 TEST_F(URLRequestTestReferrerPolicy, HTTPToSameOriginHTTP) {
@@ -8249,7 +8258,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         test_server.GetURL("/defaultresponse"), DEFAULT_PRIORITY, &d));
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -8279,7 +8288,7 @@
     TestDelegate d;
     {
       d.set_allow_certificate_errors(err_allowed);
-      scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+      std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
           test_server.GetURL("/defaultresponse"), DEFAULT_PRIORITY, &d));
 
       r->Start();
@@ -8314,7 +8323,7 @@
     TestDelegate d;
     {
       d.set_allow_certificate_errors(err_allowed);
-      scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+      std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
           test_server.GetURL("/defaultresponse"), DEFAULT_PRIORITY, &d));
 
       r->Start();
@@ -8362,7 +8371,7 @@
   context.Init();
 
   TestDelegate d;
-  scoped_ptr<URLRequest> r(context.CreateRequest(
+  std::unique_ptr<URLRequest> r(context.CreateRequest(
       GURL(base::StringPrintf("https://www.google.com:%d",
                               test_server.host_port_pair().port())),
       DEFAULT_PRIORITY, &d));
@@ -8415,7 +8424,7 @@
                                                            &dynamic_pkp_state));
 
   TestDelegate d;
-  scoped_ptr<URLRequest> r(context.CreateRequest(
+  std::unique_ptr<URLRequest> r(context.CreateRequest(
       GURL(base::StringPrintf("https://www.google.com:%d",
                               test_server.host_port_pair().port())),
       DEFAULT_PRIORITY, &d));
@@ -8489,7 +8498,7 @@
   // cause a certificate error.  Ignore the error.
   d.set_allow_certificate_errors(true);
 
-  scoped_ptr<URLRequest> req(context.CreateRequest(
+  std::unique_ptr<URLRequest> req(context.CreateRequest(
       GURL(base::StringPrintf("http://www.somewhere.com:%d/echo",
                               test_server.host_port_pair().port())),
       DEFAULT_PRIORITY, &d));
@@ -8551,7 +8560,7 @@
   // Quit on redirect to allow response header inspection upon redirect.
   d.set_quit_on_redirect(true);
 
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       context.CreateRequest(hsts_http_url, DEFAULT_PRIORITY, &d));
   // Set Origin header to simulate a cross-origin request.
   HttpRequestHeaders request_headers;
@@ -8588,7 +8597,7 @@
   context.Init();
   GURL ws_url("ws://example.net/echo");
   TestDelegate delegate;
-  scoped_ptr<URLRequest> request(
+  std::unique_ptr<URLRequest> request(
       context.CreateRequest(ws_url, DEFAULT_PRIORITY, &delegate));
   EXPECT_TRUE(request->GetHSTSRedirect(&ws_url));
   EXPECT_TRUE(ws_url.SchemeIs("wss"));
@@ -8631,7 +8640,7 @@
 
   SSLClientAuthTestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         test_server.GetURL("/defaultresponse"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -8671,7 +8680,7 @@
 
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -8687,7 +8696,7 @@
 
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -8762,7 +8771,7 @@
 
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -8785,14 +8794,14 @@
   params.http_server_properties = default_context_.http_server_properties();
 
   HttpNetworkSession network_session(params);
-  scoped_ptr<HttpCache> cache(new HttpCache(
+  std::unique_ptr<HttpCache> cache(new HttpCache(
       &network_session, HttpCache::DefaultBackend::InMemory(0), false));
 
   default_context_.set_http_transaction_factory(cache.get());
 
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -8840,7 +8849,7 @@
   ASSERT_TRUE(test_server.Start());
 
   TestDelegate d;
-  scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
       test_server.GetURL("/client-cipher-list"), DEFAULT_PRIORITY, &d));
   r->Start();
   EXPECT_TRUE(r->is_pending());
@@ -8924,7 +8933,7 @@
  private:
   TestDelegate delegate_;
   FallbackTestURLRequestContext context_;
-  scoped_ptr<URLRequest> request_;
+  std::unique_ptr<URLRequest> request_;
 };
 
 // Tests the TLS 1.0 fallback doesn't happen.
@@ -9066,7 +9075,7 @@
     FallbackTestURLRequestContext context(true);
 
     context.Init();
-    scoped_ptr<URLRequest> request(context.CreateRequest(
+    std::unique_ptr<URLRequest> request(context.CreateRequest(
         test_server.GetURL("/"), DEFAULT_PRIORITY, &delegate));
     request->Start();
 
@@ -9086,7 +9095,7 @@
     context.set_fallback_min_version(SSL_PROTOCOL_VERSION_TLS1_1);
 
     context.Init();
-    scoped_ptr<URLRequest> request(context.CreateRequest(
+    std::unique_ptr<URLRequest> request(context.CreateRequest(
         test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &delegate));
     request->Start();
 
@@ -9141,7 +9150,7 @@
   cert_verifier_.set_default_result(ERR_CERT_DATE_INVALID);
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -9160,7 +9169,7 @@
   cert_verifier_.set_default_result(OK);
   {
     TestDelegate d;
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d));
 
     r->Start();
@@ -9242,7 +9251,7 @@
 
     TestDelegate d;
     d.set_allow_certificate_errors(true);
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         context_.CreateRequest(test_server.GetURL("/"), DEFAULT_PRIORITY, &d));
     r->Start();
 
@@ -9270,9 +9279,9 @@
         false /* token binding enabled */));
   }
 
-  scoped_ptr<ScopedTestRoot> test_root_;
+  std::unique_ptr<ScopedTestRoot> test_root_;
   TestURLRequestContext context_;
-  scoped_ptr<ScopedTestEVPolicy> ev_test_policy_;
+  std::unique_ptr<ScopedTestEVPolicy> ev_test_policy_;
 };
 
 static CertStatus ExpectedCertStatusForFailedOnlineRevocationCheck() {
@@ -9752,7 +9761,7 @@
     // Add FTP support to the default URLRequestContext.
     job_factory_impl_->SetProtocolHandler(
         "ftp",
-        make_scoped_ptr(new FtpProtocolHandler(&ftp_transaction_factory_)));
+        base::WrapUnique(new FtpProtocolHandler(&ftp_transaction_factory_)));
   }
 
   std::string GetTestFileContents() {
@@ -9778,7 +9787,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(
+    std::unique_ptr<URLRequest> r(
         default_context_.CreateRequest(url, DEFAULT_PRIORITY, &d));
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -9796,7 +9805,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         ftp_test_server_.GetURL("/"), DEFAULT_PRIORITY, &d));
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -9819,7 +9828,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         ftp_test_server_.GetURL(kFtpTestFile), DEFAULT_PRIORITY, &d));
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -9842,7 +9851,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         ftp_test_server_.GetURLWithUserAndPassword(kFtpTestFile, "chrome",
                                                    "chrome"),
         DEFAULT_PRIORITY, &d));
@@ -9871,7 +9880,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         ftp_test_server_.GetURLWithUserAndPassword(kFtpTestFile, "chrome",
                                                    "wrong_password"),
         DEFAULT_PRIORITY, &d));
@@ -9895,7 +9904,7 @@
   // the initial login with wrong credentials will fail.
   d.set_credentials(AuthCredentials(kChrome, kChrome));
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         ftp_test_server_.GetURLWithUserAndPassword(kFtpTestFile, "chrome",
                                                    "wrong_password"),
         DEFAULT_PRIORITY, &d));
@@ -9916,7 +9925,7 @@
 
   TestDelegate d;
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         ftp_test_server_.GetURLWithUserAndPassword(kFtpTestFile, "wrong_user",
                                                    "chrome"),
         DEFAULT_PRIORITY, &d));
@@ -9940,7 +9949,7 @@
   // the initial login with wrong credentials will fail.
   d.set_credentials(AuthCredentials(kChrome, kChrome));
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         ftp_test_server_.GetURLWithUserAndPassword(kFtpTestFile, "wrong_user",
                                                    "chrome"),
         DEFAULT_PRIORITY, &d));
@@ -9959,10 +9968,10 @@
 TEST_F(URLRequestTestFTP, FTPCacheURLCredentials) {
   ASSERT_TRUE(ftp_test_server_.Start());
 
-  scoped_ptr<TestDelegate> d(new TestDelegate);
+  std::unique_ptr<TestDelegate> d(new TestDelegate);
   {
     // Pass correct login identity in the URL.
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         ftp_test_server_.GetURLWithUserAndPassword(kFtpTestFile, "chrome",
                                                    "chrome"),
         DEFAULT_PRIORITY, d.get()));
@@ -9980,7 +9989,7 @@
   d.reset(new TestDelegate);
   {
     // This request should use cached identity from previous request.
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         ftp_test_server_.GetURL(kFtpTestFile), DEFAULT_PRIORITY, d.get()));
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -9997,12 +10006,12 @@
 TEST_F(URLRequestTestFTP, FTPCacheLoginBoxCredentials) {
   ASSERT_TRUE(ftp_test_server_.Start());
 
-  scoped_ptr<TestDelegate> d(new TestDelegate);
+  std::unique_ptr<TestDelegate> d(new TestDelegate);
   // Set correct login credentials. The delegate will be asked for them when
   // the initial login with wrong credentials will fail.
   d->set_credentials(AuthCredentials(kChrome, kChrome));
   {
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         ftp_test_server_.GetURLWithUserAndPassword(kFtpTestFile, "chrome",
                                                    "wrong_password"),
         DEFAULT_PRIORITY, d.get()));
@@ -10023,7 +10032,7 @@
   {
     // Don't pass wrong credentials in the URL, they would override valid cached
     // ones.
-    scoped_ptr<URLRequest> r(default_context_.CreateRequest(
+    std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
         ftp_test_server_.GetURL(kFtpTestFile), DEFAULT_PRIORITY, d.get()));
     r->Start();
     EXPECT_TRUE(r->is_pending());
@@ -10040,7 +10049,7 @@
 
 TEST_F(URLRequestTest, NetworkAccessedClearBeforeNetworkStart) {
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
   d.set_quit_on_network_start(true);
 
@@ -10059,7 +10068,7 @@
 
 TEST_F(URLRequestTest, NetworkAccessedClearOnDataRequest) {
   TestDelegate d;
-  scoped_ptr<URLRequest> req(
+  std::unique_ptr<URLRequest> req(
       default_context_.CreateRequest(GURL("data:,"), DEFAULT_PRIORITY, &d));
 
   EXPECT_FALSE(req->response_info().network_accessed);
@@ -10081,7 +10090,7 @@
   context.Init();
 
   TestDelegate d;
-  scoped_ptr<URLRequest> req(context.CreateRequest(
+  std::unique_ptr<URLRequest> req(context.CreateRequest(
       GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
 
   EXPECT_FALSE(req->response_info().network_accessed);
@@ -10095,10 +10104,10 @@
 // See http://crbug.com/508900
 TEST_F(URLRequestTest, URLRequestRedirectJobCancelRequest) {
   TestDelegate d;
-  scoped_ptr<URLRequest> req(default_context_.CreateRequest(
+  std::unique_ptr<URLRequest> req(default_context_.CreateRequest(
       GURL("http://not-a-real-domain/"), DEFAULT_PRIORITY, &d));
 
-  scoped_ptr<URLRequestRedirectJob> job(new URLRequestRedirectJob(
+  std::unique_ptr<URLRequestRedirectJob> job(new URLRequestRedirectJob(
       req.get(), &default_network_delegate_,
       GURL("http://this-should-never-be-navigated-to/"),
       URLRequestRedirectJob::REDIRECT_307_TEMPORARY_REDIRECT, "Jumbo shrimp"));
diff --git a/net/url_request/view_cache_helper.h b/net/url_request/view_cache_helper.h
index 4ab0031..89183e3c 100644
--- a/net/url_request/view_cache_helper.h
+++ b/net/url_request/view_cache_helper.h
@@ -101,7 +101,7 @@
   const URLRequestContext* context_;
   disk_cache::Backend* disk_cache_;
   disk_cache::Entry* entry_;
-  scoped_ptr<disk_cache::Backend::Iterator> iter_;
+  std::unique_ptr<disk_cache::Backend::Iterator> iter_;
   scoped_refptr<IOBuffer> buf_;
   int buf_len_;
   int index_;
diff --git a/net/url_request/view_cache_helper_unittest.cc b/net/url_request/view_cache_helper_unittest.cc
index 9671700..e21e05e 100644
--- a/net/url_request/view_cache_helper_unittest.cc
+++ b/net/url_request/view_cache_helper_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "net/url_request/view_cache_helper.h"
 
+#include "base/memory/ptr_util.h"
 #include "base/pickle.h"
 #include "net/base/net_errors.h"
 #include "net/base/test_completion_callback.h"
@@ -31,7 +32,7 @@
 };
 
 TestURLRequestContext::TestURLRequestContext()
-    : cache_(make_scoped_ptr(new MockNetworkLayer()),
+    : cache_(base::WrapUnique(new MockNetworkLayer()),
              HttpCache::DefaultBackend::InMemory(0),
              true) {
   set_http_transaction_factory(&cache_);
diff --git a/net/websockets/websocket_basic_handshake_stream.cc b/net/websockets/websocket_basic_handshake_stream.cc
index aee33673..2ae16b2 100644
--- a/net/websockets/websocket_basic_handshake_stream.cc
+++ b/net/websockets/websocket_basic_handshake_stream.cc
@@ -288,7 +288,7 @@
 }  // namespace
 
 WebSocketBasicHandshakeStream::WebSocketBasicHandshakeStream(
-    scoped_ptr<ClientSocketHandle> connection,
+    std::unique_ptr<ClientSocketHandle> connection,
     WebSocketStream::ConnectDelegate* connect_delegate,
     bool using_proxy,
     std::vector<std::string> requested_sub_protocols,
@@ -355,7 +355,7 @@
       ComputeSecWebSocketAccept(handshake_challenge);
 
   DCHECK(connect_delegate_);
-  scoped_ptr<WebSocketHandshakeRequestInfo> request(
+  std::unique_ptr<WebSocketHandshakeRequestInfo> request(
       new WebSocketHandshakeRequestInfo(url_, base::Time::Now()));
   request->headers.CopyFrom(enriched_headers);
   connect_delegate_->OnStartOpeningHandshake(std::move(request));
@@ -471,16 +471,14 @@
   return nullptr;
 }
 
-scoped_ptr<WebSocketStream> WebSocketBasicHandshakeStream::Upgrade() {
+std::unique_ptr<WebSocketStream> WebSocketBasicHandshakeStream::Upgrade() {
   // The HttpStreamParser object has a pointer to our ClientSocketHandle. Make
   // sure it does not touch it again before it is destroyed.
   state_.DeleteParser();
   WebSocketTransportClientSocketPool::UnlockEndpoint(state_.connection());
-  scoped_ptr<WebSocketStream> basic_stream(
-      new WebSocketBasicStream(state_.ReleaseConnection(),
-                               state_.read_buf(),
-                               sub_protocol_,
-                               extensions_));
+  std::unique_ptr<WebSocketStream> basic_stream(
+      new WebSocketBasicStream(state_.ReleaseConnection(), state_.read_buf(),
+                               sub_protocol_, extensions_));
   DCHECK(extension_params_.get());
   if (extension_params_->deflate_enabled) {
     UMA_HISTOGRAM_ENUMERATION(
@@ -488,9 +486,9 @@
         extension_params_->deflate_parameters.client_context_take_over_mode(),
         WebSocketDeflater::NUM_CONTEXT_TAKEOVER_MODE_TYPES);
 
-    return scoped_ptr<WebSocketStream>(new WebSocketDeflateStream(
+    return std::unique_ptr<WebSocketStream>(new WebSocketDeflateStream(
         std::move(basic_stream), extension_params_->deflate_parameters,
-        scoped_ptr<WebSocketDeflatePredictor>(
+        std::unique_ptr<WebSocketDeflatePredictor>(
             new WebSocketDeflatePredictorImpl)));
   } else {
     return basic_stream;
diff --git a/net/websockets/websocket_basic_handshake_stream.h b/net/websockets/websocket_basic_handshake_stream.h
index d390982..dbb847e 100644
--- a/net/websockets/websocket_basic_handshake_stream.h
+++ b/net/websockets/websocket_basic_handshake_stream.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/http/http_basic_state.h"
 #include "net/websockets/websocket_handshake_stream_base.h"
@@ -32,7 +32,7 @@
  public:
   // |connect_delegate| and |failure_message| must out-live this object.
   WebSocketBasicHandshakeStream(
-      scoped_ptr<ClientSocketHandle> connection,
+      std::unique_ptr<ClientSocketHandle> connection,
       WebSocketStream::ConnectDelegate* connect_delegate,
       bool using_proxy,
       std::vector<std::string> requested_sub_protocols,
@@ -77,7 +77,7 @@
   // have been received. It creates an appropriate subclass of WebSocketStream
   // depending on what extensions were negotiated. This object is unusable after
   // Upgrade() has been called and should be disposed of as soon as possible.
-  scoped_ptr<WebSocketStream> Upgrade() override;
+  std::unique_ptr<WebSocketStream> Upgrade() override;
 
   // Set the value used for the next Sec-WebSocket-Key header
   // deterministically. The key is only used once, and then discarded.
@@ -118,7 +118,7 @@
 
   // The key to be sent in the next Sec-WebSocket-Key header. Usually NULL (the
   // key is generated on the fly).
-  scoped_ptr<std::string> handshake_challenge_for_testing_;
+  std::unique_ptr<std::string> handshake_challenge_for_testing_;
 
   // The required value for the Sec-WebSocket-Accept header.
   std::string handshake_challenge_response_;
@@ -137,7 +137,7 @@
 
   // The extension parameters. The class is defined in the implementation file
   // to avoid including extension-related header files here.
-  scoped_ptr<WebSocketExtensionParams> extension_params_;
+  std::unique_ptr<WebSocketExtensionParams> extension_params_;
 
   std::string* failure_message_;
 
diff --git a/net/websockets/websocket_basic_stream.cc b/net/websockets/websocket_basic_stream.cc
index c54ef71..1c57584 100644
--- a/net/websockets/websocket_basic_stream.cc
+++ b/net/websockets/websocket_basic_stream.cc
@@ -46,7 +46,7 @@
 // |frames| will be serialized with mask field. This function forces the
 // masked bit of the frames on.
 int CalculateSerializedSizeAndTurnOnMaskBit(
-    std::vector<scoped_ptr<WebSocketFrame>>* frames) {
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames) {
   const uint64_t kMaximumTotalSize = std::numeric_limits<int>::max();
 
   uint64_t total_size = 0;
@@ -67,7 +67,7 @@
 }  // namespace
 
 WebSocketBasicStream::WebSocketBasicStream(
-    scoped_ptr<ClientSocketHandle> connection,
+    std::unique_ptr<ClientSocketHandle> connection,
     const scoped_refptr<GrowableIOBuffer>& http_read_buffer,
     const std::string& sub_protocol,
     const std::string& extensions)
@@ -86,7 +86,7 @@
 WebSocketBasicStream::~WebSocketBasicStream() { Close(); }
 
 int WebSocketBasicStream::ReadFrames(
-    std::vector<scoped_ptr<WebSocketFrame>>* frames,
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames,
     const CompletionCallback& callback) {
   DCHECK(frames->empty());
   // If there is data left over after parsing the HTTP headers, attempt to parse
@@ -98,7 +98,7 @@
     scoped_refptr<GrowableIOBuffer> buffered_data;
     buffered_data.swap(http_read_buffer_);
     DCHECK(http_read_buffer_.get() == NULL);
-    std::vector<scoped_ptr<WebSocketFrameChunk>> frame_chunks;
+    std::vector<std::unique_ptr<WebSocketFrameChunk>> frame_chunks;
     if (!parser_.Decode(buffered_data->StartOfBuffer(),
                         buffered_data->offset(),
                         &frame_chunks))
@@ -133,7 +133,7 @@
 }
 
 int WebSocketBasicStream::WriteFrames(
-    std::vector<scoped_ptr<WebSocketFrame>>* frames,
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames,
     const CompletionCallback& callback) {
   // This function always concatenates all frames into a single buffer.
   // TODO(ricea): Investigate whether it would be better in some cases to
@@ -184,14 +184,14 @@
 std::string WebSocketBasicStream::GetExtensions() const { return extensions_; }
 
 /*static*/
-scoped_ptr<WebSocketBasicStream>
+std::unique_ptr<WebSocketBasicStream>
 WebSocketBasicStream::CreateWebSocketBasicStreamForTesting(
-    scoped_ptr<ClientSocketHandle> connection,
+    std::unique_ptr<ClientSocketHandle> connection,
     const scoped_refptr<GrowableIOBuffer>& http_read_buffer,
     const std::string& sub_protocol,
     const std::string& extensions,
     WebSocketMaskingKeyGeneratorFunction key_generator_function) {
-  scoped_ptr<WebSocketBasicStream> stream(new WebSocketBasicStream(
+  std::unique_ptr<WebSocketBasicStream> stream(new WebSocketBasicStream(
       std::move(connection), http_read_buffer, sub_protocol, extensions));
   stream->generate_websocket_masking_key_ = key_generator_function;
   return stream;
@@ -238,14 +238,14 @@
 
 int WebSocketBasicStream::HandleReadResult(
     int result,
-    std::vector<scoped_ptr<WebSocketFrame>>* frames) {
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames) {
   DCHECK_NE(ERR_IO_PENDING, result);
   DCHECK(frames->empty());
   if (result < 0)
     return result;
   if (result == 0)
     return ERR_CONNECTION_CLOSED;
-  std::vector<scoped_ptr<WebSocketFrameChunk>> frame_chunks;
+  std::vector<std::unique_ptr<WebSocketFrameChunk>> frame_chunks;
   if (!parser_.Decode(read_buffer_->data(), result, &frame_chunks))
     return WebSocketErrorToNetError(parser_.websocket_error());
   if (frame_chunks.empty())
@@ -254,10 +254,10 @@
 }
 
 int WebSocketBasicStream::ConvertChunksToFrames(
-    std::vector<scoped_ptr<WebSocketFrameChunk>>* frame_chunks,
-    std::vector<scoped_ptr<WebSocketFrame>>* frames) {
+    std::vector<std::unique_ptr<WebSocketFrameChunk>>* frame_chunks,
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames) {
   for (size_t i = 0; i < frame_chunks->size(); ++i) {
-    scoped_ptr<WebSocketFrame> frame;
+    std::unique_ptr<WebSocketFrame> frame;
     int result = ConvertChunkToFrame(std::move((*frame_chunks)[i]), &frame);
     if (result != OK)
       return result;
@@ -271,8 +271,8 @@
 }
 
 int WebSocketBasicStream::ConvertChunkToFrame(
-    scoped_ptr<WebSocketFrameChunk> chunk,
-    scoped_ptr<WebSocketFrame>* frame) {
+    std::unique_ptr<WebSocketFrameChunk> chunk,
+    std::unique_ptr<WebSocketFrame>* frame) {
   DCHECK(frame->get() == NULL);
   bool is_first_chunk = false;
   if (chunk->header) {
@@ -356,10 +356,10 @@
   return OK;
 }
 
-scoped_ptr<WebSocketFrame> WebSocketBasicStream::CreateFrame(
+std::unique_ptr<WebSocketFrame> WebSocketBasicStream::CreateFrame(
     bool is_final_chunk,
     const scoped_refptr<IOBufferWithSize>& data) {
-  scoped_ptr<WebSocketFrame> result_frame;
+  std::unique_ptr<WebSocketFrame> result_frame;
   const bool is_final_chunk_in_message =
       is_final_chunk && current_frame_header_->final;
   const int data_size = data.get() ? data->size() : 0;
@@ -409,7 +409,7 @@
 }
 
 void WebSocketBasicStream::OnReadComplete(
-    std::vector<scoped_ptr<WebSocketFrame>>* frames,
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames,
     const CompletionCallback& callback,
     int result) {
   result = HandleReadResult(result, frames);
diff --git a/net/websockets/websocket_basic_stream.h b/net/websockets/websocket_basic_stream.h
index d035639b..f326d64 100644
--- a/net/websockets/websocket_basic_stream.h
+++ b/net/websockets/websocket_basic_stream.h
@@ -5,12 +5,12 @@
 #ifndef NET_WEBSOCKETS_WEBSOCKET_BASIC_STREAM_H_
 #define NET_WEBSOCKETS_WEBSOCKET_BASIC_STREAM_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/websockets/websocket_frame_parser.h"
 #include "net/websockets/websocket_stream.h"
 
@@ -32,21 +32,20 @@
   // This class should not normally be constructed directly; see
   // WebSocketStream::CreateAndConnectStream() and
   // WebSocketBasicHandshakeStream::Upgrade().
-  WebSocketBasicStream(
-      scoped_ptr<ClientSocketHandle> connection,
-      const scoped_refptr<GrowableIOBuffer>& http_read_buffer,
-      const std::string& sub_protocol,
-      const std::string& extensions);
+  WebSocketBasicStream(std::unique_ptr<ClientSocketHandle> connection,
+                       const scoped_refptr<GrowableIOBuffer>& http_read_buffer,
+                       const std::string& sub_protocol,
+                       const std::string& extensions);
 
   // The destructor has to make sure the connection is closed when we finish so
   // that it does not get returned to the pool.
   ~WebSocketBasicStream() override;
 
   // WebSocketStream implementation.
-  int ReadFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int ReadFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                  const CompletionCallback& callback) override;
 
-  int WriteFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int WriteFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                   const CompletionCallback& callback) override;
 
   void Close() override;
@@ -58,8 +57,9 @@
   ////////////////////////////////////////////////////////////////////////////
   // Methods for testing only.
 
-  static scoped_ptr<WebSocketBasicStream> CreateWebSocketBasicStreamForTesting(
-      scoped_ptr<ClientSocketHandle> connection,
+  static std::unique_ptr<WebSocketBasicStream>
+  CreateWebSocketBasicStreamForTesting(
+      std::unique_ptr<ClientSocketHandle> connection,
       const scoped_refptr<GrowableIOBuffer>& http_read_buffer,
       const std::string& sub_protocol,
       const std::string& extensions,
@@ -79,23 +79,23 @@
   // Attempts to parse the output of a read as WebSocket frames. On success,
   // returns OK and places the frame(s) in |frames|.
   int HandleReadResult(int result,
-                       std::vector<scoped_ptr<WebSocketFrame>>* frames);
+                       std::vector<std::unique_ptr<WebSocketFrame>>* frames);
 
   // Converts the chunks in |frame_chunks| into frames and writes them to
   // |frames|. |frame_chunks| is destroyed in the process. Returns
   // ERR_WS_PROTOCOL_ERROR if an invalid chunk was found. If one or more frames
   // was added to |frames|, then returns OK, otherwise returns ERR_IO_PENDING.
   int ConvertChunksToFrames(
-      std::vector<scoped_ptr<WebSocketFrameChunk>>* frame_chunks,
-      std::vector<scoped_ptr<WebSocketFrame>>* frames);
+      std::vector<std::unique_ptr<WebSocketFrameChunk>>* frame_chunks,
+      std::vector<std::unique_ptr<WebSocketFrame>>* frames);
 
   // Converts a |chunk| to a |frame|. |*frame| should be NULL on entry to this
   // method. If |chunk| is an incomplete control frame, or an empty middle
   // frame, then |*frame| may still be NULL on exit. If an invalid control frame
   // is found, returns ERR_WS_PROTOCOL_ERROR and the stream is no longer
   // usable. Otherwise returns OK (even if frame is still NULL).
-  int ConvertChunkToFrame(scoped_ptr<WebSocketFrameChunk> chunk,
-                          scoped_ptr<WebSocketFrame>* frame);
+  int ConvertChunkToFrame(std::unique_ptr<WebSocketFrameChunk> chunk,
+                          std::unique_ptr<WebSocketFrame>* frame);
 
   // Creates a frame based on the value of |is_final_chunk|, |data| and
   // |current_frame_header_|. Clears |current_frame_header_| if |is_final_chunk|
@@ -104,7 +104,7 @@
   // returned frame will be NULL. Otherwise, |current_frame_header_->opcode| is
   // set to Continuation after use if it was Text or Binary, in accordance with
   // WebSocket RFC6455 section 5.4.
-  scoped_ptr<WebSocketFrame> CreateFrame(
+  std::unique_ptr<WebSocketFrame> CreateFrame(
       bool is_final_chunk,
       const scoped_refptr<IOBufferWithSize>& data);
 
@@ -115,7 +115,7 @@
 
   // Called when a read completes. Parses the result and (unless no complete
   // header has been received) calls |callback|.
-  void OnReadComplete(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  void OnReadComplete(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                       const CompletionCallback& callback,
                       int result);
 
@@ -126,14 +126,14 @@
 
   // The connection, wrapped in a ClientSocketHandle so that we can prevent it
   // from being returned to the pool.
-  scoped_ptr<ClientSocketHandle> connection_;
+  std::unique_ptr<ClientSocketHandle> connection_;
 
   // Frame header for the frame currently being received. Only non-NULL while we
   // are processing the frame. If the frame arrives in multiple chunks, it can
   // remain non-NULL until additional chunks arrive. If the header of the frame
   // was invalid, this is set to NULL, the channel is failed, and subsequent
   // chunks of the same frame will be ignored.
-  scoped_ptr<WebSocketFrameHeader> current_frame_header_;
+  std::unique_ptr<WebSocketFrameHeader> current_frame_header_;
 
   // Although it should rarely happen in practice, a control frame can arrive
   // broken into chunks. This variable provides storage for a partial control
diff --git a/net/websockets/websocket_basic_stream_test.cc b/net/websockets/websocket_basic_stream_test.cc
index f60a105..0671114d 100644
--- a/net/websockets/websocket_basic_stream_test.cc
+++ b/net/websockets/websocket_basic_stream_test.cc
@@ -76,7 +76,7 @@
 // Base class for WebSocketBasicStream test fixtures.
 class WebSocketBasicStreamTest : public ::testing::Test {
  protected:
-  scoped_ptr<WebSocketBasicStream> stream_;
+  std::unique_ptr<WebSocketBasicStream> stream_;
   TestNetLog net_log_;
 };
 
@@ -117,16 +117,17 @@
     stream_.reset();
   }
 
-  scoped_ptr<ClientSocketHandle> MakeTransportSocket(MockRead reads[],
-                                                     size_t reads_count,
-                                                     MockWrite writes[],
-                                                     size_t writes_count) {
+  std::unique_ptr<ClientSocketHandle> MakeTransportSocket(MockRead reads[],
+                                                          size_t reads_count,
+                                                          MockWrite writes[],
+                                                          size_t writes_count) {
     socket_data_.reset(new StrictStaticSocketDataProvider(
         reads, reads_count, writes, writes_count, expect_all_io_to_complete_));
     socket_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
     factory_.AddSocketDataProvider(socket_data_.get());
 
-    scoped_ptr<ClientSocketHandle> transport_socket(new ClientSocketHandle);
+    std::unique_ptr<ClientSocketHandle> transport_socket(
+        new ClientSocketHandle);
     scoped_refptr<MockTransportSocketParams> params;
     transport_socket->Init(
         "a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
@@ -160,11 +161,11 @@
 
   void CreateNullStream() { CreateStream(NULL, 0, NULL, 0); }
 
-  scoped_ptr<SocketDataProvider> socket_data_;
+  std::unique_ptr<SocketDataProvider> socket_data_;
   MockClientSocketFactory factory_;
   MockTransportClientSocketPool pool_;
   BoundTestNetLog(bound_net_log_);
-  std::vector<scoped_ptr<WebSocketFrame>> frames_;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_;
   TestCompletionCallback cb_;
   scoped_refptr<GrowableIOBuffer> http_read_buffer_;
   std::string sub_protocol_;
@@ -225,7 +226,7 @@
     CreateStream(reads_.get(), number_of_chunks, NULL, 0);
   }
 
-  scoped_ptr<MockRead[]> reads_;
+  std::unique_ptr<MockRead[]> reads_;
 };
 
 // Test fixture for write tests.
@@ -239,7 +240,7 @@
   // Creates a WebSocketFrame with a wire format matching kWriteFrame and adds
   // it to |frames_|.
   void PrepareWriteFrame() {
-    scoped_ptr<WebSocketFrame> frame(
+    std::unique_ptr<WebSocketFrame> frame(
         new WebSocketFrame(WebSocketFrameHeader::kOpCodeText));
     const size_t payload_size =
         kWriteFrameSize - (WebSocketFrameHeader::kBaseHeaderSize +
@@ -798,7 +799,7 @@
   const size_t kWireSize = kPayloadSize + kLargeFrameHeaderSize;
   const size_t kExpectedFrameCount =
       (kWireSize + kReadBufferSize - 1) / kReadBufferSize;
-  scoped_ptr<char[]> big_frame(new char[kWireSize]);
+  std::unique_ptr<char[]> big_frame(new char[kWireSize]);
   memcpy(big_frame.get(), "\x81\x7F", 2);
   base::WriteBigEndian(big_frame.get() + 2, kPayloadSize);
   memset(big_frame.get() + kLargeFrameHeaderSize, 'A', kPayloadSize);
@@ -888,13 +889,13 @@
       MockWrite(SYNCHRONOUS, kMaskedEmptyPong, kMaskedEmptyPongSize)};
   CreateWriteOnly(writes);
 
-  scoped_ptr<WebSocketFrame> frame(
+  std::unique_ptr<WebSocketFrame> frame(
       new WebSocketFrame(WebSocketFrameHeader::kOpCodePong));
   WebSocketFrameHeader& header = frame->header;
   header.final = true;
   header.masked = true;
   header.payload_length = 0;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   frames.push_back(std::move(frame));
   EXPECT_EQ(OK, stream_->WriteFrames(&frames, cb_.callback()));
 }
@@ -909,7 +910,7 @@
   generator_ = &GenerateNonNulMaskingKey;
   CreateStream(NULL, 0, writes, arraysize(writes));
 
-  scoped_ptr<WebSocketFrame> frame(
+  std::unique_ptr<WebSocketFrame> frame(
       new WebSocketFrame(WebSocketFrameHeader::kOpCodeText));
   const std::string unmasked_payload = "graphics";
   const size_t payload_size = unmasked_payload.size();
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc
index 35a6528..bb0c3de 100644
--- a/net/websockets/websocket_channel.cc
+++ b/net/websockets/websocket_channel.cc
@@ -136,14 +136,14 @@
   SendBuffer() : total_bytes_(0) {}
 
   // Add a WebSocketFrame to the buffer and increase total_bytes_.
-  void AddFrame(scoped_ptr<WebSocketFrame> chunk);
+  void AddFrame(std::unique_ptr<WebSocketFrame> chunk);
 
   // Return a pointer to the frames_ for write purposes.
-  std::vector<scoped_ptr<WebSocketFrame>>* frames() { return &frames_; }
+  std::vector<std::unique_ptr<WebSocketFrame>>* frames() { return &frames_; }
 
  private:
   // The frames_ that will be sent in the next call to WriteFrames().
-  std::vector<scoped_ptr<WebSocketFrame>> frames_;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_;
 
   // The total size of the payload data in |frames_|. This will be used to
   // measure the throughput of the link.
@@ -151,7 +151,8 @@
   uint64_t total_bytes_;
 };
 
-void WebSocketChannel::SendBuffer::AddFrame(scoped_ptr<WebSocketFrame> frame) {
+void WebSocketChannel::SendBuffer::AddFrame(
+    std::unique_ptr<WebSocketFrame> frame) {
   total_bytes_ += frame->header.payload_length;
   frames_.push_back(std::move(frame));
 }
@@ -163,7 +164,7 @@
  public:
   explicit ConnectDelegate(WebSocketChannel* creator) : creator_(creator) {}
 
-  void OnSuccess(scoped_ptr<WebSocketStream> stream) override {
+  void OnSuccess(std::unique_ptr<WebSocketStream> stream) override {
     creator_->OnConnectSuccess(std::move(stream));
     // |this| may have been deleted.
   }
@@ -174,17 +175,17 @@
   }
 
   void OnStartOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeRequestInfo> request) override {
+      std::unique_ptr<WebSocketHandshakeRequestInfo> request) override {
     creator_->OnStartOpeningHandshake(std::move(request));
   }
 
   void OnFinishOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeResponseInfo> response) override {
+      std::unique_ptr<WebSocketHandshakeResponseInfo> response) override {
     creator_->OnFinishOpeningHandshake(std::move(response));
   }
 
   void OnSSLCertificateError(
-      scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>
+      std::unique_ptr<WebSocketEventInterface::SSLErrorCallbacks>
           ssl_error_callbacks,
       const SSLInfo& ssl_info,
       bool fatal) override {
@@ -217,7 +218,7 @@
   }
 
   void set_handshake_request_info(
-      scoped_ptr<WebSocketHandshakeRequestInfo> request_info) {
+      std::unique_ptr<WebSocketHandshakeRequestInfo> request_info) {
     handshake_request_info_ = std::move(request_info);
   }
 
@@ -226,14 +227,14 @@
   }
 
   void set_handshake_response_info(
-      scoped_ptr<WebSocketHandshakeResponseInfo> response_info) {
+      std::unique_ptr<WebSocketHandshakeResponseInfo> response_info) {
     handshake_response_info_ = std::move(response_info);
   }
 
  private:
   WebSocketChannel* owner_;
-  scoped_ptr<WebSocketHandshakeRequestInfo> handshake_request_info_;
-  scoped_ptr<WebSocketHandshakeResponseInfo> handshake_response_info_;
+  std::unique_ptr<WebSocketHandshakeRequestInfo> handshake_request_info_;
+  std::unique_ptr<WebSocketHandshakeResponseInfo> handshake_response_info_;
 };
 
 WebSocketChannel::HandshakeNotificationSender::HandshakeNotificationSender(
@@ -303,7 +304,7 @@
 }
 
 WebSocketChannel::WebSocketChannel(
-    scoped_ptr<WebSocketEventInterface> event_interface,
+    std::unique_ptr<WebSocketEventInterface> event_interface,
     URLRequestContext* url_request_context)
     : event_interface_(std::move(event_interface)),
       url_request_context_(url_request_context),
@@ -573,7 +574,7 @@
     return;
   }
   socket_url_ = socket_url;
-  scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate(
+  std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate(
       new ConnectDelegate(this));
   stream_request_ = creator.Run(socket_url_, requested_subprotocols, origin,
                                 url_request_context_, BoundNetLog(),
@@ -581,7 +582,8 @@
   SetState(CONNECTING);
 }
 
-void WebSocketChannel::OnConnectSuccess(scoped_ptr<WebSocketStream> stream) {
+void WebSocketChannel::OnConnectSuccess(
+    std::unique_ptr<WebSocketStream> stream) {
   DCHECK(stream);
   DCHECK_EQ(CONNECTING, state_);
 
@@ -628,7 +630,8 @@
 }
 
 void WebSocketChannel::OnSSLCertificateError(
-    scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks> ssl_error_callbacks,
+    std::unique_ptr<WebSocketEventInterface::SSLErrorCallbacks>
+        ssl_error_callbacks,
     const SSLInfo& ssl_info,
     bool fatal) {
   ignore_result(event_interface_->OnSSLCertificateError(
@@ -636,7 +639,7 @@
 }
 
 void WebSocketChannel::OnStartOpeningHandshake(
-    scoped_ptr<WebSocketHandshakeRequestInfo> request) {
+    std::unique_ptr<WebSocketHandshakeRequestInfo> request) {
   DCHECK(!notification_sender_->handshake_request_info());
 
   // Because it is hard to handle an IPC error synchronously is difficult,
@@ -646,7 +649,7 @@
 }
 
 void WebSocketChannel::OnFinishOpeningHandshake(
-    scoped_ptr<WebSocketHandshakeResponseInfo> response) {
+    std::unique_ptr<WebSocketHandshakeResponseInfo> response) {
   DCHECK(!notification_sender_->handshake_response_info());
 
   // Because it is hard to handle an IPC error synchronously is difficult,
@@ -793,7 +796,8 @@
   }
 }
 
-ChannelState WebSocketChannel::HandleFrame(scoped_ptr<WebSocketFrame> frame) {
+ChannelState WebSocketChannel::HandleFrame(
+    std::unique_ptr<WebSocketFrame> frame) {
   if (frame->header.masked) {
     // RFC6455 Section 5.1 "A client MUST close a connection if it detects a
     // masked frame."
@@ -1028,7 +1032,7 @@
   DCHECK(state_ == CONNECTED || state_ == RECV_CLOSED);
   DCHECK(stream_);
 
-  scoped_ptr<WebSocketFrame> frame(new WebSocketFrame(op_code));
+  std::unique_ptr<WebSocketFrame> frame(new WebSocketFrame(op_code));
   WebSocketFrameHeader& header = frame->header;
   header.final = fin;
   header.masked = true;
diff --git a/net/websockets/websocket_channel.h b/net/websockets/websocket_channel.h
index 666b620..002212b 100644
--- a/net/websockets/websocket_channel.h
+++ b/net/websockets/websocket_channel.h
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <queue>
 #include <string>
 #include <vector>
@@ -16,7 +17,6 @@
 #include "base/i18n/streaming_utf8_validator.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
 #include "net/base/net_export.h"
@@ -46,13 +46,14 @@
  public:
   // The type of a WebSocketStream creator callback. Must match the signature of
   // WebSocketStream::CreateAndConnectStream().
-  typedef base::Callback<scoped_ptr<WebSocketStreamRequest>(
+  typedef base::Callback<std::unique_ptr<WebSocketStreamRequest>(
       const GURL&,
       const std::vector<std::string>&,
       const url::Origin&,
       URLRequestContext*,
       const BoundNetLog&,
-      scoped_ptr<WebSocketStream::ConnectDelegate>)> WebSocketStreamCreator;
+      std::unique_ptr<WebSocketStream::ConnectDelegate>)>
+      WebSocketStreamCreator;
 
   // Methods which return a value of type ChannelState may delete |this|. If the
   // return value is CHANNEL_DELETED, then the caller must return without making
@@ -62,7 +63,7 @@
   // Creates a new WebSocketChannel in an idle state.
   // SendAddChannelRequest() must be called immediately afterwards to start the
   // connection process.
-  WebSocketChannel(scoped_ptr<WebSocketEventInterface> event_interface,
+  WebSocketChannel(std::unique_ptr<WebSocketEventInterface> event_interface,
                    URLRequestContext* url_request_context);
   virtual ~WebSocketChannel();
 
@@ -135,12 +136,12 @@
   // Called when the stream starts the WebSocket Opening Handshake.
   // This method is public for testing.
   void OnStartOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeRequestInfo> request);
+      std::unique_ptr<WebSocketHandshakeRequestInfo> request);
 
   // Called when the stream ends the WebSocket Opening Handshake.
   // This method is public for testing.
   void OnFinishOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeResponseInfo> response);
+      std::unique_ptr<WebSocketHandshakeResponseInfo> response);
 
  private:
   class HandshakeNotificationSender;
@@ -216,7 +217,7 @@
 
   // Success callback from WebSocketStream::CreateAndConnectStream(). Reports
   // success to the event interface. May delete |this|.
-  void OnConnectSuccess(scoped_ptr<WebSocketStream> stream);
+  void OnConnectSuccess(std::unique_ptr<WebSocketStream> stream);
 
   // Failure callback from WebSocketStream::CreateAndConnectStream(). Reports
   // failure to the event interface. May delete |this|.
@@ -226,7 +227,7 @@
   // WebSocketStream::CreateAndConnectStream(). Forwards the request to the
   // event interface.
   void OnSSLCertificateError(
-      scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>
+      std::unique_ptr<WebSocketEventInterface::SSLErrorCallbacks>
           ssl_error_callbacks,
       const SSLInfo& ssl_info,
       bool fatal);
@@ -268,8 +269,8 @@
   // This method performs sanity checks on the frame that are needed regardless
   // of the current state. Then, calls the HandleFrameByState() method below
   // which performs the appropriate action(s) depending on the current state.
-  ChannelState HandleFrame(
-      scoped_ptr<WebSocketFrame> frame) WARN_UNUSED_RESULT;
+  ChannelState HandleFrame(std::unique_ptr<WebSocketFrame> frame)
+      WARN_UNUSED_RESULT;
 
   // Handles a single frame depending on the current state. It's used by the
   // HandleFrame() method.
@@ -352,25 +353,25 @@
   GURL socket_url_;
 
   // The object receiving events.
-  const scoped_ptr<WebSocketEventInterface> event_interface_;
+  const std::unique_ptr<WebSocketEventInterface> event_interface_;
 
   // The URLRequestContext to pass to the WebSocketStream creator.
   URLRequestContext* const url_request_context_;
 
   // The WebSocketStream on which to send and receive data.
-  scoped_ptr<WebSocketStream> stream_;
+  std::unique_ptr<WebSocketStream> stream_;
 
   // A data structure containing a vector of frames to be sent and the total
   // number of bytes contained in the vector.
   class SendBuffer;
   // Data that is currently pending write, or NULL if no write is pending.
-  scoped_ptr<SendBuffer> data_being_sent_;
+  std::unique_ptr<SendBuffer> data_being_sent_;
   // Data that is queued up to write after the current write completes.
   // Only non-NULL when such data actually exists.
-  scoped_ptr<SendBuffer> data_to_send_next_;
+  std::unique_ptr<SendBuffer> data_to_send_next_;
 
   // Destination for the current call to WebSocketStream::ReadFrames
-  std::vector<scoped_ptr<WebSocketFrame>> read_frames_;
+  std::vector<std::unique_ptr<WebSocketFrame>> read_frames_;
 
   // Frames that have been read but not yet forwarded to the renderer due to
   // lack of quota.
@@ -378,7 +379,7 @@
 
   // Handle to an in-progress WebSocketStream creation request. Only non-NULL
   // during the connection process.
-  scoped_ptr<WebSocketStreamRequest> stream_request_;
+  std::unique_ptr<WebSocketStreamRequest> stream_request_;
 
   // If the renderer's send quota reaches this level, it is sent a quota
   // refresh. "quota units" are currently bytes. TODO(ricea): Update the
@@ -416,7 +417,7 @@
   State state_;
 
   // |notification_sender_| is owned by this object.
-  scoped_ptr<HandshakeNotificationSender> notification_sender_;
+  std::unique_ptr<HandshakeNotificationSender> notification_sender_;
 
   // UTF-8 validator for outgoing Text messages.
   base::StreamingUtf8Validator outgoing_utf8_validator_;
diff --git a/net/websockets/websocket_channel_test.cc b/net/websockets/websocket_channel_test.cc
index 16872a71..841dc3d 100644
--- a/net/websockets/websocket_channel_test.cc
+++ b/net/websockets/websocket_channel_test.cc
@@ -7,8 +7,10 @@
 #include <limits.h>
 #include <stddef.h>
 #include <string.h>
+
 #include <iostream>
 #include <iterator>
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
@@ -18,7 +20,7 @@
 #include "base/callback.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/single_thread_task_runner.h"
@@ -73,7 +75,7 @@
 
 std::ostream& operator<<(
     std::ostream& os,
-    const std::vector<scoped_ptr<WebSocketFrame>>& frames) {
+    const std::vector<std::unique_ptr<WebSocketFrame>>& frames) {
   os << "{";
   bool first = true;
   for (const auto& frame : frames) {
@@ -89,7 +91,7 @@
 
 std::ostream& operator<<(
     std::ostream& os,
-    const std::vector<scoped_ptr<WebSocketFrame>>* vector) {
+    const std::vector<std::unique_ptr<WebSocketFrame>>* vector) {
   return os << '&' << *vector;
 }
 
@@ -168,17 +170,17 @@
 
   // We can't use GMock with scoped_ptr.
   ChannelState OnStartOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeRequestInfo>) override {
+      std::unique_ptr<WebSocketHandshakeRequestInfo>) override {
     OnStartOpeningHandshakeCalled();
     return CHANNEL_ALIVE;
   }
   ChannelState OnFinishOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeResponseInfo>) override {
+      std::unique_ptr<WebSocketHandshakeResponseInfo>) override {
     OnFinishOpeningHandshakeCalled();
     return CHANNEL_ALIVE;
   }
   ChannelState OnSSLCertificateError(
-      scoped_ptr<SSLErrorCallbacks> ssl_error_callbacks,
+      std::unique_ptr<SSLErrorCallbacks> ssl_error_callbacks,
       const GURL& url,
       const SSLInfo& ssl_info,
       bool fatal) override {
@@ -217,15 +219,15 @@
     return CHANNEL_DELETED;
   }
   ChannelState OnStartOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeRequestInfo> request) override {
+      std::unique_ptr<WebSocketHandshakeRequestInfo> request) override {
     return CHANNEL_ALIVE;
   }
   ChannelState OnFinishOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeResponseInfo> response) override {
+      std::unique_ptr<WebSocketHandshakeResponseInfo> response) override {
     return CHANNEL_ALIVE;
   }
   ChannelState OnSSLCertificateError(
-      scoped_ptr<SSLErrorCallbacks> ssl_error_callbacks,
+      std::unique_ptr<SSLErrorCallbacks> ssl_error_callbacks,
       const GURL& url,
       const SSLInfo& ssl_info,
       bool fatal) override {
@@ -246,12 +248,12 @@
                       const std::string& extensions)
       : protocol_(protocol), extensions_(extensions) {}
 
-  int ReadFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int ReadFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                  const CompletionCallback& callback) override {
     return ERR_IO_PENDING;
   }
 
-  int WriteFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int WriteFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                   const CompletionCallback& callback) override {
     return ERR_IO_PENDING;
   }
@@ -285,7 +287,7 @@
   WebSocketFrameHeader::OpCode opcode;
   IsMasked masked;
 
-  // Will be used to create the IOBuffer member. Can be NULL for NULL data. Is a
+  // Will be used to create the IOBuffer member. Can be null for null data. Is a
   // nul-terminated string for ease-of-use. |header.payload_length| is
   // initialised from |strlen(data)|. This means it is not 8-bit clean, but this
   // is not an issue for test data.
@@ -321,13 +323,13 @@
 // Convert a const array of InitFrame structs to the format used at
 // runtime. Templated on the size of the array to save typing.
 template <size_t N>
-std::vector<scoped_ptr<WebSocketFrame>> CreateFrameVector(
-    const InitFrame(&source_frames)[N]) {
-  std::vector<scoped_ptr<WebSocketFrame>> result_frames;
+std::vector<std::unique_ptr<WebSocketFrame>> CreateFrameVector(
+    const InitFrame (&source_frames)[N]) {
+  std::vector<std::unique_ptr<WebSocketFrame>> result_frames;
   result_frames.reserve(N);
   for (size_t i = 0; i < N; ++i) {
     const InitFrame& source_frame = source_frames[i];
-    scoped_ptr<WebSocketFrame> result_frame(
+    std::unique_ptr<WebSocketFrame> result_frame(
         new WebSocketFrame(source_frame.opcode));
     size_t frame_length = source_frame.data ? strlen(source_frame.data) : 0;
     WebSocketFrameHeader& result_header = result_frame->header;
@@ -354,19 +356,20 @@
 }
 
 // The implementation of a GoogleMock matcher which can be used to compare a
-// std::vector<scoped_ptr<WebSocketFrame>>* against an expectation defined as an
+// std::vector<std::unique_ptr<WebSocketFrame>>* against an expectation defined
+// as an
 // array of InitFrame objects. Although it is possible to compose built-in
 // GoogleMock matchers to check the contents of a WebSocketFrame, the results
 // are so unreadable that it is better to use this matcher.
 template <size_t N>
 class EqualsFramesMatcher : public ::testing::MatcherInterface<
-                                std::vector<scoped_ptr<WebSocketFrame>>*> {
+                                std::vector<std::unique_ptr<WebSocketFrame>>*> {
  public:
   EqualsFramesMatcher(const InitFrame (*expect_frames)[N])
       : expect_frames_(expect_frames) {}
 
   virtual bool MatchAndExplain(
-      std::vector<scoped_ptr<WebSocketFrame>>* actual_frames,
+      std::vector<std::unique_ptr<WebSocketFrame>>* actual_frames,
       ::testing::MatchResultListener* listener) const {
     if (actual_frames->size() != N) {
       *listener << "the vector size is " << actual_frames->size();
@@ -422,8 +425,8 @@
 // The definition of EqualsFrames GoogleMock matcher. Unlike the ReturnFrames
 // action, this can take the array by reference.
 template <size_t N>
-::testing::Matcher<std::vector<scoped_ptr<WebSocketFrame>>*> EqualsFrames(
-    const InitFrame(&frames)[N]) {
+::testing::Matcher<std::vector<std::unique_ptr<WebSocketFrame>>*> EqualsFrames(
+    const InitFrame (&frames)[N]) {
   return ::testing::MakeMatcher(new EqualsFramesMatcher<N>(&frames));
 }
 
@@ -459,32 +462,34 @@
   // |async| is SYNC, the response will be returned synchronously. |error| is
   // returned directly from ReadFrames() in the synchronous case, or passed to
   // the callback in the asynchronous case. |frames| will be converted to a
-  // std::vector<scoped_ptr<WebSocketFrame>> and copied to the pointer that was
+  // std::vector<std::unique_ptr<WebSocketFrame>> and copied to the pointer that
+  // was
   // passed to ReadFrames().
   template <size_t N>
   void PrepareReadFrames(IsSync async,
                          int error,
                          const InitFrame (&frames)[N]) {
-    responses_.push_back(
-        make_scoped_ptr(new Response(async, error, CreateFrameVector(frames))));
+    responses_.push_back(base::WrapUnique(
+        new Response(async, error, CreateFrameVector(frames))));
   }
 
   // An alternate version of PrepareReadFrames for when we need to construct
   // the frames manually.
-  void PrepareRawReadFrames(IsSync async,
-                            int error,
-                            std::vector<scoped_ptr<WebSocketFrame>> frames) {
+  void PrepareRawReadFrames(
+      IsSync async,
+      int error,
+      std::vector<std::unique_ptr<WebSocketFrame>> frames) {
     responses_.push_back(
-        make_scoped_ptr(new Response(async, error, std::move(frames))));
+        base::WrapUnique(new Response(async, error, std::move(frames))));
   }
 
   // Prepares a fake error response (ie. there is no data).
   void PrepareReadFramesError(IsSync async, int error) {
-    responses_.push_back(make_scoped_ptr(
-        new Response(async, error, std::vector<scoped_ptr<WebSocketFrame>>())));
+    responses_.push_back(base::WrapUnique(new Response(
+        async, error, std::vector<std::unique_ptr<WebSocketFrame>>())));
   }
 
-  int ReadFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int ReadFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                  const CompletionCallback& callback) override {
     CHECK(!read_frames_pending_);
     if (index_ >= responses_.size())
@@ -502,7 +507,7 @@
   }
 
  private:
-  void DoCallback(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  void DoCallback(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                   const CompletionCallback& callback) {
     read_frames_pending_ = false;
     frames->swap(responses_[index_]->frames);
@@ -513,18 +518,18 @@
   struct Response {
     Response(IsSync async,
              int error,
-             std::vector<scoped_ptr<WebSocketFrame>> frames)
+             std::vector<std::unique_ptr<WebSocketFrame>> frames)
         : async(async), error(error), frames(std::move(frames)) {}
 
     IsSync async;
     int error;
-    std::vector<scoped_ptr<WebSocketFrame>> frames;
+    std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
    private:
     // Bad things will happen if we attempt to copy or assign |frames|.
     DISALLOW_COPY_AND_ASSIGN(Response);
   };
-  std::vector<scoped_ptr<Response>> responses_;
+  std::vector<std::unique_ptr<Response>> responses_;
 
   // The index into the responses_ array of the next response to be returned.
   size_t index_;
@@ -540,7 +545,7 @@
 // synchronously.
 class WriteableFakeWebSocketStream : public FakeWebSocketStream {
  public:
-  int WriteFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int WriteFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                   const CompletionCallback& callback) override {
     return OK;
   }
@@ -549,7 +554,7 @@
 // A FakeWebSocketStream where writes always fail.
 class UnWriteableFakeWebSocketStream : public FakeWebSocketStream {
  public:
-  int WriteFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int WriteFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                   const CompletionCallback& callback) override {
     return ERR_CONNECTION_RESET;
   }
@@ -563,9 +568,9 @@
 // otherwise the ReadFrames() callback will never be called.
 class EchoeyFakeWebSocketStream : public FakeWebSocketStream {
  public:
-  EchoeyFakeWebSocketStream() : read_frames_(NULL), done_(false) {}
+  EchoeyFakeWebSocketStream() : read_frames_(nullptr), done_(false) {}
 
-  int WriteFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int WriteFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                   const CompletionCallback& callback) override {
     stored_frames_.insert(stored_frames_.end(),
                           std::make_move_iterator(frames->begin()),
@@ -577,7 +582,7 @@
     return OK;
   }
 
-  int ReadFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int ReadFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                  const CompletionCallback& callback) override {
     read_callback_ = callback;
     read_frames_ = frames;
@@ -598,7 +603,7 @@
       read_callback_.Run(ERR_CONNECTION_CLOSED);
     } else if (!stored_frames_.empty()) {
       done_ = MoveFrames(read_frames_);
-      read_frames_ = NULL;
+      read_frames_ = nullptr;
       read_callback_.Run(OK);
     }
   }
@@ -606,7 +611,7 @@
   // Copy the frames stored in stored_frames_ to |out|, while clearing the
   // "masked" header bit. Returns true if a Close Frame was seen, false
   // otherwise.
-  bool MoveFrames(std::vector<scoped_ptr<WebSocketFrame>>* out) {
+  bool MoveFrames(std::vector<std::unique_ptr<WebSocketFrame>>* out) {
     bool seen_close = false;
     *out = std::move(stored_frames_);
     for (const auto& frame : *out) {
@@ -618,10 +623,10 @@
     return seen_close;
   }
 
-  std::vector<scoped_ptr<WebSocketFrame>> stored_frames_;
+  std::vector<std::unique_ptr<WebSocketFrame>> stored_frames_;
   CompletionCallback read_callback_;
   // Owned by the caller of ReadFrames().
-  std::vector<scoped_ptr<WebSocketFrame>>* read_frames_;
+  std::vector<std::unique_ptr<WebSocketFrame>>* read_frames_;
   // True if we should close the connection.
   bool done_;
 };
@@ -637,7 +642,7 @@
  public:
   ResetOnWriteFakeWebSocketStream() : closed_(false), weak_ptr_factory_(this) {}
 
-  int WriteFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int WriteFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                   const CompletionCallback& callback) override {
     base::ThreadTaskRunnerHandle::Get()->PostTask(
         FROM_HERE,
@@ -652,7 +657,7 @@
     return ERR_IO_PENDING;
   }
 
-  int ReadFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int ReadFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                  const CompletionCallback& callback) override {
     read_callback_ = callback;
     return ERR_IO_PENDING;
@@ -678,10 +683,10 @@
 class MockWebSocketStream : public WebSocketStream {
  public:
   MOCK_METHOD2(ReadFrames,
-               int(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+               int(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                    const CompletionCallback& callback));
   MOCK_METHOD2(WriteFrames,
-               int(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+               int(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                    const CompletionCallback& callback));
   MOCK_METHOD0(Close, void());
   MOCK_CONST_METHOD0(GetSubProtocol, std::string());
@@ -690,20 +695,20 @@
 };
 
 struct ArgumentCopyingWebSocketStreamCreator {
-  scoped_ptr<WebSocketStreamRequest> Create(
+  std::unique_ptr<WebSocketStreamRequest> Create(
       const GURL& socket_url,
       const std::vector<std::string>& requested_subprotocols,
       const url::Origin& origin,
       URLRequestContext* url_request_context,
       const BoundNetLog& net_log,
-      scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate) {
+      std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate) {
     this->socket_url = socket_url;
     this->requested_subprotocols = requested_subprotocols;
     this->origin = origin;
     this->url_request_context = url_request_context;
     this->net_log = net_log;
     this->connect_delegate = std::move(connect_delegate);
-    return make_scoped_ptr(new WebSocketStreamRequest);
+    return base::WrapUnique(new WebSocketStreamRequest);
   }
 
   GURL socket_url;
@@ -711,7 +716,7 @@
   std::vector<std::string> requested_subprotocols;
   URLRequestContext* url_request_context;
   BoundNetLog net_log;
-  scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate;
+  std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate;
 };
 
 // Converts a std::string to a std::vector<char>. For test purposes, it is
@@ -759,15 +764,15 @@
   // Returns a WebSocketEventInterface to be passed to the WebSocketChannel.
   // This implementation returns a newly-created fake. Subclasses may return a
   // mock instead.
-  virtual scoped_ptr<WebSocketEventInterface> CreateEventInterface() {
-    return scoped_ptr<WebSocketEventInterface>(new FakeWebSocketEventInterface);
+  virtual std::unique_ptr<WebSocketEventInterface> CreateEventInterface() {
+    return base::WrapUnique(new FakeWebSocketEventInterface);
   }
 
   // This method serves no other purpose than to provide a nice syntax for
   // assigning to stream_. class T must be a subclass of WebSocketStream or you
   // will have unpleasant compile errors.
   template <class T>
-  void set_stream(scoped_ptr<T> stream) {
+  void set_stream(std::unique_ptr<T> stream) {
     stream_ = std::move(stream);
   }
 
@@ -792,10 +797,10 @@
   ConnectData connect_data_;
 
   // The channel we are testing. Not initialised until SetChannel() is called.
-  scoped_ptr<WebSocketChannel> channel_;
+  std::unique_ptr<WebSocketChannel> channel_;
 
   // A mock or fake stream for tests that need one.
-  scoped_ptr<WebSocketStream> stream_;
+  std::unique_ptr<WebSocketStream> stream_;
 };
 
 // enum of WebSocketEventInterface calls. These are intended to be or'd together
@@ -835,7 +840,7 @@
                   EVENT_ON_SSL_CERTIFICATE_ERROR) {}
   // Create a ChannelDeletingFakeWebSocketEventInterface. Defined out-of-line to
   // avoid circular dependency.
-  scoped_ptr<WebSocketEventInterface> CreateEventInterface() override;
+  std::unique_ptr<WebSocketEventInterface> CreateEventInterface() override;
 
   // Tests can set deleting_ to a bitmap of EventInterfaceCall members that they
   // want to cause Channel deletion. The default is for all calls to cause
@@ -882,15 +887,15 @@
   }
 
   ChannelState OnStartOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeRequestInfo> request) override {
+      std::unique_ptr<WebSocketHandshakeRequestInfo> request) override {
     return fixture_->DeleteIfDeleting(EVENT_ON_START_OPENING_HANDSHAKE);
   }
   ChannelState OnFinishOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeResponseInfo> response) override {
+      std::unique_ptr<WebSocketHandshakeResponseInfo> response) override {
     return fixture_->DeleteIfDeleting(EVENT_ON_FINISH_OPENING_HANDSHAKE);
   }
   ChannelState OnSSLCertificateError(
-      scoped_ptr<SSLErrorCallbacks> ssl_error_callbacks,
+      std::unique_ptr<SSLErrorCallbacks> ssl_error_callbacks,
       const GURL& url,
       const SSLInfo& ssl_info,
       bool fatal) override {
@@ -903,10 +908,9 @@
   WebSocketChannelDeletingTest* fixture_;
 };
 
-scoped_ptr<WebSocketEventInterface>
+std::unique_ptr<WebSocketEventInterface>
 WebSocketChannelDeletingTest::CreateEventInterface() {
-  return scoped_ptr<WebSocketEventInterface>(
-      new ChannelDeletingFakeWebSocketEventInterface(this));
+  return base::WrapUnique(new ChannelDeletingFakeWebSocketEventInterface(this));
 }
 
 // Base class for tests which verify that EventInterface methods are called
@@ -930,11 +934,11 @@
   // object before calling CreateChannelAndConnect() or
   // CreateChannelAndConnectSuccessfully(). This will only work once per test
   // case, but once should be enough.
-  scoped_ptr<WebSocketEventInterface> CreateEventInterface() override {
-    return scoped_ptr<WebSocketEventInterface>(event_interface_.release());
+  std::unique_ptr<WebSocketEventInterface> CreateEventInterface() override {
+    return base::WrapUnique(event_interface_.release());
   }
 
-  scoped_ptr<MockWebSocketEventInterface> event_interface_;
+  std::unique_ptr<MockWebSocketEventInterface> event_interface_;
 };
 
 // Base class for tests which verify that WebSocketStream methods are called
@@ -949,7 +953,7 @@
     WebSocketChannelTest::CreateChannelAndConnectSuccessfully();
   }
 
-  scoped_ptr<MockWebSocketStream> mock_stream_;
+  std::unique_ptr<MockWebSocketStream> mock_stream_;
 };
 
 // Fixture for tests which test UTF-8 validation of sent Text frames via the
@@ -958,7 +962,7 @@
     : public WebSocketChannelEventInterfaceTest {
  public:
   void SetUp() override {
-    set_stream(make_scoped_ptr(new WriteableFakeWebSocketStream));
+    set_stream(base::WrapUnique(new WriteableFakeWebSocketStream));
     // For the purpose of the tests using this fixture, it doesn't matter
     // whether these methods are called or not.
     EXPECT_CALL(*event_interface_, OnAddChannelResponse(_, _))
@@ -1031,17 +1035,17 @@
   CreateChannelAndConnect();
   EXPECT_TRUE(channel_);
   connect_data_.creator.connect_delegate->OnFailure("bye");
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 // Deletion is possible (due to IPC failure) even if the connect succeeds.
 TEST_F(WebSocketChannelDeletingTest, OnAddChannelResponseSuccess) {
   CreateChannelAndConnectSuccessfully();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, OnDataFrameSync) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}};
@@ -1050,11 +1054,11 @@
   deleting_ = EVENT_ON_DATA_FRAME;
 
   CreateChannelAndConnectSuccessfully();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, OnDataFrameAsync) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}};
@@ -1065,18 +1069,18 @@
   CreateChannelAndConnectSuccessfully();
   EXPECT_TRUE(channel_);
   base::MessageLoop::current()->RunUntilIdle();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, OnFlowControlAfterConnect) {
   deleting_ = EVENT_ON_FLOW_CONTROL;
 
   CreateChannelAndConnectSuccessfully();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, OnFlowControlAfterSend) {
-  set_stream(make_scoped_ptr(new WriteableFakeWebSocketStream));
+  set_stream(base::WrapUnique(new WriteableFakeWebSocketStream));
   // Avoid deleting the channel yet.
   deleting_ = EVENT_ON_FAIL_CHANNEL | EVENT_ON_DROP_CHANNEL;
   CreateChannelAndConnectSuccessfully();
@@ -1085,11 +1089,11 @@
   channel_->SendFrame(true,
                       WebSocketFrameHeader::kOpCodeText,
                       std::vector<char>(kDefaultInitialQuota, 'B'));
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, OnClosingHandshakeSync) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose,
@@ -1098,11 +1102,11 @@
   set_stream(std::move(stream));
   deleting_ = EVENT_ON_CLOSING_HANDSHAKE;
   CreateChannelAndConnectSuccessfully();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, OnClosingHandshakeAsync) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose,
@@ -1113,21 +1117,21 @@
   CreateChannelAndConnectSuccessfully();
   ASSERT_TRUE(channel_);
   base::MessageLoop::current()->RunUntilIdle();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, OnDropChannelWriteError) {
-  set_stream(make_scoped_ptr(new UnWriteableFakeWebSocketStream));
+  set_stream(base::WrapUnique(new UnWriteableFakeWebSocketStream));
   deleting_ = EVENT_ON_DROP_CHANNEL;
   CreateChannelAndConnectSuccessfully();
   ASSERT_TRUE(channel_);
   channel_->SendFrame(
       true, WebSocketFrameHeader::kOpCodeText, AsVector("this will fail"));
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, OnDropChannelReadError) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   stream->PrepareReadFramesError(ReadableFakeWebSocketStream::ASYNC,
                                  ERR_FAILED);
@@ -1136,11 +1140,11 @@
   CreateChannelAndConnectSuccessfully();
   ASSERT_TRUE(channel_);
   base::MessageLoop::current()->RunUntilIdle();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, OnNotifyStartOpeningHandshakeError) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}};
@@ -1150,15 +1154,16 @@
 
   CreateChannelAndConnectSuccessfully();
   ASSERT_TRUE(channel_);
-  channel_->OnStartOpeningHandshake(scoped_ptr<WebSocketHandshakeRequestInfo>(
-      new WebSocketHandshakeRequestInfo(GURL("http://www.example.com/"),
-                                        base::Time())));
+  channel_->OnStartOpeningHandshake(
+      std::unique_ptr<WebSocketHandshakeRequestInfo>(
+          new WebSocketHandshakeRequestInfo(GURL("http://www.example.com/"),
+                                            base::Time())));
   base::MessageLoop::current()->RunUntilIdle();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, OnNotifyFinishOpeningHandshakeError) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}};
@@ -1170,29 +1175,27 @@
   ASSERT_TRUE(channel_);
   scoped_refptr<HttpResponseHeaders> response_headers(
       new HttpResponseHeaders(""));
-  channel_->OnFinishOpeningHandshake(scoped_ptr<WebSocketHandshakeResponseInfo>(
-      new WebSocketHandshakeResponseInfo(GURL("http://www.example.com/"),
-                                         200,
-                                         "OK",
-                                         response_headers,
-                                         base::Time())));
+  channel_->OnFinishOpeningHandshake(
+      base::WrapUnique(new WebSocketHandshakeResponseInfo(
+          GURL("http://www.example.com/"), 200, "OK", response_headers,
+          base::Time())));
   base::MessageLoop::current()->RunUntilIdle();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, FailChannelInSendFrame) {
-  set_stream(make_scoped_ptr(new WriteableFakeWebSocketStream));
+  set_stream(base::WrapUnique(new WriteableFakeWebSocketStream));
   deleting_ = EVENT_ON_FAIL_CHANNEL;
   CreateChannelAndConnectSuccessfully();
   ASSERT_TRUE(channel_);
   channel_->SendFrame(true,
                       WebSocketFrameHeader::kOpCodeText,
                       std::vector<char>(kDefaultInitialQuota * 2, 'T'));
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, FailChannelInOnReadDone) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   stream->PrepareReadFramesError(ReadableFakeWebSocketStream::ASYNC,
                                  ERR_WS_PROTOCOL_ERROR);
@@ -1201,11 +1204,11 @@
   CreateChannelAndConnectSuccessfully();
   ASSERT_TRUE(channel_);
   base::MessageLoop::current()->RunUntilIdle();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, FailChannelDueToMaskedFrame) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, MASKED, "HELLO"}};
@@ -1214,11 +1217,11 @@
   deleting_ = EVENT_ON_FAIL_CHANNEL;
 
   CreateChannelAndConnectSuccessfully();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, FailChannelDueToBadControlFrame) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, 0xF, NOT_MASKED, ""}};
@@ -1227,25 +1230,24 @@
   deleting_ = EVENT_ON_FAIL_CHANNEL;
 
   CreateChannelAndConnectSuccessfully();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
-// Version of above test with NULL data.
+// Version of above test with null data.
 TEST_F(WebSocketChannelDeletingTest, FailChannelDueToBadControlFrameNull) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
-  static const InitFrame frames[] = {
-      {FINAL_FRAME, 0xF, NOT_MASKED, NULL}};
+  static const InitFrame frames[] = {{FINAL_FRAME, 0xF, NOT_MASKED, nullptr}};
   stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames);
   set_stream(std::move(stream));
   deleting_ = EVENT_ON_FAIL_CHANNEL;
 
   CreateChannelAndConnectSuccessfully();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, FailChannelDueToPongAfterClose) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED,
@@ -1256,26 +1258,26 @@
   deleting_ = EVENT_ON_FAIL_CHANNEL;
 
   CreateChannelAndConnectSuccessfully();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, FailChannelDueToPongAfterCloseNull) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED,
        CLOSE_DATA(NORMAL_CLOSURE, "Success")},
-      {FINAL_FRAME, WebSocketFrameHeader::kOpCodePong, NOT_MASKED, NULL}};
+      {FINAL_FRAME, WebSocketFrameHeader::kOpCodePong, NOT_MASKED, nullptr}};
   stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames);
   set_stream(std::move(stream));
   deleting_ = EVENT_ON_FAIL_CHANNEL;
 
   CreateChannelAndConnectSuccessfully();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, FailChannelDueToUnknownOpCode) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {{FINAL_FRAME, 0x7, NOT_MASKED, ""}};
   stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames);
@@ -1283,23 +1285,23 @@
   deleting_ = EVENT_ON_FAIL_CHANNEL;
 
   CreateChannelAndConnectSuccessfully();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, FailChannelDueToUnknownOpCodeNull) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
-  static const InitFrame frames[] = {{FINAL_FRAME, 0x7, NOT_MASKED, NULL}};
+  static const InitFrame frames[] = {{FINAL_FRAME, 0x7, NOT_MASKED, nullptr}};
   stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames);
   set_stream(std::move(stream));
   deleting_ = EVENT_ON_FAIL_CHANNEL;
 
   CreateChannelAndConnectSuccessfully();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelDeletingTest, FailChannelDueInvalidCloseReason) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose,
@@ -1309,7 +1311,7 @@
   deleting_ = EVENT_ON_FAIL_CHANNEL;
 
   CreateChannelAndConnectSuccessfully();
-  EXPECT_EQ(NULL, channel_.get());
+  EXPECT_EQ(nullptr, channel_.get());
 }
 
 TEST_F(WebSocketChannelEventInterfaceTest, ConnectSuccessReported) {
@@ -1345,7 +1347,7 @@
   CreateChannelAndConnect();
 
   connect_data_.creator.connect_delegate->OnSuccess(
-      scoped_ptr<WebSocketStream>(new FakeWebSocketStream("Bob", "")));
+      base::WrapUnique(new FakeWebSocketStream("Bob", "")));
 }
 
 TEST_F(WebSocketChannelEventInterfaceTest, ExtensionsPassed) {
@@ -1355,15 +1357,15 @@
 
   CreateChannelAndConnect();
 
-  connect_data_.creator.connect_delegate->OnSuccess(scoped_ptr<WebSocketStream>(
-      new FakeWebSocketStream("", "extension1, extension2")));
+  connect_data_.creator.connect_delegate->OnSuccess(
+      base::WrapUnique(new FakeWebSocketStream("", "extension1, extension2")));
 }
 
 // The first frames from the server can arrive together with the handshake, in
 // which case they will be available as soon as ReadFrames() is called the first
 // time.
 TEST_F(WebSocketChannelEventInterfaceTest, DataLeftFromHandshake) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}};
@@ -1385,7 +1387,7 @@
 // A remote server could accept the handshake, but then immediately send a
 // Close frame.
 TEST_F(WebSocketChannelEventInterfaceTest, CloseAfterHandshake) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose,
@@ -1411,7 +1413,7 @@
 // A remote server could close the connection immediately after sending the
 // handshake response (most likely a bug in the server).
 TEST_F(WebSocketChannelEventInterfaceTest, ConnectionCloseAfterHandshake) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   stream->PrepareReadFramesError(ReadableFakeWebSocketStream::SYNC,
                                  ERR_CONNECTION_CLOSED);
@@ -1428,7 +1430,7 @@
 }
 
 TEST_F(WebSocketChannelEventInterfaceTest, NormalAsyncRead) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}};
@@ -1458,7 +1460,7 @@
 // Extra data can arrive while a read is being processed, resulting in the next
 // read completing synchronously.
 TEST_F(WebSocketChannelEventInterfaceTest, AsyncThenSyncRead) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames1[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}};
@@ -1488,7 +1490,7 @@
 // Data frames are delivered the same regardless of how many reads they arrive
 // as.
 TEST_F(WebSocketChannelEventInterfaceTest, FragmentedMessage) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   // Here we have one message which arrived in five frames split across three
   // reads. It may have been reframed on arrival, but this class doesn't care
@@ -1539,12 +1541,12 @@
   base::MessageLoop::current()->RunUntilIdle();
 }
 
-// A message can consist of one frame with NULL payload.
+// A message can consist of one frame with null payload.
 TEST_F(WebSocketChannelEventInterfaceTest, NullMessage) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
-      {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, NULL}};
+      {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, nullptr}};
   stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames);
   set_stream(std::move(stream));
   EXPECT_CALL(*event_interface_, OnAddChannelResponse(_, _));
@@ -1557,7 +1559,7 @@
 
 // Connection closed by the remote host without a closing handshake.
 TEST_F(WebSocketChannelEventInterfaceTest, AsyncAbnormalClosure) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   stream->PrepareReadFramesError(ReadableFakeWebSocketStream::ASYNC,
                                  ERR_CONNECTION_CLOSED);
@@ -1576,7 +1578,7 @@
 
 // A connection reset should produce the same event as an unexpected closure.
 TEST_F(WebSocketChannelEventInterfaceTest, ConnectionReset) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   stream->PrepareReadFramesError(ReadableFakeWebSocketStream::ASYNC,
                                  ERR_CONNECTION_RESET);
@@ -1595,7 +1597,7 @@
 
 // RFC6455 5.1 "A client MUST close a connection if it detects a masked frame."
 TEST_F(WebSocketChannelEventInterfaceTest, MaskedFramesAreRejected) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, MASKED, "HELLO"}};
@@ -1619,7 +1621,7 @@
 // RFC6455 5.2 "If an unknown opcode is received, the receiving endpoint MUST
 // _Fail the WebSocket Connection_."
 TEST_F(WebSocketChannelEventInterfaceTest, UnknownOpCodeIsRejected) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {{FINAL_FRAME, 4, NOT_MASKED, "HELLO"}};
 
@@ -1640,7 +1642,7 @@
 // RFC6455 5.4 "Control frames ... MAY be injected in the middle of a
 // fragmented message."
 TEST_F(WebSocketChannelEventInterfaceTest, ControlFrameInDataMessage) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   // We have one message of type Text split into two frames. In the middle is a
   // control message of type Pong.
@@ -1675,12 +1677,12 @@
 }
 
 // It seems redundant to repeat the entirety of the above test, so just test a
-// Pong with NULL data.
+// Pong with null data.
 TEST_F(WebSocketChannelEventInterfaceTest, PongWithNullData) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
-      {FINAL_FRAME, WebSocketFrameHeader::kOpCodePong, NOT_MASKED, NULL}};
+      {FINAL_FRAME, WebSocketFrameHeader::kOpCodePong, NOT_MASKED, nullptr}};
   stream->PrepareReadFrames(ReadableFakeWebSocketStream::ASYNC, OK, frames);
   set_stream(std::move(stream));
   EXPECT_CALL(*event_interface_, OnAddChannelResponse(_, _));
@@ -1693,7 +1695,7 @@
 // If a frame has an invalid header, then the connection is closed and
 // subsequent frames must not trigger events.
 TEST_F(WebSocketChannelEventInterfaceTest, FrameAfterInvalidFrame) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {NOT_FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, MASKED, "HELLO"},
@@ -1718,7 +1720,7 @@
 // If the renderer sends lots of small writes, we don't want to update the quota
 // for each one.
 TEST_F(WebSocketChannelEventInterfaceTest, SmallWriteDoesntUpdateQuota) {
-  set_stream(make_scoped_ptr(new WriteableFakeWebSocketStream));
+  set_stream(base::WrapUnique(new WriteableFakeWebSocketStream));
   {
     InSequence s;
     EXPECT_CALL(*event_interface_, OnAddChannelResponse(_, _));
@@ -1732,7 +1734,7 @@
 // If we send enough to go below |send_quota_low_water_mark_| we should get our
 // quota refreshed.
 TEST_F(WebSocketChannelEventInterfaceTest, LargeWriteUpdatesQuota) {
-  set_stream(make_scoped_ptr(new WriteableFakeWebSocketStream));
+  set_stream(base::WrapUnique(new WriteableFakeWebSocketStream));
   // We use this checkpoint object to verify that the quota update comes after
   // the write.
   Checkpoint checkpoint;
@@ -1755,7 +1757,7 @@
 
 // Verify that our quota actually is refreshed when we are told it is.
 TEST_F(WebSocketChannelEventInterfaceTest, QuotaReallyIsRefreshed) {
-  set_stream(make_scoped_ptr(new WriteableFakeWebSocketStream));
+  set_stream(base::WrapUnique(new WriteableFakeWebSocketStream));
   Checkpoint checkpoint;
   {
     InSequence s;
@@ -1786,7 +1788,7 @@
 // If we send more than the available quota then the connection will be closed
 // with an error.
 TEST_F(WebSocketChannelEventInterfaceTest, WriteOverQuotaIsRejected) {
-  set_stream(make_scoped_ptr(new WriteableFakeWebSocketStream));
+  set_stream(base::WrapUnique(new WriteableFakeWebSocketStream));
   {
     InSequence s;
     EXPECT_CALL(*event_interface_, OnAddChannelResponse(_, _));
@@ -1802,7 +1804,7 @@
 
 // If a write fails, the channel is dropped.
 TEST_F(WebSocketChannelEventInterfaceTest, FailedWrite) {
-  set_stream(make_scoped_ptr(new UnWriteableFakeWebSocketStream));
+  set_stream(base::WrapUnique(new UnWriteableFakeWebSocketStream));
   Checkpoint checkpoint;
   {
     InSequence s;
@@ -1823,7 +1825,7 @@
 
 // OnDropChannel() is called exactly once when StartClosingHandshake() is used.
 TEST_F(WebSocketChannelEventInterfaceTest, SendCloseDropsChannel) {
-  set_stream(make_scoped_ptr(new EchoeyFakeWebSocketStream));
+  set_stream(base::WrapUnique(new EchoeyFakeWebSocketStream));
   {
     InSequence s;
     EXPECT_CALL(*event_interface_, OnAddChannelResponse(_, _));
@@ -1853,7 +1855,7 @@
 // OnDropChannel() is only called once when a write() on the socket triggers a
 // connection reset.
 TEST_F(WebSocketChannelEventInterfaceTest, OnDropChannelCalledOnce) {
-  set_stream(make_scoped_ptr(new ResetOnWriteFakeWebSocketStream));
+  set_stream(base::WrapUnique(new ResetOnWriteFakeWebSocketStream));
   EXPECT_CALL(*event_interface_, OnAddChannelResponse(_, _));
   EXPECT_CALL(*event_interface_, OnFlowControl(_));
 
@@ -1870,7 +1872,7 @@
 // When the remote server sends a Close frame with an empty payload,
 // WebSocketChannel should report code 1005, kWebSocketErrorNoStatusReceived.
 TEST_F(WebSocketChannelEventInterfaceTest, CloseWithNoPayloadGivesStatus1005) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, ""}};
@@ -1887,13 +1889,13 @@
   CreateChannelAndConnectSuccessfully();
 }
 
-// A version of the above test with NULL payload.
+// A version of the above test with null payload.
 TEST_F(WebSocketChannelEventInterfaceTest,
        CloseWithNullPayloadGivesStatus1005) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
-      {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, NULL}};
+      {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, nullptr}};
   stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames);
   stream->PrepareReadFramesError(ReadableFakeWebSocketStream::SYNC,
                                  ERR_CONNECTION_CLOSED);
@@ -1910,7 +1912,7 @@
 // If ReadFrames() returns ERR_WS_PROTOCOL_ERROR, then the connection must be
 // failed.
 TEST_F(WebSocketChannelEventInterfaceTest, SyncProtocolErrorGivesStatus1002) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   stream->PrepareReadFramesError(ReadableFakeWebSocketStream::SYNC,
                                  ERR_WS_PROTOCOL_ERROR);
@@ -1925,7 +1927,7 @@
 
 // Async version of above test.
 TEST_F(WebSocketChannelEventInterfaceTest, AsyncProtocolErrorGivesStatus1002) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   stream->PrepareReadFramesError(ReadableFakeWebSocketStream::ASYNC,
                                  ERR_WS_PROTOCOL_ERROR);
@@ -1949,7 +1951,7 @@
 
   CreateChannelAndConnectSuccessfully();
 
-  scoped_ptr<WebSocketHandshakeRequestInfo> request_info(
+  std::unique_ptr<WebSocketHandshakeRequestInfo> request_info(
       new WebSocketHandshakeRequestInfo(GURL("ws://www.example.com/"),
                                         base::Time()));
   connect_data_.creator.connect_delegate->OnStartOpeningHandshake(
@@ -1970,12 +1972,9 @@
 
   scoped_refptr<HttpResponseHeaders> response_headers(
       new HttpResponseHeaders(""));
-  scoped_ptr<WebSocketHandshakeResponseInfo> response_info(
-      new WebSocketHandshakeResponseInfo(GURL("ws://www.example.com/"),
-                                         200,
-                                         "OK",
-                                         response_headers,
-                                         base::Time()));
+  std::unique_ptr<WebSocketHandshakeResponseInfo> response_info(
+      new WebSocketHandshakeResponseInfo(GURL("ws://www.example.com/"), 200,
+                                         "OK", response_headers, base::Time()));
   connect_data_.creator.connect_delegate->OnFinishOpeningHandshake(
       std::move(response_info));
   base::MessageLoop::current()->RunUntilIdle();
@@ -1994,15 +1993,12 @@
   WebSocketStream::ConnectDelegate* connect_delegate =
       connect_data_.creator.connect_delegate.get();
   GURL url("ws://www.example.com/");
-  scoped_ptr<WebSocketHandshakeRequestInfo> request_info(
+  std::unique_ptr<WebSocketHandshakeRequestInfo> request_info(
       new WebSocketHandshakeRequestInfo(url, base::Time()));
   scoped_refptr<HttpResponseHeaders> response_headers(
       new HttpResponseHeaders(""));
-  scoped_ptr<WebSocketHandshakeResponseInfo> response_info(
-      new WebSocketHandshakeResponseInfo(url,
-                                         200,
-                                         "OK",
-                                         response_headers,
+  std::unique_ptr<WebSocketHandshakeResponseInfo> response_info(
+      new WebSocketHandshakeResponseInfo(url, 200, "OK", response_headers,
                                          base::Time()));
   connect_delegate->OnStartOpeningHandshake(std::move(request_info));
   connect_delegate->OnFinishOpeningHandshake(std::move(response_info));
@@ -2014,7 +2010,7 @@
 // Any frame after close is invalid. This test uses a Text frame. See also
 // test "PingAfterCloseIfRejected".
 TEST_F(WebSocketChannelEventInterfaceTest, DataAfterCloseIsRejected) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED,
@@ -2038,7 +2034,7 @@
 // A Close frame with a one-byte payload elicits a specific console error
 // message.
 TEST_F(WebSocketChannelEventInterfaceTest, OneByteClosePayloadMessage) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, "\x03"}};
@@ -2057,7 +2053,7 @@
 // A Close frame with a reserved status code also elicits a specific console
 // error message.
 TEST_F(WebSocketChannelEventInterfaceTest, ClosePayloadReservedStatusMessage) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose,
@@ -2077,7 +2073,7 @@
 // A Close frame with invalid UTF-8 also elicits a specific console error
 // message.
 TEST_F(WebSocketChannelEventInterfaceTest, ClosePayloadInvalidReason) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose,
@@ -2097,14 +2093,14 @@
 // The reserved bits must all be clear on received frames. Extensions should
 // clear the bits when they are set correctly before passing on the frame.
 TEST_F(WebSocketChannelEventInterfaceTest, ReservedBitsMustNotBeSet) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText,
        NOT_MASKED,  "sakana"}};
   // It is not worth adding support for reserved bits to InitFrame just for this
   // one test, so set the bit manually.
-  std::vector<scoped_ptr<WebSocketFrame>> raw_frames =
+  std::vector<std::unique_ptr<WebSocketFrame>> raw_frames =
       CreateFrameVector(frames);
   raw_frames[0]->header.reserved1 = true;
   stream->PrepareRawReadFrames(ReadableFakeWebSocketStream::SYNC, OK,
@@ -2124,7 +2120,7 @@
 // response to the client Close message is received.
 TEST_F(WebSocketChannelEventInterfaceTest,
        ClientInitiatedClosingHandshakeTimesOut) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   stream->PrepareReadFramesError(ReadableFakeWebSocketStream::SYNC,
                                  ERR_IO_PENDING);
@@ -2160,7 +2156,7 @@
 // message is received but the connection isn't closed by the remote host.
 TEST_F(WebSocketChannelEventInterfaceTest,
        ServerInitiatedClosingHandshakeTimesOut) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose,
@@ -2308,7 +2304,7 @@
 // A message that needs to be split into frames to fit within quota should
 // maintain correct semantics.
 TEST_F(WebSocketChannelFlowControlTest, SingleFrameMessageSplitSync) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "FOUR"}};
@@ -2339,7 +2335,7 @@
 // The code path for async messages is slightly different, so test it
 // separately.
 TEST_F(WebSocketChannelFlowControlTest, SingleFrameMessageSplitAsync) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "FOUR"}};
@@ -2381,7 +2377,7 @@
 // necessary. The complexity/performance tradeoffs here need further
 // examination.
 TEST_F(WebSocketChannelFlowControlTest, MultipleFrameSplit) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {NOT_FINAL_FRAME, WebSocketFrameHeader::kOpCodeText,
@@ -2425,15 +2421,14 @@
 // An empty message handled when we are out of quota must not be delivered
 // out-of-order with respect to other messages.
 TEST_F(WebSocketChannelFlowControlTest, EmptyMessageNoQuota) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
-      {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText,
-       NOT_MASKED,  "FIRST MESSAGE"},
-      {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText,
-       NOT_MASKED,  NULL},
-      {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText,
-       NOT_MASKED,  "THIRD MESSAGE"}};
+      {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED,
+       "FIRST MESSAGE"},
+      {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, nullptr},
+      {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED,
+       "THIRD MESSAGE"}};
   stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames);
   set_stream(std::move(stream));
   {
@@ -2464,7 +2459,7 @@
 
 // A close frame should not overtake data frames.
 TEST_F(WebSocketChannelFlowControlTest, CloseFrameShouldNotOvertakeDataFrames) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {NOT_FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED,
@@ -2582,7 +2577,7 @@
   // We store the parameters that were passed to ReadFrames() so that we can
   // call them explicitly later.
   CompletionCallback read_callback;
-  std::vector<scoped_ptr<WebSocketFrame>>* frames = NULL;
+  std::vector<std::unique_ptr<WebSocketFrame>>* frames = nullptr;
 
   // These are not interesting.
   EXPECT_CALL(*mock_stream_, GetSubProtocol()).Times(AnyNumber());
@@ -2677,7 +2672,7 @@
 
 TEST_F(WebSocketChannelStreamTest, Code1005IsNotEchoedNull) {
   static const InitFrame frames[] = {
-      {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, NULL}};
+      {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, nullptr}};
   static const InitFrame expected[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, MASKED, ""}};
   EXPECT_CALL(*mock_stream_, GetSubProtocol()).Times(AnyNumber());
@@ -2736,13 +2731,13 @@
   CreateChannelAndConnectSuccessfully();
 }
 
-// A ping with a NULL payload should be responded to with a Pong with a NULL
+// A ping with a null payload should be responded to with a Pong with a null
 // payload.
 TEST_F(WebSocketChannelStreamTest, NullPingRepliedWithNullPong) {
   static const InitFrame frames[] = {
-      {FINAL_FRAME, WebSocketFrameHeader::kOpCodePing, NOT_MASKED, NULL}};
+      {FINAL_FRAME, WebSocketFrameHeader::kOpCodePing, NOT_MASKED, nullptr}};
   static const InitFrame expected[] = {
-      {FINAL_FRAME, WebSocketFrameHeader::kOpCodePong, MASKED, NULL}};
+      {FINAL_FRAME, WebSocketFrameHeader::kOpCodePong, MASKED, nullptr}};
   EXPECT_CALL(*mock_stream_, GetSubProtocol()).Times(AnyNumber());
   EXPECT_CALL(*mock_stream_, GetExtensions()).Times(AnyNumber());
   EXPECT_CALL(*mock_stream_, ReadFrames(_, _))
@@ -2766,7 +2761,7 @@
   static const InitFrame expected3[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeContinuation,
        MASKED,      "World"}};
-  std::vector<scoped_ptr<WebSocketFrame>>* read_frames;
+  std::vector<std::unique_ptr<WebSocketFrame>>* read_frames;
   CompletionCallback read_callback;
   EXPECT_CALL(*mock_stream_, GetSubProtocol()).Times(AnyNumber());
   EXPECT_CALL(*mock_stream_, GetExtensions()).Times(AnyNumber());
@@ -2887,7 +2882,7 @@
 // protocol also has Binary frames and those need to be 8-bit clean. For the
 // sake of completeness, this test verifies that they are.
 TEST_F(WebSocketChannelStreamTest, WrittenBinaryFramesAre8BitClean) {
-  std::vector<scoped_ptr<WebSocketFrame>>* frames = NULL;
+  std::vector<std::unique_ptr<WebSocketFrame>>* frames = nullptr;
 
   EXPECT_CALL(*mock_stream_, GetSubProtocol()).Times(AnyNumber());
   EXPECT_CALL(*mock_stream_, GetExtensions()).Times(AnyNumber());
@@ -2900,7 +2895,7 @@
       true,
       WebSocketFrameHeader::kOpCodeBinary,
       std::vector<char>(kBinaryBlob, kBinaryBlob + kBinaryBlobSize));
-  ASSERT_TRUE(frames != NULL);
+  ASSERT_TRUE(frames != nullptr);
   ASSERT_EQ(1U, frames->size());
   const WebSocketFrame* out_frame = (*frames)[0].get();
   EXPECT_EQ(kBinaryBlobSize, out_frame->header.payload_length);
@@ -2910,16 +2905,16 @@
 
 // Test the read path for 8-bit cleanliness as well.
 TEST_F(WebSocketChannelEventInterfaceTest, ReadBinaryFramesAre8BitClean) {
-  scoped_ptr<WebSocketFrame> frame(
+  std::unique_ptr<WebSocketFrame> frame(
       new WebSocketFrame(WebSocketFrameHeader::kOpCodeBinary));
   WebSocketFrameHeader& frame_header = frame->header;
   frame_header.final = true;
   frame_header.payload_length = kBinaryBlobSize;
   frame->data = new IOBuffer(kBinaryBlobSize);
   memcpy(frame->data->data(), kBinaryBlob, kBinaryBlobSize);
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   frames.push_back(std::move(frame));
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   stream->PrepareRawReadFrames(ReadableFakeWebSocketStream::SYNC, OK,
                                std::move(frames));
@@ -3034,7 +3029,7 @@
 
 // UTF-8 validation is enforced on received Text frames.
 TEST_F(WebSocketChannelEventInterfaceTest, ReceivedInvalidUtf8) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "\xff"}};
@@ -3223,7 +3218,7 @@
 
 // A new data message cannot start in the middle of another data message.
 TEST_F(WebSocketChannelEventInterfaceTest, BogusContinuation) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {NOT_FINAL_FRAME, WebSocketFrameHeader::kOpCodeBinary,
@@ -3249,7 +3244,7 @@
 
 // A new message cannot start with a Continuation frame.
 TEST_F(WebSocketChannelEventInterfaceTest, MessageStartingWithContinuation) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {FINAL_FRAME, WebSocketFrameHeader::kOpCodeContinuation,
@@ -3268,7 +3263,7 @@
 // A frame passed to the renderer must be either non-empty or have the final bit
 // set.
 TEST_F(WebSocketChannelEventInterfaceTest, DataFramesNonEmptyOrFinal) {
-  scoped_ptr<ReadableFakeWebSocketStream> stream(
+  std::unique_ptr<ReadableFakeWebSocketStream> stream(
       new ReadableFakeWebSocketStream);
   static const InitFrame frames[] = {
       {NOT_FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, ""},
@@ -3294,7 +3289,7 @@
   connect_data_.socket_url = wss_url;
   const SSLInfo ssl_info;
   const bool fatal = true;
-  scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks> fake_callbacks(
+  std::unique_ptr<WebSocketEventInterface::SSLErrorCallbacks> fake_callbacks(
       new FakeSSLErrorCallbacks);
 
   EXPECT_CALL(*event_interface_,
@@ -3445,7 +3440,7 @@
   EXPECT_CALL(*mock_stream_, GetSubProtocol()).Times(AnyNumber());
   EXPECT_CALL(*mock_stream_, GetExtensions()).Times(AnyNumber());
   TestClosure completion;
-  std::vector<scoped_ptr<WebSocketFrame>>* read_frames = NULL;
+  std::vector<std::unique_ptr<WebSocketFrame>>* read_frames = nullptr;
   CompletionCallback read_callback;
   {
     InSequence s;
@@ -3489,7 +3484,7 @@
 // Verify that current_send_quota() is updated when SendFrame() is called.
 TEST_F(WebSocketChannelTest, CurrentSendQuotaUpdated) {
   const int kMessageSize = 5;
-  set_stream(make_scoped_ptr(new WriteableFakeWebSocketStream));
+  set_stream(base::WrapUnique(new WriteableFakeWebSocketStream));
   CreateChannelAndConnectSuccessfully();
 
   int initial_send_quota = channel_->current_send_quota();
diff --git a/net/websockets/websocket_deflate_predictor.h b/net/websockets/websocket_deflate_predictor.h
index 38566dd..fde316e 100644
--- a/net/websockets/websocket_deflate_predictor.h
+++ b/net/websockets/websocket_deflate_predictor.h
@@ -7,9 +7,9 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
@@ -41,8 +41,9 @@
   // but future frames may contain control message frames.
   // |frames[frame_index]| cannot be recorded yet and all preceding
   // data frames have to be already recorded when this method is called.
-  virtual Result Predict(const std::vector<scoped_ptr<WebSocketFrame>>& frames,
-                         size_t frame_index) = 0;
+  virtual Result Predict(
+      const std::vector<std::unique_ptr<WebSocketFrame>>& frames,
+      size_t frame_index) = 0;
 
   // Records frame data for future prediction.
   // Only data frames should be recorded. Do not pass control frames' data.
diff --git a/net/websockets/websocket_deflate_predictor_impl.cc b/net/websockets/websocket_deflate_predictor_impl.cc
index 7736607..60120008 100644
--- a/net/websockets/websocket_deflate_predictor_impl.cc
+++ b/net/websockets/websocket_deflate_predictor_impl.cc
@@ -9,7 +9,7 @@
 typedef WebSocketDeflatePredictor::Result Result;
 
 Result WebSocketDeflatePredictorImpl::Predict(
-    const std::vector<scoped_ptr<WebSocketFrame>>& frames,
+    const std::vector<std::unique_ptr<WebSocketFrame>>& frames,
     size_t frame_index) {
   return DEFLATE;
 }
diff --git a/net/websockets/websocket_deflate_predictor_impl.h b/net/websockets/websocket_deflate_predictor_impl.h
index 6086431..3a0b09c 100644
--- a/net/websockets/websocket_deflate_predictor_impl.h
+++ b/net/websockets/websocket_deflate_predictor_impl.h
@@ -7,9 +7,9 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/websockets/websocket_deflate_predictor.h"
 
@@ -22,7 +22,7 @@
  public:
   ~WebSocketDeflatePredictorImpl() override {}
 
-  Result Predict(const std::vector<scoped_ptr<WebSocketFrame>>& frames,
+  Result Predict(const std::vector<std::unique_ptr<WebSocketFrame>>& frames,
                  size_t frame_index) override;
   void RecordInputDataFrame(const WebSocketFrame* frame) override;
   void RecordWrittenDataFrame(const WebSocketFrame* frame) override;
diff --git a/net/websockets/websocket_deflate_predictor_impl_test.cc b/net/websockets/websocket_deflate_predictor_impl_test.cc
index 279ca48..191232da 100644
--- a/net/websockets/websocket_deflate_predictor_impl_test.cc
+++ b/net/websockets/websocket_deflate_predictor_impl_test.cc
@@ -6,6 +6,7 @@
 
 #include <vector>
 
+#include "base/memory/ptr_util.h"
 #include "net/websockets/websocket_frame.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -17,9 +18,9 @@
 
 TEST(WebSocketDeflatePredictorImpl, Predict) {
   WebSocketDeflatePredictorImpl predictor;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   frames.push_back(
-      make_scoped_ptr(new WebSocketFrame(WebSocketFrameHeader::kOpCodeText)));
+      base::WrapUnique(new WebSocketFrame(WebSocketFrameHeader::kOpCodeText)));
   Result result = predictor.Predict(frames, 0);
 
   EXPECT_EQ(WebSocketDeflatePredictor::DEFLATE, result);
diff --git a/net/websockets/websocket_deflate_stream.cc b/net/websockets/websocket_deflate_stream.cc
index 798d9b7..52814935 100644
--- a/net/websockets/websocket_deflate_stream.cc
+++ b/net/websockets/websocket_deflate_stream.cc
@@ -5,7 +5,9 @@
 #include "net/websockets/websocket_deflate_stream.h"
 
 #include <stdint.h>
+
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
@@ -13,7 +15,6 @@
 #include "base/bind.h"
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/io_buffer.h"
 #include "net/base/net_errors.h"
@@ -37,9 +38,9 @@
 }  // namespace
 
 WebSocketDeflateStream::WebSocketDeflateStream(
-    scoped_ptr<WebSocketStream> stream,
+    std::unique_ptr<WebSocketStream> stream,
     const WebSocketDeflateParameters& params,
-    scoped_ptr<WebSocketDeflatePredictor> predictor)
+    std::unique_ptr<WebSocketDeflatePredictor> predictor)
     : stream_(std::move(stream)),
       deflater_(params.client_context_take_over_mode()),
       inflater_(kChunkSize, kChunkSize),
@@ -62,7 +63,7 @@
 WebSocketDeflateStream::~WebSocketDeflateStream() {}
 
 int WebSocketDeflateStream::ReadFrames(
-    std::vector<scoped_ptr<WebSocketFrame>>* frames,
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames,
     const CompletionCallback& callback) {
   int result = stream_->ReadFrames(
       frames,
@@ -79,7 +80,7 @@
 }
 
 int WebSocketDeflateStream::WriteFrames(
-    std::vector<scoped_ptr<WebSocketFrame>>* frames,
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames,
     const CompletionCallback& callback) {
   int result = Deflate(frames);
   if (result != OK)
@@ -100,7 +101,7 @@
 }
 
 void WebSocketDeflateStream::OnReadComplete(
-    std::vector<scoped_ptr<WebSocketFrame>>* frames,
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames,
     const CompletionCallback& callback,
     int result) {
   if (result != OK) {
@@ -115,11 +116,11 @@
 }
 
 int WebSocketDeflateStream::Deflate(
-    std::vector<scoped_ptr<WebSocketFrame>>* frames) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_write;
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames) {
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_write;
   // Store frames of the currently processed message if writing_state_ equals to
   // WRITING_POSSIBLY_COMPRESSED_MESSAGE.
-  std::vector<scoped_ptr<WebSocketFrame>> frames_of_message;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_of_message;
   for (size_t i = 0; i < frames->size(); ++i) {
     DCHECK(!(*frames)[i]->header.reserved1);
     if (!WebSocketFrameHeader::IsKnownDataOpCode((*frames)[i]->header.opcode)) {
@@ -129,7 +130,7 @@
     if (writing_state_ == NOT_WRITING)
       OnMessageStart(*frames, i);
 
-    scoped_ptr<WebSocketFrame> frame(std::move((*frames)[i]));
+    std::unique_ptr<WebSocketFrame> frame(std::move((*frames)[i]));
     predictor_->RecordInputDataFrame(frame.get());
 
     if (writing_state_ == WRITING_UNCOMPRESSED_MESSAGE) {
@@ -183,7 +184,7 @@
 }
 
 void WebSocketDeflateStream::OnMessageStart(
-    const std::vector<scoped_ptr<WebSocketFrame>>& frames,
+    const std::vector<std::unique_ptr<WebSocketFrame>>& frames,
     size_t index) {
   WebSocketFrame* frame = frames[index].get();
   current_writing_opcode_ = frame->header.opcode;
@@ -208,7 +209,7 @@
 
 int WebSocketDeflateStream::AppendCompressedFrame(
     const WebSocketFrameHeader& header,
-    std::vector<scoped_ptr<WebSocketFrame>>* frames_to_write) {
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames_to_write) {
   const WebSocketFrameHeader::OpCode opcode = current_writing_opcode_;
   scoped_refptr<IOBufferWithSize> compressed_payload =
       deflater_.GetOutput(deflater_.CurrentOutputSize());
@@ -217,7 +218,7 @@
              << "deflater_.GetOutput() returns an error.";
     return ERR_WS_PROTOCOL_ERROR;
   }
-  scoped_ptr<WebSocketFrame> compressed(new WebSocketFrame(opcode));
+  std::unique_ptr<WebSocketFrame> compressed(new WebSocketFrame(opcode));
   compressed->header.CopyFrom(header);
   compressed->header.opcode = opcode;
   compressed->header.final = header.final;
@@ -233,8 +234,8 @@
 }
 
 int WebSocketDeflateStream::AppendPossiblyCompressedMessage(
-    std::vector<scoped_ptr<WebSocketFrame>>* frames,
-    std::vector<scoped_ptr<WebSocketFrame>>* frames_to_write) {
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames,
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames_to_write) {
   DCHECK(!frames->empty());
 
   const WebSocketFrameHeader::OpCode opcode = current_writing_opcode_;
@@ -261,14 +262,14 @@
       static_cast<uint64_t>(compressed_payload->size())) {
     // Compression is not effective. Use the original frames.
     for (size_t i = 0; i < frames->size(); ++i) {
-      scoped_ptr<WebSocketFrame> frame = std::move((*frames)[i]);
+      std::unique_ptr<WebSocketFrame> frame = std::move((*frames)[i]);
       predictor_->RecordWrittenDataFrame(frame.get());
       frames_to_write->push_back(std::move(frame));
     }
     frames->clear();
     return OK;
   }
-  scoped_ptr<WebSocketFrame> compressed(new WebSocketFrame(opcode));
+  std::unique_ptr<WebSocketFrame> compressed(new WebSocketFrame(opcode));
   compressed->header.CopyFrom((*frames)[0]->header);
   compressed->header.opcode = opcode;
   compressed->header.final = true;
@@ -282,12 +283,12 @@
 }
 
 int WebSocketDeflateStream::Inflate(
-    std::vector<scoped_ptr<WebSocketFrame>>* frames) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
-  std::vector<scoped_ptr<WebSocketFrame>> frames_passed;
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames) {
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_passed;
   frames->swap(frames_passed);
   for (size_t i = 0; i < frames_passed.size(); ++i) {
-    scoped_ptr<WebSocketFrame> frame(std::move(frames_passed[i]));
+    std::unique_ptr<WebSocketFrame> frame(std::move(frames_passed[i]));
     frames_passed[i] = NULL;
     DVLOG(3) << "Input frame: opcode=" << frame->header.opcode
              << " final=" << frame->header.final
@@ -342,7 +343,7 @@
       while (inflater_.CurrentOutputSize() >= kChunkSize ||
              frame->header.final) {
         size_t size = std::min(kChunkSize, inflater_.CurrentOutputSize());
-        scoped_ptr<WebSocketFrame> inflated(
+        std::unique_ptr<WebSocketFrame> inflated(
             new WebSocketFrame(WebSocketFrameHeader::kOpCodeText));
         scoped_refptr<IOBufferWithSize> data = inflater_.GetOutput(size);
         bool is_final = !inflater_.CurrentOutputSize() && frame->header.final;
@@ -375,7 +376,7 @@
 }
 
 int WebSocketDeflateStream::InflateAndReadIfNecessary(
-    std::vector<scoped_ptr<WebSocketFrame>>* frames,
+    std::vector<std::unique_ptr<WebSocketFrame>>* frames,
     const CompletionCallback& callback) {
   int result = Inflate(frames);
   while (result == ERR_IO_PENDING) {
diff --git a/net/websockets/websocket_deflate_stream.h b/net/websockets/websocket_deflate_stream.h
index 6143d0d..bcccd06 100644
--- a/net/websockets/websocket_deflate_stream.h
+++ b/net/websockets/websocket_deflate_stream.h
@@ -7,11 +7,11 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
 #include "net/websockets/websocket_deflater.h"
@@ -42,15 +42,15 @@
 // [1]: http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-12
 class NET_EXPORT_PRIVATE WebSocketDeflateStream : public WebSocketStream {
  public:
-  WebSocketDeflateStream(scoped_ptr<WebSocketStream> stream,
+  WebSocketDeflateStream(std::unique_ptr<WebSocketStream> stream,
                          const WebSocketDeflateParameters& params,
-                         scoped_ptr<WebSocketDeflatePredictor> predictor);
+                         std::unique_ptr<WebSocketDeflatePredictor> predictor);
   ~WebSocketDeflateStream() override;
 
   // WebSocketStream functions.
-  int ReadFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int ReadFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                  const CompletionCallback& callback) override;
-  int WriteFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int WriteFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                   const CompletionCallback& callback) override;
   void Close() override;
   std::string GetSubProtocol() const override;
@@ -71,35 +71,37 @@
   };
 
   // Handles asynchronous completion of ReadFrames() call on |stream_|.
-  void OnReadComplete(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  void OnReadComplete(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                       const CompletionCallback& callback,
                       int result);
 
   // This function deflates |frames| and stores the result to |frames| itself.
-  int Deflate(std::vector<scoped_ptr<WebSocketFrame>>* frames);
-  void OnMessageStart(const std::vector<scoped_ptr<WebSocketFrame>>& frames,
-                      size_t index);
+  int Deflate(std::vector<std::unique_ptr<WebSocketFrame>>* frames);
+  void OnMessageStart(
+      const std::vector<std::unique_ptr<WebSocketFrame>>& frames,
+      size_t index);
   int AppendCompressedFrame(
       const WebSocketFrameHeader& header,
-      std::vector<scoped_ptr<WebSocketFrame>>* frames_to_write);
+      std::vector<std::unique_ptr<WebSocketFrame>>* frames_to_write);
   int AppendPossiblyCompressedMessage(
-      std::vector<scoped_ptr<WebSocketFrame>>* frames,
-      std::vector<scoped_ptr<WebSocketFrame>>* frames_to_write);
+      std::vector<std::unique_ptr<WebSocketFrame>>* frames,
+      std::vector<std::unique_ptr<WebSocketFrame>>* frames_to_write);
 
   // This function inflates |frames| and stores the result to |frames| itself.
-  int Inflate(std::vector<scoped_ptr<WebSocketFrame>>* frames);
+  int Inflate(std::vector<std::unique_ptr<WebSocketFrame>>* frames);
 
-  int InflateAndReadIfNecessary(std::vector<scoped_ptr<WebSocketFrame>>* frames,
-                                const CompletionCallback& callback);
+  int InflateAndReadIfNecessary(
+      std::vector<std::unique_ptr<WebSocketFrame>>* frames,
+      const CompletionCallback& callback);
 
-  const scoped_ptr<WebSocketStream> stream_;
+  const std::unique_ptr<WebSocketStream> stream_;
   WebSocketDeflater deflater_;
   WebSocketInflater inflater_;
   ReadingState reading_state_;
   WritingState writing_state_;
   WebSocketFrameHeader::OpCode current_reading_opcode_;
   WebSocketFrameHeader::OpCode current_writing_opcode_;
-  scoped_ptr<WebSocketDeflatePredictor> predictor_;
+  std::unique_ptr<WebSocketDeflatePredictor> predictor_;
 
   DISALLOW_COPY_AND_ASSIGN(WebSocketDeflateStream);
 };
diff --git a/net/websockets/websocket_deflate_stream_test.cc b/net/websockets/websocket_deflate_stream_test.cc
index a470e2a2..5106df7 100644
--- a/net/websockets/websocket_deflate_stream_test.cc
+++ b/net/websockets/websocket_deflate_stream_test.cc
@@ -6,16 +6,18 @@
 
 #include <stddef.h>
 #include <stdint.h>
+
 #include <deque>
 #include <iterator>
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
 
 #include "base/bind.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/completion_callback.h"
 #include "net/base/io_buffer.h"
 #include "net/base/net_errors.h"
@@ -76,15 +78,15 @@
                            : "";
 }
 
-std::string ToString(const scoped_ptr<WebSocketFrame>& frame) {
+std::string ToString(const std::unique_ptr<WebSocketFrame>& frame) {
   return ToString(frame.get());
 }
 
-void AppendTo(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+void AppendTo(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
               WebSocketFrameHeader::OpCode opcode,
               FrameFlag flag,
               const std::string& data) {
-  scoped_ptr<WebSocketFrame> frame(new WebSocketFrame(opcode));
+  std::unique_ptr<WebSocketFrame> frame(new WebSocketFrame(opcode));
   frame->header.final = (flag & kFinal);
   frame->header.reserved1 = (flag & kReserved1);
   frame->data = ToIOBuffer(data);
@@ -92,10 +94,10 @@
   frames->push_back(std::move(frame));
 }
 
-void AppendTo(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+void AppendTo(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
               WebSocketFrameHeader::OpCode opcode,
               FrameFlag flag) {
-  scoped_ptr<WebSocketFrame> frame(new WebSocketFrame(opcode));
+  std::unique_ptr<WebSocketFrame> frame(new WebSocketFrame(opcode));
   frame->header.final = (flag & kFinal);
   frame->header.reserved1 = (flag & kReserved1);
   frames->push_back(std::move(frame));
@@ -104,10 +106,10 @@
 class MockWebSocketStream : public WebSocketStream {
  public:
   MOCK_METHOD2(ReadFrames,
-               int(std::vector<scoped_ptr<WebSocketFrame>>*,
+               int(std::vector<std::unique_ptr<WebSocketFrame>>*,
                    const CompletionCallback&));
   MOCK_METHOD2(WriteFrames,
-               int(std::vector<scoped_ptr<WebSocketFrame>>*,
+               int(std::vector<std::unique_ptr<WebSocketFrame>>*,
                    const CompletionCallback&));
   MOCK_METHOD0(Close, void());
   MOCK_CONST_METHOD0(GetSubProtocol, std::string());
@@ -134,7 +136,7 @@
   }
 
   // WebSocketDeflatePredictor functions.
-  Result Predict(const std::vector<scoped_ptr<WebSocketFrame>>& frames,
+  Result Predict(const std::vector<std::unique_ptr<WebSocketFrame>>& frames,
                  size_t frame_index) override {
     return result_;
   }
@@ -189,11 +191,12 @@
     frames_written_.pop_front();
   }
   void AddFramesToBeInput(
-      const std::vector<scoped_ptr<WebSocketFrame>>& frames) {
+      const std::vector<std::unique_ptr<WebSocketFrame>>& frames) {
     for (size_t i = 0; i < frames.size(); ++i)
       AddFrameToBeInput(frames[i].get());
   }
-  void VerifySentFrames(const std::vector<scoped_ptr<WebSocketFrame>>& frames) {
+  void VerifySentFrames(
+      const std::vector<std::unique_ptr<WebSocketFrame>>& frames) {
     for (size_t i = 0; i < frames.size(); ++i)
       VerifySentFrame(frames[i].get());
   }
@@ -241,11 +244,11 @@
     mock_stream_ = new testing::StrictMock<MockWebSocketStream>;
     predictor_ = new WebSocketDeflatePredictorMock;
     deflate_stream_.reset(new WebSocketDeflateStream(
-        scoped_ptr<WebSocketStream>(mock_stream_), parameters,
-        scoped_ptr<WebSocketDeflatePredictor>(predictor_)));
+        std::unique_ptr<WebSocketStream>(mock_stream_), parameters,
+        std::unique_ptr<WebSocketDeflatePredictor>(predictor_)));
   }
 
-  scoped_ptr<WebSocketDeflateStream> deflate_stream_;
+  std::unique_ptr<WebSocketDeflateStream> deflate_stream_;
   // Owned by |deflate_stream_|.
   MockWebSocketStream* mock_stream_;
   // Owned by |deflate_stream_|.
@@ -290,7 +293,7 @@
   }
 
  protected:
-  std::vector<scoped_ptr<WebSocketFrame>> frames_;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_;
 };
 
 // ReadFrameStub is a stub for WebSocketStream::ReadFrames.
@@ -301,12 +304,12 @@
   explicit ReadFramesStub(int result) : result_(result) {}
 
   ReadFramesStub(int result,
-                 std::vector<scoped_ptr<WebSocketFrame>>* frames_to_output)
+                 std::vector<std::unique_ptr<WebSocketFrame>>* frames_to_output)
       : result_(result) {
     frames_to_output_.swap(*frames_to_output);
   }
 
-  int Call(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int Call(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
            const CompletionCallback& callback) {
     DCHECK(frames->empty());
     frames_passed_ = frames;
@@ -317,15 +320,15 @@
 
   int result() const { return result_; }
   const CompletionCallback& callback() const { return callback_; }
-  std::vector<scoped_ptr<WebSocketFrame>>* frames_passed() {
+  std::vector<std::unique_ptr<WebSocketFrame>>* frames_passed() {
     return frames_passed_;
   }
 
  private:
   int result_;
   CompletionCallback callback_;
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output_;
-  std::vector<scoped_ptr<WebSocketFrame>>* frames_passed_;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output_;
+  std::vector<std::unique_ptr<WebSocketFrame>>* frames_passed_;
 };
 
 // WriteFramesStub is a stub for WebSocketStream::WriteFrames.
@@ -337,7 +340,7 @@
                            int result)
       : result_(result), predictor_(predictor) {}
 
-  int Call(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  int Call(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
            const CompletionCallback& callback) {
     frames_.insert(frames_.end(), std::make_move_iterator(frames->begin()),
                    std::make_move_iterator(frames->end()));
@@ -349,17 +352,17 @@
 
   int result() const { return result_; }
   const CompletionCallback& callback() const { return callback_; }
-  std::vector<scoped_ptr<WebSocketFrame>>* frames() { return &frames_; }
+  std::vector<std::unique_ptr<WebSocketFrame>>* frames() { return &frames_; }
 
  private:
   int result_;
   CompletionCallback callback_;
-  std::vector<scoped_ptr<WebSocketFrame>> frames_;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_;
   WebSocketDeflatePredictorMock* predictor_;
 };
 
 TEST_F(WebSocketDeflateStreamTest, ReadFailedImmediately) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   CompletionCallback callback;
   {
     InSequence s;
@@ -370,13 +373,13 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, ReadUncompressedFrameImmediately) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kFinal,
            "hello");
   ReadFramesStub stub(OK, &frames_to_output);
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -394,7 +397,7 @@
 
 TEST_F(WebSocketDeflateStreamTest, ReadUncompressedFrameAsync) {
   ReadFramesStub stub(ERR_IO_PENDING);
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   MockCallback mock_callback, checkpoint;
   CompletionCallback callback =
       base::Bind(&MockCallback::Call, base::Unretained(&mock_callback));
@@ -425,7 +428,7 @@
 
 TEST_F(WebSocketDeflateStreamTest, ReadFailedAsync) {
   ReadFramesStub stub(ERR_IO_PENDING);
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   MockCallback mock_callback, checkpoint;
   CompletionCallback callback =
       base::Bind(&MockCallback::Call, base::Unretained(&mock_callback));
@@ -451,14 +454,14 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, ReadCompressedFrameImmediately) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kFinal | kReserved1,
            std::string("\xf2\x48\xcd\xc9\xc9\x07\x00", 7));
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   {
     InSequence s;
     EXPECT_CALL(*mock_stream_, ReadFrames(&frames, _))
@@ -477,7 +480,7 @@
   MockCallback mock_callback, checkpoint;
   CompletionCallback callback =
       base::Bind(&MockCallback::Call, base::Unretained(&mock_callback));
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   {
     InSequence s;
     EXPECT_CALL(*mock_stream_, ReadFrames(&frames, _))
@@ -504,7 +507,7 @@
 
 TEST_F(WebSocketDeflateStreamTest,
        ReadCompressedFrameFragmentImmediatelyButInflaterReturnsPending) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   const std::string data1("\xf2", 1);
   const std::string data2("\x48\xcd\xc9\xc9\x07\x00", 6);
   AppendTo(&frames_to_output,
@@ -515,7 +518,7 @@
   MockCallback mock_callback, checkpoint;
   CompletionCallback callback =
       base::Bind(&MockCallback::Call, base::Unretained(&mock_callback));
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -545,14 +548,14 @@
 
 TEST_F(WebSocketDeflateStreamTest, ReadInvalidCompressedPayload) {
   const std::string data("\xf2\x48\xcdINVALID", 10);
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kFinal | kReserved1,
            data);
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -567,7 +570,7 @@
 TEST_F(WebSocketDeflateStreamTest, MergeMultipleFramesInReadFrames) {
   const std::string data1("\xf2\x48\xcd", 3);
   const std::string data2("\xc9\xc9\x07\x00", 4);
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kReserved1,
@@ -578,7 +581,7 @@
            data2);
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -594,7 +597,7 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, ReadUncompressedEmptyFrames) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kNoFlag);
@@ -603,7 +606,7 @@
            kFinal);
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -624,7 +627,7 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, ReadCompressedEmptyFrames) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kReserved1,
@@ -634,7 +637,7 @@
            kFinal);
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -652,7 +655,7 @@
 TEST_F(WebSocketDeflateStreamTest,
        ReadCompressedFrameFollowedByEmptyFrame) {
   const std::string data("\xf2\x48\xcd\xc9\xc9\x07\x00", 7);
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kReserved1,
@@ -662,7 +665,7 @@
            kFinal);
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -680,7 +683,7 @@
 TEST_F(WebSocketDeflateStreamTest, ReadControlFrameBetweenDataFrames) {
   const std::string data1("\xf2\x48\xcd", 3);
   const std::string data2("\xc9\xc9\x07\x00", 4);
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kReserved1,
@@ -689,7 +692,7 @@
   AppendTo(&frames_to_output, WebSocketFrameHeader::kOpCodeText, kFinal, data2);
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -715,7 +718,7 @@
   deflater.AddBytes(original_data.data(), original_data.size());
   deflater.Finish();
 
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeBinary,
            kFinal | kReserved1,
@@ -723,7 +726,7 @@
 
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   {
     InSequence s;
     EXPECT_CALL(*mock_stream_, ReadFrames(&frames, _))
@@ -757,7 +760,7 @@
   deflater.AddBytes(original_data.data(), original_data.size());
   deflater.Finish();
 
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeBinary,
            kReserved1,
@@ -769,7 +772,7 @@
 
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   {
     InSequence s;
     EXPECT_CALL(*mock_stream_, ReadFrames(&frames, _))
@@ -795,7 +798,7 @@
        Reserved1TurnsOnDuringReadingCompressedContinuationFrame) {
   const std::string data1("\xf2\x48\xcd", 3);
   const std::string data2("\xc9\xc9\x07\x00", 4);
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kReserved1,
@@ -806,7 +809,7 @@
            data2);
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -819,7 +822,7 @@
 
 TEST_F(WebSocketDeflateStreamTest,
        Reserved1TurnsOnDuringReadingUncompressedContinuationFrame) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kNoFlag,
@@ -830,7 +833,7 @@
            "world");
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -842,7 +845,7 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, ReadCompressedMessages) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kFinal | kReserved1,
@@ -854,7 +857,7 @@
            std::string("\x4a\x86\x33\x8d\x00\x00", 6));
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -874,7 +877,7 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, ReadUncompressedMessages) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kFinal,
@@ -885,7 +888,7 @@
            "uncompressed2");
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -906,7 +909,7 @@
 
 TEST_F(WebSocketDeflateStreamTest,
        ReadCompressedMessageThenUncompressedMessage) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kFinal | kReserved1,
@@ -918,7 +921,7 @@
            "uncompressed");
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -939,7 +942,7 @@
 
 TEST_F(WebSocketDeflateStreamTest,
        ReadUncompressedMessageThenCompressedMessage) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames_to_output;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames_to_output;
   AppendTo(&frames_to_output,
            WebSocketFrameHeader::kOpCodeText,
            kFinal,
@@ -951,7 +954,7 @@
                "\x4a\xce\xcf\x2d\x28\x4a\x2d\x2e\x4e\x4d\x01\x00", 12));
   ReadFramesStub stub(OK, &frames_to_output);
   CompletionCallback callback;
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -972,13 +975,13 @@
 
 // This is a regression test for crbug.com/343506.
 TEST_F(WebSocketDeflateStreamTest, ReadEmptyAsyncFrame) {
-  std::vector<scoped_ptr<ReadFramesStub>> stub_vector;
-  stub_vector.push_back(make_scoped_ptr(new ReadFramesStub(ERR_IO_PENDING)));
-  stub_vector.push_back(make_scoped_ptr(new ReadFramesStub(ERR_IO_PENDING)));
+  std::vector<std::unique_ptr<ReadFramesStub>> stub_vector;
+  stub_vector.push_back(base::WrapUnique(new ReadFramesStub(ERR_IO_PENDING)));
+  stub_vector.push_back(base::WrapUnique(new ReadFramesStub(ERR_IO_PENDING)));
   MockCallback mock_callback;
   CompletionCallback callback =
       base::Bind(&MockCallback::Call, base::Unretained(&mock_callback));
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
 
   {
     InSequence s;
@@ -1008,7 +1011,7 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, WriteEmpty) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   CompletionCallback callback;
   {
     InSequence s;
@@ -1018,7 +1021,7 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, WriteFailedImmediately) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   CompletionCallback callback;
   {
     InSequence s;
@@ -1033,7 +1036,7 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, WriteFrameImmediately) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   CompletionCallback callback;
   WriteFramesStub stub(predictor_, OK);
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeText, kFinal, "Hello");
@@ -1044,7 +1047,8 @@
         .WillOnce(Invoke(&stub, &WriteFramesStub::Call));
   }
   ASSERT_EQ(OK, deflate_stream_->WriteFrames(&frames, callback));
-  const std::vector<scoped_ptr<WebSocketFrame>>& frames_passed = *stub.frames();
+  const std::vector<std::unique_ptr<WebSocketFrame>>& frames_passed =
+      *stub.frames();
   ASSERT_EQ(1u, frames_passed.size());
   EXPECT_EQ(WebSocketFrameHeader::kOpCodeText, frames_passed[0]->header.opcode);
   EXPECT_TRUE(frames_passed[0]->header.final);
@@ -1058,7 +1062,7 @@
   MockCallback mock_callback, checkpoint;
   CompletionCallback callback =
       base::Bind(&MockCallback::Call, base::Unretained(&mock_callback));
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   {
     InSequence s;
     EXPECT_CALL(*mock_stream_, WriteFrames(&frames, _))
@@ -1073,7 +1077,8 @@
   checkpoint.Call(0);
   stub.callback().Run(OK);
 
-  const std::vector<scoped_ptr<WebSocketFrame>>& frames_passed = *stub.frames();
+  const std::vector<std::unique_ptr<WebSocketFrame>>& frames_passed =
+      *stub.frames();
   ASSERT_EQ(1u, frames_passed.size());
   EXPECT_EQ(WebSocketFrameHeader::kOpCodeText, frames_passed[0]->header.opcode);
   EXPECT_TRUE(frames_passed[0]->header.final);
@@ -1083,7 +1088,7 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, WriteControlFrameBetweenDataFrames) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeText, kNoFlag, "Hel");
   AppendTo(&frames, WebSocketFrameHeader::kOpCodePing, kFinal);
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeContinuation, kFinal, "lo");
@@ -1097,7 +1102,8 @@
         .WillOnce(Invoke(&stub, &WriteFramesStub::Call));
   }
   ASSERT_EQ(OK, deflate_stream_->WriteFrames(&frames, callback));
-  const std::vector<scoped_ptr<WebSocketFrame>>& frames_passed = *stub.frames();
+  const std::vector<std::unique_ptr<WebSocketFrame>>& frames_passed =
+      *stub.frames();
   ASSERT_EQ(2u, frames_passed.size());
   EXPECT_EQ(WebSocketFrameHeader::kOpCodePing, frames_passed[0]->header.opcode);
   EXPECT_TRUE(frames_passed[0]->header.final);
@@ -1110,7 +1116,7 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, WriteEmptyMessage) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeText, kFinal);
   predictor_->AddFramesToBeInput(frames);
   WriteFramesStub stub(predictor_, OK);
@@ -1122,7 +1128,8 @@
         .WillOnce(Invoke(&stub, &WriteFramesStub::Call));
   }
   ASSERT_EQ(OK, deflate_stream_->WriteFrames(&frames, callback));
-  const std::vector<scoped_ptr<WebSocketFrame>>& frames_passed = *stub.frames();
+  const std::vector<std::unique_ptr<WebSocketFrame>>& frames_passed =
+      *stub.frames();
   ASSERT_EQ(1u, frames_passed.size());
   EXPECT_EQ(WebSocketFrameHeader::kOpCodeText, frames_passed[0]->header.opcode);
   EXPECT_TRUE(frames_passed[0]->header.final);
@@ -1131,7 +1138,7 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, WriteUncompressedMessage) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeText, kNoFlag, "AAAA");
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeContinuation, kFinal, "AAA");
   predictor_->AddFramesToBeInput(frames);
@@ -1146,7 +1153,8 @@
         .WillOnce(Invoke(&stub, &WriteFramesStub::Call));
   }
   ASSERT_EQ(OK, deflate_stream_->WriteFrames(&frames, callback));
-  const std::vector<scoped_ptr<WebSocketFrame>>& frames_passed = *stub.frames();
+  const std::vector<std::unique_ptr<WebSocketFrame>>& frames_passed =
+      *stub.frames();
   ASSERT_EQ(2u, frames_passed.size());
   EXPECT_EQ(WebSocketFrameHeader::kOpCodeText, frames_passed[0]->header.opcode);
   EXPECT_FALSE(frames_passed[0]->header.final);
@@ -1171,12 +1179,12 @@
     EXPECT_CALL(*mock_stream_, WriteFrames(_, _))
         .WillRepeatedly(Invoke(&stub, &WriteFramesStub::Call));
   }
-  std::vector<scoped_ptr<WebSocketFrame>> total_compressed_frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> total_compressed_frames;
 
   deflater.Initialize(kWindowBits);
   while (true) {
     bool is_final = (total_compressed_frames.size() >= 2);
-    std::vector<scoped_ptr<WebSocketFrame>> frames;
+    std::vector<std::unique_ptr<WebSocketFrame>> frames;
     std::string data;
     for (size_t i = 0; i < size; ++i)
       data += static_cast<char>(lcg.Generate());
@@ -1216,7 +1224,7 @@
 }
 
 TEST_F(WebSocketDeflateStreamTest, WriteMultipleMessages) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeText, kFinal, "Hello");
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeText, kFinal, "Hello");
   predictor_->AddFramesToBeInput(frames);
@@ -1229,7 +1237,8 @@
         .WillOnce(Invoke(&stub, &WriteFramesStub::Call));
   }
   ASSERT_EQ(OK, deflate_stream_->WriteFrames(&frames, callback));
-  const std::vector<scoped_ptr<WebSocketFrame>>& frames_passed = *stub.frames();
+  const std::vector<std::unique_ptr<WebSocketFrame>>& frames_passed =
+      *stub.frames();
   ASSERT_EQ(2u, frames_passed.size());
   EXPECT_EQ(WebSocketFrameHeader::kOpCodeText, frames_passed[0]->header.opcode);
   EXPECT_TRUE(frames_passed[0]->header.final);
@@ -1244,7 +1253,7 @@
 
 TEST_F(WebSocketDeflateStreamWithDoNotTakeOverContextTest,
        WriteMultipleMessages) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeText, kFinal, "Hello");
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeText, kFinal, "Hello");
   predictor_->AddFramesToBeInput(frames);
@@ -1257,7 +1266,8 @@
         .WillOnce(Invoke(&stub, &WriteFramesStub::Call));
   }
   ASSERT_EQ(OK, deflate_stream_->WriteFrames(&frames, callback));
-  const std::vector<scoped_ptr<WebSocketFrame>>& frames_passed = *stub.frames();
+  const std::vector<std::unique_ptr<WebSocketFrame>>& frames_passed =
+      *stub.frames();
   ASSERT_EQ(2u, frames_passed.size());
   EXPECT_EQ(WebSocketFrameHeader::kOpCodeText, frames_passed[0]->header.opcode);
   EXPECT_TRUE(frames_passed[0]->header.final);
@@ -1275,7 +1285,7 @@
 // "PossiblyCompressedMessage"s, we test various messages at one test case.
 TEST_F(WebSocketDeflateStreamWithDoNotTakeOverContextTest,
        WritePossiblyCompressMessages) {
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeText, kNoFlag, "He");
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeContinuation, kFinal, "llo");
   AppendTo(&frames, WebSocketFrameHeader::kOpCodeText, kNoFlag, "AAAAAAAAAA");
@@ -1293,7 +1303,8 @@
         .WillOnce(Invoke(&stub, &WriteFramesStub::Call));
   }
   ASSERT_EQ(OK, deflate_stream_->WriteFrames(&frames, callback));
-  const std::vector<scoped_ptr<WebSocketFrame>>& frames_passed = *stub.frames();
+  const std::vector<std::unique_ptr<WebSocketFrame>>& frames_passed =
+      *stub.frames();
   ASSERT_EQ(5u, frames_passed.size());
 
   EXPECT_EQ(WebSocketFrameHeader::kOpCodeText, frames_passed[0]->header.opcode);
@@ -1335,7 +1346,8 @@
         .WillOnce(Invoke(&stub, &WriteFramesStub::Call));
   }
   ASSERT_EQ(OK, deflate_stream_->WriteFrames(&frames_, callback));
-  const std::vector<scoped_ptr<WebSocketFrame>>& frames_passed = *stub.frames();
+  const std::vector<std::unique_ptr<WebSocketFrame>>& frames_passed =
+      *stub.frames();
   ASSERT_EQ(1u, frames_passed.size());
   EXPECT_EQ(std::string("r\xce(\xca\xcf\xcd,\xcdM\x1c\xe1\xc0\x39\xa3"
                         "(?7\xb3\x34\x17\x00", 21),
@@ -1354,7 +1366,8 @@
         .WillOnce(Invoke(&stub, &WriteFramesStub::Call));
   }
   ASSERT_EQ(OK, deflate_stream_->WriteFrames(&frames_, callback));
-  const std::vector<scoped_ptr<WebSocketFrame>>& frames_passed = *stub.frames();
+  const std::vector<std::unique_ptr<WebSocketFrame>>& frames_passed =
+      *stub.frames();
   ASSERT_EQ(1u, frames_passed.size());
   EXPECT_EQ(
       std::string("r\xce(\xca\xcf\xcd,\xcdM\x1c\xe1\xc0\x19\x1a\x0e\0\0", 17),
diff --git a/net/websockets/websocket_deflater.h b/net/websockets/websocket_deflater.h
index 9b34c857..cf5b43b3b 100644
--- a/net/websockets/websocket_deflater.h
+++ b/net/websockets/websocket_deflater.h
@@ -8,11 +8,11 @@
 #include <stddef.h>
 
 #include <deque>
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 extern "C" struct z_stream_s;
@@ -65,7 +65,7 @@
   void ResetContext();
   int Deflate(int flush);
 
-  scoped_ptr<z_stream_s> stream_;
+  std::unique_ptr<z_stream_s> stream_;
   ContextTakeOverMode mode_;
   std::deque<char> buffer_;
   std::vector<char> fixed_buffer_;
diff --git a/net/websockets/websocket_end_to_end_test.cc b/net/websockets/websocket_end_to_end_test.cc
index 24053374e..740b154 100644
--- a/net/websockets/websocket_end_to_end_test.cc
+++ b/net/websockets/websocket_end_to_end_test.cc
@@ -10,6 +10,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
@@ -17,7 +18,7 @@
 #include "base/callback.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_piece.h"
@@ -83,13 +84,13 @@
   ChannelState OnFailChannel(const std::string& message) override;
 
   ChannelState OnStartOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeRequestInfo> request) override;
+      std::unique_ptr<WebSocketHandshakeRequestInfo> request) override;
 
   ChannelState OnFinishOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeResponseInfo> response) override;
+      std::unique_ptr<WebSocketHandshakeResponseInfo> response) override;
 
   ChannelState OnSSLCertificateError(
-      scoped_ptr<SSLErrorCallbacks> ssl_error_callbacks,
+      std::unique_ptr<SSLErrorCallbacks> ssl_error_callbacks,
       const GURL& url,
       const SSLInfo& ssl_info,
       bool fatal) override;
@@ -169,17 +170,17 @@
 }
 
 ChannelState ConnectTestingEventInterface::OnStartOpeningHandshake(
-    scoped_ptr<WebSocketHandshakeRequestInfo> request) {
+    std::unique_ptr<WebSocketHandshakeRequestInfo> request) {
   return CHANNEL_ALIVE;
 }
 
 ChannelState ConnectTestingEventInterface::OnFinishOpeningHandshake(
-    scoped_ptr<WebSocketHandshakeResponseInfo> response) {
+    std::unique_ptr<WebSocketHandshakeResponseInfo> response) {
   return CHANNEL_ALIVE;
 }
 
 ChannelState ConnectTestingEventInterface::OnSSLCertificateError(
-    scoped_ptr<SSLErrorCallbacks> ssl_error_callbacks,
+    std::unique_ptr<SSLErrorCallbacks> ssl_error_callbacks,
     const GURL& url,
     const SSLInfo& ssl_info,
     bool fatal) {
@@ -269,16 +270,16 @@
     url::Origin origin(GURL("http://localhost"));
     event_interface_ = new ConnectTestingEventInterface;
     channel_.reset(
-        new WebSocketChannel(make_scoped_ptr(event_interface_), &context_));
+        new WebSocketChannel(base::WrapUnique(event_interface_), &context_));
     channel_->SendAddChannelRequest(GURL(socket_url), sub_protocols_, origin);
     event_interface_->WaitForResponse();
     return !event_interface_->failed();
   }
 
   ConnectTestingEventInterface* event_interface_;  // owned by channel_
-  scoped_ptr<TestProxyDelegateWithProxyInfo> proxy_delegate_;
+  std::unique_ptr<TestProxyDelegateWithProxyInfo> proxy_delegate_;
   TestURLRequestContext context_;
-  scoped_ptr<WebSocketChannel> channel_;
+  std::unique_ptr<WebSocketChannel> channel_;
   std::vector<std::string> sub_protocols_;
   bool initialised_context_;
 };
@@ -317,7 +318,7 @@
   ASSERT_TRUE(ws_server.BlockUntilStarted());
   std::string proxy_config =
       "https=" + proxy_server.host_port_pair().ToString();
-  scoped_ptr<ProxyService> proxy_service(
+  std::unique_ptr<ProxyService> proxy_service(
       ProxyService::CreateFixed(proxy_config));
   ASSERT_TRUE(proxy_service);
   context_.set_proxy_service(proxy_service.get());
@@ -338,7 +339,7 @@
   ASSERT_TRUE(wss_server.BlockUntilStarted());
   std::string proxy_config =
       "https=" + proxy_server.host_port_pair().ToString();
-  scoped_ptr<ProxyService> proxy_service(
+  std::unique_ptr<ProxyService> proxy_service(
       ProxyService::CreateFixed(proxy_config));
   ASSERT_TRUE(proxy_service);
   context_.set_proxy_service(proxy_service.get());
@@ -362,7 +363,7 @@
   std::string proxy_config = "https=" +
                              proxy_server.host_port_pair().ToString() + ";" +
                              "http=" + proxy_server.host_port_pair().ToString();
-  scoped_ptr<ProxyService> proxy_service(
+  std::unique_ptr<ProxyService> proxy_service(
       ProxyService::CreateFixed(proxy_config));
   context_.set_proxy_service(proxy_service.get());
   InitialiseContext();
@@ -377,7 +378,7 @@
   delegate.set_credentials(
       AuthCredentials(base::ASCIIToUTF16("foo"), base::ASCIIToUTF16("bar")));
   {
-    scoped_ptr<URLRequest> request(
+    std::unique_ptr<URLRequest> request(
         context_.CreateRequest(http_page, DEFAULT_PRIORITY, &delegate));
     request->Start();
     // TestDelegate exits the message loop when the request completes by
@@ -425,7 +426,7 @@
   // Set HSTS via https:
   TestDelegate delegate;
   GURL https_page = https_server.GetURL("/hsts-headers.html");
-  scoped_ptr<URLRequest> request(
+  std::unique_ptr<URLRequest> request(
       context_.CreateRequest(https_page, DEFAULT_PRIORITY, &delegate));
   request->Start();
   // TestDelegate exits the message loop when the request completes.
@@ -459,7 +460,7 @@
   TestDelegate delegate;
   GURL http_page =
       ReplaceUrlScheme(https_server.GetURL("/simple.html"), "http");
-  scoped_ptr<URLRequest> request(
+  std::unique_ptr<URLRequest> request(
       context_.CreateRequest(http_page, DEFAULT_PRIORITY, &delegate));
   request->Start();
   // TestDelegate exits the message loop when the request completes.
diff --git a/net/websockets/websocket_event_interface.h b/net/websockets/websocket_event_interface.h
index 1434841..761f356 100644
--- a/net/websockets/websocket_event_interface.h
+++ b/net/websockets/websocket_event_interface.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/compiler_specific.h"  // for WARN_UNUSED_RESULT
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 class GURL;
@@ -95,11 +95,12 @@
 
   // Called when the browser starts the WebSocket Opening Handshake.
   virtual ChannelState OnStartOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeRequestInfo> request) WARN_UNUSED_RESULT = 0;
+      std::unique_ptr<WebSocketHandshakeRequestInfo> request)
+      WARN_UNUSED_RESULT = 0;
 
   // Called when the browser finishes the WebSocket Opening Handshake.
   virtual ChannelState OnFinishOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeResponseInfo> response)
+      std::unique_ptr<WebSocketHandshakeResponseInfo> response)
       WARN_UNUSED_RESULT = 0;
 
   // Callbacks to be used in response to a call to OnSSLCertificateError. Very
@@ -123,7 +124,7 @@
   // make the actual decision. The callbacks must not be called after the
   // WebSocketChannel has been destroyed.
   virtual ChannelState OnSSLCertificateError(
-      scoped_ptr<SSLErrorCallbacks> ssl_error_callbacks,
+      std::unique_ptr<SSLErrorCallbacks> ssl_error_callbacks,
       const GURL& url,
       const SSLInfo& ssl_info,
       bool fatal) WARN_UNUSED_RESULT = 0;
diff --git a/net/websockets/websocket_frame.cc b/net/websockets/websocket_frame.cc
index da596d8..792e7fde 100644
--- a/net/websockets/websocket_frame.cc
+++ b/net/websockets/websocket_frame.cc
@@ -56,8 +56,8 @@
 
 }  // namespace
 
-scoped_ptr<WebSocketFrameHeader> WebSocketFrameHeader::Clone() const {
-  scoped_ptr<WebSocketFrameHeader> ret(new WebSocketFrameHeader(opcode));
+std::unique_ptr<WebSocketFrameHeader> WebSocketFrameHeader::Clone() const {
+  std::unique_ptr<WebSocketFrameHeader> ret(new WebSocketFrameHeader(opcode));
   ret->CopyFrom(*this);
   return ret;
 }
diff --git a/net/websockets/websocket_frame.h b/net/websockets/websocket_frame.h
index 7e85a3c9..074c7875 100644
--- a/net/websockets/websocket_frame.h
+++ b/net/websockets/websocket_frame.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 namespace net {
@@ -72,7 +72,7 @@
         payload_length(0) {}
 
   // Create a clone of this object on the heap.
-  scoped_ptr<WebSocketFrameHeader> Clone() const;
+  std::unique_ptr<WebSocketFrameHeader> Clone() const;
 
   // Overwrite this object with the fields from |source|.
   void CopyFrom(const WebSocketFrameHeader& source);
@@ -130,7 +130,7 @@
 
   // Non-null |header| is provided only if this chunk is the first part of
   // a series of chunks.
-  scoped_ptr<WebSocketFrameHeader> header;
+  std::unique_ptr<WebSocketFrameHeader> header;
 
   // Indicates this part is the last chunk of a frame.
   bool final_chunk;
diff --git a/net/websockets/websocket_frame_parser.cc b/net/websockets/websocket_frame_parser.cc
index 7c2a075..19999ba3 100644
--- a/net/websockets/websocket_frame_parser.cc
+++ b/net/websockets/websocket_frame_parser.cc
@@ -6,13 +6,13 @@
 
 #include <algorithm>
 #include <limits>
+#include <memory>
 #include <utility>
 #include <vector>
 
 #include "base/big_endian.h"
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/io_buffer.h"
 #include "net/websockets/websocket_frame.h"
 
@@ -47,7 +47,7 @@
 bool WebSocketFrameParser::Decode(
     const char* data,
     size_t length,
-    std::vector<scoped_ptr<WebSocketFrameChunk>>* frame_chunks) {
+    std::vector<std::unique_ptr<WebSocketFrameChunk>>* frame_chunks) {
   if (websocket_error_ != kWebSocketNormalClosure)
     return false;
   if (!length)
@@ -69,7 +69,7 @@
       first_chunk = true;
     }
 
-    scoped_ptr<WebSocketFrameChunk> frame_chunk =
+    std::unique_ptr<WebSocketFrameChunk> frame_chunk =
         DecodeFramePayload(first_chunk);
     DCHECK(frame_chunk.get());
     frame_chunks->push_back(std::move(frame_chunk));
@@ -169,7 +169,7 @@
   DCHECK_EQ(0u, frame_offset_);
 }
 
-scoped_ptr<WebSocketFrameChunk> WebSocketFrameParser::DecodeFramePayload(
+std::unique_ptr<WebSocketFrameChunk> WebSocketFrameParser::DecodeFramePayload(
     bool first_chunk) {
   // The cast here is safe because |payload_length| is already checked to be
   // less than std::numeric_limits<int>::max() when the header is parsed.
@@ -177,7 +177,7 @@
       std::min(static_cast<uint64_t>(buffer_.size() - current_read_pos_),
                current_frame_header_->payload_length - frame_offset_));
 
-  scoped_ptr<WebSocketFrameChunk> frame_chunk(new WebSocketFrameChunk);
+  std::unique_ptr<WebSocketFrameChunk> frame_chunk(new WebSocketFrameChunk);
   if (first_chunk) {
     frame_chunk->header = current_frame_header_->Clone();
   }
diff --git a/net/websockets/websocket_frame_parser.h b/net/websockets/websocket_frame_parser.h
index 250541b..e43f051f 100644
--- a/net/websockets/websocket_frame_parser.h
+++ b/net/websockets/websocket_frame_parser.h
@@ -8,11 +8,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/websockets/websocket_errors.h"
 #include "net/websockets/websocket_frame.h"
@@ -40,7 +40,7 @@
   // websocket_frame.h for more details.
   bool Decode(const char* data,
               size_t length,
-              std::vector<scoped_ptr<WebSocketFrameChunk>>* frame_chunks);
+              std::vector<std::unique_ptr<WebSocketFrameChunk>>* frame_chunks);
 
   // Returns kWebSocketNormalClosure if the parser has not failed to decode
   // WebSocket frames. Otherwise returns WebSocketError which is defined in
@@ -63,7 +63,7 @@
   // available at this moment, so the receiver could make use of frame header
   // information. If the end of frame is reached, this function clears
   // |current_frame_header_|, |frame_offset_| and |masking_key_|.
-  scoped_ptr<WebSocketFrameChunk> DecodeFramePayload(bool first_chunk);
+  std::unique_ptr<WebSocketFrameChunk> DecodeFramePayload(bool first_chunk);
 
   // Internal buffer to store the data to parse.
   std::vector<char> buffer_;
@@ -73,7 +73,7 @@
 
   // Frame header and masking key of the current frame.
   // |masking_key_| is filled with zeros if the current frame is not masked.
-  scoped_ptr<WebSocketFrameHeader> current_frame_header_;
+  std::unique_ptr<WebSocketFrameHeader> current_frame_header_;
   WebSocketMaskingKey masking_key_;
 
   // Amount of payload data read so far for the current frame.
diff --git a/net/websockets/websocket_frame_parser_fuzzer.cc b/net/websockets/websocket_frame_parser_fuzzer.cc
index 717a9a4..6e4b1f3 100644
--- a/net/websockets/websocket_frame_parser_fuzzer.cc
+++ b/net/websockets/websocket_frame_parser_fuzzer.cc
@@ -12,7 +12,7 @@
 // Entry point for LibFuzzer.
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   net::WebSocketFrameParser parser;
-  std::vector<scoped_ptr<net::WebSocketFrameChunk>> frame_chunks;
+  std::vector<std::unique_ptr<net::WebSocketFrameChunk>> frame_chunks;
   parser.Decode(reinterpret_cast<const char*>(data), size, &frame_chunks);
 
   return 0;
diff --git a/net/websockets/websocket_frame_parser_test.cc b/net/websockets/websocket_frame_parser_test.cc
index 09557852..2dcf4fbb 100644
--- a/net/websockets/websocket_frame_parser_test.cc
+++ b/net/websockets/websocket_frame_parser_test.cc
@@ -50,7 +50,7 @@
 TEST(WebSocketFrameParserTest, DecodeNormalFrame) {
   WebSocketFrameParser parser;
 
-  std::vector<scoped_ptr<WebSocketFrameChunk>> frames;
+  std::vector<std::unique_ptr<WebSocketFrameChunk>> frames;
   EXPECT_TRUE(parser.Decode(kHelloFrame, kHelloFrameLength, &frames));
   EXPECT_EQ(kWebSocketNormalClosure, parser.websocket_error());
   ASSERT_EQ(1u, frames.size());
@@ -76,7 +76,7 @@
 TEST(WebSocketFrameParserTest, DecodeMaskedFrame) {
   WebSocketFrameParser parser;
 
-  std::vector<scoped_ptr<WebSocketFrameChunk>> frames;
+  std::vector<std::unique_ptr<WebSocketFrameChunk>> frames;
   EXPECT_TRUE(
       parser.Decode(kMaskedHelloFrame, kMaskedHelloFrameLength, &frames));
   EXPECT_EQ(kWebSocketNormalClosure, parser.websocket_error());
@@ -135,7 +135,7 @@
 
   WebSocketFrameParser parser;
 
-  std::vector<scoped_ptr<WebSocketFrameChunk>> frames;
+  std::vector<std::unique_ptr<WebSocketFrameChunk>> frames;
   EXPECT_TRUE(parser.Decode(&input.front(), input.size(), &frames));
   EXPECT_EQ(kWebSocketNormalClosure, parser.websocket_error());
   ASSERT_EQ(static_cast<size_t>(kNumInputs), frames.size());
@@ -181,7 +181,7 @@
 
     WebSocketFrameParser parser;
 
-    std::vector<scoped_ptr<WebSocketFrameChunk>> frames1;
+    std::vector<std::unique_ptr<WebSocketFrameChunk>> frames1;
     EXPECT_TRUE(parser.Decode(&input1.front(), input1.size(), &frames1));
     EXPECT_EQ(kWebSocketNormalClosure, parser.websocket_error());
     EXPECT_EQ(1u, frames1.size());
@@ -211,7 +211,7 @@
     EXPECT_FALSE(header1->masked);
     EXPECT_EQ(kHelloLength, header1->payload_length);
 
-    std::vector<scoped_ptr<WebSocketFrameChunk>> frames2;
+    std::vector<std::unique_ptr<WebSocketFrameChunk>> frames2;
     EXPECT_TRUE(parser.Decode(&input2.front(), input2.size(), &frames2));
     EXPECT_EQ(kWebSocketNormalClosure, parser.websocket_error());
     EXPECT_EQ(1u, frames2.size());
@@ -248,7 +248,7 @@
 
     WebSocketFrameParser parser;
 
-    std::vector<scoped_ptr<WebSocketFrameChunk>> frames1;
+    std::vector<std::unique_ptr<WebSocketFrameChunk>> frames1;
     EXPECT_TRUE(parser.Decode(&input1.front(), input1.size(), &frames1));
     EXPECT_EQ(kWebSocketNormalClosure, parser.websocket_error());
     EXPECT_EQ(1u, frames1.size());
@@ -278,7 +278,7 @@
     EXPECT_TRUE(header1->masked);
     EXPECT_EQ(kHelloLength, header1->payload_length);
 
-    std::vector<scoped_ptr<WebSocketFrameChunk>> frames2;
+    std::vector<std::unique_ptr<WebSocketFrameChunk>> frames2;
     EXPECT_TRUE(parser.Decode(&input2.front(), input2.size(), &frames2));
     EXPECT_EQ(kWebSocketNormalClosure, parser.websocket_error());
     EXPECT_EQ(1u, frames2.size());
@@ -315,7 +315,7 @@
 
     WebSocketFrameParser parser;
 
-    std::vector<scoped_ptr<WebSocketFrameChunk>> frames;
+    std::vector<std::unique_ptr<WebSocketFrameChunk>> frames;
     EXPECT_EQ(kFrameHeaderTests[i].error_code == kWebSocketNormalClosure,
               parser.Decode(&input.front(), input.size(), &frames));
     EXPECT_EQ(kFrameHeaderTests[i].error_code, parser.websocket_error());
@@ -367,7 +367,7 @@
 
     WebSocketFrameParser parser;
 
-    std::vector<scoped_ptr<WebSocketFrameChunk>> frames;
+    std::vector<std::unique_ptr<WebSocketFrameChunk>> frames;
     // Feed each byte to the parser to see if the parser behaves correctly
     // when it receives partial frame header.
     size_t last_byte_offset = frame_header_length - 1;
@@ -437,7 +437,7 @@
 
     WebSocketFrameParser parser;
 
-    std::vector<scoped_ptr<WebSocketFrameChunk>> frames;
+    std::vector<std::unique_ptr<WebSocketFrameChunk>> frames;
     EXPECT_EQ(kWebSocketNormalClosure, parser.websocket_error());
     EXPECT_FALSE(parser.Decode(frame_header, frame_header_length, &frames));
     EXPECT_EQ(kWebSocketErrorProtocolError, parser.websocket_error());
@@ -486,7 +486,7 @@
 
     WebSocketFrameParser parser;
 
-    std::vector<scoped_ptr<WebSocketFrameChunk>> frames;
+    std::vector<std::unique_ptr<WebSocketFrameChunk>> frames;
     EXPECT_TRUE(parser.Decode(frame_header, frame_header_length, &frames));
     EXPECT_EQ(kWebSocketNormalClosure, parser.websocket_error());
     EXPECT_EQ(1u, frames.size());
@@ -542,7 +542,7 @@
 
     WebSocketFrameParser parser;
 
-    std::vector<scoped_ptr<WebSocketFrameChunk>> frames;
+    std::vector<std::unique_ptr<WebSocketFrameChunk>> frames;
     EXPECT_TRUE(parser.Decode(frame_header, frame_header_length, &frames));
     EXPECT_EQ(kWebSocketNormalClosure, parser.websocket_error());
     EXPECT_EQ(1u, frames.size());
diff --git a/net/websockets/websocket_frame_test.cc b/net/websockets/websocket_frame_test.cc
index 04c10d22..25a0e0c 100644
--- a/net/websockets/websocket_frame_test.cc
+++ b/net/websockets/websocket_frame_test.cc
@@ -297,9 +297,8 @@
   };
   static_assert(arraysize(kTestInput) == arraysize(kTestOutput),
                 "output and input arrays should have the same length");
-  scoped_ptr<char, base::AlignedFreeDeleter> scratch(
-      static_cast<char*>(
-          base::AlignedAlloc(kScratchBufferSize, kMaxVectorAlignment)));
+  std::unique_ptr<char, base::AlignedFreeDeleter> scratch(static_cast<char*>(
+      base::AlignedAlloc(kScratchBufferSize, kMaxVectorAlignment)));
   WebSocketMaskingKey masking_key;
   std::copy(kTestMask, kTestMask + kMaskingKeyLength, masking_key.key);
   for (size_t frame_offset = 0; frame_offset < kMaskingKeyLength;
diff --git a/net/websockets/websocket_handshake_stream_base.h b/net/websockets/websocket_handshake_stream_base.h
index dda9f3d..c198cf3 100644
--- a/net/websockets/websocket_handshake_stream_base.h
+++ b/net/websockets/websocket_handshake_stream_base.h
@@ -9,10 +9,10 @@
 // Since net/http can be built without linking net/websockets code,
 // this file must not introduce any link-time dependencies on websockets.
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/supports_user_data.h"
 #include "net/http/http_stream.h"
@@ -47,7 +47,7 @@
     // has been transferred. This can be called more than once in the case that
     // HTTP authentication is needed.
     virtual WebSocketHandshakeStreamBase* CreateBasicStream(
-        scoped_ptr<ClientSocketHandle> connection,
+        std::unique_ptr<ClientSocketHandle> connection,
         bool using_proxy) = 0;
 
     // Create a WebSocketSpdyHandshakeStream (unimplemented as of October 2013)
@@ -64,7 +64,7 @@
   // (of the appropriate type) from the WebSocketHandshakeStreamBase object.
   // The WebSocketHandshakeStreamBase object is unusable after Upgrade() has
   // been called.
-  virtual scoped_ptr<WebSocketStream> Upgrade() = 0;
+  virtual std::unique_ptr<WebSocketStream> Upgrade() = 0;
 
  protected:
   // As with the destructor, this must be inline.
diff --git a/net/websockets/websocket_handshake_stream_create_helper.cc b/net/websockets/websocket_handshake_stream_create_helper.cc
index e8985a1..91e62f1b 100644
--- a/net/websockets/websocket_handshake_stream_create_helper.cc
+++ b/net/websockets/websocket_handshake_stream_create_helper.cc
@@ -4,10 +4,10 @@
 
 #include "net/websockets/websocket_handshake_stream_create_helper.h"
 
+#include <memory>
 #include <utility>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "net/socket/client_socket_handle.h"
 #include "net/spdy/spdy_session.h"
@@ -29,7 +29,7 @@
 
 WebSocketHandshakeStreamBase*
 WebSocketHandshakeStreamCreateHelper::CreateBasicStream(
-    scoped_ptr<ClientSocketHandle> connection,
+    std::unique_ptr<ClientSocketHandle> connection,
     bool using_proxy) {
   DCHECK(failure_message_) << "set_failure_message() must be called";
   // The list of supported extensions and parameters is hard-coded.
@@ -54,7 +54,8 @@
   return NULL;
 }
 
-scoped_ptr<WebSocketStream> WebSocketHandshakeStreamCreateHelper::Upgrade() {
+std::unique_ptr<WebSocketStream>
+WebSocketHandshakeStreamCreateHelper::Upgrade() {
   DCHECK(stream_);
   WebSocketHandshakeStreamBase* stream = stream_;
   stream_ = NULL;
diff --git a/net/websockets/websocket_handshake_stream_create_helper.h b/net/websockets/websocket_handshake_stream_create_helper.h
index 2494f1406c..67e62dd 100644
--- a/net/websockets/websocket_handshake_stream_create_helper.h
+++ b/net/websockets/websocket_handshake_stream_create_helper.h
@@ -5,11 +5,11 @@
 #ifndef NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_STREAM_CREATE_HELPER_H_
 #define NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_STREAM_CREATE_HELPER_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 #include "net/websockets/websocket_handshake_stream_base.h"
 #include "net/websockets/websocket_stream.h"
@@ -38,7 +38,7 @@
 
   // Create a WebSocketBasicHandshakeStream.
   WebSocketHandshakeStreamBase* CreateBasicStream(
-      scoped_ptr<ClientSocketHandle> connection,
+      std::unique_ptr<ClientSocketHandle> connection,
       bool using_proxy) override;
 
   // Unimplemented as of November 2013.
@@ -48,7 +48,7 @@
 
   // Call Upgrade() on the WebSocketHandshakeStream and return the result. This
   // must only be called if the handshake succeeded.
-  scoped_ptr<WebSocketStream> Upgrade();
+  std::unique_ptr<WebSocketStream> Upgrade();
 
   // Set a pointer to the std::string into which to write any failure messages
   // that are encountered. This method must be called before CreateBasicStream()
diff --git a/net/websockets/websocket_handshake_stream_create_helper_test.cc b/net/websockets/websocket_handshake_stream_create_helper_test.cc
index 6a8499c..1b2c27f 100644
--- a/net/websockets/websocket_handshake_stream_create_helper_test.cc
+++ b/net/websockets/websocket_handshake_stream_create_helper_test.cc
@@ -36,11 +36,11 @@
   // The created socket expects |expect_written| to be written to the socket,
   // and will respond with |return_to_read|. The test will fail if the expected
   // text is not written, or if all the bytes are not read.
-  scoped_ptr<ClientSocketHandle> CreateClientSocketHandle(
+  std::unique_ptr<ClientSocketHandle> CreateClientSocketHandle(
       const std::string& expect_written,
       const std::string& return_to_read) {
     socket_factory_maker_.SetExpectations(expect_written, return_to_read);
-    scoped_ptr<ClientSocketHandle> socket_handle(new ClientSocketHandle);
+    std::unique_ptr<ClientSocketHandle> socket_handle(new ClientSocketHandle);
     socket_handle->Init("a", scoped_refptr<MockTransportSocketParams>(), MEDIUM,
                         ClientSocketPool::RespectLimits::ENABLED,
                         CompletionCallback(), &pool_, BoundNetLog());
@@ -58,14 +58,14 @@
  public:
   ~TestConnectDelegate() override {}
 
-  void OnSuccess(scoped_ptr<WebSocketStream> stream) override {}
+  void OnSuccess(std::unique_ptr<WebSocketStream> stream) override {}
   void OnFailure(const std::string& failure_message) override {}
   void OnStartOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeRequestInfo> request) override {}
+      std::unique_ptr<WebSocketHandshakeRequestInfo> request) override {}
   void OnFinishOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeResponseInfo> response) override {}
+      std::unique_ptr<WebSocketHandshakeResponseInfo> response) override {}
   void OnSSLCertificateError(
-      scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>
+      std::unique_ptr<WebSocketEventInterface::SSLErrorCallbacks>
           ssl_error_callbacks,
       const SSLInfo& ssl_info,
       bool fatal) override {}
@@ -73,7 +73,7 @@
 
 class WebSocketHandshakeStreamCreateHelperTest : public ::testing::Test {
  protected:
-  scoped_ptr<WebSocketStream> CreateAndInitializeStream(
+  std::unique_ptr<WebSocketStream> CreateAndInitializeStream(
       const std::vector<std::string>& sub_protocols,
       const std::string& extra_request_headers,
       const std::string& extra_response_headers) {
@@ -82,14 +82,14 @@
                                                        sub_protocols);
     create_helper.set_failure_message(&failure_message_);
 
-    scoped_ptr<ClientSocketHandle> socket_handle =
+    std::unique_ptr<ClientSocketHandle> socket_handle =
         socket_handle_factory_.CreateClientSocketHandle(
             WebSocketStandardRequest("/", "localhost",
                                      url::Origin(GURL(kOrigin)),
                                      extra_request_headers),
             WebSocketStandardResponse(extra_response_headers));
 
-    scoped_ptr<WebSocketHandshakeStreamBase> handshake(
+    std::unique_ptr<WebSocketHandshakeStreamBase> handshake(
         create_helper.CreateBasicStream(std::move(socket_handle), false));
 
     // If in future the implementation type returned by CreateBasicStream()
@@ -140,7 +140,7 @@
 
 // Confirm that the basic case works as expected.
 TEST_F(WebSocketHandshakeStreamCreateHelperTest, BasicStream) {
-  scoped_ptr<WebSocketStream> stream =
+  std::unique_ptr<WebSocketStream> stream =
       CreateAndInitializeStream(std::vector<std::string>(), "", "");
   EXPECT_EQ("", stream->GetExtensions());
   EXPECT_EQ("", stream->GetSubProtocol());
@@ -151,7 +151,7 @@
   std::vector<std::string> sub_protocols;
   sub_protocols.push_back("chat");
   sub_protocols.push_back("superchat");
-  scoped_ptr<WebSocketStream> stream = CreateAndInitializeStream(
+  std::unique_ptr<WebSocketStream> stream = CreateAndInitializeStream(
       sub_protocols, "Sec-WebSocket-Protocol: chat, superchat\r\n",
       "Sec-WebSocket-Protocol: superchat\r\n");
   EXPECT_EQ("superchat", stream->GetSubProtocol());
@@ -160,7 +160,7 @@
 // Verify that extension name is available. Bad extension names are tested in
 // websocket_stream_test.cc.
 TEST_F(WebSocketHandshakeStreamCreateHelperTest, Extensions) {
-  scoped_ptr<WebSocketStream> stream = CreateAndInitializeStream(
+  std::unique_ptr<WebSocketStream> stream = CreateAndInitializeStream(
       std::vector<std::string>(), "",
       "Sec-WebSocket-Extensions: permessage-deflate\r\n");
   EXPECT_EQ("permessage-deflate", stream->GetExtensions());
@@ -169,7 +169,7 @@
 // Verify that extension parameters are available. Bad parameters are tested in
 // websocket_stream_test.cc.
 TEST_F(WebSocketHandshakeStreamCreateHelperTest, ExtensionParameters) {
-  scoped_ptr<WebSocketStream> stream = CreateAndInitializeStream(
+  std::unique_ptr<WebSocketStream> stream = CreateAndInitializeStream(
       std::vector<std::string>(), "",
       "Sec-WebSocket-Extensions: permessage-deflate;"
       " client_max_window_bits=14; server_max_window_bits=14;"
diff --git a/net/websockets/websocket_inflater.h b/net/websockets/websocket_inflater.h
index e695fa1d..8fe2b41 100644
--- a/net/websockets/websocket_inflater.h
+++ b/net/websockets/websocket_inflater.h
@@ -8,12 +8,12 @@
 #include <stddef.h>
 
 #include <deque>
+#include <memory>
 #include <utility>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"
 
 extern "C" struct z_stream_s;
@@ -120,7 +120,7 @@
   int Inflate(const char* next_in, size_t avail_in, int flush);
   int InflateChokedInput();
 
-  scoped_ptr<z_stream_s> stream_;
+  std::unique_ptr<z_stream_s> stream_;
   InputQueue input_queue_;
   OutputBuffer output_buffer_;
 
diff --git a/net/websockets/websocket_stream.cc b/net/websockets/websocket_stream.cc
index 6e6ae09..560cbad 100644
--- a/net/websockets/websocket_stream.cc
+++ b/net/websockets/websocket_stream.cc
@@ -4,10 +4,11 @@
 
 #include "net/websockets/websocket_stream.h"
 
+#include <memory>
 #include <utility>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/sparse_histogram.h"
 #include "base/strings/stringprintf.h"
@@ -85,8 +86,8 @@
       const GURL& url,
       const URLRequestContext* context,
       const url::Origin& origin,
-      scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate,
-      scoped_ptr<WebSocketHandshakeStreamCreateHelper> create_helper)
+      std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate,
+      std::unique_ptr<WebSocketHandshakeStreamCreateHelper> create_helper)
       : delegate_(new Delegate(this)),
         url_request_(
             context->CreateRequest(url, DEFAULT_PRIORITY, delegate_.get())),
@@ -112,7 +113,7 @@
   // and so terminates the handshake if it is incomplete.
   ~StreamRequestImpl() override {}
 
-  void Start(scoped_ptr<base::Timer> timer) {
+  void Start(std::unique_ptr<base::Timer> timer) {
     DCHECK(timer);
     base::TimeDelta timeout(base::TimeDelta::FromSeconds(
         kHandshakeTimeoutIntervalInSeconds));
@@ -187,13 +188,13 @@
  private:
   // |delegate_| needs to be declared before |url_request_| so that it gets
   // initialised first.
-  scoped_ptr<Delegate> delegate_;
+  std::unique_ptr<Delegate> delegate_;
 
   // Deleting the StreamRequestImpl object deletes this URLRequest object,
   // cancelling the whole connection.
-  scoped_ptr<URLRequest> url_request_;
+  std::unique_ptr<URLRequest> url_request_;
 
-  scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate_;
+  std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate_;
 
   // Owned by the URLRequest.
   WebSocketHandshakeStreamCreateHelper* create_helper_;
@@ -202,7 +203,7 @@
   std::string failure_message_;
 
   // A timer for handshake timeout.
-  scoped_ptr<base::Timer> timer_;
+  std::unique_ptr<base::Timer> timer_;
 };
 
 class SSLErrorCallbacks : public WebSocketEventInterface::SSLErrorCallbacks {
@@ -309,10 +310,9 @@
                                      const SSLInfo& ssl_info,
                                      bool fatal) {
   owner_->connect_delegate()->OnSSLCertificateError(
-      scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>(
+      std::unique_ptr<WebSocketEventInterface::SSLErrorCallbacks>(
           new SSLErrorCallbacks(request)),
-      ssl_info,
-      fatal);
+      ssl_info, fatal);
 }
 
 void Delegate::OnReadCompleted(URLRequest* request, int bytes_read) {
@@ -328,33 +328,33 @@
 
 WebSocketStream::ConnectDelegate::~ConnectDelegate() {}
 
-scoped_ptr<WebSocketStreamRequest> WebSocketStream::CreateAndConnectStream(
+std::unique_ptr<WebSocketStreamRequest> WebSocketStream::CreateAndConnectStream(
     const GURL& socket_url,
     const std::vector<std::string>& requested_subprotocols,
     const url::Origin& origin,
     URLRequestContext* url_request_context,
     const BoundNetLog& net_log,
-    scoped_ptr<ConnectDelegate> connect_delegate) {
-  scoped_ptr<WebSocketHandshakeStreamCreateHelper> create_helper(
+    std::unique_ptr<ConnectDelegate> connect_delegate) {
+  std::unique_ptr<WebSocketHandshakeStreamCreateHelper> create_helper(
       new WebSocketHandshakeStreamCreateHelper(connect_delegate.get(),
                                                requested_subprotocols));
-  scoped_ptr<StreamRequestImpl> request(new StreamRequestImpl(
+  std::unique_ptr<StreamRequestImpl> request(new StreamRequestImpl(
       socket_url, url_request_context, origin, std::move(connect_delegate),
       std::move(create_helper)));
-  request->Start(scoped_ptr<base::Timer>(new base::Timer(false, false)));
+  request->Start(std::unique_ptr<base::Timer>(new base::Timer(false, false)));
   return std::move(request);
 }
 
 // This is declared in websocket_test_util.h.
-scoped_ptr<WebSocketStreamRequest> CreateAndConnectStreamForTesting(
+std::unique_ptr<WebSocketStreamRequest> CreateAndConnectStreamForTesting(
     const GURL& socket_url,
-    scoped_ptr<WebSocketHandshakeStreamCreateHelper> create_helper,
+    std::unique_ptr<WebSocketHandshakeStreamCreateHelper> create_helper,
     const url::Origin& origin,
     URLRequestContext* url_request_context,
     const BoundNetLog& net_log,
-    scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate,
-    scoped_ptr<base::Timer> timer) {
-  scoped_ptr<StreamRequestImpl> request(new StreamRequestImpl(
+    std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate,
+    std::unique_ptr<base::Timer> timer) {
+  std::unique_ptr<StreamRequestImpl> request(new StreamRequestImpl(
       socket_url, url_request_context, origin, std::move(connect_delegate),
       std::move(create_helper)));
   request->Start(std::move(timer));
@@ -368,12 +368,10 @@
     base::Time response_time) {
   DCHECK(connect_delegate);
   if (headers.get()) {
-    connect_delegate->OnFinishOpeningHandshake(make_scoped_ptr(
-        new WebSocketHandshakeResponseInfo(url,
-                                           headers->response_code(),
-                                           headers->GetStatusText(),
-                                           headers,
-                                           response_time)));
+    connect_delegate->OnFinishOpeningHandshake(
+        base::WrapUnique(new WebSocketHandshakeResponseInfo(
+            url, headers->response_code(), headers->GetStatusText(), headers,
+            response_time)));
   }
 }
 
diff --git a/net/websockets/websocket_stream.h b/net/websockets/websocket_stream.h
index 8a2b371..accbf89 100644
--- a/net/websockets/websocket_stream.h
+++ b/net/websockets/websocket_stream.h
@@ -5,13 +5,13 @@
 #ifndef NET_WEBSOCKETS_WEBSOCKET_STREAM_H_
 #define NET_WEBSOCKETS_WEBSOCKET_STREAM_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback_forward.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_export.h"
@@ -68,7 +68,7 @@
     virtual ~ConnectDelegate();
     // Called on successful connection. The parameter is an object derived from
     // WebSocketStream.
-    virtual void OnSuccess(scoped_ptr<WebSocketStream> stream) = 0;
+    virtual void OnSuccess(std::unique_ptr<WebSocketStream> stream) = 0;
 
     // Called on failure to connect.
     // |message| contains defails of the failure.
@@ -76,17 +76,17 @@
 
     // Called when the WebSocket Opening Handshake starts.
     virtual void OnStartOpeningHandshake(
-        scoped_ptr<WebSocketHandshakeRequestInfo> request) = 0;
+        std::unique_ptr<WebSocketHandshakeRequestInfo> request) = 0;
 
     // Called when the WebSocket Opening Handshake ends.
     virtual void OnFinishOpeningHandshake(
-        scoped_ptr<WebSocketHandshakeResponseInfo> response) = 0;
+        std::unique_ptr<WebSocketHandshakeResponseInfo> response) = 0;
 
     // Called when there is an SSL certificate error. Should call
     // ssl_error_callbacks->ContinueSSLRequest() or
     // ssl_error_callbacks->CancelSSLRequest().
     virtual void OnSSLCertificateError(
-        scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>
+        std::unique_ptr<WebSocketEventInterface::SSLErrorCallbacks>
             ssl_error_callbacks,
         const SSLInfo& ssl_info,
         bool fatal) = 0;
@@ -104,13 +104,13 @@
   // required, the caller should keep the WebSocketStreamRequest object alive
   // until connect_delegate->OnSuccess() or OnFailure() have been called, then
   // it is safe to delete.
-  static scoped_ptr<WebSocketStreamRequest> CreateAndConnectStream(
+  static std::unique_ptr<WebSocketStreamRequest> CreateAndConnectStream(
       const GURL& socket_url,
       const std::vector<std::string>& requested_subprotocols,
       const url::Origin& origin,
       URLRequestContext* url_request_context,
       const BoundNetLog& net_log,
-      scoped_ptr<ConnectDelegate> connect_delegate);
+      std::unique_ptr<ConnectDelegate> connect_delegate);
 
   // Derived classes must make sure Close() is called when the stream is not
   // closed on destruction.
@@ -158,7 +158,7 @@
   // Extensions which use reserved header bits should clear them when they are
   // set correctly. If the reserved header bits are set incorrectly, it is okay
   // to leave it to the caller to report the error.
-  virtual int ReadFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  virtual int ReadFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                          const CompletionCallback& callback) = 0;
 
   // Writes WebSocket frame data.
@@ -175,7 +175,7 @@
   // object. Implementations of WriteFrames() should be robust against
   // this. This generally means returning to the event loop immediately after
   // calling the callback.
-  virtual int WriteFrames(std::vector<scoped_ptr<WebSocketFrame>>* frames,
+  virtual int WriteFrames(std::vector<std::unique_ptr<WebSocketFrame>>* frames,
                           const CompletionCallback& callback) = 0;
 
   // Closes the stream. All pending I/O operations (if any) are cancelled
@@ -218,15 +218,15 @@
 // use only. The differences are the use of a |create_helper| argument in place
 // of |requested_subprotocols| and taking |timer| as the handshake timeout
 // timer. Implemented in websocket_stream.cc.
-NET_EXPORT_PRIVATE scoped_ptr<WebSocketStreamRequest>
+NET_EXPORT_PRIVATE std::unique_ptr<WebSocketStreamRequest>
 CreateAndConnectStreamForTesting(
     const GURL& socket_url,
-    scoped_ptr<WebSocketHandshakeStreamCreateHelper> create_helper,
+    std::unique_ptr<WebSocketHandshakeStreamCreateHelper> create_helper,
     const url::Origin& origin,
     URLRequestContext* url_request_context,
     const BoundNetLog& net_log,
-    scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate,
-    scoped_ptr<base::Timer> timer);
+    std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate,
+    std::unique_ptr<base::Timer> timer);
 
 }  // namespace net
 
diff --git a/net/websockets/websocket_stream_cookie_test.cc b/net/websockets/websocket_stream_cookie_test.cc
index c45fac4..694fc04 100644
--- a/net/websockets/websocket_stream_cookie_test.cc
+++ b/net/websockets/websocket_stream_cookie_test.cc
@@ -5,6 +5,7 @@
 #include <string>
 
 #include "base/callback_forward.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
@@ -118,7 +119,7 @@
 
 TEST_P(WebSocketStreamClientUseCookieTest, ClientUseCookie) {
   // For wss tests.
-  ssl_data_.push_back(make_scoped_ptr(new SSLSocketDataProvider(ASYNC, OK)));
+  ssl_data_.push_back(base::WrapUnique(new SSLSocketDataProvider(ASYNC, OK)));
 
   CookieStore* store =
       url_request_context_host_.GetURLRequestContext()->cookie_store();
@@ -151,7 +152,7 @@
 
 TEST_P(WebSocketStreamServerSetCookieTest, ServerSetCookie) {
   // For wss tests.
-  ssl_data_.push_back(make_scoped_ptr(new SSLSocketDataProvider(ASYNC, OK)));
+  ssl_data_.push_back(base::WrapUnique(new SSLSocketDataProvider(ASYNC, OK)));
 
   const GURL url(GetParam().url);
   const GURL cookie_url(GetParam().cookie_url);
diff --git a/net/websockets/websocket_stream_create_test_base.cc b/net/websockets/websocket_stream_create_test_base.cc
index 00e5f7fe..816d8a9 100644
--- a/net/websockets/websocket_stream_create_test_base.cc
+++ b/net/websockets/websocket_stream_create_test_base.cc
@@ -49,7 +49,7 @@
                       const base::Closure& done_callback)
       : owner_(owner), done_callback_(done_callback) {}
 
-  void OnSuccess(scoped_ptr<WebSocketStream> stream) override {
+  void OnSuccess(std::unique_ptr<WebSocketStream> stream) override {
     stream.swap(owner_->stream_);
     done_callback_.Run();
   }
@@ -61,21 +61,21 @@
   }
 
   void OnStartOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeRequestInfo> request) override {
+      std::unique_ptr<WebSocketHandshakeRequestInfo> request) override {
     // Can be called multiple times (in the case of HTTP auth). Last call
     // wins.
     owner_->request_info_ = std::move(request);
   }
 
   void OnFinishOpeningHandshake(
-      scoped_ptr<WebSocketHandshakeResponseInfo> response) override {
+      std::unique_ptr<WebSocketHandshakeResponseInfo> response) override {
     if (owner_->response_info_)
       ADD_FAILURE();
     owner_->response_info_ = std::move(response);
   }
 
   void OnSSLCertificateError(
-      scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>
+      std::unique_ptr<WebSocketEventInterface::SSLErrorCallbacks>
           ssl_error_callbacks,
       const SSLInfo& ssl_info,
       bool fatal) override {
@@ -101,15 +101,15 @@
     const std::string& socket_url,
     const std::vector<std::string>& sub_protocols,
     const url::Origin& origin,
-    scoped_ptr<base::Timer> timer) {
+    std::unique_ptr<base::Timer> timer) {
   for (size_t i = 0; i < ssl_data_.size(); ++i) {
     url_request_context_host_.AddSSLSocketDataProvider(std::move(ssl_data_[i]));
   }
   ssl_data_.clear();
-  scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate(
+  std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate(
       new TestConnectDelegate(this, connect_run_loop_.QuitClosure()));
   WebSocketStream::ConnectDelegate* delegate = connect_delegate.get();
-  scoped_ptr<WebSocketHandshakeStreamCreateHelper> create_helper(
+  std::unique_ptr<WebSocketHandshakeStreamCreateHelper> create_helper(
       new DeterministicKeyWebSocketHandshakeStreamCreateHelper(delegate,
                                                                sub_protocols));
   stream_request_ = CreateAndConnectStreamForTesting(
@@ -117,7 +117,7 @@
       url_request_context_host_.GetURLRequestContext(), BoundNetLog(),
       std::move(connect_delegate),
       timer ? std::move(timer)
-            : scoped_ptr<base::Timer>(new base::Timer(false, false)));
+            : std::unique_ptr<base::Timer>(new base::Timer(false, false)));
 }
 
 std::vector<HeaderKeyValuePair>
diff --git a/net/websockets/websocket_stream_create_test_base.h b/net/websockets/websocket_stream_create_test_base.h
index ca4d85057..75be4d1 100644
--- a/net/websockets/websocket_stream_create_test_base.h
+++ b/net/websockets/websocket_stream_create_test_base.h
@@ -5,12 +5,12 @@
 #ifndef NET_WEBSOCKETS_WEBSOCKET_STREAM_CREATE_TEST_BASE_H_
 #define NET_WEBSOCKETS_WEBSOCKET_STREAM_CREATE_TEST_BASE_H_
 
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/timer/timer.h"
 #include "net/base/net_export.h"
@@ -40,7 +40,7 @@
   void CreateAndConnectStream(const std::string& socket_url,
                               const std::vector<std::string>& sub_protocols,
                               const url::Origin& origin,
-                              scoped_ptr<base::Timer> timer);
+                              std::unique_ptr<base::Timer> timer);
 
   static std::vector<HeaderKeyValuePair> RequestHeadersToVector(
       const HttpRequestHeaders& headers);
@@ -59,18 +59,19 @@
 
  protected:
   WebSocketTestURLRequestContextHost url_request_context_host_;
-  scoped_ptr<WebSocketStreamRequest> stream_request_;
+  std::unique_ptr<WebSocketStreamRequest> stream_request_;
   // Only set if the connection succeeded.
-  scoped_ptr<WebSocketStream> stream_;
+  std::unique_ptr<WebSocketStream> stream_;
   // Only set if the connection failed.
   std::string failure_message_;
   bool has_failed_;
-  scoped_ptr<WebSocketHandshakeRequestInfo> request_info_;
-  scoped_ptr<WebSocketHandshakeResponseInfo> response_info_;
-  scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks> ssl_error_callbacks_;
+  std::unique_ptr<WebSocketHandshakeRequestInfo> request_info_;
+  std::unique_ptr<WebSocketHandshakeResponseInfo> response_info_;
+  std::unique_ptr<WebSocketEventInterface::SSLErrorCallbacks>
+      ssl_error_callbacks_;
   SSLInfo ssl_info_;
   bool ssl_fatal_;
-  std::vector<scoped_ptr<SSLSocketDataProvider>> ssl_data_;
+  std::vector<std::unique_ptr<SSLSocketDataProvider>> ssl_data_;
 
   // This temporarily sets WebSocketEndpointLockManager unlock delay to zero
   // during tests.
diff --git a/net/websockets/websocket_stream_test.cc b/net/websockets/websocket_stream_test.cc
index a5f5f41..91ccdde 100644
--- a/net/websockets/websocket_stream_test.cc
+++ b/net/websockets/websocket_stream_test.cc
@@ -11,6 +11,7 @@
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/metrics/histogram_samples.h"
 #include "base/metrics/statistics_recorder.h"
@@ -45,10 +46,10 @@
 // copied. It is up to the caller to ensure they stay in scope until the test
 // ends.
 template <size_t reads_count, size_t writes_count>
-scoped_ptr<SequencedSocketData> BuildSocketData(
-    MockRead(&reads)[reads_count],
-    MockWrite(&writes)[writes_count]) {
-  scoped_ptr<SequencedSocketData> socket_data(
+std::unique_ptr<SequencedSocketData> BuildSocketData(
+    MockRead (&reads)[reads_count],
+    MockWrite (&writes)[writes_count]) {
+  std::unique_ptr<SequencedSocketData> socket_data(
       new SequencedSocketData(reads, reads_count, writes, writes_count));
   socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK));
   return socket_data;
@@ -56,8 +57,8 @@
 
 // Builder for a SequencedSocketData that expects nothing. This does not
 // set the connect data, so the calling code must do that explicitly.
-scoped_ptr<SequencedSocketData> BuildNullSocketData() {
-  return make_scoped_ptr(new SequencedSocketData(NULL, 0, NULL, 0));
+std::unique_ptr<SequencedSocketData> BuildNullSocketData() {
+  return base::WrapUnique(new SequencedSocketData(NULL, 0, NULL, 0));
 }
 
 class MockWeakTimer : public base::MockTimer,
@@ -93,7 +94,7 @@
       const url::Origin& origin,
       const std::string& extra_request_headers,
       const std::string& response_body,
-      scoped_ptr<base::Timer> timer = scoped_ptr<base::Timer>()) {
+      std::unique_ptr<base::Timer> timer = std::unique_ptr<base::Timer>()) {
     url_request_context_host_.SetExpectations(
         WebSocketStandardRequest(socket_path, socket_host, origin,
                                  extra_request_headers),
@@ -111,7 +112,7 @@
       const url::Origin& origin,
       const std::string& extra_request_headers,
       const std::string& extra_response_headers,
-      scoped_ptr<base::Timer> timer = scoped_ptr<base::Timer>()) {
+      std::unique_ptr<base::Timer> timer = std::unique_ptr<base::Timer>()) {
     CreateAndConnectCustomResponse(
         socket_url, socket_host, socket_path, sub_protocols, origin,
         extra_request_headers,
@@ -122,14 +123,14 @@
       const std::string& socket_url,
       const std::vector<std::string>& sub_protocols,
       const url::Origin& origin,
-      scoped_ptr<SequencedSocketData> socket_data,
-      scoped_ptr<base::Timer> timer = scoped_ptr<base::Timer>()) {
+      std::unique_ptr<SequencedSocketData> socket_data,
+      std::unique_ptr<base::Timer> timer = std::unique_ptr<base::Timer>()) {
     AddRawExpectations(std::move(socket_data));
     CreateAndConnectStream(socket_url, sub_protocols, origin, std::move(timer));
   }
 
   // Add additional raw expectations for sockets created before the final one.
-  void AddRawExpectations(scoped_ptr<SequencedSocketData> socket_data) {
+  void AddRawExpectations(std::unique_ptr<SequencedSocketData> socket_data) {
     url_request_context_host_.AddRawExpectations(std::move(socket_data));
   }
 };
@@ -158,7 +159,7 @@
  public:
   CommonAuthTestHelper() : reads1_(), writes1_(), reads2_(), writes2_() {}
 
-  scoped_ptr<SequencedSocketData> BuildSocketData1(
+  std::unique_ptr<SequencedSocketData> BuildSocketData1(
       const std::string& response) {
     request1_ =
         WebSocketStandardRequest("/", "localhost", LocalhostOrigin(), "");
@@ -170,7 +171,7 @@
     return BuildSocketData(reads1_, writes1_);
   }
 
-  scoped_ptr<SequencedSocketData> BuildSocketData2(
+  std::unique_ptr<SequencedSocketData> BuildSocketData2(
       const std::string& request,
       const std::string& response) {
     request2_ = request;
@@ -290,11 +291,11 @@
     void TestBody() override {}
   };
 
-  scoped_ptr<base::HistogramSamples> GetSamples(const std::string& name) {
+  std::unique_ptr<base::HistogramSamples> GetSamples(const std::string& name) {
     base::HistogramBase* histogram =
         base::StatisticsRecorder::FindHistogram(name);
     return histogram ? histogram->SnapshotSamples()
-                     : scoped_ptr<base::HistogramSamples>();
+                     : std::unique_ptr<base::HistogramSamples>();
   }
 };
 
@@ -520,7 +521,7 @@
   WaitUntilConnectDone();
 
   ASSERT_TRUE(stream_);
-  std::vector<scoped_ptr<WebSocketFrame>> frames;
+  std::vector<std::unique_ptr<WebSocketFrame>> frames;
   CompletionCallback callback;
   ASSERT_EQ(OK, stream_->ReadFrames(&frames, callback));
   ASSERT_EQ(1U, frames.size());
@@ -800,7 +801,7 @@
 
 // Connect failure must look just like negotiation failure.
 TEST_F(WebSocketStreamCreateTest, ConnectionFailure) {
-  scoped_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
+  std::unique_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
   socket_data->set_connect_data(
       MockConnect(SYNCHRONOUS, ERR_CONNECTION_REFUSED));
   CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
@@ -815,7 +816,7 @@
 
 // Connect timeout must look just like any other failure.
 TEST_F(WebSocketStreamCreateTest, ConnectionTimeout) {
-  scoped_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
+  std::unique_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
   socket_data->set_connect_data(
       MockConnect(ASYNC, ERR_CONNECTION_TIMED_OUT));
   CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
@@ -828,9 +829,9 @@
 
 // The server doesn't respond to the opening handshake.
 TEST_F(WebSocketStreamCreateTest, HandshakeTimeout) {
-  scoped_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
+  std::unique_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
   socket_data->set_connect_data(MockConnect(SYNCHRONOUS, ERR_IO_PENDING));
-  scoped_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false));
+  std::unique_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false));
   base::WeakPtr<MockWeakTimer> weak_timer = timer->AsWeakPtr();
   CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
                                   LocalhostOrigin(), std::move(socket_data),
@@ -850,7 +851,7 @@
 
 // When the connection establishes the timer should be stopped.
 TEST_F(WebSocketStreamCreateTest, HandshakeTimerOnSuccess) {
-  scoped_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false));
+  std::unique_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false));
   base::WeakPtr<MockWeakTimer> weak_timer = timer->AsWeakPtr();
 
   CreateAndConnectStandard("ws://localhost/", "localhost", "/",
@@ -868,10 +869,10 @@
 
 // When the connection fails the timer should be stopped.
 TEST_F(WebSocketStreamCreateTest, HandshakeTimerOnFailure) {
-  scoped_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
+  std::unique_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
   socket_data->set_connect_data(
       MockConnect(SYNCHRONOUS, ERR_CONNECTION_REFUSED));
-  scoped_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false));
+  std::unique_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false));
   base::WeakPtr<MockWeakTimer> weak_timer = timer->AsWeakPtr();
   CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
                                   LocalhostOrigin(), std::move(socket_data),
@@ -889,7 +890,7 @@
 
 // Cancellation during connect works.
 TEST_F(WebSocketStreamCreateTest, CancellationDuringConnect) {
-  scoped_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
+  std::unique_ptr<SequencedSocketData> socket_data(BuildNullSocketData());
   socket_data->set_connect_data(MockConnect(SYNCHRONOUS, ERR_IO_PENDING));
   CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
                                   LocalhostOrigin(), std::move(socket_data));
@@ -909,7 +910,7 @@
   socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK));
   CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
                                   LocalhostOrigin(),
-                                  make_scoped_ptr(socket_data));
+                                  base::WrapUnique(socket_data));
   base::RunLoop().RunUntilIdle();
   EXPECT_TRUE(socket_data->AllWriteDataConsumed());
   stream_request_.reset();
@@ -929,7 +930,8 @@
   MockRead reads[] = {
       MockRead(SYNCHRONOUS, ERR_IO_PENDING, 1),
   };
-  scoped_ptr<SequencedSocketData> socket_data(BuildSocketData(reads, writes));
+  std::unique_ptr<SequencedSocketData> socket_data(
+      BuildSocketData(reads, writes));
   SequencedSocketData* socket_data_raw_ptr = socket_data.get();
   CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
                                   LocalhostOrigin(), std::move(socket_data));
@@ -970,7 +972,8 @@
       WebSocketStandardRequest("/", "localhost", LocalhostOrigin(), "");
   MockWrite writes[] = {MockWrite(ASYNC, request.data(), request.size(), 0)};
   MockRead reads[] = {MockRead(ASYNC, 0, 1)};
-  scoped_ptr<SequencedSocketData> socket_data(BuildSocketData(reads, writes));
+  std::unique_ptr<SequencedSocketData> socket_data(
+      BuildSocketData(reads, writes));
   SequencedSocketData* socket_data_raw_ptr = socket_data.get();
   CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
                                   LocalhostOrigin(), std::move(socket_data));
@@ -984,12 +987,12 @@
 }
 
 TEST_F(WebSocketStreamCreateTest, SelfSignedCertificateFailure) {
-  ssl_data_.push_back(make_scoped_ptr(
+  ssl_data_.push_back(base::WrapUnique(
       new SSLSocketDataProvider(ASYNC, ERR_CERT_AUTHORITY_INVALID)));
   ssl_data_[0]->cert =
       ImportCertFromFile(GetTestCertsDirectory(), "unittest.selfsigned.der");
   ASSERT_TRUE(ssl_data_[0]->cert.get());
-  scoped_ptr<SequencedSocketData> raw_socket_data(BuildNullSocketData());
+  std::unique_ptr<SequencedSocketData> raw_socket_data(BuildNullSocketData());
   CreateAndConnectRawExpectations("wss://localhost/", NoSubProtocols(),
                                   LocalhostOrigin(),
                                   std::move(raw_socket_data));
@@ -1004,7 +1007,7 @@
 }
 
 TEST_F(WebSocketStreamCreateTest, SelfSignedCertificateSuccess) {
-  scoped_ptr<SSLSocketDataProvider> ssl_data(
+  std::unique_ptr<SSLSocketDataProvider> ssl_data(
       new SSLSocketDataProvider(ASYNC, ERR_CERT_AUTHORITY_INVALID));
   ssl_data->cert =
       ImportCertFromFile(GetTestCertsDirectory(), "unittest.selfsigned.der");
@@ -1075,7 +1078,7 @@
 
 TEST_F(WebSocketStreamCreateUMATest, Incomplete) {
   const std::string name("Net.WebSocket.HandshakeResult");
-  scoped_ptr<base::HistogramSamples> original(GetSamples(name));
+  std::unique_ptr<base::HistogramSamples> original(GetSamples(name));
 
   {
     StreamCreation creation;
@@ -1084,7 +1087,7 @@
                                       LocalhostOrigin(), "", "");
   }
 
-  scoped_ptr<base::HistogramSamples> samples(GetSamples(name));
+  std::unique_ptr<base::HistogramSamples> samples(GetSamples(name));
   ASSERT_TRUE(samples);
   if (original) {
     samples->Subtract(*original);  // Cancel the original values.
@@ -1096,7 +1099,7 @@
 
 TEST_F(WebSocketStreamCreateUMATest, Connected) {
   const std::string name("Net.WebSocket.HandshakeResult");
-  scoped_ptr<base::HistogramSamples> original(GetSamples(name));
+  std::unique_ptr<base::HistogramSamples> original(GetSamples(name));
 
   {
     StreamCreation creation;
@@ -1106,7 +1109,7 @@
     creation.WaitUntilConnectDone();
   }
 
-  scoped_ptr<base::HistogramSamples> samples(GetSamples(name));
+  std::unique_ptr<base::HistogramSamples> samples(GetSamples(name));
   ASSERT_TRUE(samples);
   if (original) {
     samples->Subtract(*original);  // Cancel the original values.
@@ -1118,7 +1121,7 @@
 
 TEST_F(WebSocketStreamCreateUMATest, Failed) {
   const std::string name("Net.WebSocket.HandshakeResult");
-  scoped_ptr<base::HistogramSamples> original(GetSamples(name));
+  std::unique_ptr<base::HistogramSamples> original(GetSamples(name));
 
   {
     StreamCreation creation;
@@ -1134,7 +1137,7 @@
     creation.WaitUntilConnectDone();
   }
 
-  scoped_ptr<base::HistogramSamples> samples(GetSamples(name));
+  std::unique_ptr<base::HistogramSamples> samples(GetSamples(name));
   ASSERT_TRUE(samples);
   if (original) {
     samples->Subtract(*original);  // Cancel the original values.
@@ -1159,7 +1162,8 @@
       MockRead(SYNCHRONOUS, ERR_CONNECTION_CLOSED, 2),
   };
   MockWrite writes[] = {MockWrite(SYNCHRONOUS, 0, request.c_str())};
-  scoped_ptr<SequencedSocketData> socket_data(BuildSocketData(reads, writes));
+  std::unique_ptr<SequencedSocketData> socket_data(
+      BuildSocketData(reads, writes));
   socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK));
   CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
                                   LocalhostOrigin(), std::move(socket_data));
@@ -1184,7 +1188,8 @@
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, 1, kProxyResponse)};
   MockWrite writes[] = {MockWrite(SYNCHRONOUS, 0, kConnectRequest)};
-  scoped_ptr<SequencedSocketData> socket_data(BuildSocketData(reads, writes));
+  std::unique_ptr<SequencedSocketData> socket_data(
+      BuildSocketData(reads, writes));
   url_request_context_host_.SetProxyConfig("https=proxy:8000");
   CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
                                   LocalhostOrigin(), std::move(socket_data));
diff --git a/net/websockets/websocket_test_util.cc b/net/websockets/websocket_test_util.cc
index 3b7ad10..46dda2b 100644
--- a/net/websockets/websocket_test_util.cc
+++ b/net/websockets/websocket_test_util.cc
@@ -86,8 +86,8 @@
   std::string return_to_read;
   std::vector<MockRead> reads;
   MockWrite write;
-  std::vector<scoped_ptr<SequencedSocketData>> socket_data_vector;
-  std::vector<scoped_ptr<SSLSocketDataProvider>> ssl_socket_data_vector;
+  std::vector<std::unique_ptr<SequencedSocketData>> socket_data_vector;
+  std::vector<std::unique_ptr<SSLSocketDataProvider>> ssl_socket_data_vector;
   MockClientSocketFactory factory;
 };
 
@@ -125,20 +125,20 @@
                           kHttpStreamParserBufferSize),
                  sequence++));
   }
-  scoped_ptr<SequencedSocketData> socket_data(new SequencedSocketData(
+  std::unique_ptr<SequencedSocketData> socket_data(new SequencedSocketData(
       detail_->reads.data(), detail_->reads.size(), &detail_->write, 1));
   socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK));
   AddRawExpectations(std::move(socket_data));
 }
 
 void WebSocketMockClientSocketFactoryMaker::AddRawExpectations(
-    scoped_ptr<SequencedSocketData> socket_data) {
+    std::unique_ptr<SequencedSocketData> socket_data) {
   detail_->factory.AddSocketDataProvider(socket_data.get());
   detail_->socket_data_vector.push_back(std::move(socket_data));
 }
 
 void WebSocketMockClientSocketFactoryMaker::AddSSLSocketDataProvider(
-    scoped_ptr<SSLSocketDataProvider> ssl_socket_data) {
+    std::unique_ptr<SSLSocketDataProvider> ssl_socket_data) {
   detail_->factory.AddSSLSocketDataProvider(ssl_socket_data.get());
   detail_->ssl_socket_data_vector.push_back(std::move(ssl_socket_data));
 }
@@ -151,12 +151,12 @@
 WebSocketTestURLRequestContextHost::~WebSocketTestURLRequestContextHost() {}
 
 void WebSocketTestURLRequestContextHost::AddRawExpectations(
-    scoped_ptr<SequencedSocketData> socket_data) {
+    std::unique_ptr<SequencedSocketData> socket_data) {
   maker_.AddRawExpectations(std::move(socket_data));
 }
 
 void WebSocketTestURLRequestContextHost::AddSSLSocketDataProvider(
-    scoped_ptr<SSLSocketDataProvider> ssl_socket_data) {
+    std::unique_ptr<SSLSocketDataProvider> ssl_socket_data) {
   maker_.AddSSLSocketDataProvider(std::move(ssl_socket_data));
 }
 
diff --git a/net/websockets/websocket_test_util.h b/net/websockets/websocket_test_util.h
index 054c6766..becaba8 100644
--- a/net/websockets/websocket_test_util.h
+++ b/net/websockets/websocket_test_util.h
@@ -7,10 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "net/url_request/url_request_test_util.h"
 #include "net/websockets/websocket_stream.h"
 
@@ -82,7 +82,7 @@
 
   // A low-level interface to permit arbitrary expectations to be added. The
   // mock sockets will be created in the same order that they were added.
-  void AddRawExpectations(scoped_ptr<SequencedSocketData> socket_data);
+  void AddRawExpectations(std::unique_ptr<SequencedSocketData> socket_data);
 
   // Allow an SSL socket data provider to be added. You must also supply a mock
   // transport socket for it to use. If the mock SSL handshake fails then the
@@ -90,14 +90,14 @@
   // mock handshake succeeds then the data from the underlying transport socket
   // will be passed through unchanged (without encryption).
   void AddSSLSocketDataProvider(
-      scoped_ptr<SSLSocketDataProvider> ssl_socket_data);
+      std::unique_ptr<SSLSocketDataProvider> ssl_socket_data);
 
   // Call to get a pointer to the factory, which remains owned by this object.
   MockClientSocketFactory* factory();
 
  private:
   struct Detail;
-  scoped_ptr<Detail> detail_;
+  std::unique_ptr<Detail> detail_;
 
   DISALLOW_COPY_AND_ASSIGN(WebSocketMockClientSocketFactoryMaker);
 };
@@ -115,11 +115,11 @@
     maker_.SetExpectations(expect_written, return_to_read);
   }
 
-  void AddRawExpectations(scoped_ptr<SequencedSocketData> socket_data);
+  void AddRawExpectations(std::unique_ptr<SequencedSocketData> socket_data);
 
   // Allow an SSL socket data provider to be added.
   void AddSSLSocketDataProvider(
-      scoped_ptr<SSLSocketDataProvider> ssl_socket_data);
+      std::unique_ptr<SSLSocketDataProvider> ssl_socket_data);
 
   // Allow a proxy to be set. Usage:
   //   SetProxyConfig("proxy1:8000");
@@ -135,7 +135,7 @@
   WebSocketMockClientSocketFactoryMaker maker_;
   TestURLRequestContext url_request_context_;
   TestNetworkDelegate network_delegate_;
-  scoped_ptr<ProxyService> proxy_service_;
+  std::unique_ptr<ProxyService> proxy_service_;
   bool url_request_context_initialized_;
 
   DISALLOW_COPY_AND_ASSIGN(WebSocketTestURLRequestContextHost);
diff --git a/remoting/test/codec_perftest.cc b/remoting/test/codec_perftest.cc
index b36b38f..5bfdc2b 100644
--- a/remoting/test/codec_perftest.cc
+++ b/remoting/test/codec_perftest.cc
@@ -87,15 +87,15 @@
       total_bytes += packet->data().size();
 
     switch (frame_generator_->last_frame_type()) {
-      case CyclicFrameGenerator::FrameType::EMPTY:
+      case CyclicFrameGenerator::ChangeType::NO_CHANGES:
         total_latency_empty_frames += latency;
         ++empty_frame_count;
         break;
-      case CyclicFrameGenerator::FrameType::FULL:
+      case CyclicFrameGenerator::ChangeType::FULL:
         total_latency_big_frames += latency;
         ++big_frame_count;
         break;
-      case CyclicFrameGenerator::FrameType::CURSOR:
+      case CyclicFrameGenerator::ChangeType::CURSOR:
         total_latency_small_frames += latency;
         ++small_frame_count;
         break;
diff --git a/remoting/test/cyclic_frame_generator.cc b/remoting/test/cyclic_frame_generator.cc
index 91d61c7..c8f566c5 100644
--- a/remoting/test/cyclic_frame_generator.cc
+++ b/remoting/test/cyclic_frame_generator.cc
@@ -55,12 +55,11 @@
 }
 
 }  // namespace
-CyclicFrameGenerator::FrameInfo::FrameInfo() = default;
 
-CyclicFrameGenerator::FrameInfo::FrameInfo(int frame_id,
-                                           FrameType type,
-                                           base::TimeTicks timestamp)
-    : frame_id(frame_id), type(type), timestamp(timestamp) {}
+CyclicFrameGenerator::ChangeInfo::ChangeInfo() = default;
+CyclicFrameGenerator::ChangeInfo::ChangeInfo(ChangeType type,
+                                             base::TimeTicks timestamp)
+    : type(type), timestamp(timestamp) {}
 
 // static
 scoped_refptr<CyclicFrameGenerator> CyclicFrameGenerator::Create() {
@@ -101,9 +100,10 @@
 std::unique_ptr<webrtc::DesktopFrame> CyclicFrameGenerator::GenerateFrame(
     webrtc::SharedMemoryFactory* shared_memory_factory) {
   base::TimeTicks now = clock_->NowTicks();
+  int frame_id = (now - started_time_) / cursor_blink_period_;
   int reference_frame =
       ((now - started_time_) / frame_cycle_period_) % reference_frames_.size();
-  bool cursor_state = ((now - started_time_) / cursor_blink_period_) % 2;
+  bool cursor_state = frame_id % 2;
 
   std::unique_ptr<webrtc::DesktopFrame> frame(
       new webrtc::BasicDesktopFrame(screen_size_));
@@ -122,20 +122,16 @@
     // The whole frame has changed.
     frame->mutable_updated_region()->AddRect(
         webrtc::DesktopRect::MakeSize(screen_size_));
-    last_frame_type_ = FrameType::FULL;
+    last_frame_type_ = ChangeType::FULL;
   } else if (last_cursor_state_ != cursor_state) {
     // Cursor state has changed.
     frame->mutable_updated_region()->AddRect(cursor_rect);
-    last_frame_type_ = FrameType::CURSOR;
+    last_frame_type_ = ChangeType::CURSOR;
   } else {
     // No changes.
-    last_frame_type_ = FrameType::EMPTY;
+    last_frame_type_ = ChangeType::NO_CHANGES;
   }
 
-  // Increment frame_id for non-empty frames.
-  int frame_id = (last_frame_type_ == FrameType::EMPTY) ? last_frame_id_
-                                                        : last_frame_id_ + 1;
-
   // Render barcode.
   if (draw_barcode_) {
     uint32_t value = static_cast<uint32_t>(frame_id);
@@ -154,12 +150,6 @@
     }
   }
 
-  // Add non-empty frames to |generated_frames_info_|.
-  if (last_frame_type_ != FrameType::EMPTY) {
-    generated_frames_info_[frame_id] =
-        FrameInfo(frame_id, last_frame_type_, clock_->NowTicks());
-  }
-
   last_reference_frame_ = reference_frame;
   last_cursor_state_ = cursor_state;
   last_frame_id_ = frame_id;
@@ -167,7 +157,7 @@
   return frame;
 }
 
-CyclicFrameGenerator::FrameInfo CyclicFrameGenerator::IdentifyFrame(
+CyclicFrameGenerator::ChangeInfoList CyclicFrameGenerator::GetChangeList(
     webrtc::DesktopFrame* frame) {
   CHECK(draw_barcode_);
   int frame_id = 0;
@@ -195,10 +185,20 @@
       frame_id |= 1;
   }
 
-  if (!generated_frames_info_.count(frame_id))
-    LOG(FATAL) << "Barcode contains unknown frame_id: " << frame_id;
+  CHECK_GE(frame_id, last_identifier_frame_);
 
-  return generated_frames_info_[frame_id];
+  ChangeInfoList result;
+  for (int i = last_identifier_frame_ + 1; i <= frame_id; ++i) {
+    ChangeType type = (i % (frame_cycle_period_ / cursor_blink_period_) == 0)
+                          ? ChangeType::FULL
+                          : ChangeType::CURSOR;
+    base::TimeTicks timestamp =
+        started_time_ + i * base::TimeDelta(cursor_blink_period_);
+    result.push_back(ChangeInfo(type, timestamp));
+  }
+  last_identifier_frame_ = frame_id;
+
+  return result;
 }
 
 }  // namespace test
diff --git a/remoting/test/cyclic_frame_generator.h b/remoting/test/cyclic_frame_generator.h
index 9dd26bae..fbe9ca8 100644
--- a/remoting/test/cyclic_frame_generator.h
+++ b/remoting/test/cyclic_frame_generator.h
@@ -24,9 +24,9 @@
 class CyclicFrameGenerator
     : public base::RefCountedThreadSafe<CyclicFrameGenerator> {
  public:
-  enum class FrameType {
-    // Frame had no changes.
-    EMPTY,
+  enum class ChangeType {
+    // No changes.
+    NO_CHANGES,
 
     // Whole screen changed.
     FULL,
@@ -35,15 +35,16 @@
     CURSOR,
   };
 
-  struct FrameInfo {
-    FrameInfo();
-    FrameInfo(int frame_id, FrameType type, base::TimeTicks timestamp);
+  struct ChangeInfo {
+    ChangeInfo();
+    ChangeInfo(ChangeType type, base::TimeTicks timestamp);
 
-    int frame_id = 0;
-    FrameType type = FrameType::EMPTY;
+    ChangeType type = ChangeType::NO_CHANGES;
     base::TimeTicks timestamp;
   };
 
+  typedef std::vector<ChangeInfo> ChangeInfoList;
+
   static scoped_refptr<CyclicFrameGenerator> Create();
 
   CyclicFrameGenerator(
@@ -60,18 +61,21 @@
   void SetTickClock(base::TickClock* tick_clock);
 
   // When |draw_barcode| is set to true a barcode is drawn on each generated
-  // frame. This make it possible to call IdentifyFrame() to identify the frame
+  // frame. This makes it possible to call GetChangeList() to identify the frame
   // by its content.
   void set_draw_barcode(bool draw_barcode) { draw_barcode_ = draw_barcode; }
 
   std::unique_ptr<webrtc::DesktopFrame> GenerateFrame(
       webrtc::SharedMemoryFactory* shared_memory_factory);
 
-  FrameType last_frame_type() { return last_frame_type_; }
+  ChangeType last_frame_type() { return last_frame_type_; }
 
-  // Identifies |frame| by its content and returns FrameInfo corresponding to
-  // the frame.
-  FrameInfo IdentifyFrame(webrtc::DesktopFrame* frame);
+  // Identifies |frame| by its content and returns list of ChangeInfo for all
+  // changes between the frame passed to the previous GetChangeList() call and
+  // this one. GetChangeList() must be called for the frames in the order in
+  // which they were received, which is expected to match the order in which
+  // they are generated.
+  ChangeInfoList GetChangeList(webrtc::DesktopFrame* frame);
 
  private:
   ~CyclicFrameGenerator();
@@ -97,13 +101,14 @@
   // True if the cursor was rendered on the last generated frame.
   bool last_cursor_state_ = false;
 
-  FrameType last_frame_type_ = FrameType::EMPTY;
+  ChangeType last_frame_type_ = ChangeType::NO_CHANGES;
 
   bool draw_barcode_ = false;
 
   base::TimeTicks started_time_;
 
-  std::map<int, FrameInfo> generated_frames_info_;
+  // frame_id of the frame passed to the last GetChangeList() call.
+  int last_identifier_frame_ = -1;
 
   DISALLOW_COPY_AND_ASSIGN(CyclicFrameGenerator);
 };
diff --git a/remoting/test/protocol_perftest.cc b/remoting/test/protocol_perftest.cc
index a19f994..9da5eb3 100644
--- a/remoting/test/protocol_perftest.cc
+++ b/remoting/test/protocol_perftest.cc
@@ -420,36 +420,39 @@
     StartHostAndClient(webrtc, protocol::ChannelConfig::CODEC_VP8);
     ASSERT_NO_FATAL_FAILURE(WaitConnected());
 
+    int skipped_frames = 0;
+    while (skipped_frames < 10) {
+      std::unique_ptr<webrtc::DesktopFrame> frame = ReceiveFrame();
+      test::CyclicFrameGenerator::ChangeInfoList changes =
+          frame_generator->GetChangeList(frame.get());
+      skipped_frames += changes.size();
+    }
+
     base::TimeDelta total_latency_big_frames;
     int big_frame_count = 0;
     base::TimeDelta total_latency_small_frames;
     int small_frame_count = 0;
 
-    int last_frame_id = -1;
-    for (int i = 0; i < 30; ++i) {
+    while (big_frame_count + small_frame_count < 30) {
       std::unique_ptr<webrtc::DesktopFrame> frame = ReceiveFrame();
-      test::CyclicFrameGenerator::FrameInfo frame_info =
-          frame_generator->IdentifyFrame(frame.get());
-      base::TimeDelta latency = base::TimeTicks::Now() - frame_info.timestamp;
-
-      if (frame_info.frame_id > last_frame_id) {
-        last_frame_id = frame_info.frame_id;
-
-        switch (frame_info.type) {
-          case test::CyclicFrameGenerator::FrameType::EMPTY:
+      base::TimeTicks frame_received_time = base::TimeTicks::Now();
+      test::CyclicFrameGenerator::ChangeInfoList changes =
+          frame_generator->GetChangeList(frame.get());
+      for (auto& change_info : changes) {
+        base::TimeDelta latency = frame_received_time - change_info.timestamp;
+        switch (change_info.type) {
+          case test::CyclicFrameGenerator::ChangeType::NO_CHANGES:
             NOTREACHED();
             break;
-          case test::CyclicFrameGenerator::FrameType::FULL:
+          case test::CyclicFrameGenerator::ChangeType::FULL:
             total_latency_big_frames += latency;
             ++big_frame_count;
             break;
-          case test::CyclicFrameGenerator::FrameType::CURSOR:
+          case test::CyclicFrameGenerator::ChangeType::CURSOR:
             total_latency_small_frames += latency;
             ++small_frame_count;
             break;
         }
-      } else {
-        LOG(ERROR) << "Unexpected duplicate frame " << frame_info.frame_id;
       }
     }
 
diff --git a/services/catalog/BUILD.gn b/services/catalog/BUILD.gn
index f491aa9..ef626922 100644
--- a/services/catalog/BUILD.gn
+++ b/services/catalog/BUILD.gn
@@ -17,11 +17,15 @@
   sources = [
     "catalog.cc",
     "catalog.h",
+    "constants.cc",
+    "constants.h",
     "entry.cc",
     "entry.h",
-    "factory.cc",
-    "factory.h",
     "manifest_provider.h",
+    "reader.cc",
+    "reader.h",
+    "resolver.cc",
+    "resolver.h",
     "store.cc",
     "store.h",
     "types.h",
diff --git a/services/catalog/catalog.cc b/services/catalog/catalog.cc
index 8ebb33c0..2680d75 100644
--- a/services/catalog/catalog.cc
+++ b/services/catalog/catalog.cc
@@ -5,277 +5,84 @@
 #include "services/catalog/catalog.h"
 
 #include "base/bind.h"
-#include "base/json/json_file_value_serializer.h"
-#include "base/json/json_reader.h"
-#include "base/strings/string_split.h"
-#include "base/task_runner_util.h"
-#include "base/thread_task_runner_handle.h"
-#include "mojo/common/url_type_converters.h"
-#include "services/catalog/entry.h"
-#include "services/catalog/manifest_provider.h"
-#include "services/catalog/store.h"
-#include "services/shell/public/cpp/names.h"
-#include "url/gurl.h"
-#include "url/url_util.h"
+#include "services/catalog/constants.h"
+#include "services/catalog/reader.h"
+#include "services/catalog/resolver.h"
+#include "services/shell/public/cpp/connection.h"
+#include "services/shell/public/cpp/shell_connection.h"
 
 namespace catalog {
-namespace {
 
-base::FilePath GetManifestPath(const base::FilePath& package_dir,
-                               const std::string& name) {
-  // TODO(beng): think more about how this should be done for exe targets.
-  std::string type = shell::GetNameType(name);
-  std::string path = shell::GetNamePath(name);
-  if (type == shell::kNameType_Mojo) {
-    return package_dir.AppendASCII("Mojo Applications").AppendASCII(
-        path + "/manifest.json");
-  }
-  if (type == shell::kNameType_Exe)
-    return package_dir.AppendASCII(path + "_manifest.json");
-  return base::FilePath();
-}
-
-base::FilePath GetPackagePath(const base::FilePath& package_dir,
-                              const std::string& name) {
-  std::string type = shell::GetNameType(name);
-  if (type == shell::kNameType_Mojo) {
-    // It's still a mojo: URL, use the default mapping scheme.
-    const std::string host = shell::GetNamePath(name);
-    return package_dir.AppendASCII("Mojo Applications").AppendASCII(
-        host + "/" + host + ".mojo");
-  }
-  if (type == shell::kNameType_Exe) {
-#if defined OS_WIN
-    std::string extension = ".exe";
-#else
-    std::string extension;
-#endif
-    return package_dir.AppendASCII(shell::GetNamePath(name) + extension);
-  }
-  return base::FilePath();
-}
-
-scoped_ptr<ReadManifestResult> ProcessManifest(
-    const base::FilePath& user_package_dir,
-    const base::FilePath& system_package_dir,
-    const std::string& name,
-    scoped_ptr<base::Value> manifest_root) {
-  scoped_ptr<Entry> entry(new Entry(name));
-  if (manifest_root) {
-    const base::DictionaryValue* dictionary = nullptr;
-    CHECK(manifest_root->GetAsDictionary(&dictionary));
-    entry = Entry::Deserialize(*dictionary);
-  }
-  entry->set_path(GetPackagePath(system_package_dir, name));
-
-  scoped_ptr<ReadManifestResult> result(new ReadManifestResult);
-  // NOTE: This TypeConverter must run on a thread which allows IO.
-  result->resolve_result = shell::mojom::ResolveResult::From(*entry);
-  result->catalog_entry = std::move(entry);
-  result->package_dir = system_package_dir;
-  return result;
-}
-
-scoped_ptr<ReadManifestResult> ReadManifest(
-    const base::FilePath& user_package_dir,
-    const base::FilePath& system_package_dir,
-    const std::string& name) {
-  base::FilePath manifest_path = GetManifestPath(system_package_dir, name);
-  JSONFileValueDeserializer deserializer(manifest_path);
-  int error = 0;
-  std::string message;
-
-  // TODO(beng): probably want to do more detailed error checking. This should
-  //             be done when figuring out if to unblock connection completion.
-  return ProcessManifest(user_package_dir, system_package_dir, name,
-                         deserializer.Deserialize(&error, &message));
-}
-
-void AddEntryToMap(const Entry& entry,
-                   mojo::Map<mojo::String, mojom::CatalogEntryPtr>* map) {
-  mojom::CatalogEntryPtr entry_ptr(mojom::CatalogEntry::New());
-  entry_ptr->display_name = entry.display_name();
-  (*map)[entry.name()] = std::move(entry_ptr);
-}
-
-}  // namespace
-
-ReadManifestResult::ReadManifestResult() {}
-ReadManifestResult::~ReadManifestResult() {}
-
-////////////////////////////////////////////////////////////////////////////////
-// Catalog, public:
-
-Catalog::Catalog(scoped_ptr<Store> store,
-                 base::TaskRunner* file_task_runner,
-                 EntryCache* system_catalog,
+Catalog::Catalog(base::TaskRunner* file_task_runner,
+                 scoped_ptr<Store> store,
                  ManifestProvider* manifest_provider)
-    : manifest_provider_(manifest_provider),
+    : file_task_runner_(file_task_runner),
       store_(std::move(store)),
-      file_task_runner_(file_task_runner),
-      system_catalog_(system_catalog),
       weak_factory_(this) {
-  PathService::Get(base::DIR_MODULE, &system_package_dir_);
-  DeserializeCatalog();
+  shell::mojom::ShellClientRequest request = GetProxy(&shell_client_);
+  shell_connection_.reset(new shell::ShellConnection(this, std::move(request)));
+
+  base::FilePath system_package_dir;
+  PathService::Get(base::DIR_MODULE, &system_package_dir);
+  system_package_dir = system_package_dir.AppendASCII(kMojoApplicationsDirName);
+  system_reader_.reset(new Reader(file_task_runner, manifest_provider));
+  system_reader_->Read(system_package_dir, &system_catalog_,
+                       base::Bind(&Catalog::SystemPackageDirScanned,
+                                  weak_factory_.GetWeakPtr()));
 }
 
 Catalog::~Catalog() {}
 
-void Catalog::BindResolver(mojom::ResolverRequest request) {
-  resolver_bindings_.AddBinding(this, std::move(request));
+shell::mojom::ShellClientPtr Catalog::TakeShellClient() {
+  return std::move(shell_client_);
 }
 
-void Catalog::BindShellResolver(shell::mojom::ShellResolverRequest request) {
-  shell_resolver_bindings_.AddBinding(this, std::move(request));
+bool Catalog::AcceptConnection(shell::Connection* connection) {
+  connection->AddInterface<mojom::Catalog>(this);
+  connection->AddInterface<mojom::Resolver>(this);
+  connection->AddInterface<shell::mojom::ShellResolver>(this);
+  return true;
 }
 
-void Catalog::BindCatalog(mojom::CatalogRequest request) {
-  catalog_bindings_.AddBinding(this, std::move(request));
+void Catalog::Create(shell::Connection* connection,
+                     mojom::ResolverRequest request) {
+  Resolver* resolver =
+      GetResolverForUserId(connection->GetRemoteIdentity().user_id());
+  resolver->BindResolver(std::move(request));
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// Catalog, mojom::Resolver:
-
-void Catalog::ResolveInterfaces(mojo::Array<mojo::String> interfaces,
-                                const ResolveInterfacesCallback& callback) {
-  // TODO(beng): implement.
+void Catalog::Create(shell::Connection* connection,
+                     shell::mojom::ShellResolverRequest request) {
+  Resolver* resolver =
+      GetResolverForUserId(connection->GetRemoteIdentity().user_id());
+  resolver->BindShellResolver(std::move(request));
 }
 
-void Catalog::ResolveMIMEType(const mojo::String& mime_type,
-                              const ResolveMIMETypeCallback& callback) {
-  // TODO(beng): implement.
+void Catalog::Create(shell::Connection* connection,
+                     mojom::CatalogRequest request) {
+  Resolver* resolver =
+      GetResolverForUserId(connection->GetRemoteIdentity().user_id());
+  resolver->BindCatalog(std::move(request));
 }
 
-void Catalog::ResolveProtocolScheme(
-    const mojo::String& scheme,
-    const ResolveProtocolSchemeCallback& callback) {
-  // TODO(beng): implement.
+Resolver* Catalog::GetResolverForUserId(const std::string& user_id) {
+  auto it = resolvers_.find(user_id);
+  if (it != resolvers_.end())
+    return it->second.get();
+
+  // TODO(beng): There needs to be a way to load the store from different users.
+  Resolver* resolver = new Resolver(std::move(store_), system_reader_.get());
+  resolvers_[user_id] = make_scoped_ptr(resolver);
+  if (loaded_)
+    resolver->CacheReady(&system_catalog_);
+
+  return resolver;
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// Catalog, shell::mojom::ShellResolver:
-
-void Catalog::ResolveMojoName(const mojo::String& mojo_name,
-                              const ResolveMojoNameCallback& callback) {
-  std::string type = shell::GetNameType(mojo_name);
-  if (type != "mojo" && type != "exe") {
-    scoped_ptr<Entry> entry(new Entry(mojo_name));
-    callback.Run(shell::mojom::ResolveResult::From(*entry));
-    return;
-  }
-
-  auto entry = user_catalog_.find(mojo_name);
-  if (entry != user_catalog_.end()) {
-    callback.Run(shell::mojom::ResolveResult::From(*entry->second));
-    return;
-  }
-  entry = system_catalog_->find(mojo_name);
-  if (entry != system_catalog_->end()) {
-    callback.Run(shell::mojom::ResolveResult::From(*entry->second));
-    return;
-  }
-
-  std::string manifest_contents;
-  if (manifest_provider_ &&
-      manifest_provider_->GetApplicationManifest(mojo_name.To<std::string>(),
-                                                 &manifest_contents)) {
-    scoped_ptr<base::Value> manifest_root =
-        base::JSONReader::Read(manifest_contents);
-    base::PostTaskAndReplyWithResult(
-        file_task_runner_, FROM_HERE,
-        base::Bind(&ProcessManifest, user_package_dir_, system_package_dir_,
-                   mojo_name, base::Passed(&manifest_root)),
-        base::Bind(&Catalog::OnReadManifest, weak_factory_.GetWeakPtr(),
-                   mojo_name, callback));
-  } else {
-    base::PostTaskAndReplyWithResult(
-        file_task_runner_, FROM_HERE,
-        base::Bind(&ReadManifest, user_package_dir_, system_package_dir_,
-                   mojo_name),
-        base::Bind(&Catalog::OnReadManifest, weak_factory_.GetWeakPtr(),
-                   mojo_name, callback));
-  }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Catalog, mojom::Catalog:
-
-void Catalog::GetEntries(mojo::Array<mojo::String> names,
-                         const GetEntriesCallback& callback) {
-  mojo::Map<mojo::String, mojom::CatalogEntryPtr> entries;
-  if (names.is_null()) {
-    for (const auto& entry : user_catalog_)
-      AddEntryToMap(*entry.second, &entries);
-    for (const auto& entry : *system_catalog_)
-      AddEntryToMap(*entry.second, &entries);
-  } else {
-    std::vector<mojo::String> names_vec = names.PassStorage();
-    for (const std::string& name : names_vec) {
-      Entry* entry = nullptr;
-      if (user_catalog_.find(name) != user_catalog_.end())
-        entry = user_catalog_[name].get();
-      else if (system_catalog_->find(name) != system_catalog_->end())
-        entry = (*system_catalog_)[name].get();
-      else
-        continue;
-      AddEntryToMap(*entry, &entries);
-    }
-  }
-  callback.Run(std::move(entries));
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Catalog, private:
-
-void Catalog::DeserializeCatalog() {
-  if (!store_)
-    return;
-  const base::ListValue* catalog = store_->GetStore();
-  CHECK(catalog);
-  // TODO(sky): make this handle aliases.
-  // TODO(beng): implement this properly!
-  for (auto it = catalog->begin(); it != catalog->end(); ++it) {
-    const base::DictionaryValue* dictionary = nullptr;
-    const base::Value* v = *it;
-    CHECK(v->GetAsDictionary(&dictionary));
-    scoped_ptr<Entry> entry = Entry::Deserialize(*dictionary);
-    if (entry)
-      user_catalog_[entry->name()] = std::move(entry);
-  }
-}
-
-void Catalog::SerializeCatalog() {
-  // TODO(beng): system catalog?
-  scoped_ptr<base::ListValue> catalog(new base::ListValue);
-  for (const auto& entry : user_catalog_)
-    catalog->Append(entry.second->Serialize());
-  if (store_)
-    store_->UpdateStore(std::move(catalog));
-}
-
-// static
-void Catalog::OnReadManifest(base::WeakPtr<Catalog> catalog,
-                             const std::string& name,
-                             const ResolveMojoNameCallback& callback,
-                             scoped_ptr<ReadManifestResult> result) {
-  callback.Run(std::move(result ->resolve_result));
-  if (catalog) {
-    catalog->AddEntryToCatalog(
-        std::move(result->catalog_entry),
-        result->package_dir == catalog->system_package_dir_);
-  }
-}
-
-void Catalog::AddEntryToCatalog(scoped_ptr<Entry> entry,
-                                bool is_system_catalog) {
-  DCHECK(entry);
-  EntryCache* catalog = is_system_catalog ? system_catalog_ : &user_catalog_;
-  if (catalog->end() != catalog->find(entry->name()))
-    return;
-  for (auto child : entry->applications())
-    AddEntryToCatalog(make_scoped_ptr(child), is_system_catalog);
-  (*catalog)[entry->name()] = std::move(entry);
-  SerializeCatalog();
+void Catalog::SystemPackageDirScanned() {
+  loaded_ = true;
+  for (auto& resolver : resolvers_)
+    resolver.second->CacheReady(&system_catalog_);
 }
 
 }  // namespace catalog
diff --git a/services/catalog/catalog.h b/services/catalog/catalog.h
index 9301e53..eccf24c 100644
--- a/services/catalog/catalog.h
+++ b/services/catalog/catalog.h
@@ -5,105 +5,81 @@
 #ifndef SERVICES_CATALOG_CATALOG_H_
 #define SERVICES_CATALOG_CATALOG_H_
 
-#include "base/files/file_path.h"
+#include <map>
+#include <string>
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
-#include "base/path_service.h"
-#include "base/values.h"
-#include "mojo/public/cpp/bindings/binding_set.h"
-#include "services/catalog/entry.h"
+#include "mojo/public/cpp/bindings/binding.h"
 #include "services/catalog/public/interfaces/catalog.mojom.h"
 #include "services/catalog/public/interfaces/resolver.mojom.h"
-#include "services/catalog/store.h"
 #include "services/catalog/types.h"
-#include "services/shell/public/cpp/interface_factory.h"
+#include "services/shell/public/cpp/shell_client.h"
+#include "services/shell/public/interfaces/shell_client.mojom.h"
 #include "services/shell/public/interfaces/shell_resolver.mojom.h"
 
+namespace base {
+class TaskRunner;
+}
+
+namespace shell {
+class ShellConnection;
+}
+
 namespace catalog {
 
 class ManifestProvider;
+class Reader;
+class Resolver;
 class Store;
 
-struct ReadManifestResult {
-  ReadManifestResult();
-  ~ReadManifestResult();
-  shell::mojom::ResolveResultPtr resolve_result;
-  scoped_ptr<Entry> catalog_entry;
-  base::FilePath package_dir;
-};
-
-class Catalog : public mojom::Resolver,
-                public shell::mojom::ShellResolver,
-                public mojom::Catalog {
+// Creates and owns an instance of the catalog. Exposes a ShellClientPtr that
+// can be passed to the Shell, potentially in a different process.
+class Catalog : public shell::ShellClient,
+                public shell::InterfaceFactory<mojom::Catalog>,
+                public shell::InterfaceFactory<mojom::Resolver>,
+                public shell::InterfaceFactory<shell::mojom::ShellResolver> {
  public:
   // |manifest_provider| may be null.
-  Catalog(scoped_ptr<Store> store,
-          base::TaskRunner* file_task_runner,
-          EntryCache* system_catalog,
+  Catalog(base::TaskRunner* file_task_runner,
+          scoped_ptr<Store> store,
           ManifestProvider* manifest_provider);
   ~Catalog() override;
 
-  void BindResolver(mojom::ResolverRequest request);
-  void BindShellResolver(shell::mojom::ShellResolverRequest request);
-  void BindCatalog(mojom::CatalogRequest request);
+  shell::mojom::ShellClientPtr TakeShellClient();
 
  private:
-  using MojoNameAliasMap =
-      std::map<std::string, std::pair<std::string, std::string>>;
+  // shell::ShellClient:
+  bool AcceptConnection(shell::Connection* connection) override;
 
-  // mojom::Resolver:
-  void ResolveInterfaces(mojo::Array<mojo::String> interfaces,
-                         const ResolveInterfacesCallback& callback) override;
-  void ResolveMIMEType(const mojo::String& mime_type,
-                       const ResolveMIMETypeCallback& callback) override;
-  void ResolveProtocolScheme(
-      const mojo::String& scheme,
-      const ResolveProtocolSchemeCallback& callback) override;
+  // shell::InterfaceFactory<mojom::Resolver>:
+  void Create(shell::Connection* connection,
+              mojom::ResolverRequest request) override;
 
-  // shell::mojom::ShellResolver:
-  void ResolveMojoName(const mojo::String& mojo_name,
-                       const ResolveMojoNameCallback& callback) override;
+  // shell::InterfaceFactory<shell::mojom::ShellResolver>:
+  void Create(shell::Connection* connection,
+              shell::mojom::ShellResolverRequest request) override;
 
-  // mojom::Catalog:
-  void GetEntries(mojo::Array<mojo::String> names,
-                  const GetEntriesCallback& callback) override;
+  // shell::InterfaceFactory<mojom::Catalog>:
+  void Create(shell::Connection* connection,
+              mojom::CatalogRequest request) override;
 
-  // Populate/serialize the catalog from/to the supplied store.
-  void DeserializeCatalog();
-  void SerializeCatalog();
+  Resolver* GetResolverForUserId(const std::string& user_id);
 
-  // Receives the result of manifest parsing on |file_task_runner_|, may be
-  // received after the catalog object that issued the request is destroyed.
-  static void OnReadManifest(base::WeakPtr<Catalog> catalog,
-                             const std::string& name,
-                             const ResolveMojoNameCallback& callback,
-                             scoped_ptr<ReadManifestResult> result);
+  void SystemPackageDirScanned();
 
-  // Populate the catalog with data from |entry|, and pass it to the client
-  // via callback.
-  void AddEntryToCatalog(scoped_ptr<Entry> entry, bool is_system_catalog);
-
-  ManifestProvider* const manifest_provider_;
-
-  // Directory that contains packages and executables visible to all users.
-  base::FilePath system_package_dir_;
-  // Directory that contains packages visible to this Catalog instance's user.
-  base::FilePath user_package_dir_;
-
-  // User-specific persistent storage of package manifests and other settings.
+  base::TaskRunner* const file_task_runner_;
   scoped_ptr<Store> store_;
 
-  // Task runner for performing file operations.
-  base::TaskRunner* const file_task_runner_;
+  shell::mojom::ShellClientPtr shell_client_;
+  scoped_ptr<shell::ShellConnection> shell_connection_;
 
-  mojo::BindingSet<mojom::Resolver> resolver_bindings_;
-  mojo::BindingSet<shell::mojom::ShellResolver> shell_resolver_bindings_;
-  mojo::BindingSet<mojom::Catalog> catalog_bindings_;
+  std::map<std::string, scoped_ptr<Resolver>> resolvers_;
 
-  // The current user's packages, constructed from Store/package manifests.
-  EntryCache user_catalog_;
-  // Same as above, but for system-level (visible to all-users) packages and
-  // executables.
-  EntryCache* system_catalog_;
+  scoped_ptr<Reader> system_reader_;
+  EntryCache system_catalog_;
+  bool loaded_ = false;
 
   base::WeakPtrFactory<Catalog> weak_factory_;
 
diff --git a/services/catalog/constants.cc b/services/catalog/constants.cc
new file mode 100644
index 0000000..eb102cbf
--- /dev/null
+++ b/services/catalog/constants.cc
@@ -0,0 +1,11 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "services/catalog/constants.h"
+
+namespace catalog {
+
+const char kMojoApplicationsDirName[] = "Mojo Applications";
+
+}  // namespace catalog
diff --git a/services/catalog/constants.h b/services/catalog/constants.h
new file mode 100644
index 0000000..8942cc9
--- /dev/null
+++ b/services/catalog/constants.h
@@ -0,0 +1,14 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_CATALOG_CONSTANTS_H_
+#define SERVICES_CATALOG_CONSTANTS_H_
+
+namespace catalog {
+
+extern const char kMojoApplicationsDirName[];
+
+}  // namespace catalog
+
+#endif  // SERVICES_CATALOG_CONSTANTS_H_
diff --git a/services/catalog/factory.cc b/services/catalog/factory.cc
deleted file mode 100644
index 0d98c7f..0000000
--- a/services/catalog/factory.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "services/catalog/factory.h"
-
-#include "base/bind.h"
-#include "services/catalog/catalog.h"
-#include "services/shell/public/cpp/connection.h"
-#include "services/shell/public/cpp/shell_connection.h"
-
-namespace catalog {
-
-Factory::Factory(base::TaskRunner* file_task_runner,
-                 scoped_ptr<Store> store,
-                 ManifestProvider* manifest_provider)
-    : file_task_runner_(file_task_runner),
-      store_(std::move(store)),
-      manifest_provider_(manifest_provider),
-      weak_factory_(this) {
-  shell::mojom::ShellClientRequest request = GetProxy(&shell_client_);
-  shell_connection_.reset(new shell::ShellConnection(this, std::move(request)));
-}
-
-Factory::~Factory() {}
-
-shell::mojom::ShellClientPtr Factory::TakeShellClient() {
-  return std::move(shell_client_);
-}
-
-bool Factory::AcceptConnection(shell::Connection* connection) {
-  connection->AddInterface<mojom::Catalog>(this);
-  connection->AddInterface<mojom::Resolver>(this);
-  connection->AddInterface<shell::mojom::ShellResolver>(this);
-  return true;
-}
-
-void Factory::Create(shell::Connection* connection,
-                     mojom::ResolverRequest request) {
-  Catalog* instance =
-      GetCatalogForUserId(connection->GetRemoteIdentity().user_id());
-  instance->BindResolver(std::move(request));
-}
-
-void Factory::Create(shell::Connection* connection,
-                     shell::mojom::ShellResolverRequest request) {
-  Catalog* instance =
-      GetCatalogForUserId(connection->GetRemoteIdentity().user_id());
-  instance->BindShellResolver(std::move(request));
-}
-
-void Factory::Create(shell::Connection* connection,
-                     mojom::CatalogRequest request) {
-  Catalog* instance =
-      GetCatalogForUserId(connection->GetRemoteIdentity().user_id());
-  instance->BindCatalog(std::move(request));
-}
-
-Catalog* Factory::GetCatalogForUserId(const std::string& user_id) {
-  auto it = catalogs_.find(user_id);
-  if (it != catalogs_.end())
-    return it->second.get();
-
-  // TODO(beng): There needs to be a way to load the store from different users.
-  Catalog* instance = new Catalog(std::move(store_), file_task_runner_,
-                                  &system_catalog_, manifest_provider_);
-  catalogs_[user_id] = make_scoped_ptr(instance);
-  return instance;
-}
-
-}  // namespace catalog
diff --git a/services/catalog/factory.h b/services/catalog/factory.h
deleted file mode 100644
index 867b9f1860..0000000
--- a/services/catalog/factory.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SERVICES_CATALOG_FACTORY_H_
-#define SERVICES_CATALOG_FACTORY_H_
-
-#include <map>
-#include <string>
-
-#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "mojo/public/cpp/bindings/binding.h"
-#include "services/catalog/public/interfaces/catalog.mojom.h"
-#include "services/catalog/public/interfaces/resolver.mojom.h"
-#include "services/catalog/types.h"
-#include "services/shell/public/cpp/shell_client.h"
-#include "services/shell/public/interfaces/shell_client.mojom.h"
-#include "services/shell/public/interfaces/shell_resolver.mojom.h"
-
-namespace base {
-class TaskRunner;
-}
-
-namespace shell {
-class ShellConnection;
-}
-
-namespace catalog {
-
-class Catalog;
-class ManifestProvider;
-class Store;
-
-// Creates and owns an instance of the catalog. Exposes a ShellClientPtr that
-// can be passed to the Shell, potentially in a different process.
-class Factory : public shell::ShellClient,
-                public shell::InterfaceFactory<mojom::Catalog>,
-                public shell::InterfaceFactory<mojom::Resolver>,
-                public shell::InterfaceFactory<shell::mojom::ShellResolver> {
- public:
-  // |manifest_provider| may be null.
-  Factory(base::TaskRunner* file_task_runner,
-          scoped_ptr<Store> store,
-          ManifestProvider* manifest_provider);
-  ~Factory() override;
-
-  shell::mojom::ShellClientPtr TakeShellClient();
-
- private:
-  // shell::ShellClient:
-  bool AcceptConnection(shell::Connection* connection) override;
-
-  // shell::InterfaceFactory<mojom::Resolver>:
-  void Create(shell::Connection* connection,
-              mojom::ResolverRequest request) override;
-
-  // shell::InterfaceFactory<shell::mojom::ShellResolver>:
-  void Create(shell::Connection* connection,
-              shell::mojom::ShellResolverRequest request) override;
-
-  // shell::InterfaceFactory<mojom::Catalog>:
-  void Create(shell::Connection* connection,
-              mojom::CatalogRequest request) override;
-
-  Catalog* GetCatalogForUserId(const std::string& user_id);
-
-  base::TaskRunner* const file_task_runner_;
-  scoped_ptr<Store> store_;
-  ManifestProvider* const manifest_provider_;
-
-  shell::mojom::ShellClientPtr shell_client_;
-  scoped_ptr<shell::ShellConnection> shell_connection_;
-
-  std::map<std::string, scoped_ptr<Catalog>> catalogs_;
-
-  EntryCache system_catalog_;
-
-  base::WeakPtrFactory<Factory> weak_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(Factory);
-};
-
-}  // namespace catalog
-
-#endif  // SERVICES_CATALOG_FACTORY_H_
diff --git a/services/catalog/reader.cc b/services/catalog/reader.cc
new file mode 100644
index 0000000..5b2f37b
--- /dev/null
+++ b/services/catalog/reader.cc
@@ -0,0 +1,198 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "services/catalog/reader.h"
+
+#include "base/bind.h"
+#include "base/files/file_enumerator.h"
+#include "base/files/file_util.h"
+#include "base/json/json_file_value_serializer.h"
+#include "base/json/json_reader.h"
+#include "base/path_service.h"
+#include "base/task_runner_util.h"
+#include "base/thread_task_runner_handle.h"
+#include "services/catalog/constants.h"
+#include "services/catalog/entry.h"
+#include "services/catalog/manifest_provider.h"
+#include "services/shell/public/cpp/names.h"
+
+namespace catalog {
+namespace {
+
+base::FilePath GetManifestPath(const base::FilePath& package_dir,
+                               const std::string& name) {
+  // TODO(beng): think more about how this should be done for exe targets.
+  std::string type = shell::GetNameType(name);
+  std::string path = shell::GetNamePath(name);
+  if (type == shell::kNameType_Mojo) {
+    return package_dir.AppendASCII(kMojoApplicationsDirName).AppendASCII(
+        path + "/manifest.json");
+  }
+  if (type == shell::kNameType_Exe)
+    return package_dir.AppendASCII(path + "_manifest.json");
+  return base::FilePath();
+}
+
+
+base::FilePath GetPackagePath(const base::FilePath& package_dir,
+                              const std::string& name) {
+  std::string type = shell::GetNameType(name);
+  if (type == shell::kNameType_Mojo) {
+    // It's still a mojo: URL, use the default mapping scheme.
+    const std::string host = shell::GetNamePath(name);
+    return package_dir.AppendASCII(host + "/" + host + ".mojo");
+  }
+  if (type == shell::kNameType_Exe) {
+#if defined OS_WIN
+    std::string extension = ".exe";
+#else
+    std::string extension;
+#endif
+    return package_dir.AppendASCII(shell::GetNamePath(name) + extension);
+  }
+  return base::FilePath();
+}
+
+scoped_ptr<Entry> ProcessManifest(scoped_ptr<base::Value> manifest_root,
+                                  const base::FilePath& package_dir) {
+  // Manifest was malformed or did not exist.
+  if (!manifest_root)
+    return nullptr;
+
+  const base::DictionaryValue* dictionary = nullptr;
+  if (!manifest_root->GetAsDictionary(&dictionary))
+    return nullptr;
+
+  scoped_ptr<Entry> entry = Entry::Deserialize(*dictionary);
+  if (!entry)
+    return nullptr;
+  entry->set_path(GetPackagePath(package_dir, entry->name()));
+  return entry;
+}
+
+scoped_ptr<Entry> CreateEntryForManifestAt(
+    const base::FilePath& manifest_path,
+    const base::FilePath& package_dir) {
+  JSONFileValueDeserializer deserializer(manifest_path);
+  int error = 0;
+  std::string message;
+
+  // TODO(beng): probably want to do more detailed error checking. This should
+  //             be done when figuring out if to unblock connection completion.
+  return ProcessManifest(deserializer.Deserialize(&error, &message),
+                         package_dir);
+}
+
+void ScanDir(
+    const base::FilePath& package_dir,
+    const Reader::ReadManifestCallback& read_manifest_callback,
+    scoped_refptr<base::SingleThreadTaskRunner> original_thread_task_runner,
+    const base::Closure& read_complete_closure) {
+  base::FileEnumerator enumerator(package_dir, false,
+                                  base::FileEnumerator::DIRECTORIES);
+  while (1) {
+    base::FilePath path = enumerator.Next();
+    if (path.empty())
+      break;
+    base::FilePath manifest_path = path.AppendASCII("manifest.json");
+    scoped_ptr<Entry> entry =
+        CreateEntryForManifestAt(manifest_path, package_dir);
+    if (!entry)
+      continue;
+
+    // Skip over subdirs that contain only manifests, they're artifacts of the
+    // build (e.g. for applications that are packaged into others) and are not
+    // valid standalone packages.
+    base::FilePath package_path = GetPackagePath(package_dir, entry->name());
+    if (!base::PathExists(package_path))
+      continue;
+
+    original_thread_task_runner->PostTask(
+        FROM_HERE,
+        base::Bind(read_manifest_callback, base::Passed(&entry)));
+  }
+
+  original_thread_task_runner->PostTask(FROM_HERE, read_complete_closure);
+}
+
+scoped_ptr<Entry> ReadManifest(const base::FilePath& package_dir,
+                               const std::string& mojo_name) {
+  scoped_ptr<Entry> entry = CreateEntryForManifestAt(
+      GetManifestPath(package_dir, mojo_name), package_dir);
+  if (!entry) {
+    entry.reset(new Entry(mojo_name));
+    entry->set_path(GetPackagePath(
+        package_dir.AppendASCII(kMojoApplicationsDirName), mojo_name));
+  }
+  return entry;
+}
+
+void AddEntryToCache(EntryCache* cache, scoped_ptr<Entry> entry) {
+  for (auto child : entry->applications())
+    AddEntryToCache(cache, make_scoped_ptr(child));
+  (*cache)[entry->name()] = std::move(entry);
+}
+
+void DoNothing(shell::mojom::ResolveResultPtr) {}
+
+}  // namespace
+
+Reader::Reader(base::TaskRunner* file_task_runner,
+               ManifestProvider* manifest_provider)
+    : file_task_runner_(file_task_runner),
+      manifest_provider_(manifest_provider),
+      weak_factory_(this) {
+  PathService::Get(base::DIR_MODULE, &system_package_dir_);
+}
+Reader::~Reader() {}
+
+void Reader::Read(const base::FilePath& package_dir,
+                  EntryCache* cache,
+                  const base::Closure& read_complete_closure) {
+  file_task_runner_->PostTask(
+      FROM_HERE,
+      base::Bind(&ScanDir, package_dir,
+                 base::Bind(&Reader::OnReadManifest, weak_factory_.GetWeakPtr(),
+                            cache, base::Bind(&DoNothing)),
+                 base::ThreadTaskRunnerHandle::Get(),
+                 read_complete_closure));
+}
+
+void Reader::CreateEntryForName(
+    const std::string& mojo_name,
+    EntryCache* cache,
+    const CreateEntryForNameCallback& entry_created_callback) {
+  std::string manifest_contents;
+  if (manifest_provider_ &&
+      manifest_provider_->GetApplicationManifest(mojo_name,
+                                                 &manifest_contents)) {
+    scoped_ptr<base::Value> manifest_root =
+        base::JSONReader::Read(manifest_contents);
+    base::PostTaskAndReplyWithResult(
+        file_task_runner_, FROM_HERE,
+        base::Bind(&ProcessManifest, base::Passed(&manifest_root),
+                   system_package_dir_),
+        base::Bind(&Reader::OnReadManifest, weak_factory_.GetWeakPtr(),
+                   cache, entry_created_callback));
+  } else {
+    base::PostTaskAndReplyWithResult(
+        file_task_runner_, FROM_HERE,
+        base::Bind(&ReadManifest, system_package_dir_, mojo_name),
+        base::Bind(&Reader::OnReadManifest, weak_factory_.GetWeakPtr(),
+                   cache, entry_created_callback));
+
+  }
+}
+
+void Reader::OnReadManifest(
+    EntryCache* cache,
+    const CreateEntryForNameCallback& entry_created_callback,
+    scoped_ptr<Entry> entry) {
+  shell::mojom::ResolveResultPtr result =
+      shell::mojom::ResolveResult::From(*entry);
+  AddEntryToCache(cache, std::move(entry));
+  entry_created_callback.Run(std::move(result));
+}
+
+}  // namespace catalog
diff --git a/services/catalog/reader.h b/services/catalog/reader.h
new file mode 100644
index 0000000..0bc8e64
--- /dev/null
+++ b/services/catalog/reader.h
@@ -0,0 +1,65 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_CATALOG_READER_H_
+#define SERVICES_CATALOG_READER_H_
+
+#include "base/callback.h"
+#include "base/files/file_path.h"
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "services/catalog/types.h"
+#include "services/shell/public/interfaces/shell_resolver.mojom.h"
+
+namespace base {
+class TaskRunner;
+}
+
+namespace catalog {
+
+class Entry;
+class ManifestProvider;
+
+// Responsible for loading manifests & building the Entry data structures.
+class Reader {
+ public:
+   using ReadManifestCallback =
+      base::Callback<void(scoped_ptr<Entry>)>;
+   using CreateEntryForNameCallback =
+      base::Callback<void(shell::mojom::ResolveResultPtr)>;
+
+  Reader(base::TaskRunner* file_task_runner,
+         ManifestProvider* manifest_provider);
+  ~Reader();
+
+  // Scans the contents of |package_dir|, reading all application manifests and
+  // populating |cache|. Runs |read_complete_closure| when done.
+  void Read(const base::FilePath& package_dir,
+            EntryCache* cache,
+            const base::Closure& read_complete_closure);
+
+  // Returns an Entry for |mojo_name| via |callback|, assuming a manifest file
+  // in the canonical location
+  void CreateEntryForName(
+      const std::string& mojo_name,
+      EntryCache* cache,
+      const CreateEntryForNameCallback& entry_created_callback);
+
+ private:
+  void OnReadManifest(EntryCache* cache,
+                      const CreateEntryForNameCallback& entry_created_callback,
+                      scoped_ptr<Entry> entry);
+
+  base::FilePath system_package_dir_;
+  base::TaskRunner* file_task_runner_;
+  ManifestProvider* const manifest_provider_;
+  base::WeakPtrFactory<Reader> weak_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(Reader);
+};
+
+}  // namespace catalog
+
+#endif  // SERVICES_CATALOG_READER_H_
diff --git a/services/catalog/resolver.cc b/services/catalog/resolver.cc
new file mode 100644
index 0000000..255e28b
--- /dev/null
+++ b/services/catalog/resolver.cc
@@ -0,0 +1,185 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "services/catalog/resolver.h"
+
+#include "base/bind.h"
+#include "services/catalog/entry.h"
+#include "services/catalog/manifest_provider.h"
+#include "services/catalog/reader.h"
+#include "services/catalog/store.h"
+#include "services/shell/public/cpp/names.h"
+
+namespace catalog {
+namespace {
+
+void AddEntryToMap(const Entry& entry,
+                   mojo::Map<mojo::String, mojom::CatalogEntryPtr>* map) {
+  mojom::CatalogEntryPtr entry_ptr(mojom::CatalogEntry::New());
+  entry_ptr->display_name = entry.display_name();
+  (*map)[entry.name()] = std::move(entry_ptr);
+}
+
+}  // namespace
+
+////////////////////////////////////////////////////////////////////////////////
+// Resolver, public:
+
+Resolver::Resolver(scoped_ptr<Store> store, Reader* system_reader)
+    : store_(std::move(store)),
+      system_reader_(system_reader),
+      weak_factory_(this) {}
+Resolver::~Resolver() {}
+
+void Resolver::BindResolver(mojom::ResolverRequest request) {
+  if (system_catalog_)
+    resolver_bindings_.AddBinding(this, std::move(request));
+  else
+    pending_resolver_requests_.push_back(std::move(request));
+}
+
+void Resolver::BindShellResolver(
+    shell::mojom::ShellResolverRequest request) {
+  if (system_catalog_)
+    shell_resolver_bindings_.AddBinding(this, std::move(request));
+  else
+    pending_shell_resolver_requests_.push_back(std::move(request));
+}
+
+void Resolver::BindCatalog(mojom::CatalogRequest request) {
+  if (system_catalog_)
+    catalog_bindings_.AddBinding(this, std::move(request));
+  else
+    pending_catalog_requests_.push_back(std::move(request));
+}
+
+void Resolver::CacheReady(EntryCache* cache) {
+  system_catalog_ = cache;
+  DeserializeCatalog();
+  for (auto& request : pending_resolver_requests_)
+    BindResolver(std::move(request));
+  for (auto& request : pending_shell_resolver_requests_)
+    BindShellResolver(std::move(request));
+  for (auto& request : pending_catalog_requests_)
+    BindCatalog(std::move(request));
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Resolver, mojom::Resolver:
+
+void Resolver::ResolveInterfaces(mojo::Array<mojo::String> interfaces,
+                                 const ResolveInterfacesCallback& callback) {
+  // TODO(beng): implement.
+}
+
+void Resolver::ResolveMIMEType(const mojo::String& mime_type,
+                               const ResolveMIMETypeCallback& callback) {
+  // TODO(beng): implement.
+}
+
+void Resolver::ResolveProtocolScheme(
+    const mojo::String& scheme,
+    const ResolveProtocolSchemeCallback& callback) {
+  // TODO(beng): implement.
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Resolver, shell::mojom::ShellResolver:
+
+void Resolver::ResolveMojoName(const mojo::String& mojo_name,
+                               const ResolveMojoNameCallback& callback) {
+  DCHECK(system_catalog_);
+
+  std::string type = shell::GetNameType(mojo_name);
+  if (type != shell::kNameType_Mojo && type != shell::kNameType_Exe) {
+    scoped_ptr<Entry> entry(new Entry(mojo_name));
+    callback.Run(shell::mojom::ResolveResult::From(*entry));
+    return;
+  }
+
+  // TODO(beng): per-user catalogs.
+  auto entry = system_catalog_->find(mojo_name);
+  if (entry != system_catalog_->end()) {
+    callback.Run(shell::mojom::ResolveResult::From(*entry->second));
+    return;
+  }
+
+  // Manifests for mojo: names should always be in the catalog by this point.
+  //DCHECK(type == shell::kNameType_Exe);
+  system_reader_->CreateEntryForName(
+      mojo_name, system_catalog_,
+      base::Bind(&Resolver::OnReadManifest, weak_factory_.GetWeakPtr(),
+                 mojo_name, callback));
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Resolver, mojom::Catalog:
+
+void Resolver::GetEntries(mojo::Array<mojo::String> names,
+                          const GetEntriesCallback& callback) {
+  DCHECK(system_catalog_);
+
+  mojo::Map<mojo::String, mojom::CatalogEntryPtr> entries;
+  if (names.is_null()) {
+    // TODO(beng): user catalog.
+    for (const auto& entry : *system_catalog_)
+      AddEntryToMap(*entry.second, &entries);
+  } else {
+    std::vector<mojo::String> names_vec = names.PassStorage();
+    for (const std::string& name : names_vec) {
+      Entry* entry = nullptr;
+      // TODO(beng): user catalog.
+      if (system_catalog_->find(name) != system_catalog_->end())
+        entry = (*system_catalog_)[name].get();
+      else
+        continue;
+      AddEntryToMap(*entry, &entries);
+    }
+  }
+  callback.Run(std::move(entries));
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Resolver, private:
+
+void Resolver::DeserializeCatalog() {
+  DCHECK(system_catalog_);
+  if (!store_)
+    return;
+  const base::ListValue* catalog = store_->GetStore();
+  CHECK(catalog);
+  // TODO(sky): make this handle aliases.
+  // TODO(beng): implement this properly!
+  for (auto it = catalog->begin(); it != catalog->end(); ++it) {
+    const base::DictionaryValue* dictionary = nullptr;
+    const base::Value* v = *it;
+    CHECK(v->GetAsDictionary(&dictionary));
+    scoped_ptr<Entry> entry = Entry::Deserialize(*dictionary);
+    // TODO(beng): user catalog.
+    if (entry)
+      (*system_catalog_)[entry->name()] = std::move(entry);
+  }
+}
+
+void Resolver::SerializeCatalog() {
+  DCHECK(system_catalog_);
+  scoped_ptr<base::ListValue> catalog(new base::ListValue);
+  // TODO(beng): user catalog.
+  for (const auto& entry : *system_catalog_)
+    catalog->Append(entry.second->Serialize());
+  if (store_)
+    store_->UpdateStore(std::move(catalog));
+}
+
+// static
+void Resolver::OnReadManifest(base::WeakPtr<Resolver> resolver,
+                              const std::string& mojo_name,
+                              const ResolveMojoNameCallback& callback,
+                              shell::mojom::ResolveResultPtr result) {
+  callback.Run(std::move(result));
+  if (resolver)
+    resolver->SerializeCatalog();
+}
+
+}  // namespace catalog
diff --git a/services/catalog/resolver.h b/services/catalog/resolver.h
new file mode 100644
index 0000000..ba2de87
--- /dev/null
+++ b/services/catalog/resolver.h
@@ -0,0 +1,101 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_CATALOG_RESOLVER_H_
+#define SERVICES_CATALOG_RESOLVER_H_
+
+#include "base/files/file_path.h"
+#include "base/memory/weak_ptr.h"
+#include "base/path_service.h"
+#include "base/values.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
+#include "services/catalog/entry.h"
+#include "services/catalog/public/interfaces/catalog.mojom.h"
+#include "services/catalog/public/interfaces/resolver.mojom.h"
+#include "services/catalog/store.h"
+#include "services/catalog/types.h"
+#include "services/shell/public/cpp/interface_factory.h"
+#include "services/shell/public/interfaces/shell_resolver.mojom.h"
+
+namespace catalog {
+
+class Reader;
+class Store;
+
+class Resolver : public mojom::Resolver,
+                 public shell::mojom::ShellResolver,
+                 public mojom::Catalog {
+ public:
+  // |manifest_provider| may be null.
+  Resolver(scoped_ptr<Store> store, Reader* system_reader);
+  ~Resolver() override;
+
+  void BindResolver(mojom::ResolverRequest request);
+  void BindShellResolver(shell::mojom::ShellResolverRequest request);
+  void BindCatalog(mojom::CatalogRequest request);
+
+  // Called when |cache| has been populated by a directory scan.
+  void CacheReady(EntryCache* cache);
+
+ private:
+  using MojoNameAliasMap =
+      std::map<std::string, std::pair<std::string, std::string>>;
+
+  // mojom::Resolver:
+  void ResolveInterfaces(mojo::Array<mojo::String> interfaces,
+                         const ResolveInterfacesCallback& callback) override;
+  void ResolveMIMEType(const mojo::String& mime_type,
+                       const ResolveMIMETypeCallback& callback) override;
+  void ResolveProtocolScheme(
+      const mojo::String& scheme,
+      const ResolveProtocolSchemeCallback& callback) override;
+
+  // shell::mojom::ShellResolver:
+  void ResolveMojoName(const mojo::String& mojo_name,
+                       const ResolveMojoNameCallback& callback) override;
+
+  // mojom::Catalog:
+  void GetEntries(mojo::Array<mojo::String> names,
+                  const GetEntriesCallback& callback) override;
+
+  // Populate/serialize the cache from/to the supplied store.
+  void DeserializeCatalog();
+  void SerializeCatalog();
+
+  // Receives the result of manifest parsing, may be received after the
+  // catalog object that issued the request is destroyed.
+  static void OnReadManifest(base::WeakPtr<Resolver> resolver,
+                             const std::string& mojo_name,
+                             const ResolveMojoNameCallback& callback,
+                             shell::mojom::ResolveResultPtr result);
+
+  // User-specific persistent storage of package manifests and other settings.
+  scoped_ptr<Store> store_;
+
+  mojo::BindingSet<mojom::Resolver> resolver_bindings_;
+  mojo::BindingSet<shell::mojom::ShellResolver> shell_resolver_bindings_;
+  mojo::BindingSet<mojom::Catalog> catalog_bindings_;
+
+  Reader* system_reader_;
+
+  // A map of name -> Entry data structure for system-level packages (i.e. those
+  // that are visible to all users).
+  // TODO(beng): eventually add per-user applications.
+  EntryCache* system_catalog_ = nullptr;
+
+  // We only bind requests for these interfaces once the catalog has been
+  // populated. These data structures queue requests until that happens.
+  std::vector<mojom::ResolverRequest> pending_resolver_requests_;
+  std::vector<shell::mojom::ShellResolverRequest>
+      pending_shell_resolver_requests_;
+  std::vector<mojom::CatalogRequest> pending_catalog_requests_;
+
+  base::WeakPtrFactory<Resolver> weak_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(Resolver);
+};
+
+}  // namespace catalog
+
+#endif  // SERVICES_CATALOG_RESOLVER_H_
diff --git a/services/shell/BUILD.gn b/services/shell/BUILD.gn
index e3ce5fa..58c7f8d 100644
--- a/services/shell/BUILD.gn
+++ b/services/shell/BUILD.gn
@@ -24,7 +24,6 @@
     "connect_params.h",
     "connect_util.cc",
     "connect_util.h",
-    "loader.h",
     "native_runner.h",
     "native_runner_delegate.h",
     "shell.cc",
@@ -53,9 +52,6 @@
   data_deps = [
     ":manifest",
   ]
-
-  # For services/shell/loader.h
-  allow_circular_includes_from = [ "//services/catalog:lib" ]
 }
 
 mojo_application_manifest("manifest") {
diff --git a/services/shell/background/background_shell.cc b/services/shell/background/background_shell.cc
index 6ce9f8a..7e16e7c 100644
--- a/services/shell/background/background_shell.cc
+++ b/services/shell/background/background_shell.cc
@@ -15,7 +15,6 @@
 #include "mojo/message_pump/message_pump_mojo.h"
 #include "services/catalog/store.h"
 #include "services/shell/connect_params.h"
-#include "services/shell/loader.h"
 #include "services/shell/public/cpp/shell_client.h"
 #include "services/shell/public/cpp/shell_connection.h"
 #include "services/shell/shell.h"
@@ -29,30 +28,6 @@
   return base::WrapUnique(new mojo::common::MessagePumpMojo);
 }
 
-// Used to obtain the ShellClientRequest for an application. When Loader::Load()
-// is called a callback is run with the ShellClientRequest.
-class BackgroundLoader : public Loader {
- public:
-  using Callback = base::Callback<void(mojom::ShellClientRequest)>;
-
-  explicit BackgroundLoader(const Callback& callback) : callback_(callback) {}
-  ~BackgroundLoader() override {}
-
-  // Loader:
-  void Load(const std::string& name,
-            mojom::ShellClientRequest request) override {
-    DCHECK(!callback_.is_null());  // Callback should only be run once.
-    Callback callback = callback_;
-    callback_.Reset();
-    callback.Run(std::move(request));
-  }
-
- private:
-  Callback callback_;
-
-  DISALLOW_COPY_AND_ASSIGN(BackgroundLoader);
-};
-
 class MojoMessageLoop : public base::MessageLoop {
  public:
   MojoMessageLoop()
@@ -77,20 +52,16 @@
   ~MojoThread() override {}
 
   void CreateShellClientRequest(base::WaitableEvent* signal,
-                                std::unique_ptr<ConnectParams> params,
+                                const std::string& name,
                                 mojom::ShellClientRequest* request) {
     // Only valid to call this on the background thread.
     DCHECK_EQ(message_loop_, base::MessageLoop::current());
+    *request = context_->shell()->InitInstanceForEmbedder(name);
+    signal->Signal();
+  }
 
-    // Ownership of |loader| passes to Shell.
-    const std::string name = params->target().name();
-    BackgroundLoader* loader = new BackgroundLoader(
-        base::Bind(&MojoThread::OnGotApplicationRequest, base::Unretained(this),
-                   name, signal, request));
-    context_->shell()->SetLoaderForName(base::WrapUnique(loader), name);
+  void Connect(std::unique_ptr<ConnectParams> params) {
     context_->shell()->Connect(std::move(params));
-    // The request is asynchronously processed. When processed
-    // OnGotApplicationRequest() is called and we'll signal |signal|.
   }
 
   base::MessageLoop* message_loop() { return message_loop_; }
@@ -148,16 +119,6 @@
   }
 
  private:
-  void OnGotApplicationRequest(const std::string& name,
-                               base::WaitableEvent* signal,
-                               mojom::ShellClientRequest* request_result,
-                               mojom::ShellClientRequest actual_request) {
-    *request_result = std::move(actual_request);
-    // Trigger destruction of the loader.
-    context_->shell()->SetLoaderForName(nullptr, name);
-    signal->Signal();
-  }
-
   // We own this. It's created on the main thread, but destroyed on the
   // background thread.
   MojoMessageLoop* message_loop_ = nullptr;
@@ -193,9 +154,13 @@
   base::WaitableEvent signal(true, false);
   thread_->message_loop()->task_runner()->PostTask(
       FROM_HERE, base::Bind(&MojoThread::CreateShellClientRequest,
-                            base::Unretained(thread_.get()), &signal,
-                            base::Passed(&params), &request));
+                            base::Unretained(thread_.get()), &signal, name,
+                            &request));
   signal.Wait();
+  thread_->message_loop()->task_runner()->PostTask(
+      FROM_HERE, base::Bind(&MojoThread::Connect,
+                            base::Unretained(thread_.get()),
+                            base::Passed(&params)));
   return request;
 }
 
diff --git a/services/shell/loader.h b/services/shell/loader.h
deleted file mode 100644
index c99b628..0000000
--- a/services/shell/loader.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SERVICES_SHELL_LOADER_H_
-#define SERVICES_SHELL_LOADER_H_
-
-#include "base/callback.h"
-#include "mojo/public/cpp/system/core.h"
-#include "services/shell/public/interfaces/connector.mojom.h"
-#include "services/shell/public/interfaces/shell_client.mojom.h"
-
-namespace shell {
-
-// Interface to implement special loading behavior for a particular name.
-class Loader {
- public:
-  virtual ~Loader() {}
-
-  virtual void Load(const std::string& name,
-                    mojom::ShellClientRequest request) = 0;
-};
-
-}  // namespace shell
-
-#endif  // SERVICES_SHELL_LOADER_H_
diff --git a/services/shell/shell.cc b/services/shell/shell.cc
index 35049dd..a542ae4 100644
--- a/services/shell/shell.cc
+++ b/services/shell/shell.cc
@@ -120,10 +120,8 @@
       allow_any_application_(capability_spec.required.count("*") == 1),
       pid_receiver_binding_(this),
       weak_factory_(this) {
-    if (identity_.name() == kShellName ||
-        shell_->GetLoaderForName(identity_.name())) {
+    if (identity_.name() == kShellName)
       pid_ = base::Process::Current().Pid();
-    }
     DCHECK_NE(mojom::kInvalidInstanceID, id_);
   }
 
@@ -460,7 +458,6 @@
 
 Shell::~Shell() {
   TerminateShellConnections();
-  STLDeleteValues(&name_to_loader_);
   for (auto& runner : native_runners_)
     runner.reset();
 }
@@ -489,14 +486,6 @@
   return request;
 }
 
-void Shell::SetLoaderForName(std::unique_ptr<Loader> loader,
-                             const std::string& name) {
-  auto it = name_to_loader_.find(name);
-  if (it != name_to_loader_.end())
-    delete it->second;
-  name_to_loader_[name] = loader.release();
-}
-
 ////////////////////////////////////////////////////////////////////////////////
 // Shell, ShellClient implementation:
 
@@ -737,21 +726,17 @@
   } else {
     // Otherwise we create a new ShellClient pipe.
     mojom::ShellClientRequest request = GetProxy(&client);
-    if (LoadWithLoader(target, &request)) {
-      instance->StartWithClient(std::move(client));
-    } else {
-      CHECK(!result->package_url.is_null() && !result->capabilities.is_null());
+    CHECK(!result->package_url.is_null() && !result->capabilities.is_null());
 
-      if (target.name() != result->resolved_name) {
-        instance->StartWithClient(std::move(client));
-        Identity factory(result->resolved_name, target.user_id(),
-                         instance_name);
-        CreateShellClientWithFactory(factory, target.name(),
-                                     std::move(request));
-      } else {
-        instance->StartWithFilePath(
-            mojo::util::UrlToFilePath(result->package_url.To<GURL>()));
-      }
+    if (target.name() != result->resolved_name) {
+      instance->StartWithClient(std::move(client));
+      Identity factory(result->resolved_name, target.user_id(),
+                       instance_name);
+      CreateShellClientWithFactory(factory, target.name(),
+                                   std::move(request));
+    } else {
+      instance->StartWithFilePath(
+          mojo::util::UrlToFilePath(result->package_url.To<GURL>()));
     }
   }
 
@@ -759,22 +744,6 @@
   instance->ConnectToClient(std::move(params));
 }
 
-bool Shell::LoadWithLoader(const Identity& target,
-                           mojom::ShellClientRequest* request) {
-  Loader* loader = GetLoaderForName(target.name());
-  if (!loader)
-    return false;
-  loader->Load(target.name(), std::move(*request));
-  return true;
-}
-
-Loader* Shell::GetLoaderForName(const std::string& name) {
-  auto name_it = name_to_loader_.find(name);
-  if (name_it != name_to_loader_.end())
-    return name_it->second;
-  return default_loader_.get();
-}
-
 base::WeakPtr<Shell> Shell::GetWeakPtr() {
   return weak_ptr_factory_.GetWeakPtr();
 }
diff --git a/services/shell/shell.gyp b/services/shell/shell.gyp
index e738bef..beb82ac5 100644
--- a/services/shell/shell.gyp
+++ b/services/shell/shell.gyp
@@ -68,14 +68,17 @@
     'sources': [
       '../catalog/catalog.cc',
       '../catalog/catalog.h',
+      '../catalog/constants.cc',
+      '../catalog/constants.h',
       '../catalog/entry.cc',
       '../catalog/entry.h',
-      '../catalog/factory.cc',
-      '../catalog/factory.h',
+      '../catalog/reader.cc',
+      '../catalog/reader.h',
+      '../catalog/resolver.cc',
+      '../catalog/resolver.h',
       '../catalog/store.cc',
       '../catalog/store.h',
       '../catalog/types.h',
-      'loader.h',
       'connect_params.cc',
       'connect_params.h',
       'connect_util.cc',
@@ -105,7 +108,7 @@
     'target_name': 'mojo_shell_unittests',
     'type': 'executable',
     'sources': [
-      'tests/loader_unittest.cc',
+      'tests/placeholder_unittest.cc',
     ],
     'dependencies': [
       'shell_lib',
diff --git a/services/shell/shell.h b/services/shell/shell.h
index fc17adf..f336025 100644
--- a/services/shell/shell.h
+++ b/services/shell/shell.h
@@ -14,7 +14,6 @@
 #include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/public/cpp/bindings/interface_ptr_set.h"
 #include "services/shell/connect_params.h"
-#include "services/shell/loader.h"
 #include "services/shell/native_runner.h"
 #include "services/shell/public/cpp/capabilities.h"
 #include "services/shell/public/cpp/identity.h"
@@ -54,8 +53,7 @@
   // implementations of NativeRunner, e.g. for in or out-of-process execution.
   // See native_runner.h and RunNativeApplication().
   // |file_task_runner| provides access to a thread to perform file copy
-  // operations on. This may be null only in testing environments where
-  // applications are loaded via Loader implementations.
+  // operations on.
   Shell(std::unique_ptr<NativeRunnerFactory> native_runner_factory,
         mojom::ShellClientPtr catalog);
   ~Shell() override;
@@ -75,15 +73,6 @@
   // called once.
   mojom::ShellClientRequest InitInstanceForEmbedder(const std::string& name);
 
-  // Sets the default Loader to be used if not overridden by SetLoaderForName().
-  void set_default_loader(std::unique_ptr<Loader> loader) {
-    default_loader_ = std::move(loader);
-  }
-
-  // Sets a Loader to be used for a specific name.
-  void SetLoaderForName(std::unique_ptr<Loader> loader,
-                        const std::string& name);
-
  private:
   class Instance;
 
@@ -147,24 +136,10 @@
                          mojom::ShellClientPtr client,
                          mojom::ResolveResultPtr result);
 
-  // Tries to load |target| with an Loader. Returns true if one was registered
-  // and it was loaded, in which case |request| is taken.
-  bool LoadWithLoader(const Identity& target,
-                      mojom::ShellClientRequest* request);
-
-  // Returns the appropriate loader for |name|, or the default loader if there
-  // is no loader configured for the name.
-  Loader* GetLoaderForName(const std::string& name);
-
   base::WeakPtr<Shell> GetWeakPtr();
 
   void CleanupRunner(NativeRunner* runner);
 
-  // Loader management.
-  // Loaders are chosen in the order they are listed here.
-  std::map<std::string, Loader*> name_to_loader_;
-  std::unique_ptr<Loader> default_loader_;
-
   std::map<Identity, Instance*> identity_to_instance_;
 
   // Tracks the names of instances that are allowed to field connection requests
diff --git a/services/shell/standalone/context.cc b/services/shell/standalone/context.cc
index e144b3c8..9eb3cb2d 100644
--- a/services/shell/standalone/context.cc
+++ b/services/shell/standalone/context.cc
@@ -29,7 +29,7 @@
 #include "mojo/edk/embedder/embedder.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "mojo/util/filename_util.h"
-#include "services/catalog/factory.h"
+#include "services/catalog/catalog.h"
 #include "services/catalog/store.h"
 #include "services/shell/connect_params.h"
 #include "services/shell/public/cpp/names.h"
@@ -165,7 +165,7 @@
   if (init_params)
     store = std::move(init_params->catalog_store);
   catalog_.reset(
-      new catalog::Factory(blocking_pool_.get(), std::move(store), nullptr));
+      new catalog::Catalog(blocking_pool_.get(), std::move(store), nullptr));
   shell_.reset(new Shell(std::move(runner_factory),
                          catalog_->TakeShellClient()));
 
diff --git a/services/shell/standalone/context.h b/services/shell/standalone/context.h
index 9db0b424..1d60d7c 100644
--- a/services/shell/standalone/context.h
+++ b/services/shell/standalone/context.h
@@ -21,7 +21,7 @@
 }
 
 namespace catalog {
-class Factory;
+class Catalog;
 class Store;
 }
 
@@ -72,7 +72,7 @@
   // Ensure this is destructed before task_runners_ since it owns a message pipe
   // that needs the IO thread to destruct cleanly.
   Tracer tracer_;
-  std::unique_ptr<catalog::Factory> catalog_;
+  std::unique_ptr<catalog::Catalog> catalog_;
   std::unique_ptr<Shell> shell_;
   base::Time main_entry_time_;
   bool init_edk_ = false;
diff --git a/services/shell/tests/BUILD.gn b/services/shell/tests/BUILD.gn
index 8ffc76d..69393a5 100644
--- a/services/shell/tests/BUILD.gn
+++ b/services/shell/tests/BUILD.gn
@@ -14,10 +14,6 @@
 }
 
 test("mojo_shell_unittests") {
-  sources = [
-    "loader_unittest.cc",
-  ]
-
   deps = [
     ":interfaces",
     "//base",
diff --git a/services/shell/tests/loader_unittest.cc b/services/shell/tests/loader_unittest.cc
deleted file mode 100644
index 533ccf6..0000000
--- a/services/shell/tests/loader_unittest.cc
+++ /dev/null
@@ -1,560 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <memory>
-#include <utility>
-
-#include "base/at_exit.h"
-#include "base/bind.h"
-#include "base/macros.h"
-#include "base/memory/ptr_util.h"
-#include "base/memory/scoped_vector.h"
-#include "base/message_loop/message_loop.h"
-#include "base/run_loop.h"
-#include "mojo/public/cpp/bindings/strong_binding.h"
-#include "services/catalog/factory.h"
-#include "services/catalog/store.h"
-#include "services/shell/connect_util.h"
-#include "services/shell/loader.h"
-#include "services/shell/public/cpp/connector.h"
-#include "services/shell/public/cpp/interface_factory.h"
-#include "services/shell/public/cpp/shell_client.h"
-#include "services/shell/public/cpp/shell_connection.h"
-#include "services/shell/public/interfaces/interface_provider.mojom.h"
-#include "services/shell/shell.h"
-#include "services/shell/tests/test.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace shell {
-namespace test {
-
-const char kTestURLString[] = "test:testService";
-const char kTestAURLString[] = "test:TestA";
-const char kTestBURLString[] = "test:TestB";
-
-struct TestContext {
-  TestContext() : num_impls(0), num_loader_deletes(0) {}
-  std::string last_test_string;
-  int num_impls;
-  int num_loader_deletes;
-};
-
-void QuitClosure(const Identity& expected,
-                 bool* value,
-                 const Identity& actual) {
-  if (expected == actual) {
-    *value = true;
-    base::MessageLoop::current()->QuitWhenIdle();
-  }
-}
-
-class TestServiceImpl : public TestService {
- public:
-  TestServiceImpl(TestContext* context, TestServiceRequest request)
-      : context_(context), binding_(this, std::move(request)) {
-    ++context_->num_impls;
-  }
-
-  ~TestServiceImpl() override {
-    --context_->num_impls;
-    if (!base::MessageLoop::current()->is_running())
-      return;
-    base::MessageLoop::current()->QuitWhenIdle();
-  }
-
-  // TestService implementation:
-  void Test(const mojo::String& test_string,
-            const mojo::Closure& callback) override {
-    context_->last_test_string = test_string;
-    callback.Run();
-  }
-
- private:
-  TestContext* context_;
-  mojo::StrongBinding<TestService> binding_;
-};
-
-class TestClient {
- public:
-  explicit TestClient(TestServicePtr service)
-      : service_(std::move(service)), quit_after_ack_(false) {}
-
-  void AckTest() {
-    if (quit_after_ack_)
-      base::MessageLoop::current()->QuitWhenIdle();
-  }
-
-  void Test(const std::string& test_string) {
-    quit_after_ack_ = true;
-    service_->Test(test_string,
-                   base::Bind(&TestClient::AckTest, base::Unretained(this)));
-  }
-
- private:
-  TestServicePtr service_;
-  bool quit_after_ack_;
-  DISALLOW_COPY_AND_ASSIGN(TestClient);
-};
-
-class TestLoader : public Loader,
-                   public ShellClient,
-                   public InterfaceFactory<TestService> {
- public:
-  explicit TestLoader(TestContext* context)
-      : context_(context), num_loads_(0) {}
-
-  ~TestLoader() override {
-    ++context_->num_loader_deletes;
-    shell_connection_.reset();
-  }
-
-  int num_loads() const { return num_loads_; }
-  const std::string& last_requestor_name() const {
-    return last_requestor_name_;
-  }
-
- private:
-  // Loader implementation.
-  void Load(const std::string& name,
-            mojom::ShellClientRequest request) override {
-    ++num_loads_;
-    shell_connection_.reset(new ShellConnection(this, std::move(request)));
-  }
-
-  // ShellClient implementation.
-  bool AcceptConnection(Connection* connection) override {
-    connection->AddInterface<TestService>(this);
-    last_requestor_name_ = connection->GetRemoteIdentity().name();
-    return true;
-  }
-
-  // InterfaceFactory<TestService> implementation.
-  void Create(Connection* connection, TestServiceRequest request) override {
-    new TestServiceImpl(context_, std::move(request));
-  }
-
-  std::unique_ptr<ShellConnection> shell_connection_;
-  TestContext* context_;
-  int num_loads_;
-  std::string last_requestor_name_;
-
-  DISALLOW_COPY_AND_ASSIGN(TestLoader);
-};
-
-class ClosingLoader : public Loader {
- private:
-  // Loader implementation.
-  void Load(const std::string& name,
-            mojom::ShellClientRequest request) override {
-  }
-};
-
-class TesterContext {
- public:
-  explicit TesterContext(base::MessageLoop* loop)
-      : num_b_calls_(0),
-        num_c_calls_(0),
-        num_a_deletes_(0),
-        num_b_deletes_(0),
-        num_c_deletes_(0),
-        tester_called_quit_(false),
-        a_called_quit_(false),
-        loop_(loop) {}
-
-  void IncrementNumBCalls() {
-    base::AutoLock lock(lock_);
-    num_b_calls_++;
-  }
-
-  void IncrementNumCCalls() {
-    base::AutoLock lock(lock_);
-    num_c_calls_++;
-  }
-
-  void IncrementNumADeletes() {
-    base::AutoLock lock(lock_);
-    num_a_deletes_++;
-  }
-
-  void IncrementNumBDeletes() {
-    base::AutoLock lock(lock_);
-    num_b_deletes_++;
-  }
-
-  void IncrementNumCDeletes() {
-    base::AutoLock lock(lock_);
-    num_c_deletes_++;
-  }
-
-  void set_tester_called_quit() {
-    base::AutoLock lock(lock_);
-    tester_called_quit_ = true;
-  }
-
-  void set_a_called_quit() {
-    base::AutoLock lock(lock_);
-    a_called_quit_ = true;
-  }
-
-  int num_b_calls() {
-    base::AutoLock lock(lock_);
-    return num_b_calls_;
-  }
-  int num_c_calls() {
-    base::AutoLock lock(lock_);
-    return num_c_calls_;
-  }
-  int num_a_deletes() {
-    base::AutoLock lock(lock_);
-    return num_a_deletes_;
-  }
-  int num_b_deletes() {
-    base::AutoLock lock(lock_);
-    return num_b_deletes_;
-  }
-  int num_c_deletes() {
-    base::AutoLock lock(lock_);
-    return num_c_deletes_;
-  }
-  bool tester_called_quit() {
-    base::AutoLock lock(lock_);
-    return tester_called_quit_;
-  }
-  bool a_called_quit() {
-    base::AutoLock lock(lock_);
-    return a_called_quit_;
-  }
-
-  void QuitSoon() {
-    loop_->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
-  }
-
- private:
-  // lock_ protects all members except for loop_ which must be unchanged for the
-  // lifetime of this class.
-  base::Lock lock_;
-  int num_b_calls_;
-  int num_c_calls_;
-  int num_a_deletes_;
-  int num_b_deletes_;
-  int num_c_deletes_;
-  bool tester_called_quit_;
-  bool a_called_quit_;
-
-  base::MessageLoop* loop_;
-};
-
-// Used to test that the requestor name will be correctly passed.
-class TestAImpl : public TestA {
- public:
-  TestAImpl(Connector* connector,
-            TesterContext* test_context,
-            TestARequest request,
-            InterfaceFactory<TestC>* factory)
-      : test_context_(test_context), binding_(this, std::move(request)) {
-    connection_ = connector->Connect(kTestBURLString);
-    connection_->AddInterface<TestC>(factory);
-    connection_->GetInterface(&b_);
-  }
-
-  ~TestAImpl() override {
-    test_context_->IncrementNumADeletes();
-    if (base::MessageLoop::current()->is_running())
-      Quit();
-  }
-
- private:
-  void CallB() override {
-    b_->B(base::Bind(&TestAImpl::Quit, base::Unretained(this)));
-  }
-
-  void CallCFromB() override {
-    b_->CallC(base::Bind(&TestAImpl::Quit, base::Unretained(this)));
-  }
-
-  void Quit() {
-    base::MessageLoop::current()->QuitWhenIdle();
-    test_context_->set_a_called_quit();
-    test_context_->QuitSoon();
-  }
-
-  std::unique_ptr<Connection> connection_;
-  TesterContext* test_context_;
-  TestBPtr b_;
-  mojo::StrongBinding<TestA> binding_;
-};
-
-class TestBImpl : public TestB {
- public:
-  TestBImpl(Connection* connection,
-            TesterContext* test_context,
-            TestBRequest request)
-      : test_context_(test_context), binding_(this, std::move(request)) {
-    connection->GetInterface(&c_);
-  }
-
-  ~TestBImpl() override {
-    test_context_->IncrementNumBDeletes();
-    if (base::MessageLoop::current()->is_running())
-      base::MessageLoop::current()->QuitWhenIdle();
-    test_context_->QuitSoon();
-  }
-
- private:
-  void B(const mojo::Closure& callback) override {
-    test_context_->IncrementNumBCalls();
-    callback.Run();
-  }
-
-  void CallC(const mojo::Closure& callback) override {
-    test_context_->IncrementNumBCalls();
-    c_->C(callback);
-  }
-
-  TesterContext* test_context_;
-  TestCPtr c_;
-  mojo::StrongBinding<TestB> binding_;
-};
-
-class TestCImpl : public TestC {
- public:
-  TestCImpl(Connection* connection,
-            TesterContext* test_context,
-            TestCRequest request)
-      : test_context_(test_context), binding_(this, std::move(request)) {}
-
-  ~TestCImpl() override { test_context_->IncrementNumCDeletes(); }
-
- private:
-  void C(const mojo::Closure& callback) override {
-    test_context_->IncrementNumCCalls();
-    callback.Run();
-  }
-
-  TesterContext* test_context_;
-  mojo::StrongBinding<TestC> binding_;
-};
-
-class Tester : public ShellClient,
-               public Loader,
-               public InterfaceFactory<TestA>,
-               public InterfaceFactory<TestB>,
-               public InterfaceFactory<TestC> {
- public:
-  Tester(TesterContext* context, const std::string& requestor_name)
-      : context_(context), requestor_name_(requestor_name) {}
-  ~Tester() override {}
-
- private:
-  void Load(const std::string& name,
-            mojom::ShellClientRequest request) override {
-    app_.reset(new ShellConnection(this, std::move(request)));
-  }
-
-  bool AcceptConnection(Connection* connection) override {
-    if (!requestor_name_.empty() &&
-        requestor_name_ != connection->GetRemoteIdentity().name()) {
-      context_->set_tester_called_quit();
-      context_->QuitSoon();
-      base::MessageLoop::current()->QuitWhenIdle();
-      return false;
-    }
-    // If we're coming from A, then add B, otherwise A.
-    if (connection->GetRemoteIdentity().name() == kTestAURLString)
-      connection->AddInterface<TestB>(this);
-    else
-      connection->AddInterface<TestA>(this);
-    return true;
-  }
-
-  void Create(Connection* connection, TestARequest request) override {
-    a_bindings_.push_back(
-        new TestAImpl(app_->connector(), context_, std::move(request), this));
-  }
-
-  void Create(Connection* connection, TestBRequest request) override {
-    new TestBImpl(connection, context_, std::move(request));
-  }
-
-  void Create(Connection* connection, TestCRequest request) override {
-    new TestCImpl(connection, context_, std::move(request));
-  }
-
-  TesterContext* context_;
-  std::unique_ptr<ShellConnection> app_;
-  std::string requestor_name_;
-  ScopedVector<TestAImpl> a_bindings_;
-};
-
-void OnConnect(base::RunLoop* loop,
-               mojom::ConnectResult result,
-               const mojo::String& user_id,
-               uint32_t instance_id) {
-  loop->Quit();
-}
-
-class LoaderTest : public testing::Test {
- public:
-  LoaderTest() : tester_context_(&loop_) {}
-  ~LoaderTest() override {}
-
-  void SetUp() override {
-    blocking_pool_ = new base::SequencedWorkerPool(3, "blocking_pool");
-    catalog_.reset(
-        new catalog::Factory(blocking_pool_.get(), nullptr, nullptr));
-    shell_.reset(new Shell(nullptr, catalog_->TakeShellClient()));
-    test_loader_ = new TestLoader(&context_);
-    shell_->set_default_loader(std::unique_ptr<Loader>(test_loader_));
-
-    TestServicePtr service_proxy;
-    ConnectToInterface(kTestURLString, &service_proxy);
-    test_client_.reset(new TestClient(std::move(service_proxy)));
-  }
-
-  void TearDown() override {
-    test_client_.reset();
-    shell_.reset();
-    blocking_pool_->Shutdown();
-  }
-
-  void AddLoaderForName(const std::string& name,
-                        const std::string& requestor_name) {
-    shell_->SetLoaderForName(
-        base::WrapUnique(new Tester(&tester_context_, requestor_name)), name);
-  }
-
-  bool HasRunningInstanceForName(const std::string& name) {
-    Shell::TestAPI test_api(shell_.get());
-    return test_api.HasRunningInstanceForName(name);
-  }
-
- protected:
-  template <typename Interface>
-  void ConnectToInterface(const std::string& name,
-                          mojo::InterfacePtr<Interface>* ptr) {
-    base::RunLoop loop;
-    mojom::InterfaceProviderPtr remote_interfaces;
-    std::unique_ptr<ConnectParams> params(new ConnectParams);
-    params->set_source(CreateShellIdentity());
-    params->set_target(Identity(name, mojom::kRootUserID));
-    params->set_remote_interfaces(mojo::GetProxy(&remote_interfaces));
-    params->set_connect_callback(
-        base::Bind(&OnConnect, base::Unretained(&loop)));
-    shell_->Connect(std::move(params));
-    loop.Run();
-
-    GetInterface(remote_interfaces.get(), ptr);
-  }
-
-  base::ShadowingAtExitManager at_exit_;
-  TestLoader* test_loader_;
-  TesterContext tester_context_;
-  TestContext context_;
-  base::MessageLoop loop_;
-  std::unique_ptr<TestClient> test_client_;
-  std::unique_ptr<catalog::Factory> catalog_;
-  scoped_refptr<base::SequencedWorkerPool> blocking_pool_;
-  std::unique_ptr<Shell> shell_;
-
-  DISALLOW_COPY_AND_ASSIGN(LoaderTest);
-};
-
-TEST_F(LoaderTest, Basic) {
-  test_client_->Test("test");
-  loop_.Run();
-  EXPECT_EQ(std::string("test"), context_.last_test_string);
-}
-
-TEST_F(LoaderTest, ClientError) {
-  test_client_->Test("test");
-  EXPECT_TRUE(HasRunningInstanceForName(kTestURLString));
-  loop_.Run();
-  EXPECT_EQ(1, context_.num_impls);
-  test_client_.reset();
-  loop_.Run();
-  EXPECT_EQ(0, context_.num_impls);
-  EXPECT_TRUE(HasRunningInstanceForName(kTestURLString));
-}
-
-TEST_F(LoaderTest, Deletes) {
-  {
-    catalog::Factory catalog(blocking_pool_.get(), nullptr, nullptr);
-    Shell shell(nullptr, catalog.TakeShellClient());
-    TestLoader* default_loader = new TestLoader(&context_);
-    TestLoader* name_loader1 = new TestLoader(&context_);
-    TestLoader* name_loader2 = new TestLoader(&context_);
-    shell.set_default_loader(std::unique_ptr<Loader>(default_loader));
-    shell.SetLoaderForName(std::unique_ptr<Loader>(name_loader1), "test:test1");
-    shell.SetLoaderForName(std::unique_ptr<Loader>(name_loader2), "test:test1");
-  }
-  EXPECT_EQ(3, context_.num_loader_deletes);
-}
-
-// Test for SetLoaderForName() & set_default_loader().
-TEST_F(LoaderTest, SetLoaders) {
-  TestLoader* default_loader = new TestLoader(&context_);
-  TestLoader* name_loader = new TestLoader(&context_);
-  shell_->set_default_loader(std::unique_ptr<Loader>(default_loader));
-  shell_->SetLoaderForName(std::unique_ptr<Loader>(name_loader), "test:test1");
-
-  // test::test1 should go to name_loader.
-  TestServicePtr test_service;
-  ConnectToInterface("test:test1", &test_service);
-  EXPECT_EQ(1, name_loader->num_loads());
-  EXPECT_EQ(0, default_loader->num_loads());
-
-  // http::test1 should go to default loader.
-  ConnectToInterface("http:test1", &test_service);
-  EXPECT_EQ(1, name_loader->num_loads());
-  EXPECT_EQ(1, default_loader->num_loads());
-}
-
-TEST_F(LoaderTest, NoServiceNoLoad) {
-  AddLoaderForName(kTestAURLString, std::string());
-
-  // There is no TestC service implementation registered with the Shell, so this
-  // cannot succeed (but also shouldn't crash).
-  TestCPtr c;
-  ConnectToInterface(kTestAURLString, &c);
-  c.set_connection_error_handler(
-      []() { base::MessageLoop::current()->QuitWhenIdle(); });
-
-  loop_.Run();
-  EXPECT_TRUE(c.encountered_error());
-}
-
-TEST_F(LoaderTest, TestEndApplicationClosure) {
-  ClosingLoader* loader = new ClosingLoader();
-  shell_->SetLoaderForName(std::unique_ptr<Loader>(loader), "test:test");
-
-  bool called = false;
-  std::unique_ptr<ConnectParams> params(new ConnectParams);
-  params->set_source(CreateShellIdentity());
-  params->set_target(Identity("test:test", mojom::kRootUserID));
-  shell_->SetInstanceQuitCallback(
-      base::Bind(&QuitClosure, params->target(), &called));
-  shell_->Connect(std::move(params));
-  loop_.Run();
-  EXPECT_TRUE(called);
-}
-
-TEST_F(LoaderTest, SameIdentityShouldNotCauseDuplicateLoad) {
-  // 1 because LoaderTest connects once at startup.
-  EXPECT_EQ(1, test_loader_->num_loads());
-
-  TestServicePtr test_service;
-  ConnectToInterface("test:foo", &test_service);
-  EXPECT_EQ(2, test_loader_->num_loads());
-
-  // Exactly the same name as above.
-  ConnectToInterface("test:foo", &test_service);
-  EXPECT_EQ(2, test_loader_->num_loads());
-
-  // A different identity because the domain is different.
-  ConnectToInterface("test:bar", &test_service);
-  EXPECT_EQ(3, test_loader_->num_loads());
-}
-
-}  // namespace test
-}  // namespace shell
diff --git a/services/shell/tests/placeholder_unittest.cc b/services/shell/tests/placeholder_unittest.cc
new file mode 100644
index 0000000..a9c0359f
--- /dev/null
+++ b/services/shell/tests/placeholder_unittest.cc
@@ -0,0 +1,5 @@
+// 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.
+
+// Dummy file to keep mojo_shell_unittests building in gyp builds.
diff --git a/testing/buildbot/chromium.chromiumos.json b/testing/buildbot/chromium.chromiumos.json
index 0a30a6c..3819be4 100644
--- a/testing/buildbot/chromium.chromiumos.json
+++ b/testing/buildbot/chromium.chromiumos.json
@@ -42,7 +42,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -333,7 +333,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -638,7 +638,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json
index 32d1569..fcf83c2 100644
--- a/testing/buildbot/chromium.fyi.json
+++ b/testing/buildbot/chromium.fyi.json
@@ -400,7 +400,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -497,6 +497,9 @@
         "test": "compositor_unittests"
       },
       {
+        "args": [
+          "--gtest_filter=-WebRtcBrowserTest.CanForwardRemoteStream"
+        ],
         "swarming": {
           "can_use_on_swarming_builders": true
         },
@@ -765,7 +768,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -1658,7 +1661,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -6918,7 +6921,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -7251,7 +7254,7 @@
         "test": "app_list_unittests"
       },
       {
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "test": "app_shell_unittests"
@@ -7455,7 +7458,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -7785,7 +7788,7 @@
         "test": "app_list_unittests"
       },
       {
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "test": "app_shell_unittests"
diff --git a/testing/buildbot/chromium.linux.json b/testing/buildbot/chromium.linux.json
index a3e1478..2f984f7 100644
--- a/testing/buildbot/chromium.linux.json
+++ b/testing/buildbot/chromium.linux.json
@@ -140,19 +140,6 @@
         "test": "components_browsertests"
       },
       {
-        "swarming": {
-          "can_use_on_swarming_builders": true,
-          "dimension_sets": [
-            {
-              "build.id": "KTU84P",
-              "product.board": "hammerhead"
-            }
-          ],
-          "hard_timeout": 1200
-        },
-        "test": "chrome_public_test"
-      },
-      {
         "args": [
           "--isolate_file_path=src/components/components_unittests.isolate"
         ],
@@ -249,6 +236,9 @@
         "test": "android_webview_test_apk"
       },
       {
+        "test": "chrome_public_test_apk"
+      },
+      {
         "test": "chrome_sync_shell_test_apk"
       },
       {
@@ -567,7 +557,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -1028,7 +1018,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -1427,7 +1417,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
diff --git a/testing/buildbot/chromium.mac.json b/testing/buildbot/chromium.mac.json
index e68edb48..fa4afa6 100644
--- a/testing/buildbot/chromium.mac.json
+++ b/testing/buildbot/chromium.mac.json
@@ -5,14 +5,28 @@
     ],
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "base_unittests"
+      },
+      {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
+        "test": "net_unittests"
+      },
+      {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
+        "test": "ui_base_unittests"
       }
     ]
   },
   "Mac GN (dbg)": {
     "additional_compile_targets": [
       "accessibility_unittests",
-      "base_unittests",
       "battor_agent",
       "cacheinvalidation_unittests",
       "cast_unittests",
@@ -37,12 +51,26 @@
       "skia_unittests",
       "sql_unittests",
       "sync_unit_tests",
-      "ui_base_unittests",
       "url_unittests"
     ],
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "base_unittests"
+      },
+      {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
+        "test": "net_unittests"
+      },
+      {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
+        "test": "ui_base_unittests"
       }
     ]
   },
diff --git a/testing/buildbot/chromium.memory.fyi.json b/testing/buildbot/chromium.memory.fyi.json
index 465518f4..91bd827 100644
--- a/testing/buildbot/chromium.memory.fyi.json
+++ b/testing/buildbot/chromium.memory.fyi.json
@@ -88,7 +88,7 @@
         "test": "app_list_unittests"
       },
       {
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "test": "display_unittests"
@@ -208,7 +208,7 @@
   "Chromium OS Builder (valgrind)": {
     "additional_compile_targets": [
       "app_list_unittests",
-      "app_list_shower_unittests",
+      "app_list_presenter_unittests",
       "ash_unittests",
       "aura_unittests",
       "base_unittests",
@@ -247,7 +247,7 @@
       "accessibility_unittests",
       "angle_unittests",
       "app_list_unittests",
-      "app_list_shower_unittests",
+      "app_list_presenter_unittests",
       "aura_unittests",
       "base_unittests",
       "blink_heap_unittests",
@@ -297,7 +297,7 @@
       "accessibility_unittests",
       "angle_unittests",
       "app_list_unittests",
-      "app_list_shower_unittests",
+      "app_list_presenter_unittests",
       "aura_unittests",
       "base_unittests",
       "blink_heap_unittests",
@@ -356,7 +356,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -647,7 +647,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -955,7 +955,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -2233,7 +2233,7 @@
         "test": "app_list_unittests"
       },
       {
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "test": "aura_unittests"
@@ -2303,7 +2303,7 @@
         "test": "app_list_unittests"
       },
       {
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "test": "aura_unittests"
@@ -2445,7 +2445,7 @@
         "test": "app_list_unittests"
       },
       {
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "test": "aura_unittests"
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json
index ddc1c70..20b58733 100644
--- a/testing/buildbot/chromium.memory.json
+++ b/testing/buildbot/chromium.memory.json
@@ -276,7 +276,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
diff --git a/testing/buildbot/chromium.win.json b/testing/buildbot/chromium.win.json
index df96890..d974baa 100644
--- a/testing/buildbot/chromium.win.json
+++ b/testing/buildbot/chromium.win.json
@@ -11,7 +11,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -436,7 +436,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -877,7 +877,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -1301,7 +1301,7 @@
         "swarming": {
           "can_use_on_swarming_builders": true
         },
-        "test": "app_list_shower_unittests"
+        "test": "app_list_presenter_unittests"
       },
       {
         "swarming": {
@@ -2088,7 +2088,7 @@
     "additional_compile_targets": [
       "accessibility_unittests",
       "app_list_unittests",
-      "app_list_shower_unittests",
+      "app_list_presenter_unittests",
       "app_shell_unittests",
       "ash_shell_with_content",
       "ash_unittests",
diff --git a/testing/buildbot/chromium_trybot.json b/testing/buildbot/chromium_trybot.json
index b909f9e..ee5dfc7 100644
--- a/testing/buildbot/chromium_trybot.json
+++ b/testing/buildbot/chromium_trybot.json
@@ -25,7 +25,7 @@
       "swarming": {
         "can_use_on_swarming_builders": true
       },
-      "test": "app_list_shower_unittests"
+      "test": "app_list_presenter_unittests"
     },
     {
       "chromium_configs": [
diff --git a/testing/buildbot/client.v8.fyi.json b/testing/buildbot/client.v8.fyi.json
index 9fee35f..cbf0a62 100644
--- a/testing/buildbot/client.v8.fyi.json
+++ b/testing/buildbot/client.v8.fyi.json
@@ -9,7 +9,7 @@
     "additional_compile_targets": [
       "accessibility_unittests",
       "app_list_unittests",
-      "app_list_shower_unittests",
+      "app_list_presenter_unittests",
       "aura_unittests",
       "browser_tests",
       "cacheinvalidation_unittests",
diff --git a/testing/buildbot/gn_isolate_map.pyl b/testing/buildbot/gn_isolate_map.pyl
index d883f1a..89c7236 100644
--- a/testing/buildbot/gn_isolate_map.pyl
+++ b/testing/buildbot/gn_isolate_map.pyl
@@ -99,8 +99,8 @@
     "label": "//ui/app_list:app_list_unittests",
     "type": "windowed_test_launcher",
   },
-  "app_list_shower_unittests": {
-    "label": "//ui/app_list/shower:app_list_shower_unittests",
+  "app_list_presenter_unittests": {
+    "label": "//ui/app_list/presenter:app_list_presenter_unittests",
     "type": "windowed_test_launcher",
   },
   "app_shell_unittests": {
diff --git a/testing/buildbot/tryserver.v8.json b/testing/buildbot/tryserver.v8.json
index 81e9c88..e81259a 100644
--- a/testing/buildbot/tryserver.v8.json
+++ b/testing/buildbot/tryserver.v8.json
@@ -9,7 +9,7 @@
     "additional_compile_targets": [
       "accessibility_unittests",
       "app_list_unittests",
-      "app_list_shower_unittests",
+      "app_list_presenter_unittests",
       "aura_unittests",
       "browser_tests",
       "cacheinvalidation_unittests",
diff --git a/testing/variations/fieldtrial_testing_config_mac.json b/testing/variations/fieldtrial_testing_config_mac.json
index 4554c2b5..2359b27 100644
--- a/testing/variations/fieldtrial_testing_config_mac.json
+++ b/testing/variations/fieldtrial_testing_config_mac.json
@@ -279,6 +279,14 @@
             "group_name": "TokenBinding"
         }
     ],
+    "TranslateUiLangTrial": [
+        {
+            "group_name": "DefaultTranslateLanguage"
+        },
+        {
+            "group_name": "EnabledTranslateLanguage"
+        }
+    ],
     "V8SerializeOptions": [
         {
             "enable_features": [
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 4b6cfcd..904acfe 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -50,7 +50,7 @@
 crbug.com/574660 [ Win7 ] fast/text/emphasis-combined-text.html [ Pass Failure ]
 
 # TODO(wangxianzhu): verify this after rebaseline for crbug.com/602483
-# crbug.com/584211 [ Mac ] svg/transforms/animated-path-inside-transformed-html.xhtml [ Pass Failure ]
+crbug.com/584211 [ Mac ] svg/transforms/animated-path-inside-transformed-html.xhtml [ Pass Failure ]
 
 # This test violates lifecycle assertions.
 # Timeout because of crbug.com/603231
@@ -343,451 +343,6 @@
 crbug.com/498539 [ Win7 Debug ] inspector/elements/styles-3/styles-computed-trace.html [ Crash Pass ]
 crbug.com/498539 [ Win7 ] inspector/elements/styles-4/styles-update-from-js.html [ Crash Pass ]
 
-crbug.com/602483 compositing/overflow/fixed-scroll-in-empty-root-layer.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/overflow/text-color-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/overflow/text-match-highlight.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/overflow/updating-scrolling-container-and-content.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/repaint/fixed-pos-inside-composited-intermediate-layer.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/repaint/fixed-pos-with-abs-pos-child-scroll.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/repaint/resize-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/repaint/should-not-clip-composited-overflow-scrolling-layer.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/repaint/should-not-clip-composited-viewport-scrolling-layer.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/squashing/add-remove-squashed-layers.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/squashing/iframe-inside-squashed-layer.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/squashing/invalidations-with-large-negative-margin.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/squashing/remove-squashed-layer-plus-move.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/squashing/selection-repaint-with-gaps.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/squashing/squash-above-fixed-1.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/squashing/squashed-layer-loses-graphicslayer.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/squashing/squashed-repaints.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 compositing/will-change/containing-block-removed.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 css3/flexbox/repaint-during-resize-no-flex.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 css3/flexbox/repaint-on-layout.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 css3/flexbox/repaint-on-margin-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 css3/flexbox/repaint-opacity-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 css3/flexbox/repaint-rtl-column.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 css3/flexbox/repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/box-shadow/negative-shadow-box-expand.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/box-shadow/negative-shadow-box-shrink.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/box-shadow/shadow-box-resize-writing-mode.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/box-shadow/shadow-box-resize.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/canvas/canvas-composite-repaint-by-all-imagesource.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/css-grid-layout/grid-element-change-columns-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/css-grid-layout/grid-element-change-rows-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/css-grid-layout/grid-item-change-row-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/css-grid-layout/grid-item-z-index-change-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/forms/button/button-reset-focus-by-mouse-then-keydown.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/forms/range/range-focus-by-mouse-then-keydown.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/forms/submit/submit-focus-by-mouse-then-keydown.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/images/fixed-img-src-change-after-scroll.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/images/repaint-subrect-grid.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/layers/scroll-descendant-with-cached-cliprects.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/4776765.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/absolute-margin-change-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/absolute-position-change-containing-block.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/absolute-position-changed.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/abspos-shift-image-incorrect-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/add-table-overpaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/align-content-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/align-content-distribution-change-grid.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/align-content-position-change-grid.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/align-self-change-grid.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/align-self-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/align-self-overflow-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/background-currentColor-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/background-image-paint-invalidation.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/background-shorthand-with-gradient-and-height-changes.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/background-size-auto-with-gradient-and-height-changes.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/backgroundSizeRepaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/block-layout-inline-children-float-positioned.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/block-no-inflow-children.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/block-shift-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/body-background-image.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/border-radius-repaint-2.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/border-radius-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/border-radius-without-border.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/border-repaint-glitch.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/box-inline-resize.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/box-shadow-dynamic.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/box-shadow-inset-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/box-sizing-border-keeping-size.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/box-sizing.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/bugzilla-3509.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/bugzilla-5699.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/bugzilla-6278.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/bugzilla-6388.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/bugzilla-6473.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/bugzilla-7235.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/caret-with-transformation.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/change-text-content-and-background-color.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/clip-with-layout-delta.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/clipped-overflow-visible-subtree.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/clipped-relative.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/containing-block-position-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/content-into-overflow.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/control-clip.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/crbug-371640-2.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/crbug-371640-3.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/crbug-371640-4.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/crbug-371640.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/destroy-composited-scrollbar.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/destroy-overlay-scrollbar.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/destroy-scrollbar.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/details-open-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/dont-invalidate-root-layer-when-composited-layer-becomes-visible.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/dynamic-table-vertical-alignment-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/erase-overflow.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/fixed-after-scroll.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/fixed-and-absolute-position-scrolled.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/fixed-child-move-after-scroll.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/fixed-child-of-fixed-move-after-scroll.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/fixed-child-of-transformed-move-after-scroll.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/fixed-margin-change-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/fixed-move-after-scroll.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/fixed-scroll-simple.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/fixed-table-cell.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/fixed-table-overflow-zindex.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/fixed-table-overflow.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/fixed-to-relative-position-with-absolute-child.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/float-in-new-block-with-layout-delta.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/float-move-during-layout.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/float-overflow-right.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/float-overflow.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/focus-continuations.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/focus-enable-continuations.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/focus-ring-on-child-move.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/focus-ring-on-continuation-move.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/gradients-em-stops-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/hover-invalidation-table.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/hover-pseudo-borders-whitespace.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/hover-pseudo-borders.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/inline-block-resize.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/inline-color-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/inline-focus.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/inline-outline-repaint-2.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/inline-outline-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/inline-overflow.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/inline-reflow.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/inline-relative-positioned.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/inline-style-change-in-scrolled-view.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/inline-vertical-lr-overflow.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/inline-vertical-rl-overflow.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/intermediate-layout-position.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/invalidation-after-opacity-change-subtree.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/invisible-objects.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/japanese-rl-selection-clear.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/japanese-rl-selection-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/justify-content-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/justify-content-distribution-change-grid.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/justify-content-position-change-grid.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/justify-content-position-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/justify-items-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/justify-items-legacy-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/justify-items-overflow-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/justify-self-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/justify-self-overflow-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/layout-state-only-positioned.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/layout-state-relative.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/layout-state-scrolloffset.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/layout-state-scrolloffset2.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/layout-state-scrolloffset3.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/line-flow-with-floats-1.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/line-flow-with-floats-10.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/line-flow-with-floats-2.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/line-flow-with-floats-3.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/line-flow-with-floats-4.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/line-flow-with-floats-5.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/line-flow-with-floats-6.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/line-flow-with-floats-7.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/line-flow-with-floats-8.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/line-flow-with-floats-9.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/line-in-scrolled-clipped-block.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/line-overflow.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/lines-with-layout-delta.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/list-marker-2.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/make-children-non-inline.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/margin.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/mix-blend-mode-separate-stacking-context.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/multi-layout-one-frame.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/multicol-as-paint-container.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/multicol-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/multicol-with-abspos-in-relpos.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/multicol-with-abspos.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/multicol-with-block.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/multicol-with-inline.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/multicol-with-text.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/negative-text-indent-with-overflow-hidden.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/offset-change-wrong-invalidation-with-float.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/opacity-change-on-overflow-float.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/outline-change-continuations.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/outline-change-invalidation.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/outline-child-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/outline-clip-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/outline-continuations.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/outline-inset.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/outline-repaint-glitch.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/overflow-auto-in-overflow-auto-scrolled.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/overflow-clip-subtree-layout.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/overflow-delete-line.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/overflow-hide.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/overflow-into-content.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/overflow-scroll-after-move.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/overflow-scroll-body-appear.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/overflow-scroll-delete.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/overflow-scroll-in-overflow-scroll-scrolled.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/overflow-show.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/overhanging-float-detach-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/padding-keeping-content-size.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/percent-size-image-resize-container.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/position-change-keeping-geometry.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/positioned-document-element.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/positioned-great-grandparent-change-location.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/positioned-list-offset-change-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/push-block-with-first-line.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/quotes.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/reflection-redraw.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/reflection-repaint-test.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/relative-inline-positioned-movement-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/relative-margin-change-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/remove-block-after-layout.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/remove-inline-after-layout.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/remove-inline-block-descendant-of-flex.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/remove-inline-layer-after-layout.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/repaint-across-writing-mode-boundary.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/repaint-composited-child-in-scrolled-container.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/repaint-descandant-on-ancestor-layer-move.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/repaint-during-scroll-with-zoom.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/repaint-table-row-in-composited-document.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/replaced-clipped-positioned-not-wrong-incremental-repainting.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/requestAnimation-translation-leave-traces.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/resize-scrollable-div.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/resize-scrollable-iframe.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/resize-with-border-clipped.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/resize-with-border.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/scroll-in-transformed-layer.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/scroll-inside-table-cell.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/scroll-relative-table-inside-table-cell.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/scroll-stacking-context-backface-visiblity-leaves-traces.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/scrollbar-damage-and-full-viewport-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/scrollbar-invalidation-on-resize-with-border.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/scrollbar-invalidation-on-resize.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/scrollbar-parts.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/search-field-cancel.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/select-option-background-color.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/selected-replaced.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/selection-after-delete.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/selection-after-remove.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/selection-change-in-iframe-with-relative-parent.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/selection-clear.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/selection-partial-invalidation-between-blocks.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/selection-rl.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/shift-relative-positioned-container-with-image-addition.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/shift-relative-positioned-container-with-image-removal.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/stacked-diacritics.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/stacking-context-lost.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/static-to-positioned.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/subtree-root-skipped.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-cell-collapsed-border.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-cell-move.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-col-background-offset.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-col-background.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-collapsed-border.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-outer-border.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-overflow-auto-in-overflow-auto-scrolled.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-row-bg-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-row.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-section-overflow.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-section-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-shrink-row-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/table-with-padding-row-invalidation.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/text-append-dirty-lines.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/text-in-relative-positioned-inline.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/text-match-document-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/text-selection-rect-in-overflow-2.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/text-selection-rect-in-overflow.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/textarea-appearance-none-resize-handle.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/textarea-set-disabled.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/transform-disable-layoutstate.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/transform-inline-layered-child.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/transform-layout-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/transform-rotate-and-remove.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/transform-translate.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/vertical-align-length1.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/vertical-align-length2.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/vertical-align1.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/vertical-align2.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/vertical-rl-as-paint-container.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/video-mute-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/video-unmute-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/view-background-from-body-2.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/window-resize-background-image-fixed-centered-composited.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/window-resize-background-image-fixed-centered.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/window-resize-background-image-generated.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/window-resize-background-image-non-fixed.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/window-resize-media-query.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/window-resize-percent-html.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/window-resize-percent-width-height.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/window-resize-positioned-bottom.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/window-resize-positioned-percent-top.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/window-resize-vertical-writing-mode.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/repaint/window-resize-viewport-percent.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/border-collapse-change-collapse-to-separate.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/border-collapse-change-separate-to-collapse.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-69296.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-cell-append.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-cell-remove.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-cell-border-color.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-cell-border-width.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-cell-sl-border-color.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-col-border-color.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-col-border-width.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-colgroup-border-color.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-colgroup-border-width.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-row-border-color.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-row-border-width.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-table-border-color.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-table-border-width.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-tbody-border-color.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/border-collapsing/cached-change-tbody-border-width.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/resize-table-repaint-percent-size-cell.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/resize-table-repaint-vertical-align-cell.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 fast/table/resize-table-row-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 media/media-audio-no-spurious-repaints.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 media/video-paint-invalidation.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 paint/invalidation/animated-gif-background.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 paint/invalidation/invalidate-box-shadow-currentColor.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 paint/invalidation/invalidate-descendants-when-receiving-paint-layer.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 paint/invalidation/non-text-link-invalidation-optimization.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 paint/selection/invalidation-rect-includes-newline-for-rtl.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 paint/selection/invalidation-rect-includes-newline-for-vertical-lr.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 paint/selection/invalidation-rect-includes-newline-for-vertical-rl.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 paint/selection/invalidation-rect-includes-newline.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 paint/selection/invalidation-rect-with-br-includes-newline.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 paint/selection/selection-within-composited-scroller.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/as-image/svg-image-change-content-size.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/as-object/embedded-svg-size-changes-no-layout-triggers.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/carto.net/window.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/absolute-sized-content-with-resources.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/circle-move-invalidation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/clip-path-child-changes.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/clip-path-href-changes.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/clip-path-id-changes.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/clip-path-units-changes.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/deep-dynamic-updates.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/gradient-add-stops.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/gradient-stop-style-change.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-late-clipPath-and-object-creation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-late-clipPath-creation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-late-gradient-and-object-creation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-late-gradient-creation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-late-marker-and-object-creation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-late-marker-creation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-late-mask-and-object-creation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-late-mask-creation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-late-pattern-and-object-creation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-late-pattern-creation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-repaint-rect-on-path-with-stroke.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-update-bounce.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-update-container.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-update-gradient.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-update-pattern-child.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-update-pattern.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-update-polygon-changes.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-update-polygon-removal.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-update-stop-linked-gradient.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-update-stop.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/js-update-style.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/marker-viewBox-changes.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/mask-invalidation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/object-sizing-no-width-height-change-content-box-size.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/pending-resource-after-removal.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/relative-sized-content-with-resources.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/relative-sized-content.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/relative-sized-deep-shadow-tree-content.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/relative-sized-image.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/relative-sized-inner-svg.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/relative-sized-shadow-tree-content-with-symbol.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/relative-sized-shadow-tree-content.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/relative-sized-use-on-symbol.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/relative-sized-use-without-attributes-on-symbol.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/repaint-moving-svg-and-div.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/resource-client-removal.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/resource-invalidate-on-target-update.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/text-dom-removal.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/text-repaint-including-stroke.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/text-xy-updates-SVGList.xhtml [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/use-clipped-hit.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/use-detach.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/custom/use-setAttribute-crash.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-change-target-id.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-multiple-targets-id-change.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-reference-invalidation.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-remove-target.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-target-add-to-document.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-target-attribute-change-with-use-indirection-2.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-target-attribute-change-with-use-indirection.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-target-attribute-change.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-target-changes-id.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-target-id-change.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-target-property-change.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-target-reappend-to-document.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/feImage-target-remove-from-document.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/filter-width-update.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/filters/invalidate-on-child-layout.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/add-background-property-on-root.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/add-outline-property-on-root.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/container-repaint.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/fecomponenttransfer-in1-change.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/foreign-object-repaint.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/image-with-clip-path.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/inner-svg-change-viewBox-contract.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/inner-svg-change-viewPort-relative.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/mask-clip-target-transform.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/modify-inserted-listitem.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/modify-transferred-listitem-different-attr.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/modify-transferred-listitem.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/outline-offset-text.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/paintorder-filtered.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/remove-background-property-on-root.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/remove-outline-property-on-root.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/repaint-non-scaling-stroke-text-decoration.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/repaint-non-scaling-stroke-text.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/repaint-paintorder.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/text-mask-update.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/text-pattern-update-2.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/text-pattern-update.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/transform-changed-state.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/transform-foreign-object.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/transform-text-element.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/repaint/tspan-pattern-update.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/text/append-text-node-to-tspan.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/text/ems-display-none.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/text/exs-display-none.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/text/modify-text-node-in-tspan.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/text/remove-text-node-from-tspan.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/text/remove-tspan-from-text.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/text/text-rescale.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/text/text-selection-text-05-t.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/text/text-viewbox-rescale.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/text/tspan-dynamic-positioning.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/zoom/page/absolute-sized-document-no-scrollbars.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 svg/zoom/page/relative-sized-document-scrollbars.svg [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 transforms/transform-focus-ring-repaint.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 virtual/display_list_2d_canvas/fast/canvas/canvas-composite-repaint-by-all-imagesource.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 virtual/gpu-rasterization/fast/images/fixed-img-src-change-after-scroll.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 virtual/gpu-rasterization/fast/images/repaint-subrect-grid.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-crbug.com/602483 virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content.html [ NeedsManualRebaseline ] # should be NeedsRebaseline, crbug.com/603753
-
 crbug.com/596968 [ Win ] inspector-protocol/input/eventTimestamp.html [ Failure Pass ]
 
 crbug.com/248938 [ Win Debug ] virtual/threaded/animations/transition-and-animation-2.html [ Timeout ]
@@ -876,8 +431,9 @@
 crbug.com/600618 virtual/spv2/svg/custom/object-sizing-explicit-height.xhtml [ Pass ]
 crbug.com/600618 virtual/spv2/svg/custom/object-sizing-explicit-width-height.xhtml [ Pass ]
 crbug.com/600618 virtual/spv2/svg/custom/object-sizing-explicit-width.xhtml [ Pass ]
-# TODO(wangxianzhu): restore this after rebaseline for crbug.com/602483
-# crbug.com/600618 virtual/spv2/svg/custom/object-sizing-no-width-height-change-content-box-size.xhtml [ Pass ]
+# TODO(wangxianzhu): restore this after rebaseline
+#crbug.com/600618 virtual/spv2/svg/custom/object-sizing-no-width-height-change-content-box-size.xhtml [ Pass ]
+crbug.com/600618 virtual/spv2/svg/custom/object-sizing-no-width-height-change-content-box-size.xhtml [ NeedsManualRebaseline ]
 crbug.com/600618 virtual/spv2/svg/custom/svg-root-padding-left.html [ Pass ]
 crbug.com/600618 virtual/spv2/svg/custom/svg-root-padding-top.html [ Pass ]
 crbug.com/600618 virtual/spv2/svg/custom/viewport-em.svg [ Pass ]
@@ -1719,10 +1275,8 @@
 
 crbug.com/587593 [ Android ] fast/js/pic/cached-single-entry-transition.html [ Pass Failure ]
 
-crbug.com/602614 svg/carto.net/tabgroup.svg [ NeedsManualRebaseline ]
-crbug.com/602618 svg/custom/use-disappears-after-style-update.svg [ NeedsManualRebaseline ]
-crbug.com/602616 svg/filters/filter-refresh.svg [ NeedsManualRebaseline ]
-crbug.com/602483 svg/transforms/animated-path-inside-transformed-html.xhtml [ NeedsManualRebaseline ]
+# TODO(wangxianzhu): Examine bot result.
+crbug.com/602614 svg/carto.net/tabgroup.svg [ Pass Failure ]
 
 crbug.com/587779 [ Linux Mac10.10 Mac10.11 Retina ] fast/dynamic/window-resize-scrollbars-test.html [ Timeout Failure Pass ]
 crbug.com/588103 fast/xmlhttprequest/xmlhttprequest-responsetype-arraybuffer.html [ Pass Failure ]
@@ -1974,9 +1528,6 @@
 crbug.com/600261 imported/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.html [ Failure ]
 crbug.com/600261 imported/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.html [ Failure ]
 
-crbug.com/603767  [ Linux ] inspector/tracing/timeline-auto-record.html [ Failure ]
-crbug.com/603767  [ Linux ] virtual/threaded/inspector/tracing/timeline-auto-record.html [ Failure ]
-
 crbug.com/593679 virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance.html [ NeedsManualRebaseline ]
 crbug.com/593679 virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance.html [ NeedsManualRebaseline ]
 crbug.com/593679 virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance.html [ NeedsManualRebaseline ]
diff --git a/third_party/WebKit/LayoutTests/bluetooth/characteristicvaluechanged.html b/third_party/WebKit/LayoutTests/bluetooth/characteristicvaluechanged.html
index 0cf19da..93243fd9 100644
--- a/third_party/WebKit/LayoutTests/bluetooth/characteristicvaluechanged.html
+++ b/third_party/WebKit/LayoutTests/bluetooth/characteristicvaluechanged.html
@@ -55,41 +55,4 @@
       }
     });
 }, 'Add multiple event listeners then readValue().');
-
-promise_test(() => {
-  let char;
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-    .then(device => device.gatt.connect())
-    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-    .then(service => service.getCharacteristic('heart_rate_measurement'))
-    .then(characteristic => {
-      char = characteristic;
-      return assert_event_fires_after_promise(characteristic,
-                                              'startNotifications',
-                                              'characteristicvaluechanged');
-    })
-    .then(() => char.stopNotifications())
-    .then(() => assert_no_events(char, 'characteristicvaluechanged'));
-}, 'Starting notifications should fire an event.');
-
-promise_test(() => {
-  let char;
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-    .then(device => device.gatt.connect())
-    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-    .then(service => service.getCharacteristic('heart_rate_measurement'))
-    .then(characteristic => {
-      char = characteristic;
-      return assert_event_fires_after_promise(characteristic,
-                                              'startNotifications',
-                                              'characteristicvaluechanged',
-                                              3 /* add 3 listeners */);
-    })
-    .then(() => char.stopNotifications())
-    .then(() => assert_no_events(char, 'characteristicvaluechanged'));
-}, 'Add multiple event listeners then startNotifications().');
 </script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications.html b/third_party/WebKit/LayoutTests/bluetooth/notifications.html
deleted file mode 100644
index 4345c1a..0000000
--- a/third_party/WebKit/LayoutTests/bluetooth/notifications.html
+++ /dev/null
@@ -1,187 +0,0 @@
-<!DOCTYPE html>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="../resources/bluetooth/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-test(t => { assert_true(window.testRunner instanceof Object); t.done(); },
-     'window.testRunner is required for the following tests.');
-
-promise_test(() => {
-  let start_promise;
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-   .then(device => device.gatt.connect())
-   .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-   .then(service => service.getCharacteristic('heart_rate_measurement'))
-   .then(characteristic => {
-     start_promise = characteristic.startNotifications();
-     // We itentionally don't return the promise so that 'characteristic' goes
-     // out of scope while the request is still pending.
-   }).then(() => runGarbageCollection())
-   .then(() => start_promise);
-}, 'Object gets garbage collected while start request is pending.');
-
-promise_test(() => {
-  let stop_promise;
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-   .then(device => device.gatt.connect())
-   .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-   .then(service => service.getCharacteristic('heart_rate_measurement'))
-   .then(characteristic => {
-     return characteristic.startNotifications().then(() => {
-       stop_promise = characteristic.stopNotifications();
-       // We itentionally don't return the promise so that 'characteristic' goes
-       // out of scope while the request is still pending.
-     });
-   }).then(() => runGarbageCollection())
-   .then(() => stop_promise);
-}, 'Object gets garbage collected while stop request is pending.');
-
-promise_test(() => {
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-   .then(device => device.gatt.connect())
-   .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-   .then(service => service.getCharacteristic('heart_rate_measurement'))
-   .then(characteristic => {
-     return characteristic.startNotifications()
-                          .then(() => characteristic.stopNotifications());
-   }).then(() => runGarbageCollection());
-}, 'Single start notifications succeeds.');
-
-
-promise_test(() => {
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-   .then(device => device.gatt.connect())
-   .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-   .then(service => service.getCharacteristic('heart_rate_measurement'))
-   .then(characteristic => {
-     return characteristic.startNotifications().then(() => {
-       return characteristic.startNotifications()
-                            .then(() => characteristic.stopNotifications());
-     });
-   }).then(() => runGarbageCollection());
-}, 'Start notifications after succesfully starting before.');
-
-promise_test(() => {
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-   .then(device => device.gatt.connect())
-   .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-   .then(service => service.getCharacteristic('heart_rate_measurement'))
-   .then(characteristic => {
-     return characteristic.startNotifications()
-                          .then(() => characteristic.stopNotifications())
-                          .then(() => characteristic.startNotifications())
-                          .then(() => characteristic.stopNotifications());
-   }).then(() => runGarbageCollection());
-}, 'Start -> stop -> start -> stop.');
-
-promise_test(() => {
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-   .then(device => device.gatt.connect())
-   .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-   .then(service => service.getCharacteristic('heart_rate_measurement'))
-   .then(characteristic => {
-     return Promise.all([characteristic.startNotifications(),
-                         characteristic.startNotifications(),
-                         characteristic.startNotifications()])
-                   .then(() => characteristic.stopNotifications());
-   }).then(() => runGarbageCollection());
-}, 'Multiple starts in a row.');
-
-promise_test(() => {
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-   .then(device => device.gatt.connect())
-   .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-   .then(service => service.getCharacteristic('heart_rate_measurement'))
-   .then(characteristic => {
-     return Promise.all([characteristic.startNotifications(),
-                         characteristic.stopNotifications()]);
-   }).then(() => runGarbageCollection());
-}, "Parallel start and stop.");
-
-promise_test(() => {
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-   .then(device => device.gatt.connect())
-   .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-   .then(service => service.getCharacteristic('heart_rate_measurement'))
-   .then(characteristic => {
-     return characteristic.startNotifications().then(() => {
-       return Promise.all([characteristic.stopNotifications(),
-                           characteristic.stopNotifications()]);
-     });
-   }).then(() => runGarbageCollection());
-}, "Concurrent stop requests.");
-
-promise_test(() => {
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-   .then(device => device.gatt.connect())
-   .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-   .then(service => service.getCharacteristic('heart_rate_measurement'))
-   .then(characteristic => {
-     return characteristic.startNotifications()
-                          .then(() => characteristic.stopNotifications())
-                          .then(() => characteristic.stopNotifications());
-   }).then(() => runGarbageCollection());
-}, "Stopping twice.");
-
-promise_test(() => {
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-   .then(device => device.gatt.connect())
-   .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-   .then(service => service.getCharacteristic('heart_rate_measurement'))
-   .then(characteristic => {
-     return characteristic.startNotifications().then(() => {
-       return Promise.all([characteristic.stopNotifications(),
-                           characteristic.startNotifications()]);
-     }).then(() => characteristic.stopNotifications());
-   }).then(() => runGarbageCollection());
-}, "Start request before stop request resolves");
-
-promise_test(() => {
-  return setBluetoothFakeAdapter('HeartRateAdapter')
-    .then(() => requestDeviceWithKeyDown({
-      filters: [{services: ['heart_rate']}]}))
-   .then(device => device.gatt.connect())
-   .then(gattServer => gattServer.getPrimaryService('heart_rate'))
-   .then(service => service.getCharacteristic('heart_rate_measurement'))
-   .then(characteristic => characteristic.stopNotifications())
-   .then(() => runGarbageCollection());
-}, "Stop without starting.");
-
-gatt_errors_tests.forEach(testSpec => {
-  promise_test(() => {
-    return setBluetoothFakeAdapter('FailingGATTOperationsAdapter')
-      .then(() => requestDeviceWithKeyDown({
-        filters: [{services: [errorUUID(0xA0)]}]}))
-      .then(device => device.gatt.connect())
-      .then(gattServer => gattServer.getPrimaryService(errorUUID(0xA0)))
-      .then(service => service.getCharacteristic(testSpec.uuid))
-      .then(characteristic => {
-        return assert_promise_rejects_with_message(
-          characteristic.startNotifications(),
-          testSpec.error,
-          'Trying to write to a characteristic failed.');
-      });
-  }, testSpec.testName);
-});
-</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/add-listener-after-promise.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/add-listener-after-promise.html
new file mode 100644
index 0000000..dfbd2f3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/add-listener-after-promise.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      return characteristic.startNotifications()
+        .then(() => new Promise(resolve => {
+          let event_listener = e => {
+            characteristic.removeEventListener(
+              'characteristicvaluechanged', event_listener);
+            resolve();
+          };
+          characteristic.addEventListener(
+            'characteristicvaluechanged', event_listener);
+        }));
+    });
+}, 'Registering after the promise resolves shouldn\'t result in events ' +
+   'getting dropped.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/add-multiple-event-listeners.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/add-multiple-event-listeners.html
new file mode 100644
index 0000000..6f8116e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/add-multiple-event-listeners.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  let char;
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      char = characteristic;
+      return assert_event_fires_after_promise(characteristic,
+                                              'startNotifications',
+                                              'characteristicvaluechanged',
+                                              3 /* add 3 listeners */);
+    })
+    .then(() => char.stopNotifications())
+    .then(() => assert_no_events(char, 'characteristicvaluechanged'));
+}, 'Add multiple event listeners then startNotifications().');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/characteristic-does-not-support-notifications.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/characteristic-does-not-support-notifications.html
new file mode 100644
index 0000000..53a6fa7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/characteristic-does-not-support-notifications.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattService => gattService.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('body_sensor_location'))
+    .then(characteristic => assert_promise_rejects_with_message(
+      characteristic.startNotifications(),
+      new DOMException('GATT Error: Not supported.',
+                       'NotSupportedError'),
+      'Characteristic does not support notifications.'));
+}, 'Characteristic does not support notifications. Reject with ' +
+   'NotSupportedError.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/characteristic-is-removed.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/characteristic-is-removed.html
new file mode 100644
index 0000000..16b247f5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/characteristic-is-removed.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattService => gattService.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      return setBluetoothFakeAdapter('MissingCharacteristicHeartRateAdapter')
+        .then(() => assert_promise_rejects_with_message(
+          characteristic.startNotifications(),
+          new DOMException('GATT Characteristic no longer exists.',
+                           'InvalidStateError'),
+          'Characteristic got removed.'));
+    });
+}, 'Characteristic is removed. Reject with InvalidStateError.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/concurrent-starts.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/concurrent-starts.html
new file mode 100644
index 0000000..5f9b657
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/concurrent-starts.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => Promise.all([
+      characteristic.startNotifications(),
+      characteristic.startNotifications(),
+      characteristic.startNotifications()]));
+  // TODO(ortuno): Assert that notifications are active.
+  // http://crbug.com/600762
+}, 'Multiple starts in a row.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/concurrent-stops.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/concurrent-stops.html
new file mode 100644
index 0000000..3de7f07
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/concurrent-stops.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      return characteristic.startNotifications()
+        .then(() => Promise.all([
+          characteristic.stopNotifications(),
+          characteristic.stopNotifications()]));
+    });
+  // TODO(ortuno): Assert that notifications are not active.
+  // http://crbug.com/600762
+}, "Concurrent stop requests.");
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/device-goes-out-of-range.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/device-goes-out-of-range.html
new file mode 100644
index 0000000..1d5add94
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/device-goes-out-of-range.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      return setBluetoothFakeAdapter('EmptyAdapter')
+        .then(() => assert_promise_rejects_with_message(
+          characteristic.startNotifications(),
+          new DOMException(
+            'Bluetooth Device is no longer in range.', 'NetworkError'),
+          'Device went out of range.'));
+    });
+}, 'Device goes out of range. Reject with NetworkError.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/event-after-starting.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/event-after-starting.html
new file mode 100644
index 0000000..b2d4cde
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/event-after-starting.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      return assert_event_fires_after_promise(
+        characteristic, 'startNotifications', 'characteristicvaluechanged')
+        .then(() => characteristic.stopNotifications())
+        .then(() => assert_no_events(characteristic,
+                                     'characteristicvaluechanged'));
+    });
+}, 'Starting notifications should fire an event and we should get no events ' +
+   'after notifications are stopped.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/gc-with-pending-start.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/gc-with-pending-start.html
new file mode 100644
index 0000000..d3db2f8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/gc-with-pending-start.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  let start_promise;
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      start_promise = characteristic.startNotifications();
+      // We intentionally don't return the promise so that 'characteristic' goes
+      // out of scope while the request is still pending.
+    })
+    .then(() => runGarbageCollection())
+    .then(() => start_promise);
+  // TODO(ortuno): Assert that notifications are not active.
+  // http://crbug.com/600762
+  // Objects will no longer get garbage collected once we implement the
+  // bluetooth tree.
+  // https://crbug.com/495270
+}, 'Object gets garbage collected while start request is pending. Make ' +
+   'sure we don\' crash.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/gc-with-pending-stop.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/gc-with-pending-stop.html
new file mode 100644
index 0000000..da4a8abd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/gc-with-pending-stop.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  let stop_promise;
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      return characteristic.startNotifications().then(() => {
+        stop_promise = characteristic.stopNotifications();
+        // We intentionally don't return the promise so that 'characteristic'
+        // goes out of scope while the request is still pending.
+      });
+    })
+    .then(() => runGarbageCollection())
+    .then(() => stop_promise);
+  // TODO(ortuno): Assert that notifications are not active.
+  // http://crbug.com/600762
+}, 'Object gets garbage collected while stop request is pending. Make sure ' +
+   'we don\'t crash while the request is pending.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/parallel-start-stop.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/parallel-start-stop.html
new file mode 100644
index 0000000..bbc25d8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/parallel-start-stop.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+   .then(device => device.gatt.connect())
+   .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+   .then(service => service.getCharacteristic('heart_rate_measurement'))
+   .then(characteristic => Promise.all([
+     characteristic.startNotifications(),
+     characteristic.stopNotifications()]));
+  // TODO(ortuno): Assert that notifications are not active.
+  // http://crbug.com/600762
+}, "Parallel start and stop.");
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/service-is-removed.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/service-is-removed.html
new file mode 100644
index 0000000..6c7c47b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/service-is-removed.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattService => gattService.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      return setBluetoothFakeAdapter('MissingServiceHeartRateAdapter')
+        .then(() => assert_promise_rejects_with_message(
+          characteristic.startNotifications(),
+          new DOMException('GATT Service no longer exists.',
+                           'InvalidStateError'),
+          'Service got removed.'));
+    });
+}, 'Service is removed. Reject with InvalidStateError.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/start-before-stop-resolves.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/start-before-stop-resolves.html
new file mode 100644
index 0000000..aea9ed29
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/start-before-stop-resolves.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      return characteristic.startNotifications()
+        .then(() => Promise.all([
+          characteristic.stopNotifications(),
+          characteristic.startNotifications()]));
+    });
+  // TODO(ortuno): Assert that notifications are active.
+  // http://crbug.com/600762
+}, "Start request before stop request resolves");
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/start-fails.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/start-fails.html
new file mode 100644
index 0000000..3064565
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/start-fails.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('FailingGATTOperationsAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: [errorUUID(0xA0)]}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService(errorUUID(0xA0)))
+    .then(service => {
+      let tests = Promise.resolve();
+      gatt_errors_tests.forEach(testSpec => {
+        tests = tests.then(() => service.getCharacteristic(testSpec.uuid))
+          .then(characteristic => assert_promise_rejects_with_message(
+            characteristic.startNotifications(),
+            testSpec.error,
+            testSpec.testName));
+      });
+      return tests;
+    });
+}, 'Start notifications fails. Should reject with appropriate error.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/start-stop-start-stop.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/start-stop-start-stop.html
new file mode 100644
index 0000000..1e65acb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/start-stop-start-stop.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      return characteristic.startNotifications()
+        .then(() => characteristic.stopNotifications())
+        .then(() => characteristic.startNotifications())
+        .then(() => characteristic.stopNotifications());
+    });
+  // TODO(ortuno): Assert that notifications are not active.
+  // http://crbug.com/600762
+}, 'Start -> stop -> start -> stop.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/start-succeeds.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/start-succeeds.html
new file mode 100644
index 0000000..df88265
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/start-succeeds.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => characteristic.startNotifications());
+  // TODO(ortuno): Assert that notifications are active.
+  // http://crbug.com/600762
+}, 'Single start notifications succeeds.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/start-twice-in-a-row.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/start-twice-in-a-row.html
new file mode 100644
index 0000000..60e8dfb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/start-twice-in-a-row.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      return characteristic.startNotifications()
+        .then(() => characteristic.startNotifications());
+    });
+  // TODO(ortuno): Assert that notifications are active.
+  // http://crbug.com/600762
+}, 'Start notifications after succesfully starting before.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/stop-twice.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/stop-twice.html
new file mode 100644
index 0000000..01075c7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/stop-twice.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => {
+      return characteristic.startNotifications()
+        .then(() => characteristic.stopNotifications())
+        .then(() => characteristic.stopNotifications());
+    });
+}, "Stopping twice.");
+</script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/stop-without-starting.html b/third_party/WebKit/LayoutTests/bluetooth/notifications/stop-without-starting.html
new file mode 100644
index 0000000..7cbb029
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/notifications/stop-without-starting.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+  return setBluetoothFakeAdapter('HeartRateAdapter')
+    .then(() => requestDeviceWithKeyDown({
+      filters: [{services: ['heart_rate']}]}))
+    .then(device => device.gatt.connect())
+    .then(gattServer => gattServer.getPrimaryService('heart_rate'))
+    .then(service => service.getCharacteristic('heart_rate_measurement'))
+    .then(characteristic => characteristic.stopNotifications());
+}, "Stop without starting.");
+</script>
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/fixed-scroll-in-empty-root-layer-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/fixed-scroll-in-empty-root-layer-expected.txt
index 9e6d05f1..e35c1678 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/fixed-scroll-in-empty-root-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/fixed-scroll-in-empty-root-layer-expected.txt
@@ -11,12 +11,12 @@
           "paintInvalidations": [
             {
               "object": "LayoutBlockFlow (positioned) DIV",
-              "rect": [0, 50, 100, 100],
+              "rect": [0, 250, 100, 100],
               "reason": "full"
             },
             {
               "object": "LayoutBlockFlow (positioned) DIV",
-              "rect": [0, 250, 100, 100],
+              "rect": [0, 50, 100, 100],
               "reason": "full"
             }
           ],
@@ -35,12 +35,12 @@
               "paintInvalidations": [
                 {
                   "object": "LayoutBlockFlow (positioned) DIV",
-                  "rect": [0, 50, 100, 100],
+                  "rect": [0, 250, 100, 100],
                   "reason": "full"
                 },
                 {
                   "object": "LayoutBlockFlow (positioned) DIV",
-                  "rect": [0, 250, 100, 100],
+                  "rect": [0, 50, 100, 100],
                   "reason": "full"
                 }
               ]
diff --git a/third_party/WebKit/LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer-expected.txt b/third_party/WebKit/LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer-expected.txt
index d772667..7595ed22 100644
--- a/third_party/WebKit/LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer-expected.txt
@@ -23,12 +23,12 @@
               "paintInvalidations": [
                 {
                   "object": "LayoutBlockFlow (positioned) DIV class='fixed'",
-                  "rect": [25, 25, 50, 50],
+                  "rect": [25, 125, 50, 50],
                   "reason": "full"
                 },
                 {
                   "object": "LayoutBlockFlow (positioned) DIV class='fixed'",
-                  "rect": [25, 125, 50, 50],
+                  "rect": [25, 25, 50, 50],
                   "reason": "full"
                 }
               ]
diff --git a/third_party/WebKit/LayoutTests/compositing/repaint/resize-repaint-expected.txt b/third_party/WebKit/LayoutTests/compositing/repaint/resize-repaint-expected.txt
index 49c1879..eb2b481d 100644
--- a/third_party/WebKit/LayoutTests/compositing/repaint/resize-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/repaint/resize-repaint-expected.txt
@@ -12,14 +12,9 @@
           "drawsContent": true,
           "paintInvalidations": [
             {
-              "object": "LayoutBlockFlow DIV",
-              "rect": [2, 104, 398, 50],
-              "reason": "location change"
-            },
-            {
-              "object": "LayoutBlockFlow DIV",
-              "rect": [2, 155, 398, 50],
-              "reason": "location change"
+              "object": "LayoutBlockFlow DIV id='resizing'",
+              "rect": [0, 104, 402, 103],
+              "reason": "incremental"
             },
             {
               "object": "LayoutBlockFlow DIV id='resizing'",
@@ -27,9 +22,14 @@
               "reason": "incremental"
             },
             {
-              "object": "LayoutBlockFlow DIV id='resizing'",
-              "rect": [0, 104, 402, 103],
-              "reason": "incremental"
+              "object": "LayoutBlockFlow DIV",
+              "rect": [2, 155, 398, 50],
+              "reason": "location change"
+            },
+            {
+              "object": "LayoutBlockFlow DIV",
+              "rect": [2, 104, 398, 50],
+              "reason": "location change"
             }
           ]
         }
diff --git a/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change-expected.txt
index cd3f2493..fdfd8ca 100644
--- a/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change-expected.txt
@@ -7,13 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='overflow1'",
-          "rect": [0, 0, 200, 200],
+          "object": "LayoutBlockFlow DIV id='overflow2'",
+          "rect": [0, 200, 200, 200],
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='overflow2'",
-          "rect": [0, 200, 200, 200],
+          "object": "LayoutBlockFlow DIV id='overflow1'",
+          "rect": [0, 0, 200, 200],
           "reason": "style change"
         }
       ],
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/add-remove-squashed-layers-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/add-remove-squashed-layers-expected.txt
index 0837c2b..b5eb03be 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/add-remove-squashed-layers-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/add-remove-squashed-layers-expected.txt
@@ -41,7 +41,6 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
-          "rect": [0, 0, 0, 0],
           "reason": "layer"
         }
       ],
@@ -136,16 +135,16 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'",
-                  "rect": [0, 0, 100, 100],
-                  "reason": "layoutObject removal"
-                },
-                {
                   "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
                   "rect": [160, 160, 100, 100],
                   "reason": "layer"
                 },
                 {
+                  "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'",
+                  "rect": [0, 0, 100, 100],
+                  "reason": "layoutObject removal"
+                },
+                {
                   "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
                   "rect": [0, 0, 100, 100],
                   "reason": "location change"
@@ -169,7 +168,6 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'",
-          "rect": [0, 0, 0, 0],
           "reason": "layer"
         }
       ],
@@ -190,6 +188,11 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
+                  "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
+                  "rect": [80, 80, 100, 100],
+                  "reason": "location change"
+                },
+                {
                   "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'",
                   "rect": [0, 0, 100, 100],
                   "reason": "layoutObject insertion"
@@ -198,11 +201,6 @@
                   "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
                   "rect": [0, 0, 100, 100],
                   "reason": "layer"
-                },
-                {
-                  "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
-                  "rect": [80, 80, 100, 100],
-                  "reason": "location change"
                 }
               ]
             }
@@ -223,7 +221,6 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'",
-          "rect": [0, 0, 0, 0],
           "reason": "layer"
         }
       ],
@@ -244,16 +241,6 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'",
-                  "rect": [0, 0, 100, 100],
-                  "reason": "layoutObject insertion"
-                },
-                {
-                  "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'",
-                  "rect": [0, 0, 100, 100],
-                  "reason": "layer"
-                },
-                {
                   "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'",
                   "rect": [80, 80, 100, 100],
                   "reason": "location change"
@@ -262,6 +249,16 @@
                   "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
                   "rect": [80, 80, 100, 100],
                   "reason": "layoutObject removal"
+                },
+                {
+                  "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'",
+                  "rect": [0, 0, 100, 100],
+                  "reason": "layoutObject insertion"
+                },
+                {
+                  "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'",
+                  "rect": [0, 0, 100, 100],
+                  "reason": "layer"
                 }
               ]
             }
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/invalidations-with-large-negative-margin-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/invalidations-with-large-negative-margin-expected.txt
index 0e29a2a3..b9b4177 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/invalidations-with-large-negative-margin-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/invalidations-with-large-negative-margin-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='chip'",
-          "rect": [8, 8, 50, 50],
+          "rect": [408, 8, 50, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='chip'",
-          "rect": [408, 8, 50, 50],
+          "rect": [8, 8, 50, 50],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-1-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-1-expected.txt
index e879258..01b19c00 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-1-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-1-expected.txt
@@ -49,18 +49,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-b' class='overlapping lime'",
-          "rect": [0, 100, 200, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-c' class='overlapping cyan'",
-          "rect": [0, 0, 200, 100],
-          "reason": "layer"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-d' class='overlapping lime'",
-          "rect": [0, 100, 200, 100],
+          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-f' class='overlapping lime'",
+          "rect": [0, 500, 200, 100],
           "reason": "layer"
         },
         {
@@ -69,8 +59,18 @@
           "reason": "layer"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-f' class='overlapping lime'",
-          "rect": [0, 500, 200, 100],
+          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-b' class='overlapping lime'",
+          "rect": [0, 100, 200, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-d' class='overlapping lime'",
+          "rect": [0, 100, 200, 100],
+          "reason": "layer"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-c' class='overlapping cyan'",
+          "rect": [0, 0, 200, 100],
           "reason": "layer"
         }
       ],
@@ -105,8 +105,8 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-d' class='overlapping lime'",
-                  "rect": [0, 0, 200, 100],
+                  "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-f' class='overlapping lime'",
+                  "rect": [0, 200, 200, 100],
                   "reason": "location change"
                 },
                 {
@@ -115,8 +115,8 @@
                   "reason": "location change"
                 },
                 {
-                  "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-f' class='overlapping lime'",
-                  "rect": [0, 200, 200, 100],
+                  "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-d' class='overlapping lime'",
+                  "rect": [0, 0, 200, 100],
                   "reason": "location change"
                 }
               ]
@@ -174,13 +174,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-g' class='overlapping cyan'",
+          "rect": [0, 600, 200, 100],
+          "reason": "layer"
+        },
+        {
           "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-c' class='overlapping cyan'",
           "rect": [0, 200, 200, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-d' class='overlapping lime'",
-          "rect": [0, 0, 200, 100],
+          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-f' class='overlapping lime'",
+          "rect": [0, 200, 200, 100],
           "reason": "layer"
         },
         {
@@ -189,13 +194,8 @@
           "reason": "layer"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-f' class='overlapping lime'",
-          "rect": [0, 200, 200, 100],
-          "reason": "layer"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-g' class='overlapping cyan'",
-          "rect": [0, 600, 200, 100],
+          "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-d' class='overlapping lime'",
+          "rect": [0, 0, 200, 100],
           "reason": "layer"
         }
       ],
@@ -230,8 +230,8 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-e' class='overlapping cyan'",
-                  "rect": [0, 0, 200, 100],
+                  "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-g' class='overlapping cyan'",
+                  "rect": [0, 200, 200, 100],
                   "reason": "location change"
                 },
                 {
@@ -240,8 +240,8 @@
                   "reason": "location change"
                 },
                 {
-                  "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-g' class='overlapping cyan'",
-                  "rect": [0, 200, 200, 100],
+                  "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-e' class='overlapping cyan'",
+                  "rect": [0, 0, 200, 100],
                   "reason": "location change"
                 }
               ]
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt
index 496b3ae1..0f4b517 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt
@@ -40,8 +40,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'",
-          "rect": [140, 140, 100, 100],
+          "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
+          "rect": [300, 300, 100, 100],
           "reason": "location change"
         },
         {
@@ -50,8 +50,8 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
-          "rect": [300, 300, 100, 100],
+          "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'",
+          "rect": [140, 140, 100, 100],
           "reason": "location change"
         },
         {
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squashed-repaints-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squashed-repaints-expected.txt
index 7dbd88d..4c2ce55a 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/squashed-repaints-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/squashed-repaints-expected.txt
@@ -92,13 +92,13 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'",
-                  "rect": [0, 0, 100, 100],
+                  "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'",
+                  "rect": [80, 80, 100, 100],
                   "reason": "style change"
                 },
                 {
-                  "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'",
-                  "rect": [80, 80, 100, 100],
+                  "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'",
+                  "rect": [0, 0, 100, 100],
                   "reason": "style change"
                 }
               ]
@@ -134,13 +134,13 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'",
-                  "rect": [80, 80, 100, 100],
+                  "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
+                  "rect": [160, 160, 100, 100],
                   "reason": "style change"
                 },
                 {
-                  "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
-                  "rect": [160, 160, 100, 100],
+                  "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'",
+                  "rect": [80, 80, 100, 100],
                   "reason": "style change"
                 }
               ]
@@ -176,13 +176,13 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'",
-                  "rect": [0, 0, 100, 100],
+                  "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
+                  "rect": [160, 160, 100, 100],
                   "reason": "style change"
                 },
                 {
-                  "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'",
-                  "rect": [160, 160, 100, 100],
+                  "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'",
+                  "rect": [0, 0, 100, 100],
                   "reason": "style change"
                 }
               ]
diff --git a/third_party/WebKit/LayoutTests/compositing/will-change/containing-block-removed-expected.txt b/third_party/WebKit/LayoutTests/compositing/will-change/containing-block-removed-expected.txt
index 6dbcd59..76c4fc7 100644
--- a/third_party/WebKit/LayoutTests/compositing/will-change/containing-block-removed-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/will-change/containing-block-removed-expected.txt
@@ -22,19 +22,23 @@
           "backgroundColor": "#0000FF",
           "paintInvalidations": [
             {
+              "object": "LayoutBlockFlow (positioned) DIV id='container'",
+              "rect": [0, 0, 100, 100],
+              "reason": "became visible"
+            },
+            {
+              "object": "LayoutBlockFlow (positioned) DIV id='container'",
+              "rect": [0, 0, 100, 100],
+              "reason": "layer"
+            },
+            {
               "object": "LayoutBlockFlow (positioned) DIV class='fixed'",
               "rect": [50, 50, 75, 75],
               "reason": "layer"
             },
             {
-              "object": "LayoutBlockFlow (positioned) DIV id='container'",
-              "rect": [0, 0, 100, 100],
+              "object": "LayoutBlockFlow (positioned) DIV class='fixed'",
               "reason": "layer"
-            },
-            {
-              "object": "LayoutBlockFlow (positioned) DIV id='container'",
-              "rect": [0, 0, 100, 100],
-              "reason": "became visible"
             }
           ]
         }
diff --git a/third_party/WebKit/LayoutTests/css3/flexbox/repaint-during-resize-no-flex-expected.txt b/third_party/WebKit/LayoutTests/css3/flexbox/repaint-during-resize-no-flex-expected.txt
index a942d94..0d3526e 100644
--- a/third_party/WebKit/LayoutTests/css3/flexbox/repaint-during-resize-no-flex-expected.txt
+++ b/third_party/WebKit/LayoutTests/css3/flexbox/repaint-during-resize-no-flex-expected.txt
@@ -7,13 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV class='flex-item'",
-          "rect": [70, 20, 10, 50],
-          "reason": "location change"
+          "object": "LayoutBlockFlow DIV id='flex-item-1' class='flex-item width'",
+          "rect": [30, 20, 40, 50],
+          "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow DIV class='flex-item'",
-          "rect": [110, 20, 10, 50],
+          "rect": [160, 20, 10, 50],
           "reason": "location change"
         },
         {
@@ -23,13 +23,13 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='flex-item'",
-          "rect": [160, 20, 10, 50],
+          "rect": [110, 20, 10, 50],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='flex-item-1' class='flex-item width'",
-          "rect": [30, 20, 40, 50],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow DIV class='flex-item'",
+          "rect": [70, 20, 10, 50],
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/css3/flexbox/repaint-on-margin-change-expected.txt b/third_party/WebKit/LayoutTests/css3/flexbox/repaint-on-margin-change-expected.txt
index cc9fc08..4facbcad 100644
--- a/third_party/WebKit/LayoutTests/css3/flexbox/repaint-on-margin-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/css3/flexbox/repaint-on-margin-change-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV id='child-to-grow' class='child'",
-          "rect": [8, 28, 20, 20],
+          "rect": [48, 28, 20, 20],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV id='child-to-grow' class='child'",
-          "rect": [48, 28, 20, 20],
+          "rect": [8, 28, 20, 20],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/css3/flexbox/repaint-opacity-change-expected.txt b/third_party/WebKit/LayoutTests/css3/flexbox/repaint-opacity-change-expected.txt
index 19765c83..157b3a9 100644
--- a/third_party/WebKit/LayoutTests/css3/flexbox/repaint-opacity-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/css3/flexbox/repaint-opacity-change-expected.txt
@@ -9,12 +9,12 @@
         {
           "object": "LayoutBlockFlow DIV id='target' class='item'",
           "rect": [18, 18, 764, 20],
-          "reason": "layer"
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow DIV id='target' class='item'",
           "rect": [18, 18, 764, 20],
-          "reason": "style change"
+          "reason": "layer"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/css3/flexbox/repaint-rtl-column-expected.txt b/third_party/WebKit/LayoutTests/css3/flexbox/repaint-rtl-column-expected.txt
index c69ab18..5455d006 100644
--- a/third_party/WebKit/LayoutTests/css3/flexbox/repaint-rtl-column-expected.txt
+++ b/third_party/WebKit/LayoutTests/css3/flexbox/repaint-rtl-column-expected.txt
@@ -7,11 +7,36 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [13, 218, 190, 350],
+          "object": "LayoutBlockFlow DIV id='content'",
+          "rect": [8, 119, 200, 356],
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow DIV id='content'",
+          "rect": [8, 119, 200, 356],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='content'",
+          "rect": [8, 116, 200, 356],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='content'",
+          "rect": [8, 213, 200, 355],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='left'",
+          "rect": [8, 119, 200, 94],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='left'",
+          "rect": [8, 116, 200, 4],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutBlockFlow DIV",
           "rect": [13, 124, 190, 351],
           "reason": "location change"
@@ -27,34 +52,9 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='content'",
-          "rect": [8, 213, 200, 355],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [13, 218, 190, 350],
           "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='content'",
-          "rect": [8, 119, 200, 356],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='content'",
-          "rect": [8, 119, 200, 356],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='content'",
-          "rect": [8, 116, 200, 356],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='left'",
-          "rect": [8, 119, 200, 94],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='left'",
-          "rect": [8, 116, 200, 4],
-          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/negative-shadow-box-expand-expected.txt b/third_party/WebKit/LayoutTests/fast/box-shadow/negative-shadow-box-expand-expected.txt
index 212d1ba..dafe5222 100644
--- a/third_party/WebKit/LayoutTests/fast/box-shadow/negative-shadow-box-expand-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/box-shadow/negative-shadow-box-expand-expected.txt
@@ -7,14 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='inner2'",
-          "rect": [100, 200, 600, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='outer'",
           "rect": [100, 60, 640, 240],
           "reason": "border box change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='inner2'",
+          "rect": [100, 200, 600, 100],
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/negative-shadow-box-shrink-expected.txt b/third_party/WebKit/LayoutTests/fast/box-shadow/negative-shadow-box-shrink-expected.txt
index be577e1..ef3be76b 100644
--- a/third_party/WebKit/LayoutTests/fast/box-shadow/negative-shadow-box-shrink-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/box-shadow/negative-shadow-box-shrink-expected.txt
@@ -7,14 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='inner2'",
-          "rect": [100, 200, 600, 100],
-          "reason": "layoutObject removal"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='outer'",
           "rect": [100, 60, 640, 240],
           "reason": "border box change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='inner2'",
+          "rect": [100, 200, 600, 100],
+          "reason": "layoutObject removal"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-box-resize-expected.txt b/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-box-resize-expected.txt
index 78d9779..8874154b 100644
--- a/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-box-resize-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-box-resize-expected.txt
@@ -12,11 +12,6 @@
           "reason": "border box change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='target2'",
-          "rect": [300, 100, 140, 120],
-          "reason": "border box change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='target3'",
           "rect": [100, 300, 140, 170],
           "reason": "border box change"
@@ -25,6 +20,11 @@
           "object": "LayoutBlockFlow (positioned) DIV id='target4'",
           "rect": [300, 300, 140, 120],
           "reason": "border box change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='target2'",
+          "rect": [300, 100, 140, 120],
+          "reason": "border box change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-box-resize-writing-mode-expected.txt b/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-box-resize-writing-mode-expected.txt
index 78d9779..8874154b 100644
--- a/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-box-resize-writing-mode-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-box-resize-writing-mode-expected.txt
@@ -12,11 +12,6 @@
           "reason": "border box change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='target2'",
-          "rect": [300, 100, 140, 120],
-          "reason": "border box change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='target3'",
           "rect": [100, 300, 140, 170],
           "reason": "border box change"
@@ -25,6 +20,11 @@
           "object": "LayoutBlockFlow (positioned) DIV id='target4'",
           "rect": [300, 300, 140, 120],
           "reason": "border box change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='target2'",
+          "rect": [300, 100, 140, 120],
+          "reason": "border box change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt
index e20c02e..73f61f4 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt
@@ -8,198 +8,128 @@
       "backgroundColor": "#FFFFFF",
       "paintInvalidations": [
         {
-          "object": "LayoutHTMLCanvas CANVAS id='copycanvas'",
-          "rect": [429, 513, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='copyimage'",
-          "rect": [287, 513, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='copysolid color'",
-          "rect": [145, 513, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='copyvideo'",
           "rect": [571, 513, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-atopcanvas'",
-          "rect": [429, 413, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-atopimage'",
-          "rect": [287, 413, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-atopsolid color'",
-          "rect": [145, 413, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='destination-atopvideo'",
           "rect": [571, 413, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-incanvas'",
-          "rect": [429, 313, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-inimage'",
-          "rect": [287, 313, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-insolid color'",
-          "rect": [145, 313, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='destination-invideo'",
           "rect": [571, 313, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outcanvas'",
-          "rect": [459, 363, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outimage'",
-          "rect": [317, 363, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outsolid color'",
-          "rect": [175, 363, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outvideo'",
-          "rect": [601, 363, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-overcanvas'",
-          "rect": [459, 263, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-overimage'",
-          "rect": [317, 263, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-oversolid color'",
-          "rect": [175, 263, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-overvideo'",
-          "rect": [601, 263, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lightercanvas'",
-          "rect": [459, 463, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lighterimage'",
-          "rect": [317, 463, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lightersolid color'",
-          "rect": [175, 463, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lightervideo'",
-          "rect": [601, 463, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopcanvas'",
-          "rect": [459, 213, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopimage'",
-          "rect": [317, 213, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopsolid color'",
-          "rect": [175, 213, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopvideo'",
-          "rect": [601, 213, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-incanvas'",
-          "rect": [429, 113, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-inimage'",
-          "rect": [287, 113, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-insolid color'",
-          "rect": [145, 113, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-invideo'",
-          "rect": [571, 113, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-outcanvas'",
-          "rect": [429, 163, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-outimage'",
-          "rect": [287, 163, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-outsolid color'",
-          "rect": [145, 163, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='source-outvideo'",
           "rect": [571, 163, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='source-overcanvas'",
-          "rect": [459, 63, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='source-invideo'",
+          "rect": [571, 113, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='source-overimage'",
-          "rect": [317, 63, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='copycanvas'",
+          "rect": [429, 513, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='source-oversolid color'",
-          "rect": [175, 63, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='destination-atopcanvas'",
+          "rect": [429, 413, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-incanvas'",
+          "rect": [429, 313, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-outcanvas'",
+          "rect": [429, 163, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-incanvas'",
+          "rect": [429, 113, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='copyimage'",
+          "rect": [287, 513, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-atopimage'",
+          "rect": [287, 413, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-inimage'",
+          "rect": [287, 313, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-outimage'",
+          "rect": [287, 163, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-inimage'",
+          "rect": [287, 113, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='copysolid color'",
+          "rect": [145, 513, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-atopsolid color'",
+          "rect": [145, 413, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-insolid color'",
+          "rect": [145, 313, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-outsolid color'",
+          "rect": [145, 163, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-insolid color'",
+          "rect": [145, 113, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='xorvideo'",
+          "rect": [601, 563, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='lightervideo'",
+          "rect": [601, 463, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outvideo'",
+          "rect": [601, 363, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-overvideo'",
+          "rect": [601, 263, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopvideo'",
+          "rect": [601, 213, 50, 40],
           "reason": "invalidate paint rectangle"
         },
         {
@@ -213,18 +143,88 @@
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutHTMLCanvas CANVAS id='lightercanvas'",
+          "rect": [459, 463, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outcanvas'",
+          "rect": [459, 363, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-overcanvas'",
+          "rect": [459, 263, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopcanvas'",
+          "rect": [459, 213, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-overcanvas'",
+          "rect": [459, 63, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
           "object": "LayoutHTMLCanvas CANVAS id='xorimage'",
           "rect": [317, 563, 50, 40],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutHTMLCanvas CANVAS id='lighterimage'",
+          "rect": [317, 463, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outimage'",
+          "rect": [317, 363, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-overimage'",
+          "rect": [317, 263, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopimage'",
+          "rect": [317, 213, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-overimage'",
+          "rect": [317, 63, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
           "object": "LayoutHTMLCanvas CANVAS id='xorsolid color'",
           "rect": [175, 563, 50, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='xorvideo'",
-          "rect": [601, 563, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='lightersolid color'",
+          "rect": [175, 463, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outsolid color'",
+          "rect": [175, 363, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-oversolid color'",
+          "rect": [175, 263, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopsolid color'",
+          "rect": [175, 213, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-oversolid color'",
+          "rect": [175, 63, 50, 40],
           "reason": "invalidate paint rectangle"
         }
       ],
diff --git a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint-expected.txt
index 815f754a5..3b6f83b 100644
--- a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint-expected.txt
@@ -7,14 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV class='sizedToGridArea'",
-          "rect": [58, 48, 50, 50],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutGrid DIV class='grid min-content'",
           "rect": [8, 48, 250, 50],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='sizedToGridArea'",
+          "rect": [58, 48, 50, 50],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-change-rows-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-change-rows-repaint-expected.txt
index 8db01ff..d18aaf5 100644
--- a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-change-rows-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-change-rows-repaint-expected.txt
@@ -7,14 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV class='sizedToGridArea'",
-          "rect": [8, 98, 100, 50],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutGrid DIV class='grid fit-content'",
           "rect": [8, 48, 100, 150],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='sizedToGridArea'",
+          "rect": [8, 98, 100, 50],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-change-row-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-change-row-repaint-expected.txt
index 56a8298..4ffe8ae 100644
--- a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-change-row-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-change-row-repaint-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV class='sizedToGridArea'",
-          "rect": [8, 38, 100, 50],
+          "rect": [8, 88, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='sizedToGridArea'",
-          "rect": [8, 88, 100, 100],
+          "rect": [8, 38, 100, 50],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-z-index-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-z-index-change-repaint-expected.txt
index a9d7bf3..bbd03afc 100644
--- a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-z-index-change-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-z-index-change-repaint-expected.txt
@@ -7,13 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='item1' class='sizedToGridArea green negativeZIndex'",
-          "rect": [8, 126, 200, 100],
+          "object": "LayoutBlockFlow DIV id='item2' class='sizedToGridArea green'",
+          "rect": [8, 236, 200, 100],
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='item2' class='sizedToGridArea green'",
-          "rect": [8, 236, 200, 100],
+          "object": "LayoutBlockFlow DIV id='item1' class='sizedToGridArea green negativeZIndex'",
+          "rect": [8, 126, 200, 100],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/files/apply-blob-url-to-xhr-expected.txt b/third_party/WebKit/LayoutTests/fast/files/apply-blob-url-to-xhr-expected.txt
index f61b6ec..e06818e 100644
--- a/third_party/WebKit/LayoutTests/fast/files/apply-blob-url-to-xhr-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/files/apply-blob-url-to-xhr-expected.txt
@@ -4,7 +4,7 @@
 Status: 200
 Response: Hello
 Test that sync XMLHttpRequest POST fails.
-Received exception, code: 19, name: NetworkError, message: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'blob:file%3A///UUID': 'GET' is the only method allowed for 'blob:' URLs.
+Received exception, code: 19, name: NetworkError, message: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'blob:file:///UUID': 'GET' is the only method allowed for 'blob:' URLs.
 Test that sync XMLHttpRequest GET fails after the blob URL is revoked.
 Status: 404
 Response: 
diff --git a/third_party/WebKit/LayoutTests/fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt b/third_party/WebKit/LayoutTests/fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt
index 09c82a1a..e0195e8d 100644
--- a/third_party/WebKit/LayoutTests/fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt
@@ -3,7 +3,7 @@
 Status: 200
 Response: Hello
 Test that sync XMLHttpRequest POST fails.
-Received exception, code: 19, name: NetworkError, message: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'blob:file%3A///UUID': 'GET' is the only method allowed for 'blob:' URLs.
+Received exception, code: 19, name: NetworkError, message: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'blob:file:///UUID': 'GET' is the only method allowed for 'blob:' URLs.
 Test that sync XMLHttpRequest GET fails after the blob URL is revoked.
 Status: 404
 Response: 
diff --git a/third_party/WebKit/LayoutTests/fast/images/fixed-img-src-change-after-scroll-expected.txt b/third_party/WebKit/LayoutTests/fast/images/fixed-img-src-change-after-scroll-expected.txt
index 945d5f3..702fd505 100644
--- a/third_party/WebKit/LayoutTests/fast/images/fixed-img-src-change-after-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/images/fixed-img-src-change-after-scroll-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutImage (positioned) IMG id='img'",
-          "rect": [0, 50, 100, 100],
+          "rect": [0, 1050, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutImage (positioned) IMG id='img'",
-          "rect": [0, 1050, 100, 100],
+          "rect": [0, 50, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/images/repaint-subrect-grid-expected.txt b/third_party/WebKit/LayoutTests/fast/images/repaint-subrect-grid-expected.txt
index 682a0f2..0918f7d 100644
--- a/third_party/WebKit/LayoutTests/fast/images/repaint-subrect-grid-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/images/repaint-subrect-grid-expected.txt
@@ -8,111 +8,111 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [45, 18, 20, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [45, 18, 20, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [-10, 18, 20, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [-10, 18, 20, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [36, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [36, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [36, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [36, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [27, 18, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [27, 18, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [18, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [18, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [18, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [18, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [9, 18, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [9, 18, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [0, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [0, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [0, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [0, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
           "rect": [-100, -100, 19, 19],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [0, 0, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [0, 0, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [18, 0, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [18, 0, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [36, 0, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [36, 0, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [-10, 18, 20, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [-10, 18, 20, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [9, 18, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [9, 18, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [27, 18, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [27, 18, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [45, 18, 20, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [45, 18, 20, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [0, 36, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [0, 36, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [18, 36, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [18, 36, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [36, 36, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [36, 36, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
           "rect": [-100, -100, 19, 19],
           "reason": "location change"
         }
diff --git a/third_party/WebKit/LayoutTests/fast/layers/scroll-descendant-with-cached-cliprects-expected.txt b/third_party/WebKit/LayoutTests/fast/layers/scroll-descendant-with-cached-cliprects-expected.txt
index 9044b29..3eef112 100644
--- a/third_party/WebKit/LayoutTests/fast/layers/scroll-descendant-with-cached-cliprects-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/layers/scroll-descendant-with-cached-cliprects-expected.txt
@@ -8,8 +8,23 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollpanel'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
+          "rect": [677, 250, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='container'",
+          "rect": [677, 250, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='ul'",
+          "rect": [677, 250, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [677, 250, 100, 100],
+          "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollpanel'",
@@ -17,54 +32,35 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='container'",
+          "rect": [677, 50, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='ul'",
+          "rect": [677, 50, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [677, 50, 100, 100],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollpanel'",
-          "rect": [677, 250, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='container'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) DIV class='container'",
-          "rect": [677, 50, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='container'",
-          "rect": [677, 250, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='ul'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) DIV id='ul'",
-          "rect": [677, 50, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='ul'",
-          "rect": [677, 250, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [677, 50, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [677, 250, 100, 100],
-          "reason": "location change"
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/absolute-margin-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/absolute-margin-change-repaint-expected.txt
index fe94982..6c18d142 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/absolute-margin-change-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/absolute-margin-change-repaint-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='test'",
-          "rect": [0, 40, 100, 100],
+          "rect": [0, 60, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='test'",
-          "rect": [0, 60, 100, 100],
+          "rect": [0, 40, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/absolute-position-change-containing-block-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/absolute-position-change-containing-block-expected.txt
index c406ffa..f76f7d1 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/absolute-position-change-containing-block-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/absolute-position-change-containing-block-expected.txt
@@ -7,6 +7,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [8, 8, 784, 2000],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) DIV class='absolute green'",
           "rect": [108, 5100, 100, 100],
           "reason": "layer"
@@ -22,19 +27,21 @@
           "reason": "layer"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [8, 8, 784, 2000],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='container' class='fixed blue'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='container' class='fixed blue'",
           "rect": [8, 8, 100, 100],
           "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV class='absolute green'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV class='absolute green'",
+          "reason": "layer"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='container' class='fixed blue'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/absolute-position-changed-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/absolute-position-changed-expected.txt
index 9c4c73c..44b066b 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/absolute-position-changed-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/absolute-position-changed-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='absoluteDiv' class='absolute green'",
-          "rect": [100, 500, 100, 100],
+          "rect": [100, 700, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='absoluteDiv' class='absolute green'",
-          "rect": [100, 700, 100, 100],
+          "rect": [100, 500, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/add-table-overpaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/add-table-overpaint-expected.txt
index 619b95a3..b1a3ca6 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/add-table-overpaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/add-table-overpaint-expected.txt
@@ -17,13 +17,8 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [2, 314, 152, 152],
+          "object": "LayoutTableSection TBODY",
+          "rect": [0, 312, 156, 156],
           "reason": "location change"
         },
         {
@@ -32,9 +27,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [0, 312, 156, 156],
+          "object": "LayoutTableCell TD",
+          "rect": [2, 314, 152, 152],
           "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/align-content-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/align-content-change-expected.txt
index 9b33ea89..41b86349 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/align-content-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/align-content-change-expected.txt
@@ -7,13 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [1, 102, 198, 50],
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [0, 202, 200, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [1, 53, 198, 50],
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [0, 52, 200, 150],
           "reason": "location change"
         },
         {
@@ -27,13 +27,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 52, 200, 150],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [1, 102, 198, 50],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 202, 200, 150],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [1, 53, 198, 50],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/align-content-distribution-change-grid-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/align-content-distribution-change-grid-expected.txt
index 214902ab0..5dc93a4 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/align-content-distribution-change-grid-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/align-content-distribution-change-grid-expected.txt
@@ -7,13 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 77, 200, 50],
+          "object": "LayoutGrid DIV id='container'",
+          "rect": [0, 52, 200, 300],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [0, 252, 200, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [0, 152, 200, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [0, 52, 200, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [0, 52, 200, 50],
+          "rect": [0, 277, 200, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [0, 252, 200, 50],
           "reason": "location change"
         },
         {
@@ -28,33 +48,13 @@
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [0, 277, 200, 50],
+          "rect": [0, 77, 200, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [0, 252, 200, 50],
+          "rect": [0, 52, 200, 50],
           "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 52, 200, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 152, 200, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 252, 200, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutGrid DIV id='container'",
-          "rect": [0, 52, 200, 300],
-          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/align-content-position-change-grid-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/align-content-position-change-grid-expected.txt
index 2ec2c64e..a36a61c 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/align-content-position-change-grid-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/align-content-position-change-grid-expected.txt
@@ -7,69 +7,69 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 52, 200, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 202, 200, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 102, 200, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 252, 200, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 152, 200, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 302, 200, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 52, 200, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 202, 200, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 102, 200, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 252, 200, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 152, 200, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 302, 200, 50],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutGrid DIV id='container'",
           "rect": [0, 52, 200, 300],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [0, 302, 200, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [0, 302, 200, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [0, 252, 200, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [0, 252, 200, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [0, 202, 200, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [0, 202, 200, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [0, 152, 200, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [0, 152, 200, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [0, 102, 200, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [0, 102, 200, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [0, 52, 200, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [0, 52, 200, 50],
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/align-self-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/align-self-change-expected.txt
index 536dd583..251ad9b0 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/align-self-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/align-self-change-expected.txt
@@ -8,23 +8,23 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 154, 100, 198],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item'",
           "rect": [0, 153, 100, 199],
           "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [100, 204, 100, 148],
+          "rect": [0, 154, 100, 198],
           "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow DIV class='item'",
           "rect": [100, 203, 100, 149],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [100, 204, 100, 148],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/align-self-change-grid-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/align-self-change-grid-expected.txt
index 051b42a..a26f768 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/align-self-change-grid-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/align-self-change-grid-expected.txt
@@ -7,6 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutBlockFlow DIV class='item2'",
+          "rect": [100, 52, 100, 300],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item1'",
+          "rect": [0, 52, 100, 300],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow DIV",
           "rect": [0, 302, 100, 50],
           "reason": "location change"
@@ -15,16 +25,6 @@
           "object": "LayoutBlockFlow DIV",
           "rect": [0, 52, 100, 50],
           "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item1'",
-          "rect": [0, 52, 100, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item2'",
-          "rect": [100, 52, 100, 300],
-          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/align-self-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/align-self-overflow-change-expected.txt
index 6c78ac1..ff25fe9 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/align-self-overflow-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/align-self-overflow-change-expected.txt
@@ -12,9 +12,9 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 2, 200, 200],
-          "reason": "location change"
+          "object": "LayoutGrid DIV id='container'",
+          "rect": [0, 2, 200, 350],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutBlockFlow DIV",
@@ -23,23 +23,23 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='item1'",
+          "rect": [0, 52, 200, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
           "rect": [0, 2, 200, 200],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='item1'",
-          "rect": [0, 52, 200, 200],
+          "rect": [0, 2, 200, 200],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='item2'",
           "rect": [0, 252, 200, 100],
           "reason": "style change"
-        },
-        {
-          "object": "LayoutGrid DIV id='container'",
-          "rect": [0, 2, 200, 350],
-          "reason": "bounds change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/background-currentColor-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/background-currentColor-repaint-expected.txt
index 63bf9e3e..0a1965d 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/background-currentColor-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/background-currentColor-repaint-expected.txt
@@ -7,13 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='div1'",
-          "rect": [8, 8, 100, 100],
+          "object": "LayoutBlockFlow DIV id='div2'",
+          "rect": [8, 108, 100, 100],
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='div2'",
-          "rect": [8, 108, 100, 100],
+          "object": "LayoutBlockFlow DIV id='div1'",
+          "rect": [8, 8, 100, 100],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/background-image-paint-invalidation-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/background-image-paint-invalidation-expected.txt
index cfab916..5d04cc5 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/background-image-paint-invalidation-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/background-image-paint-invalidation-expected.txt
@@ -7,13 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [8, 8, 800, 2000],
+          "object": "LayoutView #document",
+          "rect": [0, 0, 808, 2016],
           "reason": "style change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 808, 2016],
+          "object": "LayoutBlockFlow BODY",
+          "rect": [8, 8, 800, 2000],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/background-shorthand-with-gradient-and-height-changes-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/background-shorthand-with-gradient-and-height-changes-expected.txt
index fc53eca..f529d60 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/background-shorthand-with-gradient-and-height-changes-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/background-shorthand-with-gradient-and-height-changes-expected.txt
@@ -7,14 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='inner'",
-          "rect": [8, 308, 784, 200],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='outer'",
           "rect": [8, 8, 784, 500],
           "reason": "border box change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='inner'",
+          "rect": [8, 308, 784, 200],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/background-size-auto-with-gradient-and-height-changes-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/background-size-auto-with-gradient-and-height-changes-expected.txt
index fc53eca..f529d60 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/background-size-auto-with-gradient-and-height-changes-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/background-size-auto-with-gradient-and-height-changes-expected.txt
@@ -7,14 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='inner'",
-          "rect": [8, 308, 784, 200],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='outer'",
           "rect": [8, 8, 784, 500],
           "reason": "border box change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='inner'",
+          "rect": [8, 308, 784, 200],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/backgroundSizeRepaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/backgroundSizeRepaint-expected.txt
index 48c9b53..389d6cd7 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/backgroundSizeRepaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/backgroundSizeRepaint-expected.txt
@@ -8,23 +8,23 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [19, 169, 200, 60],
-          "reason": "border box change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
           "rect": [19, 329, 200, 60],
           "reason": "border box change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='a'",
-          "rect": [29, 209, 180, 20],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow DIV",
+          "rect": [19, 169, 200, 60],
+          "reason": "border box change"
         },
         {
           "object": "LayoutBlockFlow DIV id='b'",
           "rect": [29, 369, 180, 20],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='a'",
+          "rect": [29, 209, 180, 20],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/block-shift-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/block-shift-repaint-expected.txt
index f8b842d..91d8dda 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/block-shift-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/block-shift-repaint-expected.txt
@@ -7,16 +7,51 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV class='green half'",
-          "rect": [8, 68, 60, 30],
+          "object": "LayoutBlockFlow DIV class='half'",
+          "rect": [8, 353, 60, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='half'",
+          "rect": [8, 338, 60, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='half'",
+          "rect": [8, 323, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='half'",
+          "rect": [8, 308, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='red half'",
+          "rect": [8, 248, 60, 30],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='green half'",
-          "rect": [8, 38, 60, 30],
+          "rect": [8, 218, 60, 30],
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow DIV class='red half'",
+          "rect": [8, 218, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='green half'",
+          "rect": [8, 188, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='div2' class='zero'",
+          "rect": [8, 188, 60, 30],
+          "reason": "became visible"
+        },
+        {
           "object": "LayoutBlockFlow DIV class='green half'",
           "rect": [8, 158, 60, 30],
           "reason": "location change"
@@ -27,33 +62,28 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow DIV class='red half'",
+          "rect": [8, 128, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='red half'",
+          "rect": [8, 98, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='top' class='blue half'",
+          "rect": [8, 98, 60, 30],
+          "reason": "became invisible"
+        },
+        {
           "object": "LayoutBlockFlow DIV class='green half'",
-          "rect": [8, 188, 60, 30],
+          "rect": [8, 68, 60, 30],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='green half'",
-          "rect": [8, 218, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='half'",
-          "rect": [8, 308, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='half'",
-          "rect": [8, 323, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='half'",
-          "rect": [8, 338, 60, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='half'",
-          "rect": [8, 353, 60, 38],
+          "rect": [8, 38, 60, 30],
           "reason": "location change"
         },
         {
@@ -67,44 +97,14 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV class='red half'",
-          "rect": [8, 128, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='red half'",
-          "rect": [8, 98, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='red half'",
-          "rect": [8, 218, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='red half'",
-          "rect": [8, 248, 60, 30],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='div1' class='blue half'",
           "rect": [8, 8, 60, 30],
           "reason": "became invisible"
         },
         {
-          "object": "LayoutBlockFlow DIV id='div2' class='zero'",
-          "rect": [8, 188, 60, 30],
-          "reason": "became visible"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='innerDiv'",
           "rect": [48, 308, 10, 15],
           "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='top' class='blue half'",
-          "rect": [8, 98, 60, 30],
-          "reason": "became invisible"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/body-background-image-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/body-background-image-expected.txt
index 35e0ed2..7cfb28c 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/body-background-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/body-background-image-expected.txt
@@ -8,13 +8,13 @@
       "backgroundColor": "#FFFFFF",
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [8, 240, 784, 284],
+          "object": "LayoutView #document",
+          "rect": [0, 0, 800, 600],
           "reason": "style change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 800, 600],
+          "object": "LayoutBlockFlow BODY",
+          "rect": [8, 240, 784, 284],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/border-radius-repaint-2-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/border-radius-repaint-2-expected.txt
index db2e01d..df75575 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/border-radius-repaint-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/border-radius-repaint-2-expected.txt
@@ -8,6 +8,21 @@
       "backgroundColor": "#3F3F3F",
       "paintInvalidations": [
         {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 874, 780],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [0, 600, 874, 180],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 8, 866, 764],
+          "reason": "border box change"
+        },
+        {
           "object": "LayoutBlockFlow BODY",
           "rect": [8, 224, 866, 548],
           "reason": "incremental"
@@ -19,8 +34,8 @@
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [8, 8, 866, 764],
-          "reason": "border box change"
+          "rect": [137, 139, 607, 553],
+          "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow DIV",
@@ -28,24 +43,9 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [137, 139, 607, 553],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [140, 141, 601, 548],
           "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 874, 780],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 600, 874, 180],
-          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/border-radius-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/border-radius-repaint-expected.txt
index 581aea6..bfdb86e99 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/border-radius-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/border-radius-repaint-expected.txt
@@ -8,7 +8,7 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [19, 147, 200, 20],
+          "rect": [19, 295, 200, 32],
           "reason": "incremental"
         },
         {
@@ -23,18 +23,18 @@
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [19, 295, 200, 32],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='a'",
-          "rect": [33, 133, 172, 20],
+          "rect": [19, 147, 200, 20],
           "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow DIV id='b'",
           "rect": [33, 293, 172, 20],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='a'",
+          "rect": [33, 133, 172, 20],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/border-radius-without-border-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/border-radius-without-border-expected.txt
index 6c68c63..0b01cad7 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/border-radius-without-border-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/border-radius-without-border-expected.txt
@@ -8,22 +8,22 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='target1'",
-          "rect": [100, 0, 100, 100],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='target1'",
           "rect": [80, 0, 120, 100],
           "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='target2'",
-          "rect": [0, 300, 100, 100],
+          "rect": [0, 275, 100, 125],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='target1'",
+          "rect": [100, 0, 100, 100],
           "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='target2'",
-          "rect": [0, 275, 100, 125],
+          "rect": [0, 300, 100, 100],
           "reason": "incremental"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/border-repaint-glitch-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/border-repaint-glitch-expected.txt
index 018ee848..5e31701 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/border-repaint-glitch-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/border-repaint-glitch-expected.txt
@@ -8,7 +8,7 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [19, 245, 200, 20],
+          "rect": [19, 401, 200, 24],
           "reason": "incremental"
         },
         {
@@ -23,18 +23,18 @@
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [19, 401, 200, 24],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='a'",
-          "rect": [33, 231, 172, 20],
+          "rect": [19, 245, 200, 20],
           "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow DIV id='b'",
           "rect": [33, 391, 172, 20],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='a'",
+          "rect": [33, 231, 172, 20],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/box-shadow-dynamic-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/box-shadow-dynamic-expected.txt
index 7a294243..845d886 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/box-shadow-dynamic-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/box-shadow-dynamic-expected.txt
@@ -17,13 +17,13 @@
           "reason": "border box change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='a'",
-          "rect": [28, 120, 30, 20],
+          "object": "LayoutBlockFlow DIV id='b'",
+          "rect": [28, 220, 30, 20],
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow DIV id='b'",
-          "rect": [28, 220, 30, 20],
+          "object": "LayoutBlockFlow DIV id='a'",
+          "rect": [28, 120, 30, 20],
           "reason": "incremental"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/box-shadow-inset-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/box-shadow-inset-repaint-expected.txt
index d8f3bb0..110d850 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/box-shadow-inset-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/box-shadow-inset-repaint-expected.txt
@@ -7,14 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [23, 23, 100, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='container'",
           "rect": [8, 8, 230, 130],
           "reason": "border box change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [23, 23, 100, 100],
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/box-sizing-border-keeping-size-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/box-sizing-border-keeping-size-expected.txt
index 6ccd126..1e6a886 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/box-sizing-border-keeping-size-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/box-sizing-border-keeping-size-expected.txt
@@ -7,13 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='target1' class='content-box'",
-          "rect": [0, 0, 100, 100],
+          "object": "LayoutBlockFlow (positioned) DIV id='target2' class='border-box'",
+          "rect": [0, 200, 100, 100],
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='target2' class='border-box'",
-          "rect": [0, 200, 100, 100],
+          "object": "LayoutBlockFlow (positioned) DIV id='target1' class='content-box'",
+          "rect": [0, 0, 100, 100],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/box-sizing-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/box-sizing-expected.txt
index db16a024..130507f 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/box-sizing-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/box-sizing-expected.txt
@@ -7,8 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutBlockFlow (positioned) DIV id='target2' class='border-box'",
+          "rect": [0, 200, 440, 140],
+          "reason": "content box change"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) DIV id='target1' class='content-box'",
-          "rect": [400, 0, 40, 140],
+          "rect": [0, 80, 440, 60],
           "reason": "incremental"
         },
         {
@@ -23,13 +28,8 @@
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='target1' class='content-box'",
-          "rect": [0, 80, 440, 60],
+          "rect": [400, 0, 40, 140],
           "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='target2' class='border-box'",
-          "rect": [0, 200, 440, 140],
-          "reason": "content box change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/bugzilla-3509-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/bugzilla-3509-expected.txt
index 8acab693..80c5d3f5 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/bugzilla-3509-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/bugzilla-3509-expected.txt
@@ -7,23 +7,20 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='im'",
           "rect": [11, 125, 100, 100],
           "reason": "forced by layout"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox '\u00A0'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/bugzilla-6388-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/bugzilla-6388-expected.txt
index 584a336..2af6dcf 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/bugzilla-6388-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/bugzilla-6388-expected.txt
@@ -12,13 +12,12 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='outside'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 130, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 130, 100, 100],
+          "object": "LayoutBlockFlow (positioned) DIV id='outside'",
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/clipped-overflow-visible-subtree-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/clipped-overflow-visible-subtree-expected.txt
index 7e7f9e8..b72697b 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/clipped-overflow-visible-subtree-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/clipped-overflow-visible-subtree-expected.txt
@@ -13,27 +13,27 @@
         },
         {
           "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [8, 8, 300, 100],
+          "rect": [308, 8, 300, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [308, 8, 300, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [308, 8, 300, 100],
+          "rect": [8, 8, 300, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (floating) DIV id='node'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [8, 8, 300, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [308, 8, 300, 100],
+          "rect": [308, 8, 100, 100],
           "reason": "location change"
         },
         {
@@ -42,9 +42,8 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [308, 8, 100, 100],
-          "reason": "location change"
+          "object": "LayoutBlockFlow (floating) DIV id='node'",
+          "reason": "layoutObject removal"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/clipped-relative-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/clipped-relative-expected.txt
index e0337c8..f8e4f289 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/clipped-relative-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/clipped-relative-expected.txt
@@ -7,38 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='inner'",
           "rect": [8, 70, 204, 232],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='i'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutImage IMG",
           "rect": [8, 70, 204, 232],
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='i'",
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/containing-block-position-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/containing-block-position-change-expected.txt
index 47219da0..6a327da3 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/containing-block-position-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/containing-block-position-change-expected.txt
@@ -8,17 +8,16 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [100, 70, 50, 50],
-          "reason": "layer"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV",
           "rect": [158, 70, 50, 50],
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "rect": [100, 70, 50, 50],
+          "reason": "layer"
+        },
+        {
           "object": "LayoutBlockFlow (relative positioned) DIV id='t'",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/content-into-overflow-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/content-into-overflow-expected.txt
index 641af10..c97a06bd 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/content-into-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/content-into-overflow-expected.txt
@@ -8,12 +8,7 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [111, 8, 3, 106],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [61, 8, 53, 106],
+          "rect": [8, 211, 106, 53],
           "reason": "incremental"
         },
         {
@@ -22,11 +17,6 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [8, 211, 106, 53],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [8, 308, 100, 100],
           "reason": "became visible"
@@ -35,6 +25,16 @@
           "object": "LayoutBlockFlow DIV id='target3'",
           "rect": [8, 388, 100, 20],
           "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "rect": [61, 8, 53, 106],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "rect": [111, 8, 3, 106],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/crbug-371640-2-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/crbug-371640-2-expected.txt
index 3907ac5..9a0cdff 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/crbug-371640-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/crbug-371640-2-expected.txt
@@ -13,11 +13,6 @@
         },
         {
           "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
-          "rect": [88, 84, 260, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
           "rect": [348, 84, 260, 100],
           "reason": "location change"
         },
@@ -27,21 +22,6 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [88, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [348, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
-          "rect": [88, 84, 260, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
           "rect": [348, 84, 260, 100],
           "reason": "location change"
@@ -52,13 +32,18 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
+          "rect": [88, 84, 260, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='keep' class='item'",
-          "rect": [88, 84, 100, 100],
+          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
+          "rect": [88, 84, 260, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [348, 84, 100, 100],
           "reason": "location change"
         },
         {
@@ -70,6 +55,20 @@
           "object": "LayoutBlockFlow DIV id='to_remove' class='item'",
           "rect": [348, 84, 100, 100],
           "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [88, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='keep' class='item'",
+          "rect": [88, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/crbug-371640-3-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/crbug-371640-3-expected.txt
index 8acdb17c..0c3abb4 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/crbug-371640-3-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/crbug-371640-3-expected.txt
@@ -13,11 +13,6 @@
         },
         {
           "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
-          "rect": [408, 84, 100, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
           "rect": [508, 84, 100, 300],
           "reason": "location change"
         },
@@ -27,8 +22,18 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='abs_pos'",
-          "rect": [408, 204, 100, 100],
+          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
+          "rect": [408, 84, 100, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='keep_inner'",
+          "rect": [508, 84, 100, 220],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='keep_inner'",
+          "rect": [408, 84, 100, 220],
           "reason": "location change"
         },
         {
@@ -37,28 +42,23 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow DIV id='keep_child'",
+          "rect": [508, 204, 100, 100],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) DIV id='remove_child'",
           "rect": [508, 84, 100, 100],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='keep_inner'",
-          "rect": [408, 84, 100, 220],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='keep_inner'",
-          "rect": [508, 84, 100, 220],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='keep_child'",
+          "object": "LayoutBlockFlow (positioned) DIV id='abs_pos'",
           "rect": [408, 204, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV id='keep_child'",
-          "rect": [508, 204, 100, 100],
+          "rect": [408, 204, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/destroy-composited-scrollbar-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/destroy-composited-scrollbar-expected.txt
index 323c60e..1671f92 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/destroy-composited-scrollbar-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/destroy-composited-scrollbar-expected.txt
@@ -20,12 +20,11 @@
             },
             {
               "object": "LayoutBlockFlow (positioned) DIV",
-              "rect": [0, 0, 0, 0],
+              "rect": [185, 0, 15, 200],
               "reason": "scroll"
             },
             {
               "object": "LayoutBlockFlow (positioned) DIV",
-              "rect": [185, 0, 15, 200],
               "reason": "scroll"
             }
           ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/destroy-overlay-scrollbar-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/destroy-overlay-scrollbar-expected.txt
index ab9edaa7..4660fe84 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/destroy-overlay-scrollbar-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/destroy-overlay-scrollbar-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/destroy-scrollbar-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/destroy-scrollbar-expected.txt
index ee2388a9..eb1e469 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/destroy-scrollbar-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/destroy-scrollbar-expected.txt
@@ -8,17 +8,15 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV",
           "rect": [185, 100, 15, 200],
           "reason": "scroll"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "reason": "scroll"
+        },
+        {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/dont-invalidate-root-layer-when-composited-layer-becomes-visible-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/dont-invalidate-root-layer-when-composited-layer-becomes-visible-expected.txt
index 3a7461b..7c5be036 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/dont-invalidate-root-layer-when-composited-layer-becomes-visible-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/dont-invalidate-root-layer-when-composited-layer-becomes-visible-expected.txt
@@ -8,7 +8,6 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='target'",
-          "rect": [0, 0, 0, 0],
           "reason": "layer"
         }
       ],
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/dynamic-table-vertical-alignment-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/dynamic-table-vertical-alignment-change-expected.txt
index 3eda94d..b5853b92 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/dynamic-table-vertical-alignment-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/dynamic-table-vertical-alignment-change-expected.txt
@@ -7,24 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (floating) DIV id='target'",
-          "rect": [11, 71, 100, 100],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutTableCell TD",
+          "rect": [10, 73, 102, 99],
+          "reason": "incremental"
         },
         {
           "object": "LayoutTableCell TD",
@@ -32,9 +17,14 @@
           "reason": "incremental"
         },
         {
+          "object": "LayoutBlockFlow (floating) DIV id='target'",
+          "rect": [11, 71, 100, 100],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutTableCell TD",
-          "rect": [10, 73, 102, 99],
-          "reason": "incremental"
+          "rect": [114, 70, 2, 102],
+          "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD",
@@ -42,8 +32,15 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [114, 70, 2, 102],
+          "object": "LayoutBlockFlow DIV",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/erase-overflow-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/erase-overflow-expected.txt
index 63656b7..099de752 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/erase-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/erase-overflow-expected.txt
@@ -7,14 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV class='square'",
-          "rect": [8, 108, 100, 100],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target' class='square'",
           "rect": [8, 8, 100, 200],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='square'",
+          "rect": [8, 108, 100, 100],
+          "reason": "bounds change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/fixed-after-scroll-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/fixed-after-scroll-expected.txt
index 6ee2405..86e596de 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/fixed-after-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/fixed-after-scroll-expected.txt
@@ -8,8 +8,8 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='t' class='green absolute'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
+          "rect": [8, 700, 100, 100],
+          "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='t' class='green absolute'",
@@ -18,8 +18,7 @@
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='t' class='green absolute'",
-          "rect": [8, 700, 100, 100],
-          "reason": "location change"
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/fixed-and-absolute-position-scrolled-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/fixed-and-absolute-position-scrolled-expected.txt
index ee7640d..0accba1b 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/fixed-and-absolute-position-scrolled-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/fixed-and-absolute-position-scrolled-expected.txt
@@ -7,6 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutView #document",
+          "rect": [0, 2016, 800, 3792],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 800, 2016],
+          "reason": "forced by layout"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) DIV id='absoluteDiv' class='absolute green'",
           "rect": [108, 5708, 100, 100],
           "reason": "layer"
@@ -25,16 +35,6 @@
           "object": "LayoutBlockFlow DIV id='container' class='relative'",
           "rect": [8, 8, 100, 100],
           "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 800, 2016],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 2016, 800, 3792],
-          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/fixed-child-move-after-scroll-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/fixed-child-move-after-scroll-expected.txt
index 97ee2b3..fb8b4f9 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/fixed-child-move-after-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/fixed-child-move-after-scroll-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='toMove'",
-          "rect": [10, 270, 100, 100],
+          "rect": [150, 270, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='toMove'",
-          "rect": [150, 270, 100, 100],
+          "rect": [10, 270, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/fixed-child-of-fixed-move-after-scroll-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/fixed-child-of-fixed-move-after-scroll-expected.txt
index 97ee2b3..fb8b4f9 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/fixed-child-of-fixed-move-after-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/fixed-child-of-fixed-move-after-scroll-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='toMove'",
-          "rect": [10, 270, 100, 100],
+          "rect": [150, 270, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='toMove'",
-          "rect": [150, 270, 100, 100],
+          "rect": [10, 270, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/fixed-child-of-transformed-move-after-scroll-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/fixed-child-of-transformed-move-after-scroll-expected.txt
index a4205a9..c825112e 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/fixed-child-of-transformed-move-after-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/fixed-child-of-transformed-move-after-scroll-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='toMove'",
-          "rect": [18, 278, 100, 100],
+          "rect": [158, 278, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='toMove'",
-          "rect": [158, 278, 100, 100],
+          "rect": [18, 278, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/fixed-margin-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/fixed-margin-change-repaint-expected.txt
index 6572d3c1..3e9edb28 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/fixed-margin-change-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/fixed-margin-change-repaint-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='test'",
-          "rect": [0, 0, 100, 100],
+          "rect": [0, 20, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='test'",
-          "rect": [0, 20, 100, 100],
+          "rect": [0, 0, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/fixed-move-after-scroll-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/fixed-move-after-scroll-expected.txt
index 97ee2b3..fb8b4f9 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/fixed-move-after-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/fixed-move-after-scroll-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='toMove'",
-          "rect": [10, 270, 100, 100],
+          "rect": [150, 270, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='toMove'",
-          "rect": [150, 270, 100, 100],
+          "rect": [10, 270, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/fixed-scroll-simple-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/fixed-scroll-simple-expected.txt
index 960a88c..37777a73 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/fixed-scroll-simple-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/fixed-scroll-simple-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV class='green'",
-          "rect": [8, 100, 100, 100],
+          "rect": [8, 200, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV class='green'",
-          "rect": [8, 200, 100, 100],
+          "rect": [8, 100, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/fixed-table-cell-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/fixed-table-cell-expected.txt
index 5827fd7..c539a871 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/fixed-table-cell-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/fixed-table-cell-expected.txt
@@ -7,19 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) TD id='moveMe' class='fixed'",
-          "rect": [50, 200, 100, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutTable (positioned) TABLE",
           "rect": [0, 0, 350, 350],
           "reason": "style change"
         },
         {
-          "object": "LayoutTableCell (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableSection TBODY",
+          "rect": [0, 0, 350, 350],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutTableCell (anonymous)",
@@ -27,29 +22,30 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD class='red'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableCell TD id='moveMe' class='fixed'",
           "rect": [200, 200, 100, 100],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [0, 0, 350, 350],
-          "reason": "forced by layout"
+          "object": "LayoutBlockFlow (positioned) TD id='moveMe' class='fixed'",
+          "rect": [50, 200, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell (anonymous)",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD class='red'",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/fixed-table-overflow-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/fixed-table-overflow-expected.txt
index 5ce60dd..8ea19ae 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/fixed-table-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/fixed-table-overflow-expected.txt
@@ -7,29 +7,19 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) TD id='moveMe' class='fixed'",
-          "rect": [100, 100, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='green'",
-          "rect": [0, 100, 100, 100],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='green'",
-          "rect": [0, 100, 100, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutTable (positioned) TABLE",
           "rect": [0, 0, 200, 200],
           "reason": "style change"
         },
         {
-          "object": "LayoutTableCell (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableSection TBODY",
+          "rect": [0, 0, 200, 200],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) TD id='moveMe' class='fixed'",
+          "rect": [100, 100, 100, 100],
+          "reason": "location change"
         },
         {
           "object": "LayoutTableCell (anonymous)",
@@ -37,29 +27,35 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD class='red'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableCell TD id='moveMe' class='fixed'",
           "rect": [100, 100, 100, 100],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [0, 0, 200, 200],
-          "reason": "forced by layout"
+          "object": "LayoutBlockFlow (relative positioned) DIV class='green'",
+          "rect": [0, 100, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='green'",
+          "rect": [0, 100, 100, 100],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutTableCell (anonymous)",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD class='red'",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/fixed-table-overflow-zindex-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/fixed-table-overflow-zindex-expected.txt
index d7eaaeb..ef4953d 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/fixed-table-overflow-zindex-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/fixed-table-overflow-zindex-expected.txt
@@ -7,19 +7,19 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) TD id='moveMe' class='fixed'",
-          "rect": [100, 100, 100, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutTable (positioned) TABLE",
           "rect": [0, 0, 200, 200],
           "reason": "style change"
         },
         {
-          "object": "LayoutTableCell (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableSection TBODY",
+          "rect": [0, 0, 200, 200],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) TD id='moveMe' class='fixed'",
+          "rect": [100, 100, 100, 100],
+          "reason": "location change"
         },
         {
           "object": "LayoutTableCell (anonymous)",
@@ -27,29 +27,25 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD class='red'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableCell TD id='moveMe' class='fixed'",
           "rect": [0, 100, 100, 100],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [0, 0, 200, 200],
-          "reason": "forced by layout"
+          "object": "LayoutTableCell (anonymous)",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD class='red'",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/fixed-to-relative-position-with-absolute-child-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/fixed-to-relative-position-with-absolute-child-expected.txt
index 231a70f..991ea633 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/fixed-to-relative-position-with-absolute-child-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/fixed-to-relative-position-with-absolute-child-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) DIV class='absolute green'",
-          "rect": [108, 300, 100, 100],
-          "reason": "layer"
+          "object": "LayoutBlockFlow BODY",
+          "rect": [8, 8, 784, 2000],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV class='absolute green'",
@@ -17,8 +17,8 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='container' class='fixed blue'",
-          "rect": [8, 200, 100, 100],
+          "object": "LayoutBlockFlow (positioned) DIV class='absolute green'",
+          "rect": [108, 300, 100, 100],
           "reason": "layer"
         },
         {
@@ -27,8 +27,16 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [8, 8, 784, 2000],
+          "object": "LayoutBlockFlow (positioned) DIV id='container' class='fixed blue'",
+          "rect": [8, 200, 100, 100],
+          "reason": "layer"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV class='absolute green'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='container' class='fixed blue'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/float-in-new-block-with-layout-delta-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/float-in-new-block-with-layout-delta-expected.txt
index 79b06a5..e3bd74c 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/float-in-new-block-with-layout-delta-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/float-in-new-block-with-layout-delta-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='target'",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/float-move-during-layout-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/float-move-during-layout-expected.txt
index bb7d275..bd2ea0fa 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/float-move-during-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/float-move-during-layout-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [8, 104, 100, 100],
-          "reason": "location change"
+          "object": "LayoutBlockFlow DIV id='t'",
+          "rect": [8, 104, 784, 100],
+          "reason": "became visible"
         },
         {
           "object": "LayoutBlockFlow (floating) DIV",
@@ -17,14 +17,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='s'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [8, 104, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='t'",
-          "rect": [8, 104, 784, 100],
-          "reason": "became visible"
+          "object": "LayoutBlockFlow DIV id='s'",
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/float-overflow-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/float-overflow-expected.txt
index 8b2eddf..10d9581 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/float-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/float-overflow-expected.txt
@@ -7,428 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [11, 360, 778, 28],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [11, 366, 778, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [63, 15, 42, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [63, 21, 42, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [57, 54, 48, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [57, 60, 48, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [57, 93, 42, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [57, 99, 42, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 132, 48, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 138, 48, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 171, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 177, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 210, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 216, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 249, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 255, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [66, 291, 44, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [66, 297, 44, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [58, 330, 52, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [58, 336, 52, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [58, 369, 52, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [58, 375, 52, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 420, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 426, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 459, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 465, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 498, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 504, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 537, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 543, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [63, 15, 54, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [63, 21, 54, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [57, 54, 60, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [57, 60, 60, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [57, 93, 60, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [57, 99, 60, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 132, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 138, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 171, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 177, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 210, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 216, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 249, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 255, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [67, 420, 50, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [67, 426, 50, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 459, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 465, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 498, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 504, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 537, 40, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 543, 40, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [61, 9, 62, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [61, 15, 62, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [57, 48, 66, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [57, 54, 66, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [57, 87, 66, 24],
+          "object": "LayoutBlockFlow (anonymous)",
+          "rect": [11, 360, 778, 28],
           "reason": "location change"
         },
         {
@@ -438,52 +23,22 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 126, 64, 24],
+          "rect": [57, 87, 66, 24],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 132, 64, 24],
+          "rect": [57, 54, 66, 24],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 165, 64, 24],
+          "rect": [57, 48, 66, 24],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 171, 64, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [61, 414, 62, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [61, 420, 62, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 453, 64, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 459, 64, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 492, 64, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 498, 64, 24],
+          "rect": [59, 537, 64, 36],
           "reason": "location change"
         },
         {
@@ -493,87 +48,27 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 537, 64, 36],
+          "rect": [59, 498, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer1' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 492, 64, 24],
+          "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer10' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 459, 64, 24],
+          "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer11' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer12' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer13' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer14' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer2' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer3' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer4' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer5' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer6' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer7' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer8' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer9' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
-          "rect": [59, 204, 64, 24],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 453, 64, 24],
           "reason": "location change"
         },
         {
           "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
-          "rect": [59, 210, 64, 24],
+          "rect": [59, 249, 64, 24],
           "reason": "location change"
         },
         {
@@ -583,167 +78,57 @@
         },
         {
           "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
-          "rect": [59, 249, 64, 24],
+          "rect": [59, 210, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [63, 15, 16, 18],
+          "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
+          "rect": [59, 204, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [63, 21, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 171, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [57, 54, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 165, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [57, 60, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 132, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [57, 93, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 126, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [57, 99, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [61, 15, 62, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 132, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [61, 9, 62, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 138, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [61, 420, 62, 22],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 171, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 177, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 210, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 216, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 249, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 255, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [66, 291, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [66, 297, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [58, 330, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [58, 336, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [58, 369, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [58, 375, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 420, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 426, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 459, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 465, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 498, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 504, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 537, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 543, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [61, 414, 62, 22],
           "reason": "location change"
         },
         {
           "object": "LayoutTable TABLE class='outer'",
-          "rect": [61, 282, 58, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTable TABLE class='outer'",
-          "rect": [61, 288, 58, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTable TABLE class='outer'",
-          "rect": [58, 321, 61, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTable TABLE class='outer'",
-          "rect": [58, 327, 61, 28],
+          "rect": [58, 366, 61, 28],
           "reason": "location change"
         },
         {
@@ -753,87 +138,97 @@
         },
         {
           "object": "LayoutTable TABLE class='outer'",
-          "rect": [58, 366, 61, 28],
+          "rect": [58, 327, 61, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [66, 290, 45, 19],
+          "object": "LayoutTable TABLE class='outer'",
+          "rect": [58, 321, 61, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [66, 296, 45, 19],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [57, 99, 60, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [58, 329, 53, 19],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [57, 93, 60, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [58, 335, 53, 19],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [57, 60, 60, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [58, 368, 53, 19],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [57, 54, 60, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [58, 374, 53, 19],
+          "object": "LayoutTable TABLE class='outer'",
+          "rect": [61, 288, 58, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [67, 290, 46, 12],
+          "object": "LayoutTable TABLE class='outer'",
+          "rect": [61, 282, 58, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [67, 296, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 504, 58, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [67, 329, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 498, 58, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [67, 335, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 465, 58, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [67, 368, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 459, 58, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [67, 374, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 216, 58, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 210, 58, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 177, 58, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 171, 58, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 138, 58, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 132, 58, 18],
           "reason": "location change"
         },
         {
           "object": "LayoutTableSection TBODY",
-          "rect": [66, 288, 47, 21],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [66, 294, 47, 21],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [58, 327, 55, 21],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [58, 333, 55, 21],
+          "rect": [58, 372, 55, 21],
           "reason": "location change"
         },
         {
@@ -843,117 +238,402 @@
         },
         {
           "object": "LayoutTableSection TBODY",
-          "rect": [58, 372, 55, 21],
+          "rect": [58, 333, 55, 21],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [63, 16, 16, 17],
+          "object": "LayoutTableSection TBODY",
+          "rect": [58, 327, 55, 21],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [63, 22, 16, 17],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [63, 21, 54, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [63, 15, 54, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [57, 55, 16, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [58, 374, 53, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [57, 61, 16, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [58, 368, 53, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTableCell TD",
+          "rect": [58, 335, 53, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [57, 94, 16, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [58, 329, 53, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [57, 100, 16, 17],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [58, 375, 52, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [58, 369, 52, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 133, 16, 17],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [58, 336, 52, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 139, 16, 17],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [58, 330, 52, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [67, 426, 50, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 172, 16, 17],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [67, 420, 50, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 178, 16, 17],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 138, 48, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 132, 48, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 211, 16, 17],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [57, 60, 48, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 217, 16, 17],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [57, 54, 48, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTableSection TBODY",
+          "rect": [66, 294, 47, 21],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 250, 16, 17],
+          "object": "LayoutTableSection TBODY",
+          "rect": [66, 288, 47, 21],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 256, 16, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [67, 374, 46, 12],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTableRow TR",
+          "rect": [67, 368, 46, 12],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [66, 292, 16, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [67, 335, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [67, 329, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [67, 296, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [67, 290, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [66, 296, 45, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [66, 290, 45, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [66, 297, 44, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [66, 291, 44, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [63, 21, 42, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [63, 15, 42, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [57, 99, 42, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [57, 93, 42, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 543, 40, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 537, 40, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 543, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 537, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 504, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 498, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 465, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 459, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 426, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 420, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 255, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 255, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 249, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 249, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 216, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 210, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 177, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 171, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [66, 297, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [66, 291, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [63, 21, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [63, 15, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 543, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 537, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 504, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 498, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 465, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 459, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 426, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 420, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 255, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 249, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 216, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 210, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 177, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 171, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 138, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 132, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [58, 375, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [58, 369, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [58, 336, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [58, 330, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [57, 99, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [57, 93, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [57, 60, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [57, 54, 16, 18],
           "reason": "location change"
         },
         {
@@ -963,92 +643,17 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [66, 292, 16, 17],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [58, 331, 16, 17],
+          "rect": [63, 22, 16, 17],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [58, 337, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [58, 370, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [58, 376, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 421, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 427, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 460, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 466, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 499, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 505, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 538, 16, 17],
+          "rect": [63, 16, 16, 17],
           "reason": "location change"
         },
         {
@@ -1058,92 +663,413 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [59, 538, 16, 17],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [59, 505, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 499, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 466, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 460, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 427, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 421, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 256, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 250, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 217, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 211, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 178, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 172, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 139, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 133, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [58, 376, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [58, 370, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [58, 337, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [58, 331, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [57, 100, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [57, 94, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [57, 61, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [57, 55, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer1' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer10' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer11' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer12' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer13' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer14' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer2' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer3' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer4' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer5' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer6' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer7' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer8' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer9' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/float-overflow-right-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/float-overflow-right-expected.txt
index ca501cb..d0f9f289 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/float-overflow-right-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/float-overflow-right-expected.txt
@@ -7,428 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [11, 360, 778, 28],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [11, 366, 778, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [695, 15, 42, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [695, 21, 42, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [695, 54, 48, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [695, 60, 48, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 93, 42, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 99, 42, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [693, 132, 48, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [693, 138, 48, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 171, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 177, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 210, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 216, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 249, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 255, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [690, 291, 44, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [690, 297, 44, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [690, 330, 52, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [690, 336, 52, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [690, 369, 52, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [690, 375, 52, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 420, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 426, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 459, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 465, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 498, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 504, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 537, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 543, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 15, 54, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 21, 54, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 54, 60, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 60, 60, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 93, 60, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 99, 60, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 132, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 138, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 171, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 177, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 210, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 216, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [701, 249, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [701, 255, 40, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 420, 50, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 426, 50, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 459, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 465, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 498, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 504, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [701, 537, 40, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [701, 543, 40, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 9, 62, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 15, 62, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 48, 66, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 54, 66, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 87, 66, 24],
+          "object": "LayoutBlockFlow (anonymous)",
+          "rect": [11, 360, 778, 28],
           "reason": "location change"
         },
         {
@@ -438,52 +23,22 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 126, 64, 24],
+          "rect": [677, 87, 66, 24],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 132, 64, 24],
+          "rect": [677, 54, 66, 24],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 165, 64, 24],
+          "rect": [677, 48, 66, 24],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 171, 64, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 414, 62, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 420, 62, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 453, 64, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 459, 64, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 492, 64, 24],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 498, 64, 24],
+          "rect": [677, 537, 64, 36],
           "reason": "location change"
         },
         {
@@ -493,87 +48,27 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 537, 64, 36],
+          "rect": [677, 498, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer1' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 492, 64, 24],
+          "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer10' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 459, 64, 24],
+          "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer11' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer12' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer13' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer14' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer2' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer3' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer4' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer5' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer6' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer7' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer8' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer9' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
-          "rect": [677, 204, 64, 24],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 453, 64, 24],
           "reason": "location change"
         },
         {
           "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
-          "rect": [677, 210, 64, 24],
+          "rect": [677, 249, 64, 24],
           "reason": "location change"
         },
         {
@@ -583,167 +78,57 @@
         },
         {
           "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
-          "rect": [677, 249, 64, 24],
+          "rect": [677, 210, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [721, 15, 16, 18],
+          "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
+          "rect": [677, 204, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [721, 21, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 171, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [727, 54, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 165, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [727, 60, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 132, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [727, 93, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 126, 64, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [727, 99, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 15, 62, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 132, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 9, 62, 24],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 138, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 420, 62, 22],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 171, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 177, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 210, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 216, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 249, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 255, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [718, 291, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [718, 297, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [726, 330, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [726, 336, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [726, 369, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [726, 375, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 420, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 426, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 459, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 465, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 498, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 504, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 537, 16, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 543, 16, 18],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 414, 62, 22],
           "reason": "location change"
         },
         {
           "object": "LayoutTable TABLE class='outer'",
-          "rect": [681, 282, 58, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTable TABLE class='outer'",
-          "rect": [681, 288, 58, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTable TABLE class='outer'",
-          "rect": [681, 321, 61, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTable TABLE class='outer'",
-          "rect": [681, 327, 61, 28],
+          "rect": [681, 366, 61, 28],
           "reason": "location change"
         },
         {
@@ -753,87 +138,97 @@
         },
         {
           "object": "LayoutTable TABLE class='outer'",
-          "rect": [681, 366, 61, 28],
+          "rect": [681, 327, 61, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [689, 290, 45, 19],
+          "object": "LayoutTable TABLE class='outer'",
+          "rect": [681, 321, 61, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [689, 296, 45, 19],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 99, 60, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [689, 329, 53, 19],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 93, 60, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [689, 335, 53, 19],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 60, 60, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [689, 368, 53, 19],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 54, 60, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [689, 374, 53, 19],
+          "object": "LayoutTable TABLE class='outer'",
+          "rect": [681, 288, 58, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [687, 290, 46, 12],
+          "object": "LayoutTable TABLE class='outer'",
+          "rect": [681, 282, 58, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [687, 296, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 504, 58, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [687, 329, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 498, 58, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [687, 335, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 465, 58, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [687, 368, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 459, 58, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [687, 374, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 216, 58, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 210, 58, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 177, 58, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 171, 58, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 138, 58, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 132, 58, 18],
           "reason": "location change"
         },
         {
           "object": "LayoutTableSection TBODY",
-          "rect": [687, 288, 47, 21],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [687, 294, 47, 21],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [687, 327, 55, 21],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [687, 333, 55, 21],
+          "rect": [687, 372, 55, 21],
           "reason": "location change"
         },
         {
@@ -843,42 +238,402 @@
         },
         {
           "object": "LayoutTableSection TBODY",
-          "rect": [687, 372, 55, 21],
+          "rect": [687, 333, 55, 21],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [721, 16, 16, 17],
+          "object": "LayoutTableSection TBODY",
+          "rect": [687, 327, 55, 21],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [721, 22, 16, 17],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 21, 54, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 15, 54, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [727, 55, 16, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [689, 374, 53, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [727, 61, 16, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [689, 368, 53, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTableCell TD",
+          "rect": [689, 335, 53, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [727, 94, 16, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [689, 329, 53, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [690, 375, 52, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [690, 369, 52, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [690, 336, 52, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [690, 330, 52, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 426, 50, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 420, 50, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [695, 60, 48, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [695, 54, 48, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [693, 138, 48, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [693, 132, 48, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [687, 294, 47, 21],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [687, 288, 47, 21],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [687, 374, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [687, 368, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [687, 335, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [687, 329, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [687, 296, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [687, 290, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [689, 296, 45, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [689, 290, 45, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [690, 297, 44, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [690, 291, 44, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 99, 42, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 93, 42, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [695, 21, 42, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [695, 15, 42, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [701, 543, 40, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [701, 537, 40, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 543, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 537, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 504, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 498, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 465, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 459, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 426, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 420, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 255, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [701, 255, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 249, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [701, 249, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 216, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 210, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 177, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 171, 40, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [727, 99, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [727, 93, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [727, 60, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [727, 54, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [726, 375, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [726, 369, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [726, 336, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [726, 330, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 543, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 537, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 504, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 498, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 465, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 459, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 426, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 420, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 255, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 249, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 216, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 210, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 177, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 171, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 138, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 132, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [721, 21, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [721, 15, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [718, 297, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [718, 291, 16, 18],
           "reason": "location change"
         },
         {
@@ -888,102 +643,17 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [727, 94, 16, 17],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [725, 133, 16, 17],
+          "rect": [727, 61, 16, 17],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [725, 139, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 172, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 178, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 211, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 217, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 250, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 256, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [718, 292, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [718, 298, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [726, 331, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [726, 337, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [726, 370, 16, 17],
+          "rect": [727, 55, 16, 17],
           "reason": "location change"
         },
         {
@@ -993,62 +663,17 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [726, 370, 16, 17],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [726, 337, 16, 17],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [725, 421, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 427, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 460, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 466, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 499, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 505, 16, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 538, 16, 17],
+          "rect": [726, 331, 16, 17],
           "reason": "location change"
         },
         {
@@ -1058,92 +683,393 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [725, 538, 16, 17],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [725, 505, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 499, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 466, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 460, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 427, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 421, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 256, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 250, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 217, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 211, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 178, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 172, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 139, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 133, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [721, 22, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [721, 16, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [718, 298, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [718, 292, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer1' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer10' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer11' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer12' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer13' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer14' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer2' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer3' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer4' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer5' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer6' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer7' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer8' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer9' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/focus-ring-on-continuation-move-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/focus-ring-on-continuation-move-expected.txt
index e570c35..2c063cd 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/focus-ring-on-continuation-move-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/focus-ring-on-continuation-move-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (relative positioned) DIV id='block'",
-          "rect": [8, 200, 100, 100],
+          "rect": [208, 200, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) DIV id='block'",
-          "rect": [208, 200, 100, 100],
+          "rect": [8, 200, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/hover-invalidation-table-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/hover-invalidation-table-expected.txt
index 686fd80..c740168 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/hover-invalidation-table-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/hover-invalidation-table-expected.txt
@@ -7,19 +7,17 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutTableRow TR class='bla'",
+          "rect": [8, 218, 70, 26],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "LayoutTableCell TD id='secondRowSpan'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
-        },
-        {
-          "object": "LayoutTableRow TR class='bla'",
-          "rect": [8, 218, 70, 26],
-          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/hover-pseudo-borders-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/hover-pseudo-borders-expected.txt
index ae782420..02d404c6 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/hover-pseudo-borders-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/hover-pseudo-borders-expected.txt
@@ -18,7 +18,6 @@
         },
         {
           "object": "LayoutTextFragment (anonymous)",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/hover-pseudo-borders-whitespace-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/hover-pseudo-borders-whitespace-expected.txt
index e94993c..82d54e6 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/hover-pseudo-borders-whitespace-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/hover-pseudo-borders-whitespace-expected.txt
@@ -7,13 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='div_border'",
-          "rect": [8, 8, 120, 120],
+          "object": "LayoutBlockFlow DIV id='div_outline'",
+          "rect": [8, 138, 120, 120],
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='div_outline'",
-          "rect": [8, 138, 120, 120],
+          "object": "LayoutBlockFlow DIV id='div_border'",
+          "rect": [8, 8, 120, 120],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/inline-block-resize-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/inline-block-resize-expected.txt
index cb140ca..9a5549b 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/inline-block-resize-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/inline-block-resize-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV",
           "rect": [8, 8, 100, 100],
           "reason": "forced by layout"
@@ -22,13 +17,15 @@
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/inline-outline-repaint-2-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/inline-outline-repaint-2-expected.txt
index d2ba3fe..e2a4f77 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/inline-outline-repaint-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/inline-outline-repaint-2-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'Test'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutInline SPAN",
           "rect": [210, -5, 50, 20],
           "reason": "style change"
@@ -25,6 +15,14 @@
           "object": "LayoutText #text",
           "rect": [215, 0, 40, 10],
           "reason": "style change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'Test'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/inline-overflow-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/inline-overflow-expected.txt
index 53c41821..e885de6 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/inline-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/inline-overflow-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'A\u00A0\u00A0B'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [33, 33, 250, 100],
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [33, 33, 250, 100],
+          "object": "InlineTextBox 'A\u00A0\u00A0B'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/inline-reflow-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/inline-reflow-expected.txt
index c7a4e6e..22ce9770 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/inline-reflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/inline-reflow-expected.txt
@@ -7,141 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'A A A A A AA AA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'A A A A A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'A A A A A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'A A A A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'A A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'AA AA AA A A A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'AA AA AA A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AA AA AA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AA AA AAA AAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'AA AAA AAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAA AAA AA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAA AAA AAA AA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'AAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'AAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAA AAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAA AAAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'AAAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAAA AAAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'AAAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAAAA AAAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'AAAAAA AAAAAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'AAAAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAAAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='div1' class='container'",
-          "rect": [0, 0, 200, 300],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='div1' class='container'",
           "rect": [0, 0, 300, 200],
           "reason": "forced by layout"
@@ -152,9 +17,9 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [200, 0, 100, 200],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow (positioned) DIV id='div1' class='container'",
+          "rect": [0, 0, 200, 300],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutText #text",
@@ -162,93 +27,184 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [200, 0, 100, 200],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'A A A A A AA AA'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'A A A A A'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'A A A A A'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'A A A A'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'A A'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'AA AA AA A A A'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'AA AA AA A'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AA AA AA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AA AA AAA AAA'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'AA AAA AAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAA AAA AA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAA AAA AAA AA'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'AAA AAAA AAAA'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'AAA AAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAAA AAAA AAAA'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'AAAAA AAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAAA AAAAA'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'AAAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAAAA AAAAA'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'AAAAAA AAAAAAA'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'AAAAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAAAAA'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/inline-relative-positioned-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/inline-relative-positioned-expected.txt
index 803ddcd5d..67500a5 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/inline-relative-positioned-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/inline-relative-positioned-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [8, 88, 100, 100],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/inline-vertical-lr-overflow-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/inline-vertical-lr-overflow-expected.txt
index 6015a56..07d93b6b 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/inline-vertical-lr-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/inline-vertical-lr-overflow-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'A\u00A0\u00A0B'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [33, 33, 100, 250],
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [33, 33, 100, 250],
+          "object": "InlineTextBox 'A\u00A0\u00A0B'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/inline-vertical-rl-overflow-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/inline-vertical-rl-overflow-expected.txt
index 15b4af0f..47ba9b2 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/inline-vertical-rl-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/inline-vertical-rl-overflow-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'A\u00A0\u00A0B'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [667, 33, 100, 250],
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [667, 33, 100, 250],
+          "object": "InlineTextBox 'A\u00A0\u00A0B'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/intermediate-layout-position-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/intermediate-layout-position-expected.txt
index 94608b3..6399d39 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/intermediate-layout-position-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/intermediate-layout-position-expected.txt
@@ -7,24 +7,23 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 74, 46, 20],
+          "object": "LayoutTable TABLE",
+          "rect": [8, 172, 46, 20],
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow DIV id='target'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [8, 172, 46, 20],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 74, 46, 20],
           "reason": "incremental"
         },
         {
           "object": "LayoutTableCell TD id='cell'",
           "rect": [10, 170, 42, 20],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='target'",
+          "reason": "became visible"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/invisible-objects-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/invisible-objects-expected.txt
index 5b7c4a5..5dcb7184 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/invisible-objects-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/invisible-objects-expected.txt
@@ -8,22 +8,18 @@
       "paintInvalidations": [
         {
           "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "InlineTextBox 'is invisible'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/justify-content-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/justify-content-change-expected.txt
index 16960b5c..3f1b614 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/justify-content-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/justify-content-change-expected.txt
@@ -7,23 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [25, 53, 50, 50],
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [148, 52, 52, 300],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [1, 53, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [125, 53, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [149, 53, 50, 50],
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [124, 52, 52, 300],
           "reason": "location change"
         },
         {
@@ -37,13 +27,23 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [124, 52, 52, 300],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [149, 53, 50, 50],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [148, 52, 52, 300],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [125, 53, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [25, 53, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [1, 53, 50, 50],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/justify-content-distribution-change-grid-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/justify-content-distribution-change-grid-expected.txt
index d5efda23..217a781 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/justify-content-distribution-change-grid-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/justify-content-distribution-change-grid-expected.txt
@@ -7,23 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutGrid DIV id='container'",
+          "rect": [0, 52, 300, 200],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 52, 100, 200],
+          "rect": [200, 52, 100, 200],
           "reason": "location change"
         },
         {
@@ -33,13 +23,20 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [200, 52, 100, 200],
+          "rect": [0, 52, 100, 200],
           "reason": "location change"
         },
         {
-          "object": "LayoutGrid DIV id='container'",
-          "rect": [0, 52, 300, 200],
-          "reason": "style change"
+          "object": "LayoutBlockFlow DIV",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/justify-content-position-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/justify-content-position-change-expected.txt
index 9540720..6ec3eeb 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/justify-content-position-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/justify-content-position-change-expected.txt
@@ -7,23 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [49, 53, 50, 50],
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [100, 52, 52, 300],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [1, 53, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [101, 53, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [53, 53, 50, 50],
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [52, 52, 52, 300],
           "reason": "location change"
         },
         {
@@ -37,13 +27,23 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [100, 52, 52, 300],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [101, 53, 50, 50],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [52, 52, 52, 300],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [53, 53, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [49, 53, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [1, 53, 50, 50],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/justify-content-position-change-grid-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/justify-content-position-change-grid-expected.txt
index cc1ccee..06d3f85 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/justify-content-position-change-grid-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/justify-content-position-change-grid-expected.txt
@@ -7,33 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutGrid DIV id='container'",
+          "rect": [0, 52, 300, 200],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [0, 52, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [150, 52, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [50, 52, 50, 200],
+          "rect": [250, 52, 50, 200],
           "reason": "location change"
         },
         {
@@ -43,18 +23,35 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [150, 52, 50, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item'",
           "rect": [100, 52, 50, 200],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='item'",
-          "rect": [250, 52, 50, 200],
+          "rect": [50, 52, 50, 200],
           "reason": "location change"
         },
         {
-          "object": "LayoutGrid DIV id='container'",
-          "rect": [0, 52, 300, 200],
-          "reason": "style change"
+          "object": "LayoutBlockFlow DIV class='item'",
+          "rect": [0, 52, 50, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/justify-items-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/justify-items-change-expected.txt
index b648f03..b424d3f 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/justify-items-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/justify-items-change-expected.txt
@@ -7,14 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [150, 52, 50, 50],
-          "reason": "layoutObject removal"
+          "object": "LayoutGrid DIV id='container'",
+          "rect": [0, 52, 200, 300],
+          "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 52, 50, 50],
-          "reason": "location change"
+          "object": "LayoutGrid DIV id='container'",
+          "rect": [0, 52, 200, 300],
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutBlockFlow DIV class='item'",
@@ -27,13 +27,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutGrid DIV id='container'",
-          "rect": [0, 52, 200, 300],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [150, 52, 50, 50],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutGrid DIV id='container'",
-          "rect": [0, 52, 200, 300],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [0, 52, 50, 50],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/justify-items-legacy-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/justify-items-legacy-change-expected.txt
index 21bcde7..3c4ae79 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/justify-items-legacy-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/justify-items-legacy-change-expected.txt
@@ -7,11 +7,51 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [1, 53, 50, 50],
+          "object": "LayoutBlockFlow DIV id='parentContainer'",
+          "rect": [0, 52, 300, 400],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='parentContainer'",
+          "rect": [0, 52, 300, 400],
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutGrid DIV id='container'",
+          "rect": [0, 52, 200, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutGrid DIV id='container'",
+          "rect": [0, 52, 200, 300],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item2'",
+          "rect": [124, 52, 52, 150],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item2'",
+          "rect": [100, 52, 52, 150],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item1'",
+          "rect": [24, 52, 52, 150],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item1'",
+          "rect": [0, 52, 52, 150],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [125, 53, 50, 50],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow DIV",
           "rect": [101, 53, 50, 50],
           "reason": "layoutObject removal"
@@ -23,48 +63,8 @@
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [125, 53, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item1'",
-          "rect": [0, 52, 52, 150],
+          "rect": [1, 53, 50, 50],
           "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item1'",
-          "rect": [24, 52, 52, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item2'",
-          "rect": [100, 52, 52, 150],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item2'",
-          "rect": [124, 52, 52, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='parentContainer'",
-          "rect": [0, 52, 300, 400],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='parentContainer'",
-          "rect": [0, 52, 300, 400],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutGrid DIV id='container'",
-          "rect": [0, 52, 200, 300],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutGrid DIV id='container'",
-          "rect": [0, 52, 200, 300],
-          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/justify-items-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/justify-items-overflow-change-expected.txt
index 52b9d2a..45015cb 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/justify-items-overflow-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/justify-items-overflow-change-expected.txt
@@ -7,53 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [-60, 16, 860, 336],
+          "object": "LayoutBlockFlow HTML",
+          "rect": [-60, 0, 860, 352],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [-60, 52, 160, 50],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [150, 52, 50, 50],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 52, 160, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [150, 52, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item1'",
-          "rect": [-60, 52, 160, 300],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item1'",
-          "rect": [0, 52, 160, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item2'",
-          "rect": [150, 52, 50, 300],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='item2'",
-          "rect": [150, 52, 50, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [-60, 0, 860, 352],
+          "object": "LayoutBlockFlow BODY",
+          "rect": [-60, 16, 860, 336],
           "reason": "bounds change"
         },
         {
@@ -65,6 +25,46 @@
           "object": "LayoutGrid DIV id='container'",
           "rect": [0, 52, 200, 300],
           "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item1'",
+          "rect": [0, 52, 160, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item1'",
+          "rect": [-60, 52, 160, 300],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [0, 52, 160, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [-60, 52, 160, 50],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item2'",
+          "rect": [150, 52, 50, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='item2'",
+          "rect": [150, 52, 50, 300],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [150, 52, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [150, 52, 50, 50],
+          "reason": "layoutObject removal"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/justify-self-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/justify-self-change-expected.txt
index 7676b02b..a02e3d0 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/justify-self-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/justify-self-change-expected.txt
@@ -7,26 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [25, 53, 50, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [1, 53, 50, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [125, 53, 50, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [149, 53, 50, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV class='item1'",
           "rect": [24, 52, 52, 152],
           "reason": "location change"
@@ -38,12 +18,32 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='item2'",
-          "rect": [124, 52, 52, 150],
+          "rect": [148, 52, 52, 150],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='item2'",
-          "rect": [148, 52, 52, 150],
+          "rect": [124, 52, 52, 150],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [25, 53, 50, 150],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [1, 53, 50, 150],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [149, 53, 50, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [125, 53, 50, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/justify-self-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/justify-self-overflow-change-expected.txt
index 244fe964..94dfd1f 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/justify-self-overflow-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/justify-self-overflow-change-expected.txt
@@ -7,18 +7,23 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [-50, 0, 850, 352],
+          "reason": "bounds change"
+        },
+        {
           "object": "LayoutBlockFlow BODY",
           "rect": [-50, 16, 850, 336],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [-50, 52, 150, 150],
-          "reason": "location change"
+          "object": "LayoutGrid DIV id='container'",
+          "rect": [-50, 52, 250, 300],
+          "reason": "bounds change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 52, 150, 150],
+          "object": "LayoutBlockFlow DIV class='item1'",
+          "rect": [0, 52, 150, 300],
           "reason": "location change"
         },
         {
@@ -27,24 +32,19 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV class='item1'",
-          "rect": [0, 52, 150, 300],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [0, 52, 150, 150],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [-50, 52, 150, 150],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='item2'",
           "rect": [150, 52, 50, 300],
           "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [-50, 0, 850, 352],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutGrid DIV id='container'",
-          "rect": [-50, 52, 250, 300],
-          "reason": "bounds change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/layout-state-only-positioned-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/layout-state-only-positioned-expected.txt
index 9ac97e1f..1be9e79 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/layout-state-only-positioned-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/layout-state-only-positioned-expected.txt
@@ -8,11 +8,6 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV",
           "rect": [88, 53, 15, 100],
           "reason": "scroll"
         },
@@ -22,8 +17,11 @@
           "reason": "incremental"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "reason": "scroll"
+        },
+        {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/line-flow-with-floats-7-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/line-flow-with-floats-7-expected.txt
index 7d93f55d..62ffede5 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/line-flow-with-floats-7-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/line-flow-with-floats-7-expected.txt
@@ -7,83 +7,69 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 386, 418, 54],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutInline SPAN id='theQueen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [14, 404, 355, 36],
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutInline SPAN id='theQueen'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/margin-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/margin-expected.txt
index 35cbfc88..ffc7608 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/margin-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/margin-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='target'",
-          "rect": [0, 0, 100, 100],
+          "rect": [20, 20, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='target'",
-          "rect": [20, 20, 100, 100],
+          "rect": [0, 0, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/mix-blend-mode-separate-stacking-context-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/mix-blend-mode-separate-stacking-context-expected.txt
index 82f61cdc..412d58f 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/mix-blend-mode-separate-stacking-context-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/mix-blend-mode-separate-stacking-context-expected.txt
@@ -7,33 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [348, 48, 60, 60],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='first'",
-          "rect": [48, 48, 60, 60],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='second'",
-          "rect": [148, 48, 60, 60],
-          "reason": "layer"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='second'",
-          "rect": [148, 48, 60, 60],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='third'",
-          "rect": [248, 48, 60, 60],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV",
-          "rect": [88, 28, 20, 80],
+          "rect": [128, 88, 80, 20],
           "reason": "incremental"
         },
         {
@@ -42,19 +17,44 @@
           "reason": "incremental"
         },
         {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [348, 48, 60, 60],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='fourth'",
+          "rect": [328, 28, 60, 60],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV id='third'",
+          "rect": [248, 48, 60, 60],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV id='second'",
+          "rect": [148, 48, 60, 60],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV id='second'",
+          "rect": [148, 48, 60, 60],
+          "reason": "layer"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV id='first'",
+          "rect": [48, 48, 60, 60],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV",
           "rect": [188, 28, 20, 80],
           "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV",
-          "rect": [128, 88, 80, 20],
+          "rect": [88, 28, 20, 80],
           "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='fourth'",
-          "rect": [328, 28, 60, 60],
-          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/multicol-as-paint-container-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/multicol-as-paint-container-expected.txt
index e6a37fa..d8b98c9e 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/multicol-as-paint-container-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/multicol-as-paint-container-expected.txt
@@ -13,91 +13,6 @@
           "backfaceVisibility": "hidden",
           "paintInvalidations": [
             {
-              "object": "InlineTextBox 'Lorem ipsum'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'adipiscing'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'consectetur'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'dolor sit amet,'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'eget, dapibus'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'elit. Fusce'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'eu fringilla'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'libero,'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'non condimentum'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'pulvinar, ipsum'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'purus. Ut nisl'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'quam est eu'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'sapien'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'suscipit ut leo'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'ultrices dolor.'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'ultricies arcu,'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'varius, metus'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
               "object": "LayoutMultiColumnSet (anonymous)",
               "rect": [0, 0, 630, 180],
               "reason": "style change"
@@ -106,6 +21,74 @@
               "object": "LayoutText #text",
               "rect": [0, 0, 625, 180],
               "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'Lorem ipsum'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'adipiscing'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'consectetur'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'dolor sit amet,'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'eget, dapibus'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'elit. Fusce'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'eu fringilla'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'libero,'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'non condimentum'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'pulvinar, ipsum'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'purus. Ut nisl'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'quam est eu'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'sapien'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'suscipit ut leo'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'ultrices dolor.'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'ultricies arcu,'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'varius, metus'",
+              "reason": "style change"
             }
           ]
         }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/multicol-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/multicol-repaint-expected.txt
index 59b77c4..7e46121b5 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/multicol-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/multicol-repaint-expected.txt
@@ -7,31 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'XXXXXX'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutMultiColumnFlowThread (anonymous)",
           "rect": [9, 9, 525, 100],
           "reason": "forced by layout"
@@ -42,18 +17,35 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'XXXXXX'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-abspos-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-abspos-expected.txt
index 8222ce6f..0c3a5fc 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-abspos-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-abspos-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='target'",
           "rect": [0, 580, 80, 20],
           "reason": "style change"
@@ -22,8 +17,11 @@
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-abspos-in-relpos-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-abspos-in-relpos-expected.txt
index 9c416c1..845e09a 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-abspos-in-relpos-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-abspos-in-relpos-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='target'",
           "rect": [508, 28, 80, 20],
           "reason": "style change"
@@ -22,8 +17,11 @@
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-block-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-block-expected.txt
index e340e86..bc74159 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-block-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-block-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [488, 8, 150, 20],
           "reason": "style change"
@@ -22,8 +17,11 @@
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-inline-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-inline-expected.txt
index 456e551..a10953c 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-inline-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-inline-expected.txt
@@ -7,18 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [488, 8, 80, 20],
+          "reason": "style change"
+        },
+        {
           "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "LayoutInline SPAN id='target'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [488, 8, 80, 20],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-text-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-text-expected.txt
index 0c7563b7..8edb88fe 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-text-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/multicol-with-text-expected.txt
@@ -7,26 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutMultiColumnFlowThread (anonymous)",
           "rect": [8, 8, 630, 20],
           "reason": "forced by layout"
@@ -37,23 +17,35 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt
index 0c42ff7a..6ef2ab9 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/opacity-change-on-overflow-float-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/opacity-change-on-overflow-float-expected.txt
index 76d96c11..1e74dc07 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/opacity-change-on-overflow-float-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/opacity-change-on-overflow-float-expected.txt
@@ -9,12 +9,12 @@
         {
           "object": "LayoutBlockFlow (floating) DIV class='green'",
           "rect": [8, 78, 100, 100],
-          "reason": "layer"
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (floating) DIV class='green'",
           "rect": [8, 78, 100, 100],
-          "reason": "style change"
+          "reason": "layer"
         },
         {
           "object": "LayoutBlockFlow (floating) DIV class='red'",
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/outline-change-continuations-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/outline-change-continuations-expected.txt
index 96ec3ae..2280a255 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/outline-change-continuations-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/outline-change-continuations-expected.txt
@@ -8,27 +8,22 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutInline SPAN id='outer'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "LayoutInline SPAN id='outer'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "outline"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/outline-change-invalidation-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/outline-change-invalidation-expected.txt
index 35ba43e..55a81588 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/outline-change-invalidation-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/outline-change-invalidation-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem Ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow UL",
+          "rect": [8, 79, 789, 28],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutBlockFlow A id='link'",
@@ -22,23 +17,24 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow UL",
-          "rect": [8, 79, 789, 28],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutListItem LI",
           "rect": [31, 79, 766, 28],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem Ipsum'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/outline-child-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/outline-child-repaint-expected.txt
index 58f4a44e..bb3750f 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/outline-child-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/outline-child-repaint-expected.txt
@@ -8,23 +8,23 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='container'",
-          "rect": [0, 140, 220, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='container'",
           "rect": [0, 240, 220, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV class='outlined'",
-          "rect": [0, 140, 220, 50],
+          "object": "LayoutBlockFlow (positioned) DIV id='container'",
+          "rect": [0, 140, 220, 60],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outlined'",
           "rect": [0, 240, 220, 50],
           "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='outlined'",
+          "rect": [0, 140, 220, 50],
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/outline-clip-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/outline-clip-change-expected.txt
index d3c05005..77b2fe0 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/outline-clip-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/outline-clip-change-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Lorem Ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem Ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) A id='link' class='updated'",
           "rect": [43, 97, 97, 28],
           "reason": "style change"
@@ -27,13 +17,19 @@
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'Lorem Ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem Ipsum'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/outline-inset-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/outline-inset-expected.txt
index a967ee9..9cc6eb67 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/outline-inset-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/outline-inset-expected.txt
@@ -8,23 +8,23 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [19, 29, 200, 60],
-          "reason": "outline"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
           "rect": [19, 189, 200, 60],
           "reason": "outline"
         },
         {
-          "object": "LayoutBlockFlow DIV id='a'",
-          "rect": [29, 69, 180, 20],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow DIV",
+          "rect": [19, 29, 200, 60],
+          "reason": "outline"
         },
         {
           "object": "LayoutBlockFlow DIV id='b'",
           "rect": [29, 229, 180, 20],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='a'",
+          "rect": [29, 69, 180, 20],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/outline-repaint-glitch-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/outline-repaint-glitch-expected.txt
index f12bc4d..15763f1 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/outline-repaint-glitch-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/outline-repaint-glitch-expected.txt
@@ -8,23 +8,23 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [15, 217, 208, 68],
-          "reason": "outline"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
           "rect": [15, 377, 208, 68],
           "reason": "outline"
         },
         {
-          "object": "LayoutBlockFlow DIV id='a'",
-          "rect": [29, 261, 180, 20],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow DIV",
+          "rect": [15, 217, 208, 68],
+          "reason": "outline"
         },
         {
           "object": "LayoutBlockFlow DIV id='b'",
           "rect": [29, 421, 180, 20],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='a'",
+          "rect": [29, 261, 180, 20],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled-expected.txt
index b87fc05..5747b93 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled-expected.txt
@@ -7,28 +7,27 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 8, 300, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 8, 300, 300],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='innerDiv'",
           "rect": [8, 8, 769, 300],
           "reason": "full"
         },
         {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 8, 300, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 8, 300, 300],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow DIV id='innerDiv'",
           "rect": [762, 8, 15, 300],
           "reason": "scroll"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overflow-clip-subtree-layout-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/overflow-clip-subtree-layout-expected.txt
index 0a2296c..b211e37 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overflow-clip-subtree-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overflow-clip-subtree-layout-expected.txt
@@ -8,7 +8,6 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overflow-delete-line-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/overflow-delete-line-expected.txt
index 9e831d2f..15ed2559 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overflow-delete-line-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overflow-delete-line-expected.txt
@@ -7,48 +7,42 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsu'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='dv'",
           "rect": [8, 70, 80, 36],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 70, 47, 36],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [8, 70, 74, 18],
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [8, 70, 47, 36],
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsu'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overflow-hide-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/overflow-hide-expected.txt
index e2f8ca0..e0f8caa0 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overflow-hide-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overflow-hide-expected.txt
@@ -7,14 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='overflowParent' class='absolute green'",
-          "rect": [8, 8, 100, 100],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) DIV class='relative red'",
           "rect": [108, 108, 100, 100],
           "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='overflowParent' class='absolute green'",
+          "rect": [8, 8, 100, 100],
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overflow-into-content-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/overflow-into-content-expected.txt
index 0055985..9bf88f91 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overflow-into-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overflow-into-content-expected.txt
@@ -8,12 +8,7 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [111, 8, 3, 106],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [61, 8, 53, 106],
+          "rect": [8, 211, 106, 53],
           "reason": "incremental"
         },
         {
@@ -22,11 +17,6 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [8, 211, 106, 53],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [8, 308, 100, 100],
           "reason": "became invisible"
@@ -35,6 +25,16 @@
           "object": "LayoutBlockFlow DIV id='target3'",
           "rect": [8, 388, 100, 20],
           "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "rect": [61, 8, 53, 106],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "rect": [111, 8, 3, 106],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-after-move-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-after-move-expected.txt
index 1aae3324..2c29065 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-after-move-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-after-move-expected.txt
@@ -14,12 +14,12 @@
           "paintInvalidations": [
             {
               "object": "LayoutBlockFlow (positioned) DIV id='block'",
-              "rect": [50, 50, 200, 50],
+              "rect": [50, 160, 200, 50],
               "reason": "location change"
             },
             {
               "object": "LayoutBlockFlow (positioned) DIV id='block'",
-              "rect": [50, 160, 200, 50],
+              "rect": [50, 50, 200, 50],
               "reason": "location change"
             }
           ],
@@ -34,12 +34,12 @@
                   "paintInvalidations": [
                     {
                       "object": "LayoutBlockFlow (positioned) DIV id='block'",
-                      "rect": [50, 200, 200, 50],
+                      "rect": [50, 310, 200, 50],
                       "reason": "location change"
                     },
                     {
                       "object": "LayoutBlockFlow (positioned) DIV id='block'",
-                      "rect": [50, 310, 200, 50],
+                      "rect": [50, 200, 200, 50],
                       "reason": "location change"
                     }
                   ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-body-appear-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-body-appear-expected.txt
index b840383..984939d 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-body-appear-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-body-appear-expected.txt
@@ -7,24 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Bug 36461 - No vertical scrollbar after the CSS class change'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This is the test for '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'You should see both vertical and horizontal scrollbars.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 2008, 2092],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -32,31 +17,26 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 16, 784, 18],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 50, 784, 18],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 785, 585],
           "reason": "full"
         },
         {
           "object": "LayoutView #document",
-          "rect": [0, 0, 2008, 2092],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutView #document",
           "rect": [0, 585, 785, 15],
           "reason": "scroll"
         },
         {
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 50, 784, 18],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 16, 784, 18],
+          "reason": "forced by layout"
+        },
+        {
           "object": "LayoutView #document",
           "rect": [785, 0, 15, 585],
           "reason": "scroll"
@@ -67,23 +47,39 @@
           "reason": "scroll"
         },
         {
+          "object": "InlineTextBox '.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Bug 36461 - No vertical scrollbar after the CSS class change'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This is the test for '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'You should see both vertical and horizontal scrollbars.'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutView #document",
+          "reason": "scroll"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-delete-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-delete-expected.txt
index 3a4b591..3a34ea7 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-delete-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-delete-expected.txt
@@ -7,26 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Passed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Test'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='t'",
           "rect": [8, 112, 80, 35],
           "reason": "invalidate paint rectangle"
@@ -37,13 +17,27 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Passed'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Test'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-in-overflow-scroll-scrolled-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-in-overflow-scroll-scrolled-expected.txt
index b87fc05..5747b93 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-in-overflow-scroll-scrolled-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-in-overflow-scroll-scrolled-expected.txt
@@ -7,28 +7,27 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 8, 300, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 8, 300, 300],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='innerDiv'",
           "rect": [8, 8, 769, 300],
           "reason": "full"
         },
         {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 8, 300, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 8, 300, 300],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow DIV id='innerDiv'",
           "rect": [762, 8, 15, 300],
           "reason": "scroll"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overflow-show-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/overflow-show-expected.txt
index bbaa54c0..68e3837 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overflow-show-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overflow-show-expected.txt
@@ -7,14 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='overflowParent' class='absolute green'",
-          "rect": [8, 8, 100, 100],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) DIV class='relative green'",
           "rect": [108, 108, 100, 100],
           "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='overflowParent' class='absolute green'",
+          "rect": [8, 8, 100, 100],
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overhanging-float-detach-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/overhanging-float-detach-repaint-expected.txt
index 1d7b045b..6ce859d 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overhanging-float-detach-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overhanging-float-detach-repaint-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='floatContainer'",
-          "rect": [0, 0, 0, 0],
           "reason": "layoutObject removal"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/padding-keeping-content-size-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/padding-keeping-content-size-expected.txt
index 37ec615..93b7b66 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/padding-keeping-content-size-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/padding-keeping-content-size-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='target1' class='outer'",
-          "rect": [100, 0, 40, 140],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow (positioned) DIV id='target2' class='outer'",
+          "rect": [0, 200, 140, 140],
+          "reason": "background obscuration change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='target1' class='outer'",
@@ -17,9 +17,9 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='target2' class='outer'",
-          "rect": [0, 200, 140, 140],
-          "reason": "background obscuration change"
+          "object": "LayoutBlockFlow DIV class='inner'",
+          "rect": [20, 220, 100, 100],
+          "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='inner'",
@@ -27,9 +27,9 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV class='inner'",
-          "rect": [20, 220, 100, 100],
-          "reason": "location change"
+          "object": "LayoutBlockFlow (positioned) DIV id='target1' class='outer'",
+          "rect": [100, 0, 40, 140],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/percent-size-image-resize-container-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/percent-size-image-resize-container-expected.txt
index 10c0603f..7f12086 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/percent-size-image-resize-container-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/percent-size-image-resize-container-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [100, 50, 50, 150],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [0, 200, 100, 50],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutImage (positioned) IMG",
           "rect": [0, 50, 150, 150],
           "reason": "forced by layout"
@@ -25,6 +15,16 @@
           "object": "LayoutImage (positioned) IMG",
           "rect": [0, 50, 100, 200],
           "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "rect": [0, 200, 100, 50],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "rect": [100, 50, 50, 150],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/position-change-keeping-geometry-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/position-change-keeping-geometry-expected.txt
index 9a9f7bd8..bb7ecc4f 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/position-change-keeping-geometry-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/position-change-keeping-geometry-expected.txt
@@ -8,12 +8,10 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='target2'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='target3'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/positioned-great-grandparent-change-location-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/positioned-great-grandparent-change-location-expected.txt
index b4d9d27..015cdcf 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/positioned-great-grandparent-change-location-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/positioned-great-grandparent-change-location-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Target'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV",
           "rect": [100, 200, 100, 100],
           "reason": "location change"
@@ -32,11 +17,6 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='great-grandparent'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [100, 200, 41, 18],
           "reason": "location change"
@@ -47,8 +27,23 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'Target'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='great-grandparent'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/positioned-list-offset-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/positioned-list-offset-change-repaint-expected.txt
index cf84a8d..037415a 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/positioned-list-offset-change-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/positioned-list-offset-change-repaint-expected.txt
@@ -7,18 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) UL id='list'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutListItem (positioned) LI",
+          "rect": [8, 60, 214, 236],
           "reason": "location change"
         },
         {
@@ -27,28 +17,31 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutListItem (positioned) LI",
-          "rect": [8, 60, 214, 236],
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) UL id='list'",
           "reason": "location change"
         },
         {
           "object": "LayoutListMarker (anonymous)",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/push-block-with-first-line-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/push-block-with-first-line-expected.txt
index 3b7744b..982847e62 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/push-block-with-first-line-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/push-block-with-first-line-expected.txt
@@ -7,13 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'JOCULAR'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='test'",
-          "rect": [8, 8, 784, 20],
+          "object": "LayoutBlockFlow DIV id='spacer'",
+          "rect": [8, 8, 784, 60],
           "reason": "location change"
         },
         {
@@ -22,13 +17,8 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer'",
-          "rect": [8, 8, 784, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 8, 140, 20],
+          "object": "LayoutBlockFlow DIV class='test'",
+          "rect": [8, 8, 784, 20],
           "reason": "location change"
         },
         {
@@ -37,8 +27,16 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [8, 8, 140, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'JOCULAR'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/reflection-redraw-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/reflection-redraw-expected.txt
index 1d7a35f..ca1018e 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/reflection-redraw-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/reflection-redraw-expected.txt
@@ -7,88 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'The color of this'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'The color of this'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'The color of this'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'The color of this'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'green'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'green'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'green'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'green'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'reflection should be'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'reflection should be'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'reflection should be'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'reflection should be'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'text in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'text in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'text in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'text in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
-          "rect": [304, 21, 128, 208],
+          "rect": [379, 267, 288, 72],
           "reason": "style change"
         },
         {
@@ -98,13 +18,77 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [379, 267, 288, 72],
+          "rect": [304, 21, 128, 208],
           "reason": "style change"
         },
         {
           "object": "LayoutText #text",
           "rect": [304, 377, 128, 156],
           "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'The color of this'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'The color of this'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'The color of this'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'The color of this'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'green'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'green'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'green'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'green'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'reflection should be'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'reflection should be'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'reflection should be'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'reflection should be'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'text in the'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'text in the'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'text in the'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'text in the'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/reflection-repaint-test-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/reflection-repaint-test-expected.txt
index e31cd55..8f863b2 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/reflection-repaint-test-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/reflection-repaint-test-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [22, 50, 226, 166],
           "reason": "invalidate paint rectangle"
@@ -32,8 +22,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/relative-margin-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/relative-margin-change-repaint-expected.txt
index 1e0901f..aa162a3 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/relative-margin-change-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/relative-margin-change-repaint-expected.txt
@@ -7,23 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='container'",
-          "rect": [0, 40, 200, 400],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='container'",
-          "rect": [0, 60, 200, 400],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='test'",
-          "rect": [0, 40, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='test'",
-          "rect": [0, 60, 100, 100],
+          "object": "LayoutBlockFlow BODY",
+          "rect": [0, 20, 800, 400],
           "reason": "location change"
         },
         {
@@ -32,8 +17,23 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 20, 800, 400],
+          "object": "LayoutBlockFlow (relative positioned) DIV id='container'",
+          "rect": [0, 60, 200, 400],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='container'",
+          "rect": [0, 40, 200, 400],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='test'",
+          "rect": [0, 60, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='test'",
+          "rect": [0, 40, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/remove-block-after-layout-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/remove-block-after-layout-expected.txt
index 53561e9..1d3fdd4 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/remove-block-after-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/remove-block-after-layout-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'This div should'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'disappear.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='target'",
           "rect": [8, 108, 100, 100],
           "reason": "layoutObject removal"
@@ -27,13 +17,19 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'This div should'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'disappear.'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/remove-inline-block-descendant-of-flex-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/remove-inline-block-descendant-of-flex-expected.txt
index b053456..af24dd4 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/remove-inline-block-descendant-of-flex-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/remove-inline-block-descendant-of-flex-expected.txt
@@ -7,38 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV id='inline-block-2' class='item'",
+          "rect": [0, 200, 100, 100],
           "reason": "location change"
         },
         {
@@ -53,37 +23,55 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='inline-block-2' class='item'",
-          "rect": [0, 200, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='inline-block-2' class='item'",
           "rect": [0, 100, 100, 100],
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/repaint-composited-child-in-scrolled-container-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/repaint-composited-child-in-scrolled-container-expected.txt
index 13d08b0..a5c3ab8 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/repaint-composited-child-in-scrolled-container-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/repaint-composited-child-in-scrolled-container-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (positioned) DIV id='outer'",
+          "rect": [8, 293, 285, 15],
           "reason": "scroll"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='outer'",
-          "rect": [8, 293, 285, 15],
+          "object": "HorizontalScrollbar",
           "reason": "scroll"
         }
       ],
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/repaint-descandant-on-ancestor-layer-move-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/repaint-descandant-on-ancestor-layer-move-expected.txt
index 7713665e..f5c03702 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/repaint-descandant-on-ancestor-layer-move-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/repaint-descandant-on-ancestor-layer-move-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'There should only be one copy of this text.'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (relative positioned) DIV",
+          "rect": [428, 38, 300, 18],
           "reason": "location change"
         },
         {
@@ -17,21 +17,16 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='container'",
-          "rect": [8, 18, 300, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV",
-          "rect": [428, 38, 300, 18],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) DIV",
           "rect": [28, 38, 300, 18],
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV id='container'",
+          "rect": [8, 18, 300, 18],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [428, 38, 275, 18],
           "reason": "location change"
@@ -42,18 +37,19 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'There should only be one copy of this text.'",
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/repaint-table-row-in-composited-document-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/repaint-table-row-in-composited-document-expected.txt
index 8bf314d..f1b49a1 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/repaint-table-row-in-composited-document-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/repaint-table-row-in-composited-document-expected.txt
@@ -7,18 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [52, 156, 202, 104],
+          "object": "LayoutTableRow TR",
+          "rect": [50, 306, 412, 104],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [52, 306, 202, 104],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [256, 156, 204, 104],
+          "object": "LayoutTableRow TR",
+          "rect": [50, 156, 412, 104],
           "reason": "location change"
         },
         {
@@ -27,18 +22,23 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutTableCell TD",
+          "rect": [256, 156, 204, 104],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutTableCell TD id='target'",
           "rect": [52, 154, 202, 150],
           "reason": "incremental"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [50, 156, 412, 104],
+          "object": "LayoutTableCell TD",
+          "rect": [52, 306, 202, 104],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [50, 306, 412, 104],
+          "object": "LayoutTableCell TD",
+          "rect": [52, 156, 202, 104],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt
index 1cc211c..9fff0e6 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt
@@ -12,23 +12,20 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='shiftMe'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutImage IMG",
           "rect": [8, 8, 194, 232],
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='shiftMe'",
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/requestAnimation-translation-leave-traces-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/requestAnimation-translation-leave-traces-expected.txt
index 6806162..54c192e 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/requestAnimation-translation-leave-traces-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/requestAnimation-translation-leave-traces-expected.txt
@@ -10,24 +10,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='box'",
-          "rect": [900, 0, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='box'",
-          "rect": [1200, 0, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='box'",
-          "rect": [1200, 0, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='box'",
-          "rect": [1500, 0, 100, 100],
-          "reason": "location change"
+          "object": "LayoutView #document",
+          "rect": [1300, 0, 300, 585],
+          "reason": "incremental"
         },
         {
           "object": "LayoutView #document",
@@ -35,9 +20,24 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [1300, 0, 300, 585],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow DIV id='box'",
+          "rect": [1500, 0, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='box'",
+          "rect": [1200, 0, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='box'",
+          "rect": [1200, 0, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='box'",
+          "rect": [900, 0, 100, 100],
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/resize-scrollable-div-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/resize-scrollable-div-expected.txt
index 6d9c872..39b48b9f 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/resize-scrollable-div-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/resize-scrollable-div-expected.txt
@@ -7,28 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='div'",
           "rect": [8, 108, 300, 300],
           "reason": "border box change"
         },
         {
           "object": "LayoutBlockFlow DIV id='div'",
-          "rect": [8, 193, 85, 15],
-          "reason": "scroll"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='div'",
           "rect": [8, 393, 285, 15],
           "reason": "scroll"
         },
         {
           "object": "LayoutBlockFlow DIV id='div'",
-          "rect": [93, 108, 15, 85],
+          "rect": [8, 193, 85, 15],
           "reason": "scroll"
         },
         {
@@ -38,7 +28,7 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='div'",
-          "rect": [93, 193, 15, 15],
+          "rect": [93, 108, 15, 85],
           "reason": "scroll"
         },
         {
@@ -47,8 +37,20 @@
           "reason": "scroll"
         },
         {
+          "object": "LayoutBlockFlow DIV id='div'",
+          "rect": [93, 193, 15, 15],
+          "reason": "scroll"
+        },
+        {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='div'",
+          "reason": "scroll"
+        },
+        {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/resize-with-border-clipped-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/resize-with-border-clipped-expected.txt
index ea44c86..3e34fca 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/resize-with-border-clipped-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/resize-with-border-clipped-expected.txt
@@ -8,7 +8,7 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV id='target'",
-          "rect": [220, 100, 80, 200],
+          "rect": [100, 210, 200, 90],
           "reason": "incremental"
         },
         {
@@ -23,7 +23,7 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='target'",
-          "rect": [100, 210, 200, 90],
+          "rect": [220, 100, 80, 200],
           "reason": "incremental"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/resize-with-border-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/resize-with-border-expected.txt
index 9fa74da..9a26d1c8 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/resize-with-border-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/resize-with-border-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='div'",
-          "rect": [320, 100, 200, 220],
+          "rect": [310, 100, 210, 220],
           "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='div'",
-          "rect": [310, 100, 210, 220],
+          "rect": [320, 100, 200, 220],
           "reason": "incremental"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/scroll-in-transformed-layer-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/scroll-in-transformed-layer-expected.txt
index c40faa1..eaa7551 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/scroll-in-transformed-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/scroll-in-transformed-layer-expected.txt
@@ -12,13 +12,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV class='absolute red'",
-          "rect": [100, 150, 100, 100],
+          "object": "LayoutBlockFlow (positioned) DIV id='moveMe' class='absolute clipped rotated'",
+          "rect": [79, 129, 142, 142],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='moveMe' class='absolute clipped rotated'",
-          "rect": [79, 129, 142, 142],
+          "object": "LayoutBlockFlow (positioned) DIV class='absolute red'",
+          "rect": [100, 150, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/scroll-inside-table-cell-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/scroll-inside-table-cell-expected.txt
index 2fcb48c8..09541deb 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/scroll-inside-table-cell-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/scroll-inside-table-cell-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
+          "object": "LayoutTableCell (relative positioned) TD id='cellToScroll' class='relative'",
+          "rect": [312, 112, 454, 469],
+          "reason": "full"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV class='absolute green'",
@@ -23,12 +23,11 @@
         },
         {
           "object": "LayoutTableCell (relative positioned) TD id='cellToScroll' class='relative'",
-          "rect": [312, 112, 454, 469],
-          "reason": "full"
+          "rect": [314, 564, 435, 15],
+          "reason": "scroll"
         },
         {
-          "object": "LayoutTableCell (relative positioned) TD id='cellToScroll' class='relative'",
-          "rect": [314, 564, 435, 15],
+          "object": "HorizontalScrollbar",
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/scroll-relative-table-inside-table-cell-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/scroll-relative-table-inside-table-cell-expected.txt
index 659c55f..3aaa9aa 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/scroll-relative-table-inside-table-cell-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/scroll-relative-table-inside-table-cell-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
+          "object": "LayoutTableCell (relative positioned) TD id='cellToScroll' class='relative'",
+          "rect": [1112, 1312, 454, 469],
+          "reason": "full"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV class='absolute green'",
@@ -23,12 +23,11 @@
         },
         {
           "object": "LayoutTableCell (relative positioned) TD id='cellToScroll' class='relative'",
-          "rect": [1112, 1312, 454, 469],
-          "reason": "full"
+          "rect": [1114, 1764, 435, 15],
+          "reason": "scroll"
         },
         {
-          "object": "LayoutTableCell (relative positioned) TD id='cellToScroll' class='relative'",
-          "rect": [1114, 1764, 435, 15],
+          "object": "HorizontalScrollbar",
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/scroll-stacking-context-backface-visiblity-leaves-traces-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/scroll-stacking-context-backface-visiblity-leaves-traces-expected.txt
index 874b170..c06dc511 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/scroll-stacking-context-backface-visiblity-leaves-traces-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/scroll-stacking-context-backface-visiblity-leaves-traces-expected.txt
@@ -14,22 +14,22 @@
           "paintInvalidations": [
             {
               "object": "LayoutBlockFlow (positioned) DIV id='searchbar'",
-              "rect": [10, 1424, 150, 150],
+              "rect": [10, 1824, 150, 150],
+              "reason": "full"
+            },
+            {
+              "object": "LayoutBlockFlow DIV id='recentlink'",
+              "rect": [10, 1824, 150, 150],
               "reason": "full"
             },
             {
               "object": "LayoutBlockFlow (positioned) DIV id='searchbar'",
-              "rect": [10, 1824, 150, 150],
-              "reason": "full"
-            },
-            {
-              "object": "LayoutBlockFlow DIV id='recentlink'",
               "rect": [10, 1424, 150, 150],
               "reason": "full"
             },
             {
               "object": "LayoutBlockFlow DIV id='recentlink'",
-              "rect": [10, 1824, 150, 150],
+              "rect": [10, 1424, 150, 150],
               "reason": "full"
             }
           ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint-expected.txt
index dc1e522d..4873a11 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV id='container'",
+          "rect": [1, 236, 185, 15],
           "reason": "scroll"
         },
         {
@@ -17,8 +17,7 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [1, 236, 185, 15],
+          "object": "HorizontalScrollbar",
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-invalidation-on-resize-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-invalidation-on-resize-expected.txt
index d5a4fb1..6e51185 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-invalidation-on-resize-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-invalidation-on-resize-expected.txt
@@ -7,28 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollable'",
           "rect": [8, 50, 300, 100],
           "reason": "border box change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollable'",
-          "rect": [8, 135, 85, 15],
-          "reason": "scroll"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='scrollable'",
           "rect": [8, 135, 285, 15],
           "reason": "scroll"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollable'",
-          "rect": [93, 50, 15, 85],
+          "rect": [8, 135, 85, 15],
           "reason": "scroll"
         },
         {
@@ -38,7 +28,7 @@
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollable'",
-          "rect": [93, 135, 15, 15],
+          "rect": [93, 50, 15, 85],
           "reason": "scroll"
         },
         {
@@ -47,8 +37,16 @@
           "reason": "scroll"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV id='scrollable'",
+          "rect": [93, 135, 15, 15],
+          "reason": "scroll"
+        },
+        {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-invalidation-on-resize-with-border-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-invalidation-on-resize-with-border-expected.txt
index 2b24d11..685f04808 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-invalidation-on-resize-with-border-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-invalidation-on-resize-with-border-expected.txt
@@ -7,28 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollable'",
           "rect": [8, 50, 320, 120],
           "reason": "border box change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollable'",
-          "rect": [18, 145, 85, 15],
-          "reason": "scroll"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='scrollable'",
           "rect": [18, 145, 285, 15],
           "reason": "scroll"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollable'",
-          "rect": [103, 60, 15, 85],
+          "rect": [18, 145, 85, 15],
           "reason": "scroll"
         },
         {
@@ -38,7 +28,7 @@
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollable'",
-          "rect": [103, 145, 15, 15],
+          "rect": [103, 60, 15, 85],
           "reason": "scroll"
         },
         {
@@ -47,8 +37,16 @@
           "reason": "scroll"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV id='scrollable'",
+          "rect": [103, 145, 15, 15],
+          "reason": "scroll"
+        },
+        {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-parts-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-parts-expected.txt
index 6a48a326..01a5efb 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-parts-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/scrollbar-parts-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [8, 93, 85, 15],
           "reason": "scroll"
@@ -22,8 +17,11 @@
           "reason": "scroll"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/selection-change-in-iframe-with-relative-parent-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/selection-change-in-iframe-with-relative-parent-expected.txt
index f87d323..3eed901 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/selection-change-in-iframe-with-relative-parent-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/selection-change-in-iframe-with-relative-parent-expected.txt
@@ -7,83 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'Bar'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'Bazz'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'Foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [48, 198, 10, 10],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [18, 208, 10, 10],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [48, 218, 10, 10],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [18, 228, 10, 10],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [58, 238, 10, 10],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
           "object": "LayoutText #text",
-          "rect": [18, 198, 30, 10],
+          "rect": [18, 238, 40, 10],
           "reason": "selection"
         },
         {
@@ -93,7 +18,72 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [18, 238, 40, 10],
+          "rect": [18, 198, 30, 10],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBR BR",
+          "rect": [58, 238, 10, 10],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBR BR",
+          "rect": [48, 218, 10, 10],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBR BR",
+          "rect": [48, 198, 10, 10],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBR BR",
+          "rect": [18, 228, 10, 10],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBR BR",
+          "rect": [18, 208, 10, 10],
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'Bar'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'Bazz'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'Foo'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/shift-relative-positioned-container-with-image-addition-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/shift-relative-positioned-container-with-image-addition-expected.txt
index eb6c5cd..4ed7116 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/shift-relative-positioned-container-with-image-addition-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/shift-relative-positioned-container-with-image-addition-expected.txt
@@ -7,38 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
-          "rect": [8, 86, 769, 641],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
-          "rect": [8, 180, 769, 641],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
-          "rect": [8, 86, 769, 641],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
-          "rect": [8, 180, 769, 641],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [18, 96, 712, 74],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 785, 829],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [10, 88, 728, 90],
+          "object": "LayoutView #document",
+          "rect": [0, 735, 785, 94],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
+          "rect": [8, 180, 769, 641],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
+          "rect": [8, 180, 769, 641],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
+          "rect": [8, 86, 769, 641],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
+          "rect": [8, 86, 769, 641],
           "reason": "location change"
         },
         {
@@ -47,8 +42,23 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutImage IMG",
-          "rect": [58, 136, 489, 537],
+          "object": "LayoutBlockFlow HTML",
+          "rect": [10, 88, 728, 90],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [10, 88, 728, 90],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [10, 88, 728, 90],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [18, 96, 712, 74],
           "reason": "location change"
         },
         {
@@ -57,33 +67,24 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutImage IMG",
+          "rect": [58, 136, 489, 537],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutView #document",
-          "rect": [0, 735, 785, 94],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [10, 88, 728, 90],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [10, 88, 728, 90],
-          "reason": "location change"
+          "reason": "scroll"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/shift-relative-positioned-container-with-image-removal-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/shift-relative-positioned-container-with-image-removal-expected.txt
index bf491e4..3b0ab02 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/shift-relative-positioned-container-with-image-removal-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/shift-relative-positioned-container-with-image-removal-expected.txt
@@ -7,9 +7,34 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 785, 833],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [0, 735, 785, 98],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
+          "rect": [8, 184, 769, 641],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
+          "rect": [8, 184, 769, 641],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
+          "rect": [8, 86, 769, 641],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
+          "rect": [8, 86, 769, 641],
+          "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (anonymous)",
@@ -17,31 +42,6 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
-          "rect": [8, 184, 769, 641],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
-          "rect": [8, 86, 769, 641],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
-          "rect": [8, 184, 769, 641],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
-          "rect": [8, 86, 769, 641],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 785, 833],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutIFrame IFRAME id='iframe'",
           "rect": [8, 86, 732, 94],
           "reason": "layoutObject removal"
@@ -57,28 +57,23 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
+          "object": "InlineBox",
+          "reason": "full"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 735, 785, 98],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "reason": "layoutObject removal"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/stacking-context-lost-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/stacking-context-lost-expected.txt
index 1860c626..aa178c73 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/stacking-context-lost-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/stacking-context-lost-expected.txt
@@ -8,7 +8,6 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (relative positioned) DIV id='inner'",
-          "rect": [0, 0, 0, 0],
           "reason": "layoutObject removal"
         }
       ],
@@ -29,12 +28,12 @@
             {
               "object": "LayoutBlockFlow (relative positioned) DIV id='outer'",
               "rect": [0, 0, 100, 100],
-              "reason": "layer"
+              "reason": "became visible"
             },
             {
               "object": "LayoutBlockFlow (relative positioned) DIV id='outer'",
               "rect": [0, 0, 100, 100],
-              "reason": "became visible"
+              "reason": "layer"
             }
           ]
         }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/static-to-positioned-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/static-to-positioned-expected.txt
index 381a628..6fc43b1 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/static-to-positioned-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/static-to-positioned-expected.txt
@@ -18,12 +18,12 @@
         },
         {
           "object": "LayoutBlockFlow (relative positioned) DIV id='a'",
-          "rect": [8, 78, 100, 100],
+          "rect": [8, 128, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) DIV id='a'",
-          "rect": [8, 128, 100, 100],
+          "rect": [8, 78, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-cell-collapsed-border-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/table-cell-collapsed-border-expected.txt
index de563e0..6c685f39 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-cell-collapsed-border-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-cell-collapsed-border-expected.txt
@@ -7,49 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD id='t1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableCell TD id='t3'",
+          "rect": [220, 260, 122, 110],
+          "reason": "style change"
         },
         {
           "object": "LayoutTableCell TD id='t1'",
@@ -58,23 +18,52 @@
         },
         {
           "object": "LayoutTableCell TD id='t2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD id='t2'",
           "rect": [3, 260, 118, 110],
           "reason": "style change"
         },
         {
-          "object": "LayoutTableCell TD id='t3'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD id='t1'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD id='t2'",
           "reason": "full"
         },
         {
           "object": "LayoutTableCell TD id='t3'",
-          "rect": [220, 260, 122, 110],
-          "reason": "style change"
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-cell-move-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/table-cell-move-expected.txt
index 8308fd6..54028bf 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-cell-move-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-cell-move-expected.txt
@@ -7,8 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 200, 60, 60],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 200, 60, 180],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 200, 60, 180],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 140, 60, 180],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 140, 60, 180],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 320, 60, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 320, 60, 60],
           "reason": "location change"
         },
         {
@@ -17,54 +42,26 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 200, 60, 60],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutTableCell TD",
           "rect": [8, 140, 60, 60],
           "reason": "became visible"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [8, 140, 60, 180],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 200, 60, 180],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 320, 60, 60],
           "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD id='s'",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD id='t'",
-          "rect": [0, 0, 0, 0],
           "reason": "became visible"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 140, 60, 180],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 200, 60, 180],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 320, 60, 60],
-          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-col-background-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/table-col-background-expected.txt
index a8babbc..394cc8dc 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-col-background-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-col-background-expected.txt
@@ -7,14 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableCol COL id='col'",
           "rect": [8, 108, 106, 104],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-col-background-offset-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/table-col-background-offset-expected.txt
index cb32b2e..b0d385fd 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-col-background-offset-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-col-background-offset-expected.txt
@@ -7,14 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableCol COL id='col'",
           "rect": [8, 108, 210, 104],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-outer-border-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/table-outer-border-expected.txt
index d983c69..bdf893aa 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-outer-border-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-outer-border-expected.txt
@@ -18,8 +18,8 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [8, 8, 132, 82],
-          "reason": "layoutObject removal"
+          "rect": [8, 75, 132, 82],
+          "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD",
@@ -28,28 +28,28 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
           "rect": [8, 8, 132, 82],
           "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [8, 75, 132, 82],
+          "rect": [8, 8, 132, 82],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [15, 15, 117, 134],
           "reason": "location change"
         },
         {
+          "object": "LayoutTableSection TBODY",
+          "rect": [15, 15, 117, 134],
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "LayoutTableRow TR",
-          "rect": [15, 15, 117, 67],
-          "reason": "layoutObject removal"
+          "rect": [15, 82, 117, 67],
+          "reason": "location change"
         },
         {
           "object": "LayoutTableRow TR",
@@ -63,18 +63,24 @@
         },
         {
           "object": "LayoutTableRow TR",
-          "rect": [15, 82, 117, 67],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [15, 15, 117, 134],
+          "rect": [15, 15, 117, 67],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [15, 15, 117, 134],
-          "reason": "location change"
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-auto-in-overflow-auto-scrolled-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-auto-in-overflow-auto-scrolled-expected.txt
index 41e5191..a1dfa19 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-auto-in-overflow-auto-scrolled-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-auto-in-overflow-auto-scrolled-expected.txt
@@ -12,36 +12,11 @@
           "reason": "full"
         },
         {
-          "object": "LayoutBlockFlow DIV id='innerDiv'",
-          "rect": [762, 8, 15, 300],
-          "reason": "scroll"
-        },
-        {
           "object": "LayoutTable TABLE",
           "rect": [8, 8, 306, 300],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [10, 8, 302, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [10, 8, 302, 300],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutTableRow TR",
           "rect": [8, 8, 306, 300],
           "reason": "location change"
@@ -57,8 +32,30 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutTableCell TD",
+          "rect": [10, 8, 302, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [10, 8, 302, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='innerDiv'",
+          "rect": [762, 8, 15, 300],
+          "reason": "scroll"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled-expected.txt
index 41e5191..a1dfa19 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled-expected.txt
@@ -12,36 +12,11 @@
           "reason": "full"
         },
         {
-          "object": "LayoutBlockFlow DIV id='innerDiv'",
-          "rect": [762, 8, 15, 300],
-          "reason": "scroll"
-        },
-        {
           "object": "LayoutTable TABLE",
           "rect": [8, 8, 306, 300],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [10, 8, 302, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [10, 8, 302, 300],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutTableRow TR",
           "rect": [8, 8, 306, 300],
           "reason": "location change"
@@ -57,8 +32,30 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutTableCell TD",
+          "rect": [10, 8, 302, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [10, 8, 302, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='innerDiv'",
+          "rect": [762, 8, 15, 300],
+          "reason": "scroll"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-row-bg-change-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/table-row-bg-change-expected.txt
index 2e5d806..d964cbf 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-row-bg-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-row-bg-change-expected.txt
@@ -7,24 +7,21 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableRow TR id='first'",
           "rect": [8, 10, 200, 97],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-row-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/table-row-expected.txt
index 741ddc2..944957d 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-row-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-row-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableRow TR id='target' class='green'",
+          "rect": [8, 10, 106, 100],
+          "reason": "style change"
         },
         {
           "object": "LayoutTableCell TD",
@@ -17,9 +17,8 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableRow TR id='target' class='green'",
-          "rect": [8, 10, 106, 100],
-          "reason": "style change"
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-section-overflow-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/table-section-overflow-expected.txt
index b3e7d4d9..99b1077 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-section-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-section-overflow-expected.txt
@@ -8,52 +8,52 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [33, 8, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
           "rect": [33, 58, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [33, 8, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
           "rect": [33, 58, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [33, 8, 100, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutTable TABLE",
           "rect": [33, 58, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD",
+          "rect": [33, 58, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [33, 58, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [33, 8, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [33, 8, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTable TABLE",
           "rect": [33, 8, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [33, 58, 100, 100],
+          "rect": [33, 8, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [58, 8, 50, 100],
+          "object": "LayoutTableSection TBODY",
+          "rect": [33, 8, 100, 100],
           "reason": "location change"
         },
         {
@@ -62,14 +62,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [33, 8, 100, 100],
+          "object": "LayoutTableRow TR",
+          "rect": [58, 8, 50, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [33, 58, 100, 100],
-          "reason": "location change"
+          "object": "LayoutBlockFlow DIV id='spacer'",
+          "reason": "became visible"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-section-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/table-section-repaint-expected.txt
index 1e6e399..94b55cc 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-section-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-section-repaint-expected.txt
@@ -7,208 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow CAPTION id='caption1' class='blue half'",
-          "rect": [8, 8, 60, 30],
-          "reason": "became invisible"
-        },
-        {
-          "object": "LayoutBlockFlow CAPTION id='caption2' class='zero'",
-          "rect": [8, 188, 60, 30],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='innerDiv'",
-          "rect": [33, 308, 10, 15],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='top' class='blue half'",
-          "rect": [8, 98, 60, 30],
-          "reason": "became invisible"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [8, 376, 60, 15],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [8, 372, 60, 19],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 98, 60, 30],
-          "reason": "became invisible"
-        },
-        {
-          "object": "LayoutTableCell TD class='green half'",
-          "rect": [8, 68, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='green half'",
-          "rect": [8, 38, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='green half'",
-          "rect": [8, 158, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='green half'",
-          "rect": [8, 128, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='green half'",
-          "rect": [8, 188, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='green half'",
-          "rect": [8, 218, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='half'",
-          "rect": [8, 308, 60, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='half'",
-          "rect": [8, 323, 60, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='half'",
-          "rect": [8, 338, 60, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='half'",
-          "rect": [8, 353, 60, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='red half'",
-          "rect": [8, 38, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='red half'",
-          "rect": [8, 8, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='red half'",
-          "rect": [8, 128, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='red half'",
-          "rect": [8, 98, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='red half'",
-          "rect": [8, 218, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD class='red half'",
-          "rect": [8, 248, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 38, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 8, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 68, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 38, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 128, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 98, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 158, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 128, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 188, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 218, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 218, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 248, 60, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [12, 312, 52, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [12, 327, 52, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [12, 342, 52, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [12, 357, 52, 30],
+          "object": "LayoutTableSection TBODY",
+          "rect": [8, 218, 60, 60],
           "reason": "location change"
         },
         {
           "object": "LayoutTableSection TBODY",
-          "rect": [8, 38, 60, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [8, 8, 60, 60],
+          "rect": [8, 188, 60, 60],
           "reason": "location change"
         },
         {
@@ -223,12 +28,187 @@
         },
         {
           "object": "LayoutTableSection TBODY",
-          "rect": [8, 188, 60, 60],
+          "rect": [8, 38, 60, 60],
           "reason": "location change"
         },
         {
           "object": "LayoutTableSection TBODY",
-          "rect": [8, 218, 60, 60],
+          "rect": [8, 8, 60, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='half'",
+          "rect": [8, 353, 60, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='half'",
+          "rect": [8, 338, 60, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='half'",
+          "rect": [8, 323, 60, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='half'",
+          "rect": [8, 308, 60, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='red half'",
+          "rect": [8, 248, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 248, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='green half'",
+          "rect": [8, 218, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='red half'",
+          "rect": [8, 218, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 218, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 218, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow CAPTION id='caption2' class='zero'",
+          "rect": [8, 188, 60, 30],
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutTableCell TD class='green half'",
+          "rect": [8, 188, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 188, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='green half'",
+          "rect": [8, 158, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 158, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='green half'",
+          "rect": [8, 128, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='red half'",
+          "rect": [8, 128, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 128, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 128, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='top' class='blue half'",
+          "rect": [8, 98, 60, 30],
+          "reason": "became invisible"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 98, 60, 30],
+          "reason": "became invisible"
+        },
+        {
+          "object": "LayoutTableCell TD class='red half'",
+          "rect": [8, 98, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 98, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='green half'",
+          "rect": [8, 68, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 68, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='green half'",
+          "rect": [8, 38, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD class='red half'",
+          "rect": [8, 38, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 38, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 38, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow CAPTION id='caption1' class='blue half'",
+          "rect": [8, 8, 60, 30],
+          "reason": "became invisible"
+        },
+        {
+          "object": "LayoutTableCell TD class='red half'",
+          "rect": [8, 8, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 8, 60, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "rect": [8, 372, 60, 19],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "rect": [8, 376, 60, 15],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [12, 327, 52, 60],
           "reason": "location change"
         },
         {
@@ -237,9 +217,29 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [12, 327, 52, 60],
+          "object": "LayoutTableRow TR",
+          "rect": [12, 357, 52, 30],
           "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [12, 342, 52, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [12, 327, 52, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [12, 312, 52, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='innerDiv'",
+          "rect": [33, 308, 10, 15],
+          "reason": "became visible"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-with-padding-row-invalidation-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/table-with-padding-row-invalidation-expected.txt
index d1a598f..d4885f8 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-with-padding-row-invalidation-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-with-padding-row-invalidation-expected.txt
@@ -7,14 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableRow TR",
           "rect": [0, 0, 260, 50],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/text-in-relative-positioned-inline-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/text-in-relative-positioned-inline-expected.txt
index 79094e3..a3a80634 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/text-in-relative-positioned-inline-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/text-in-relative-positioned-inline-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ab'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [108, 8, 684, 100],
           "reason": "invalidate paint rectangle"
@@ -32,8 +22,15 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ab'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/textarea-appearance-none-resize-handle-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/textarea-appearance-none-resize-handle-expected.txt
index 6d9c3cc..a5da695 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/textarea-appearance-none-resize-handle-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/textarea-appearance-none-resize-handle-expected.txt
@@ -13,12 +13,12 @@
         },
         {
           "object": "LayoutTextControl (positioned) TEXTAREA id='textarea'",
-          "rect": [90, 140, 15, 15],
+          "rect": [90, 240, 15, 15],
           "reason": "scroll"
         },
         {
           "object": "LayoutTextControl (positioned) TEXTAREA id='textarea'",
-          "rect": [90, 240, 15, 15],
+          "rect": [90, 140, 15, 15],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/textarea-set-disabled-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/textarea-set-disabled-expected.txt
index ecc23dd..c9b2dfaa 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/textarea-set-disabled-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/textarea-set-disabled-expected.txt
@@ -7,13 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='inner-editor'",
-          "rect": [11, 11, 100, 10],
+          "object": "LayoutTextControl TEXTAREA",
+          "rect": [8, 8, 106, 106],
           "reason": "full"
         },
         {
-          "object": "LayoutTextControl TEXTAREA",
-          "rect": [8, 8, 106, 106],
+          "object": "LayoutBlockFlow DIV id='inner-editor'",
+          "rect": [11, 11, 100, 10],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/transform-disable-layoutstate-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/transform-disable-layoutstate-expected.txt
index 43a5910..20b8ff91 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/transform-disable-layoutstate-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/transform-disable-layoutstate-expected.txt
@@ -8,6 +8,11 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
+          "rect": [58, 152, 500, 49],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
           "rect": [58, 256, 500, 45],
           "reason": "incremental"
         },
@@ -17,11 +22,6 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [58, 152, 500, 49],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [62, 152, 492, 45],
           "reason": "incremental"
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/transform-inline-layered-child-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/transform-inline-layered-child-expected.txt
index dde73d2..c8eca03 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/transform-inline-layered-child-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/transform-inline-layered-child-expected.txt
@@ -7,108 +7,23 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'A B C'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'D E F'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'G H I'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'J K L'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'M N O'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'P Q R'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'S T U'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'V W X'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Y Z'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='box'",
           "rect": [66, 85, 168, 192],
           "reason": "location change"
         },
         {
           "object": "LayoutInline (relative positioned) SPAN id='child'",
-          "rect": [300, 300, 80, 162],
+          "rect": [139, 359, 151, 181],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [139, 359, 151, 181],
           "reason": "location change"
         },
         {
           "object": "LayoutInline (relative positioned) SPAN id='child'",
-          "rect": [139, 359, 151, 181],
+          "rect": [300, 300, 80, 162],
           "reason": "location change"
         },
         {
@@ -118,17 +33,83 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [139, 359, 151, 181],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [147, 85, 1, 1],
           "reason": "location change"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'A B C'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'D E F'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'G H I'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'J K L'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'M N O'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'P Q R'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'S T U'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'V W X'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Y Z'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/transform-rotate-and-remove-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/transform-rotate-and-remove-expected.txt
index c6324c4..a78a72e 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/transform-rotate-and-remove-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/transform-rotate-and-remove-expected.txt
@@ -8,13 +8,13 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV id='rel'",
-          "rect": [20, -64, 196, 214],
-          "reason": "layer"
+          "rect": [8, 8, 220, 70],
+          "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV id='rel'",
-          "rect": [8, 8, 220, 70],
-          "reason": "location change"
+          "rect": [20, -64, 196, 214],
+          "reason": "layer"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/transform-translate-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/transform-translate-expected.txt
index b524fa4..cf33841 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/transform-translate-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/transform-translate-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV id='target'",
-          "rect": [8, 66, 106, 107],
+          "rect": [28, 66, 106, 107],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV id='target'",
-          "rect": [28, 66, 106, 107],
+          "rect": [8, 66, 106, 107],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/vertical-align2-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/vertical-align2-expected.txt
index 794d8e5..d7d8e1e 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/vertical-align2-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/vertical-align2-expected.txt
@@ -7,19 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow BODY",
+          "rect": [0, 0, 800, 246],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -27,9 +17,9 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 800, 246],
-          "reason": "invalidate paint rectangle"
+          "object": "LayoutBlockFlow DIV id='target'",
+          "rect": [200, 146, 100, 100],
+          "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV id='target'",
@@ -37,18 +27,23 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='target'",
-          "rect": [200, 146, 100, 100],
-          "reason": "location change"
+          "object": "InlineBox",
+          "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/vertical-rl-as-paint-container-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/vertical-rl-as-paint-container-expected.txt
index 0c0eea4..ca424247 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/vertical-rl-as-paint-container-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/vertical-rl-as-paint-container-expected.txt
@@ -13,28 +13,24 @@
           "backfaceVisibility": "hidden",
           "paintInvalidations": [
             {
+              "object": "LayoutText #text",
+              "rect": [520, 0, 80, 340],
+              "reason": "style change"
+            },
+            {
               "object": "InlineTextBox 'Lorem ipsum dolor'",
-              "rect": [0, 0, 0, 0],
               "reason": "style change"
             },
             {
               "object": "InlineTextBox 'adipiscing elit.'",
-              "rect": [0, 0, 0, 0],
               "reason": "style change"
             },
             {
               "object": "InlineTextBox 'consectetur'",
-              "rect": [0, 0, 0, 0],
               "reason": "style change"
             },
             {
               "object": "InlineTextBox 'sit amet,'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [520, 0, 80, 340],
               "reason": "style change"
             }
           ]
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/video-mute-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/video-mute-repaint-expected.txt
index c3193b8..6d68584 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/video-mute-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/video-mute-repaint-expected.txt
@@ -24,21 +24,6 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "LayoutBlockFlow DIV id='thumb'",
-                  "rect": [628, 493, 24, 24],
-                  "reason": "location change"
-                },
-                {
-                  "object": "LayoutBlockFlow DIV id='thumb'",
-                  "rect": [570, 493, 24, 24],
-                  "reason": "location change"
-                },
-                {
-                  "object": "LayoutButton INPUT",
-                  "rect": [535, 490, 35, 30],
-                  "reason": "full"
-                },
-                {
                   "object": "LayoutFlexibleBox DIV",
                   "rect": [570, 493, 89, 24],
                   "reason": "forced by layout"
@@ -47,6 +32,21 @@
                   "object": "LayoutSlider INPUT",
                   "rect": [570, 493, 89, 24],
                   "reason": "full"
+                },
+                {
+                  "object": "LayoutButton INPUT",
+                  "rect": [535, 490, 35, 30],
+                  "reason": "full"
+                },
+                {
+                  "object": "LayoutBlockFlow DIV id='thumb'",
+                  "rect": [628, 493, 24, 24],
+                  "reason": "location change"
+                },
+                {
+                  "object": "LayoutBlockFlow DIV id='thumb'",
+                  "rect": [570, 493, 24, 24],
+                  "reason": "location change"
                 }
               ]
             }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/video-unmute-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/video-unmute-repaint-expected.txt
index 880a79f..1ba1d19 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/video-unmute-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/video-unmute-repaint-expected.txt
@@ -24,21 +24,6 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "LayoutBlockFlow DIV id='thumb'",
-                  "rect": [570, 493, 24, 24],
-                  "reason": "location change"
-                },
-                {
-                  "object": "LayoutBlockFlow DIV id='thumb'",
-                  "rect": [599, 493, 24, 24],
-                  "reason": "location change"
-                },
-                {
-                  "object": "LayoutButton INPUT",
-                  "rect": [535, 490, 35, 30],
-                  "reason": "full"
-                },
-                {
                   "object": "LayoutFlexibleBox DIV",
                   "rect": [570, 493, 89, 24],
                   "reason": "forced by layout"
@@ -47,6 +32,21 @@
                   "object": "LayoutSlider INPUT",
                   "rect": [570, 493, 89, 24],
                   "reason": "full"
+                },
+                {
+                  "object": "LayoutButton INPUT",
+                  "rect": [535, 490, 35, 30],
+                  "reason": "full"
+                },
+                {
+                  "object": "LayoutBlockFlow DIV id='thumb'",
+                  "rect": [599, 493, 24, 24],
+                  "reason": "location change"
+                },
+                {
+                  "object": "LayoutBlockFlow DIV id='thumb'",
+                  "rect": [570, 493, 24, 24],
+                  "reason": "location change"
                 }
               ]
             }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/view-background-from-body-2-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/view-background-from-body-2-expected.txt
index 431f19f..2240edf1 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/view-background-from-body-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/view-background-from-body-2-expected.txt
@@ -8,14 +8,14 @@
       "backgroundColor": "#0000FF",
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [50, 50, 700, 500],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 800, 600],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [50, 50, 700, 500],
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-fixed-centered-composited-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-fixed-centered-composited-expected.txt
index 8d31c3c0..df033ae5 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-fixed-centered-composited-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-fixed-centered-composited-expected.txt
@@ -6,14 +6,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 200, 8],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 200, 200, 100],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 200, 8],
+          "reason": "forced by layout"
         }
       ]
     }
@@ -27,9 +27,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 300, 300],
+          "reason": "full"
         },
         {
           "object": "LayoutBlockFlow HTML",
@@ -38,13 +38,12 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [0, 0, 300, 300],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutView #document",
           "rect": [200, 0, 100, 300],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "became visible"
         }
       ]
     }
@@ -58,14 +57,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 300, 8],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 250, 300, 50],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 300, 8],
+          "reason": "forced by layout"
         }
       ]
     }
@@ -79,11 +78,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 300, 8],
           "reason": "forced by layout"
@@ -97,6 +91,10 @@
           "object": "LayoutView #document",
           "rect": [250, 0, 50, 250],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "became visible"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-fixed-centered-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-fixed-centered-expected.txt
index ed06055..5c120b0 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-fixed-centered-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-fixed-centered-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 200, 8],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 200, 300],
           "reason": "full"
@@ -20,6 +15,11 @@
           "object": "LayoutView #document",
           "rect": [0, 200, 200, 100],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 200, 8],
+          "reason": "forced by layout"
         }
       ]
     }
@@ -34,9 +34,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 300, 300],
+          "reason": "full"
         },
         {
           "object": "LayoutBlockFlow HTML",
@@ -45,13 +45,12 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [0, 0, 300, 300],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutView #document",
           "rect": [200, 0, 100, 300],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "became visible"
         }
       ]
     }
@@ -66,11 +65,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 300, 8],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 300, 250],
           "reason": "full"
@@ -79,6 +73,11 @@
           "object": "LayoutView #document",
           "rect": [0, 250, 300, 50],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 300, 8],
+          "reason": "forced by layout"
         }
       ]
     }
@@ -93,11 +92,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 300, 8],
           "reason": "forced by layout"
@@ -111,6 +105,10 @@
           "object": "LayoutView #document",
           "rect": [250, 0, 50, 250],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "became visible"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-generated-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-generated-expected.txt
index ed06055..5c120b0 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-generated-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-generated-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 200, 8],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 200, 300],
           "reason": "full"
@@ -20,6 +15,11 @@
           "object": "LayoutView #document",
           "rect": [0, 200, 200, 100],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 200, 8],
+          "reason": "forced by layout"
         }
       ]
     }
@@ -34,9 +34,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 300, 300],
+          "reason": "full"
         },
         {
           "object": "LayoutBlockFlow HTML",
@@ -45,13 +45,12 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [0, 0, 300, 300],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutView #document",
           "rect": [200, 0, 100, 300],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "became visible"
         }
       ]
     }
@@ -66,11 +65,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 300, 8],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 300, 250],
           "reason": "full"
@@ -79,6 +73,11 @@
           "object": "LayoutView #document",
           "rect": [0, 250, 300, 50],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 300, 8],
+          "reason": "forced by layout"
         }
       ]
     }
@@ -93,11 +92,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 300, 8],
           "reason": "forced by layout"
@@ -111,6 +105,10 @@
           "object": "LayoutView #document",
           "rect": [250, 0, 50, 250],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "became visible"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-non-fixed-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-non-fixed-expected.txt
index b41a6e1..94b6580a 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-non-fixed-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-background-image-non-fixed-expected.txt
@@ -7,14 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 200, 8],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 200, 200, 100],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 200, 8],
+          "reason": "forced by layout"
         }
       ]
     }
@@ -29,9 +29,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 300, 300],
+          "reason": "full"
         },
         {
           "object": "LayoutBlockFlow HTML",
@@ -40,13 +40,12 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [0, 0, 300, 300],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutView #document",
           "rect": [200, 0, 100, 300],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "became visible"
         }
       ]
     }
@@ -61,14 +60,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 300, 8],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 250, 300, 50],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 300, 8],
+          "reason": "forced by layout"
         }
       ]
     }
@@ -83,11 +82,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 300, 8],
           "reason": "forced by layout"
@@ -101,6 +95,10 @@
           "object": "LayoutView #document",
           "rect": [250, 0, 50, 250],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "became visible"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-media-query-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-media-query-expected.txt
index 6a8d982..37b3dec 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-media-query-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-media-query-expected.txt
@@ -8,8 +8,8 @@
       "backgroundColor": "#0000FF",
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutView #document",
+          "rect": [0, 0, 200, 300],
           "reason": "style change"
         },
         {
@@ -18,8 +18,7 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 200, 300],
+          "object": "LayoutBlockFlow BODY",
           "reason": "style change"
         }
       ]
@@ -36,9 +35,9 @@
       "backgroundColor": "#0000FF",
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 300, 300],
+          "reason": "full"
         },
         {
           "object": "LayoutBlockFlow HTML",
@@ -47,13 +46,12 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [0, 0, 300, 300],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutView #document",
           "rect": [200, 0, 100, 300],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "became visible"
         }
       ]
     }
@@ -69,14 +67,14 @@
       "backgroundColor": "#0000FF",
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 300, 8],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 250, 300, 50],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 300, 8],
+          "reason": "forced by layout"
         }
       ]
     }
@@ -92,11 +90,6 @@
       "backgroundColor": "#0000FF",
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 300, 8],
           "reason": "forced by layout"
@@ -110,6 +103,10 @@
           "object": "LayoutView #document",
           "rect": [250, 0, 50, 250],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "became visible"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-percent-html-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-percent-html-expected.txt
index 121842a..e92d26706 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-percent-html-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-percent-html-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 50, 100, 25],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 200, 150],
           "reason": "forced by layout"
@@ -20,6 +15,11 @@
           "object": "LayoutView #document",
           "rect": [0, 200, 200, 100],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [0, 50, 100, 25],
+          "reason": "incremental"
         }
       ]
     }
@@ -34,9 +34,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [100, 0, 50, 75],
-          "reason": "incremental"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 300, 300],
+          "reason": "full"
         },
         {
           "object": "LayoutBlockFlow HTML",
@@ -45,12 +45,12 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [0, 0, 300, 300],
-          "reason": "full"
+          "rect": [200, 0, 100, 300],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [200, 0, 100, 300],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [100, 0, 50, 75],
           "reason": "incremental"
         }
       ]
@@ -66,11 +66,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 62, 150, 13],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 300, 150],
           "reason": "forced by layout"
@@ -79,6 +74,11 @@
           "object": "LayoutView #document",
           "rect": [0, 250, 300, 50],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [0, 62, 150, 13],
+          "reason": "incremental"
         }
       ]
     }
@@ -93,11 +93,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [125, 0, 25, 63],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 300, 125],
           "reason": "forced by layout"
@@ -111,6 +106,11 @@
           "object": "LayoutView #document",
           "rect": [250, 0, 50, 250],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [125, 0, 25, 63],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-percent-width-height-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-percent-width-height-expected.txt
index e1083f0..e928acb2 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-percent-width-height-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-percent-width-height-expected.txt
@@ -7,19 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutView #document",
+          "rect": [0, 200, 200, 100],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) DIV",
           "rect": [0, 100, 100, 50],
           "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
           "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 200, 200, 100],
-          "reason": "incremental"
         }
       ]
     }
@@ -34,16 +33,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [100, 0, 50, 150],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 300, 300],
           "reason": "full"
@@ -52,6 +41,15 @@
           "object": "LayoutView #document",
           "rect": [200, 0, 100, 300],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "rect": [100, 0, 50, 150],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "forced by layout"
         }
       ]
     }
@@ -66,19 +64,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutView #document",
+          "rect": [0, 250, 300, 50],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) DIV",
           "rect": [0, 125, 150, 25],
           "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
           "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 250, 300, 50],
-          "reason": "incremental"
         }
       ]
     }
@@ -93,16 +90,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [125, 0, 25, 125],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 250, 250],
           "reason": "full"
@@ -111,6 +98,15 @@
           "object": "LayoutView #document",
           "rect": [250, 0, 50, 250],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "rect": [125, 0, 25, 125],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "forced by layout"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-positioned-bottom-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-positioned-bottom-expected.txt
index 57bc5b9..e925fcf 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-positioned-bottom-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-positioned-bottom-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [0, 160, 20, 20],
-          "reason": "location change"
+          "object": "LayoutView #document",
+          "rect": [0, 200, 200, 100],
+          "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV",
@@ -17,14 +17,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "rect": [0, 160, 20, 20],
+          "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 200, 200, 100],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow HTML",
+          "reason": "forced by layout"
         }
       ]
     }
@@ -39,11 +38,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 300, 300],
           "reason": "full"
@@ -52,6 +46,10 @@
           "object": "LayoutView #document",
           "rect": [200, 0, 100, 300],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "forced by layout"
         }
       ]
     }
@@ -66,6 +64,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutView #document",
+          "rect": [0, 250, 300, 50],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) DIV",
           "rect": [0, 260, 20, 20],
           "reason": "location change"
@@ -77,13 +80,7 @@
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
           "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 250, 300, 50],
-          "reason": "incremental"
         }
       ]
     }
@@ -98,11 +95,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 250, 250],
           "reason": "full"
@@ -111,6 +103,10 @@
           "object": "LayoutView #document",
           "rect": [250, 0, 50, 250],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "forced by layout"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-positioned-percent-top-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-positioned-percent-top-expected.txt
index b53c05a..7ddd41f 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-positioned-percent-top-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-positioned-percent-top-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [0, 100, 20, 20],
-          "reason": "location change"
+          "object": "LayoutView #document",
+          "rect": [0, 200, 200, 100],
+          "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV",
@@ -17,14 +17,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "rect": [0, 100, 20, 20],
+          "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 200, 200, 100],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow HTML",
+          "reason": "forced by layout"
         }
       ]
     }
@@ -39,11 +38,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 300, 300],
           "reason": "full"
@@ -52,6 +46,10 @@
           "object": "LayoutView #document",
           "rect": [200, 0, 100, 300],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "forced by layout"
         }
       ]
     }
@@ -66,6 +64,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutView #document",
+          "rect": [0, 250, 300, 50],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) DIV",
           "rect": [0, 150, 20, 20],
           "reason": "location change"
@@ -77,13 +80,7 @@
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
           "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 250, 300, 50],
-          "reason": "incremental"
         }
       ]
     }
@@ -98,11 +95,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 250, 250],
           "reason": "full"
@@ -111,6 +103,10 @@
           "object": "LayoutView #document",
           "rect": [250, 0, 50, 250],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "forced by layout"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-viewport-percent-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-viewport-percent-expected.txt
index 89c688a..3115682e 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/window-resize-viewport-percent-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/window-resize-viewport-percent-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [20, 0, 10, 30],
+          "object": "LayoutView #document",
+          "rect": [0, 200, 200, 100],
           "reason": "incremental"
         },
         {
@@ -17,14 +17,13 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
+          "object": "LayoutBlockFlow DIV",
+          "rect": [20, 0, 10, 30],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 200, 200, 100],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow HTML",
+          "reason": "forced by layout"
         }
       ]
     }
@@ -39,11 +38,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 300, 300],
           "reason": "full"
@@ -52,6 +46,10 @@
           "object": "LayoutView #document",
           "rect": [200, 0, 100, 300],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "forced by layout"
         }
       ]
     }
@@ -66,8 +64,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [25, 0, 5, 30],
+          "object": "LayoutView #document",
+          "rect": [0, 250, 300, 50],
           "reason": "incremental"
         },
         {
@@ -76,14 +74,13 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
+          "object": "LayoutBlockFlow DIV",
+          "rect": [25, 0, 5, 30],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 250, 300, 50],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow HTML",
+          "reason": "forced by layout"
         }
       ]
     }
@@ -98,11 +95,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 250, 250],
           "reason": "full"
@@ -111,6 +103,10 @@
           "object": "LayoutView #document",
           "rect": [250, 0, 50, 250],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "forced by layout"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/border-collapse-change-collapse-to-separate-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/border-collapse-change-collapse-to-separate-expected.txt
index 21e41cc..ab3f21f 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/border-collapse-change-collapse-to-separate-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/border-collapse-change-collapse-to-separate-expected.txt
@@ -12,14 +12,29 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableSection TBODY",
+          "rect": [8, 8, 220, 112],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 10, 220, 108],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [9, 9, 209, 105],
+          "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "rect": [118, 10, 108, 108],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [112, 8, 108, 108],
+          "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD",
@@ -33,28 +48,11 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [112, 8, 108, 108],
-          "reason": "location change"
+          "reason": "full"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [118, 10, 108, 108],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [9, 9, 209, 105],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 10, 220, 108],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [8, 8, 220, 112],
-          "reason": "location change"
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/border-collapse-change-separate-to-collapse-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/border-collapse-change-separate-to-collapse-expected.txt
index 20ebf867..041e2262 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/border-collapse-change-separate-to-collapse-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/border-collapse-change-separate-to-collapse-expected.txt
@@ -12,43 +12,8 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [10, 10, 106, 108],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 8, 107, 108],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [118, 10, 108, 108],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [112, 8, 108, 108],
+          "object": "LayoutTableSection TBODY",
+          "rect": [8, 8, 220, 112],
           "reason": "location change"
         },
         {
@@ -62,9 +27,40 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [8, 8, 220, 112],
+          "object": "LayoutTableCell TD",
+          "rect": [118, 10, 108, 108],
           "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [112, 8, 108, 108],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 8, 107, 108],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [10, 10, 106, 108],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-69296-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-69296-expected.txt
index 4687a33a..28773e6 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-69296-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-69296-expected.txt
@@ -7,28 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [20, 20, 54, 51],
+          "object": "LayoutTableRow TR id='row1'",
+          "rect": [20, 20, 159, 50],
           "reason": "style change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [73, 20, 54, 51],
+          "object": "LayoutTableRow TR id='row1'",
+          "rect": [20, 20, 159, 50],
           "reason": "style change"
         },
         {
@@ -38,17 +23,7 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [20, 20, 54, 51],
+          "rect": [126, 20, 54, 51],
           "reason": "style change"
         },
         {
@@ -58,18 +33,42 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [126, 20, 54, 51],
+          "rect": [73, 20, 54, 51],
           "reason": "style change"
         },
         {
-          "object": "LayoutTableRow TR id='row1'",
-          "rect": [20, 20, 159, 50],
+          "object": "LayoutTableCell TD",
+          "rect": [20, 20, 54, 51],
           "reason": "style change"
         },
         {
-          "object": "LayoutTableRow TR id='row1'",
-          "rect": [20, 20, 159, 50],
+          "object": "LayoutTableCell TD",
+          "rect": [20, 20, 54, 51],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-cell-append-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-cell-append-expected.txt
index 038d33d..2e4d936 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-cell-append-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-cell-append-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTable TABLE",
-          "rect": [68, 8, 55, 54],
-          "reason": "incremental"
+          "object": "LayoutTableCell TD",
+          "rect": [63, 8, 60, 54],
+          "reason": "location change"
         },
         {
           "object": "LayoutTable TABLE",
@@ -17,19 +17,17 @@
           "reason": "incremental"
         },
         {
+          "object": "LayoutTable TABLE",
+          "rect": [68, 8, 55, 54],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [63, 8, 60, 54],
-          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-cell-remove-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-cell-remove-expected.txt
index e2fd333..ec9fd71 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-cell-remove-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-cell-remove-expected.txt
@@ -12,34 +12,19 @@
           "reason": "full"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableSection TBODY",
+          "rect": [10, 10, 165, 50],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutTableCell TD id='bar'",
+          "rect": [64, 8, 58, 54],
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [67, 8, 3, 54],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [63, 10, 4, 50],
-          "reason": "incremental"
+          "rect": [63, 8, 58, 54],
+          "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD",
@@ -48,18 +33,29 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [63, 8, 58, 54],
-          "reason": "location change"
+          "rect": [63, 10, 4, 50],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutTableCell TD id='bar'",
-          "rect": [64, 8, 58, 54],
-          "reason": "layoutObject removal"
+          "object": "LayoutTableCell TD",
+          "rect": [67, 8, 3, 54],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [10, 10, 165, 50],
-          "reason": "forced by layout"
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color-expected.txt
index d8753720..152e9184 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-color-expected.txt
@@ -7,19 +7,17 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD id='foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableCell TD id='foo'",
           "rect": [8, 8, 60, 54],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD id='foo'",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt
index 01b3ce6..4360ea8 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt
@@ -8,7 +8,7 @@
       "paintInvalidations": [
         {
           "object": "LayoutTable TABLE",
-          "rect": [117, 8, 4, 54],
+          "rect": [8, 58, 113, 4],
           "reason": "incremental"
         },
         {
@@ -17,23 +17,28 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutTable TABLE",
-          "rect": [116, 8, 5, 54],
-          "reason": "incremental"
+          "object": "LayoutTableRow TR",
+          "rect": [10, 10, 110, 50],
+          "reason": "location change"
         },
         {
-          "object": "LayoutTable TABLE",
-          "rect": [8, 58, 113, 4],
-          "reason": "incremental"
+          "object": "LayoutTableSection TBODY",
+          "rect": [10, 10, 110, 50],
+          "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableRow TR",
+          "rect": [9, 9, 107, 50],
+          "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [62, 8, 55, 52],
+          "object": "LayoutTableSection TBODY",
+          "rect": [9, 9, 107, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD id='foo'",
+          "rect": [8, 8, 59, 54],
           "reason": "location change"
         },
         {
@@ -42,34 +47,27 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD id='foo'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTableCell TD",
+          "rect": [62, 8, 55, 52],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "rect": [116, 8, 5, 54],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "rect": [117, 8, 4, 54],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTableCell TD",
           "reason": "full"
         },
         {
           "object": "LayoutTableCell TD id='foo'",
-          "rect": [8, 8, 59, 54],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [9, 9, 107, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [10, 10, 110, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [9, 9, 107, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [10, 10, 110, 50],
-          "reason": "location change"
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-col-border-color-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-col-border-color-expected.txt
index 09939f0..ec0e6495 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-col-border-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-col-border-color-expected.txt
@@ -7,39 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableCol COL id='col'",
           "rect": [8, 8, 113, 104],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-col-border-width-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-col-border-width-expected.txt
index 58d1e0c..5211fb87 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-col-border-width-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-col-border-width-expected.txt
@@ -7,8 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutTableCol COL id='col'",
+          "rect": [8, 8, 110, 104],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutTable TABLE",
-          "rect": [117, 8, 1, 104],
+          "rect": [8, 108, 110, 4],
           "reason": "incremental"
         },
         {
@@ -17,78 +22,18 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutTable TABLE",
-          "rect": [116, 8, 2, 104],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [8, 108, 110, 4],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 8, 58, 53],
+          "object": "LayoutTableSection TBODY",
+          "rect": [10, 10, 107, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [62, 8, 56, 53],
+          "object": "LayoutTableSection TBODY",
+          "rect": [9, 9, 107, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 58, 56, 52],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 59, 58, 53],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [62, 59, 56, 53],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCol COL id='col'",
-          "rect": [8, 8, 110, 104],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutTableRow TR",
-          "rect": [9, 9, 107, 50],
+          "rect": [10, 60, 107, 50],
           "reason": "location change"
         },
         {
@@ -103,18 +48,67 @@
         },
         {
           "object": "LayoutTableRow TR",
-          "rect": [10, 60, 107, 50],
+          "rect": [9, 9, 107, 50],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [9, 9, 107, 100],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 59, 58, 53],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [10, 10, 107, 100],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 8, 58, 53],
           "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [62, 59, 56, 53],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [62, 8, 56, 53],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 58, 56, 52],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "rect": [116, 8, 2, 104],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "rect": [117, 8, 1, 104],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color-expected.txt
index 14184e8..a5f11ed 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-color-expected.txt
@@ -7,59 +7,49 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableCol COLGROUP id='colgroup'",
           "rect": [8, 8, 166, 102],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width-expected.txt
index 1c11443..76abe15 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-colgroup-border-width-expected.txt
@@ -7,58 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableCol COLGROUP id='colgroup'",
+          "rect": [8, 8, 162, 102],
+          "reason": "style change"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "rect": [61, 7, 57, 53],
+          "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 8, 56, 52],
+          "rect": [7, 58, 56, 53],
           "reason": "bounds change"
         },
         {
@@ -68,7 +28,7 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [61, 7, 57, 53],
+          "rect": [62, 59, 56, 52],
           "reason": "location change"
         },
         {
@@ -78,18 +38,48 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [7, 58, 56, 53],
+          "rect": [8, 8, 56, 52],
           "reason": "bounds change"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [62, 59, 56, 52],
-          "reason": "location change"
+          "reason": "full"
         },
         {
-          "object": "LayoutTableCol COLGROUP id='colgroup'",
-          "rect": [8, 8, 162, 102],
-          "reason": "style change"
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-row-border-color-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-row-border-color-expected.txt
index 98637d25..9338f1d 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-row-border-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-row-border-color-expected.txt
@@ -7,24 +7,21 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableRow TR id='row'",
           "rect": [10, 10, 56, 50],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width-expected.txt
index b3d97546..be9eaa3 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width-expected.txt
@@ -7,31 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTable TABLE",
-          "rect": [8, 110, 56, 1],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [8, 109, 56, 2],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableCell TD",
           "rect": [8, 8, 56, 54],
           "reason": "location change"
@@ -42,34 +17,56 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutTable TABLE",
+          "rect": [8, 109, 56, 2],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "rect": [8, 110, 56, 1],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [9, 9, 54, 100],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutTableRow TR",
           "rect": [9, 59, 54, 50],
           "reason": "location change"
         },
         {
+          "object": "LayoutTableRow TR id='row'",
+          "rect": [9, 9, 54, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [10, 10, 52, 100],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutTableRow TR",
           "rect": [10, 60, 52, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutTableRow TR id='row'",
-          "rect": [9, 9, 54, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR id='row'",
           "rect": [10, 10, 52, 50],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [9, 9, 54, 100],
-          "reason": "location change"
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [10, 10, 52, 100],
-          "reason": "location change"
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-table-border-color-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-table-border-color-expected.txt
index 8193dba..df91699 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-table-border-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-table-border-color-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-table-border-width-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-table-border-width-expected.txt
index a8ef532..ec10b802 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-table-border-width-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-table-border-width-expected.txt
@@ -13,22 +13,22 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
           "rect": [8, 8, 58, 54],
           "reason": "location change"
         },
         {
           "object": "LayoutTableRow TR",
-          "rect": [9, 9, 54, 50],
+          "rect": [10, 10, 54, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [10, 10, 54, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutTableRow TR",
-          "rect": [10, 10, 54, 50],
+          "rect": [9, 9, 54, 50],
           "reason": "location change"
         },
         {
@@ -37,9 +37,8 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [10, 10, 54, 50],
-          "reason": "location change"
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-color-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-color-expected.txt
index beb6a04..b10b9adb 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-color-expected.txt
@@ -7,59 +7,49 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableSection TBODY id='tbody'",
           "rect": [10, 10, 110, 100],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt
index 4764ace..7fb088d 100644
--- a/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt
@@ -8,7 +8,7 @@
       "paintInvalidations": [
         {
           "object": "LayoutTable TABLE",
-          "rect": [117, 8, 2, 153],
+          "rect": [8, 159, 111, 2],
           "reason": "incremental"
         },
         {
@@ -17,118 +17,23 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutTable TABLE",
-          "rect": [115, 8, 4, 153],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [8, 159, 111, 2],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 8, 56, 53],
+          "object": "LayoutTableSection TBODY id='tbody'",
+          "rect": [10, 10, 107, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [62, 8, 57, 53],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 58, 56, 52],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 59, 56, 53],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [63, 59, 54, 51],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [63, 60, 56, 52],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 108, 55, 53],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [63, 108, 56, 53],
+          "object": "LayoutTableSection TBODY id='tbody'",
+          "rect": [9, 9, 107, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutTableRow TR",
-          "rect": [9, 9, 107, 50],
+          "rect": [10, 110, 107, 50],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [10, 10, 107, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [9, 59, 107, 50],
+          "object": "LayoutTableSection TBODY",
+          "rect": [10, 110, 107, 50],
           "reason": "location change"
         },
         {
@@ -138,33 +43,118 @@
         },
         {
           "object": "LayoutTableRow TR",
+          "rect": [10, 10, 107, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [9, 109, 107, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
           "rect": [9, 109, 107, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutTableRow TR",
-          "rect": [10, 110, 107, 50],
+          "rect": [9, 59, 107, 50],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [9, 109, 107, 50],
+          "object": "LayoutTableRow TR",
+          "rect": [9, 9, 107, 50],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY",
-          "rect": [10, 110, 107, 50],
+          "object": "LayoutTableCell TD",
+          "rect": [62, 8, 57, 53],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY id='tbody'",
-          "rect": [9, 9, 107, 100],
+          "object": "LayoutTableCell TD",
+          "rect": [63, 108, 56, 53],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableSection TBODY id='tbody'",
-          "rect": [10, 10, 107, 100],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 59, 56, 53],
           "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 8, 56, 53],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [63, 60, 56, 52],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 58, 56, 52],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 108, 55, 53],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [63, 59, 54, 51],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "rect": [115, 8, 4, 153],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "rect": [117, 8, 2, 153],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xhr-to-blob-in-isolated-world.html b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xhr-to-blob-in-isolated-world.html
index 7bb1c69..aac852c 100644
--- a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xhr-to-blob-in-isolated-world.html
+++ b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xhr-to-blob-in-isolated-world.html
@@ -7,7 +7,7 @@
 } else {
     testRunner.dumpAsText();
     testRunner.setIsolatedWorldSecurityOrigin(1, "chrome-extension://123");
-    testRunner.evaluateScriptInIsolatedWorld(1, "var xhr = new XMLHttpRequest(); xhr.open('GET', 'blob:chrome-extension%3A//123/456789', false); xhr.send();");
+    testRunner.evaluateScriptInIsolatedWorld(1, "var xhr = new XMLHttpRequest(); xhr.open('GET', 'blob:chrome-extension://123/456789', false); xhr.send();");
 }
 </script>
 </body>
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-url-linkify-expected.txt b/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-url-linkify-expected.txt
index c08b8a2d..6948d6d6 100644
--- a/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-url-linkify-expected.txt
+++ b/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-url-linkify-expected.txt
@@ -21,8 +21,8 @@
 http://example.com/foo?bar=http://otherexample.com
 data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCAgMAAACeOuh7AAAABGdBTUEAAK/INwWK6QAAAAlQTFRF////AAAA////fu+PTwAAAAF0Uk5TAEDm2GYAAACHSURBVDjLxdLbDYAgDAVQGELn0R3oEHYf2KGdUqtE46OFRCP3oyTng1xCnWsaD5JRRtCkQ2YmkBkHRXqWJBn0j0TICbrsWVoWhRShCdcGyZCtHxMaUnVPRZ9KSbmBJdsX2vJVnwqRD0Rb4rpzgIbE/AI5NTnWAMvy5l0dXrfuLh5OCe5BmmYGXhTUxlQ5xJ8AAAAASUVORK5CYII=
 javascript:alert('foo');
-blob:http%3A//example.com/f91b7b00-00-0000-0000-3b7c87055d7a
-blob:http%3A//example.com/f91b7b00-00-0000-0000-3b7c87055d7a
+blob:http://example.com/f91b7b00-00-0000-0000-3b7c87055d7a
+blob:http://example.com/f91b7b00-00-0000-0000-3b7c87055d7a
 Link for a URI from CSS document:
 webkit-html-resource-link elements/styles/resources/fromcss.png
 Link for a URI from iframe inline stylesheet:
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-url-linkify.html b/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-url-linkify.html
index 3cb10f0..52ff3d4 100644
--- a/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-url-linkify.html
+++ b/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-url-linkify.html
@@ -33,7 +33,7 @@
     completeURL("http://example.com/", "/foo?bar=http://otherexample.com");
 
     const dataURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCAgMAAACeOuh7AAAABGdBTUEAAK/INwWK6QAAAAlQTFRF////AAAA////fu+PTwAAAAF0Uk5TAEDm2GYAAACHSURBVDjLxdLbDYAgDAVQGELn0R3oEHYf2KGdUqtE46OFRCP3oyTng1xCnWsaD5JRRtCkQ2YmkBkHRXqWJBn0j0TICbrsWVoWhRShCdcGyZCtHxMaUnVPRZ9KSbmBJdsX2vJVnwqRD0Rb4rpzgIbE/AI5NTnWAMvy5l0dXrfuLh5OCe5BmmYGXhTUxlQ5xJ8AAAAASUVORK5CYII=";
-    const blobURL = "blob:http%3A//example.com/f91b7b00-00-0000-0000-3b7c87055d7a";
+    const blobURL = "blob:http://example.com/f91b7b00-00-0000-0000-3b7c87055d7a";
     completeURL("https://example.com/foo", dataURL);
     completeURL("http://example.com/foo", "javascript:alert('foo');");
     completeURL("http://example.com/foo", blobURL);
diff --git a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-bottom-up-times-expected.txt b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-bottom-up-times-expected.txt
index b970ba8..f63785a7 100644
--- a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-bottom-up-times-expected.txt
+++ b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-bottom-up-times-expected.txt
@@ -1,10 +1,10 @@
 Tests bottom-up view self and total time calculation in CPU profiler.
 
-2: (idle) 500 500 500.0 ms500.0 ms(idle)
-1001: A 125 185 125.0 ms25.00 %185.0 ms37.00 %A
-2000: C 100 125 100.0 ms20.00 %125.0 ms25.00 %C
-1002: B 75 140 75.0 ms15.00 %140.0 ms28.00 %B
-3000: D 25 25 25.0 ms5.00 %25.0 ms5.00 %D
+2: (idle) 300 300 300.0 ms30.00 %300.0 ms30.00 %(idle)
+1001: A 250 370 250.0 ms25.00 %370.0 ms37.00 %A
+2000: C 200 250 200.0 ms20.00 %250.0 ms25.00 %C
+1002: B 150 280 150.0 ms15.00 %280.0 ms28.00 %B
+3000: D 50 50 50.0 ms5.00 %50.0 ms5.00 %D
 
 Profiler was disabled.
 
diff --git a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-bottom-up-times.html b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-bottom-up-times.html
index 68dde35a..1baecd5 100644
--- a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-bottom-up-times.html
+++ b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-bottom-up-times.html
@@ -17,7 +17,7 @@
                 "scriptId": "0",
                 "url": "a.js",
                 "lineNumber": 0,
-                "hitCount": 350,
+                "hitCount": 50,
                 "callUID": 1000,
                 "children": [
                 {
@@ -25,7 +25,7 @@
                     "scriptId": "0",
                     "url": "a.js",
                     "lineNumber": 1,
-                    "hitCount": 1000,
+                    "hitCount": 300,
                     "callUID": 2,
                     "children": []
                 },
@@ -89,6 +89,7 @@
                 }
                 ]
             },
+            "idleTime": 0.300,
             "startTime": 0,
             "endTime": 1.000
         }
diff --git a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-calculate-time.html b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-calculate-time.html
index 82d8916..eb45c3a 100644
--- a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-calculate-time.html
+++ b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-calculate-time.html
@@ -93,7 +93,7 @@
         "endTime": 1375445601.070847,
         "samples": [ 1, 2 ]
     };
-    WebInspector.ProfileTreeModel.prototype._calculateTotals(profileAndExpectations.head);
+    WebInspector.CPUProfileDataModel.prototype._calculateTimes(profileAndExpectations);
     function checkExpectations(node)
     {
         if (Math.abs(node.selfTime - node.expectedSelfTime) > 0.0001) {
diff --git a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html
index 545558d..afe26e4 100644
--- a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html
+++ b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html
@@ -809,8 +809,6 @@
     var profile = profileAndExpectations._profile;
     var startTime = profile.startTime * 1000;
     var endTime = profile.endTime * 1000;
-    profile.startTime /= 1000;
-    profile.endTime /= 1000;
     var samplingInterval = (endTime - startTime) / (profile.samples.length - 1);
     profile.timestamps = [];
     for (var i = 0; i < profile.samples.length; ++i)
diff --git a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter-expected.txt b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter-expected.txt
index f6756c0..87ca284 100644
--- a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter-expected.txt
+++ b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter-expected.txt
@@ -1,10 +1,10 @@
 Tests filtering of native nodes.
 
-(root) id:1 total:134330 self:100000 depth:-1
-  holder id:10 total:11330 self:11110 depth:0
-    Aaaaaa id:5 total:20 self:20 depth:1
-    Bbb id:6 total:200 self:200 depth:1
-  C id:7 total:23000 self:22000 depth:0
-    Ccc id:9 total:1000 self:1000 depth:1
+(root) id:1 hits:100000 depth:-1
+  holder id:10 hits:11110 depth:0
+    Aaaaaa id:5 hits:20 depth:1
+    Bbb id:6 hits:200 depth:1
+  C id:7 hits:22000 depth:0
+    Ccc id:9 hits:1000 depth:1
 1, 10, 10, 10, 5, 6, 7, 7, 9, 10
 
diff --git a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter.html b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter.html
index 0356a4d..1955179 100644
--- a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter.html
+++ b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter.html
@@ -104,15 +104,15 @@
             ]
         },
         "idleTime": 202.88199791684747,
-        "startTime": 100000,
-        "endTime":   100000 + 111.110 + 22.220 + 1.000,
+        "startTime": 1375445600.000847,
+        "endTime": 1375445601.070847,
         "samples": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
     };
     var model = new WebInspector.CPUProfileDataModel(profile);
     printTree("", model.profileHead);
     function printTree(padding, node)
     {
-        InspectorTest.addResult(`${padding}${node.functionName} id:${node.id} total:${node.total} self:${node.self} depth:${node.depth}`);
+        InspectorTest.addResult(padding + node.functionName + " id:" + node.id + " hits:" + node.hitCount + " depth:" + node.depth);
         node.children.forEach(printTree.bind(null, padding + "  "));
     }
     InspectorTest.addResult(model.samples.join(", "));
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener-expected.txt b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener-expected.txt
new file mode 100644
index 0000000..f6cf1bd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener-expected.txt
@@ -0,0 +1,7 @@
+Tests that scheduled pause is cleared after processing event with empty handler.
+
+Call stack:
+    0) addEmptyEventListenerAndClick (break-on-empty-event-listener.html:19)
+    1)  (:1)
+
+
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener.html
new file mode 100644
index 0000000..aa6afe09
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener.html
@@ -0,0 +1,50 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script>
+
+function SHOULD_NOT_STOP_HERE()
+{
+    return 239;
+}
+
+function addEmptyEventListenerAndClick()
+{
+    // this event listener won't execute any JS code.
+    var div = document.getElementById("myDiv");
+    div.addEventListener("click", {});
+    div.click();
+    SHOULD_NOT_STOP_HERE();
+    debugger;
+}
+
+var test = function()
+{
+    InspectorTest.startDebuggerTest(step1, true);
+
+    function step1()
+    {
+        var actions = [ "Print" ];
+        InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step2);
+        WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints._setBreakpoint("listener:click");
+        InspectorTest.evaluateInPageWithTimeout("addEmptyEventListenerAndClick()");
+    }
+
+    function step2()
+    {
+        WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints._removeBreakpoint("listener:click");
+        InspectorTest.completeDebuggerTest();
+    }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests that scheduled pause is cleared after processing event with empty handler.
+</p>
+<div id="myDiv"></div>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-set-timeout-with-syntax-error-expected.txt b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-set-timeout-with-syntax-error-expected.txt
new file mode 100644
index 0000000..a5b969c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-set-timeout-with-syntax-error-expected.txt
@@ -0,0 +1,8 @@
+CONSOLE ERROR: line 1: Uncaught SyntaxError: Unexpected identifier
+Tests that scheduled pause is cleared after processing event with empty handler.
+
+Call stack:
+    0) executeSomeCode (break-on-set-timeout-with-syntax-error.html:15)
+    1)  (:1)
+
+
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-set-timeout-with-syntax-error.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-set-timeout-with-syntax-error.html
new file mode 100644
index 0000000..feac2f5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-set-timeout-with-syntax-error.html
@@ -0,0 +1,51 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script src="../../../http/tests/inspector/console-test.js"></script>
+<script>
+
+function runSetTimeoutWithSyntaxError()
+{
+    setTimeout({}, 0);
+}
+
+function executeSomeCode()
+{
+    debugger; // should stop here not earlier
+}
+
+var test = function()
+{
+    InspectorTest.startDebuggerTest(step1, true);
+
+    function step1()
+    {
+        WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints._setBreakpoint("instrumentation:timerFired");
+        InspectorTest.evaluateInPage("runSetTimeoutWithSyntaxError()", InspectorTest.waitUntilMessageReceived.bind(this, step2));
+    }
+
+    function step2()
+    {
+        var actions = [ "Print" ];
+        InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3);
+        InspectorTest.evaluateInPage("executeSomeCode()");
+    }
+
+    function step3()
+    {
+        WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints._removeBreakpoint("instrumentation:timerFired");
+        InspectorTest.completeDebuggerTest();
+    }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests that scheduled pause is cleared after processing event with empty handler.
+</p>
+<div id="myDiv"></div>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/debugger-expand-scope.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/debugger-expand-scope.html
index 0dcee13..5c49899 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/debugger-expand-scope.html
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/debugger-expand-scope.html
@@ -30,19 +30,24 @@
 
 function test()
 {
-    InspectorTest.startDebuggerTest(step1);
+    InspectorTest.startDebuggerTest(onTestStarted);
 
-    function step1()
+    function onTestStarted()
     {
-        InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
+        InspectorTest.runTestFunctionAndWaitUntilPaused(onDebuggerPaused);
     }
 
-    function step2()
+    function onDebuggerPaused()
     {
-        InspectorTest.expandScopeVariablesSidebarPane(step3);
+        InspectorTest.addSniffer(WebInspector.ScopeChainSidebarPane.prototype, "_sidebarPaneUpdatedForTest", onSidebarRendered, true);
     }
 
-    function step3()
+    function onSidebarRendered()
+    {
+        InspectorTest.expandScopeVariablesSidebarPane(onScopeVariablesExpanded);
+    }
+
+    function onScopeVariablesExpanded()
     {
         InspectorTest.addResult("");
         InspectorTest.dumpScopeVariablesSidebarPane();
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-es6-harmony-scopes.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-es6-harmony-scopes.html
index 9c302a8..ffcbfb39 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-es6-harmony-scopes.html
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-es6-harmony-scopes.html
@@ -47,19 +47,24 @@
 
 function test()
 {
-    InspectorTest.startDebuggerTest(step1);
+    InspectorTest.startDebuggerTest(onTestStarted);
 
-    function step1()
+    function onTestStarted()
     {
-        InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
+        InspectorTest.runTestFunctionAndWaitUntilPaused(onDebuggerPaused);
     }
 
-    function step2()
+    function onDebuggerPaused()
     {
-        InspectorTest.expandScopeVariablesSidebarPane(step3);
+        InspectorTest.addSniffer(WebInspector.ScopeChainSidebarPane.prototype, "_sidebarPaneUpdatedForTest", onSidebarRendered, true);
     }
 
-    function step3()
+    function onSidebarRendered()
+    {
+        InspectorTest.expandScopeVariablesSidebarPane(onScopeVariablesExpanded);
+    }
+
+    function onScopeVariablesExpanded()
     {
         InspectorTest.addResult("");
         InspectorTest.dumpScopeVariablesSidebarPane();
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-proto-property.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-proto-property.html
index b7c81b2c..5d26d13 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-proto-property.html
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-proto-property.html
@@ -30,6 +30,11 @@
 
     function step2(callFrames)
     {
+        InspectorTest.addSniffer(WebInspector.ScopeChainSidebarPane.prototype, "_sidebarPaneUpdatedForTest", onSidebarRendered, true);
+    }
+
+    function onSidebarRendered()
+    {
         var localScope = InspectorTest.scopeChainSections()[0].objectTreeElement();
         var properties = [
             localScope, ["o", "__proto__", "__proto__"],
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-minified-variables.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-minified-variables.html
index f68dd975..17c9d35 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-minified-variables.html
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-minified-variables.html
@@ -7,11 +7,15 @@
 function test()
 {
     Runtime.experiments.enableForTest("resolveVariableNames");
-    InspectorTest.startDebuggerTest(() => InspectorTest.runTestFunctionAndWaitUntilPaused());
+    InspectorTest.waitForScriptSource("resolve-variable-names-origin.js", onSourceMapLoaded);
+
+    function onSourceMapLoaded()
+    {
+        InspectorTest.startDebuggerTest(() => InspectorTest.runTestFunctionAndWaitUntilPaused());
+        InspectorTest.addSniffer(WebInspector.SourceMapNamesResolver, "_scopeResolvedForTest", onScopeResolved, true);
+    }
 
     var resolvedScopes = 0;
-    InspectorTest.addSniffer(WebInspector.SourceMapNamesResolver, "_scopeResolvedForTest", onScopeResolved, true);
-
     function onScopeResolved()
     {
         if (++resolvedScopes === 2)
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-resolve-identifiers.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-resolve-identifiers.html
index 4bf2d5d..cef7edd 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-resolve-identifiers.html
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-resolve-identifiers.html
@@ -7,9 +7,13 @@
 function test()
 {
     Runtime.experiments.enableForTest("resolveVariableNames");
-    InspectorTest.startDebuggerTest(() => InspectorTest.runTestFunctionAndWaitUntilPaused());
+    InspectorTest.waitForScriptSource("resolve-identifiers.ts", onSourceMapLoaded);
 
-    InspectorTest.addSniffer(WebInspector.SourceMapNamesResolver, "_scopeResolvedForTest", onAllScopesResolved, true);
+    function onSourceMapLoaded()
+    {
+        InspectorTest.startDebuggerTest(() => InspectorTest.runTestFunctionAndWaitUntilPaused());
+        InspectorTest.addSniffer(WebInspector.SourceMapNamesResolver, "_scopeResolvedForTest", onAllScopesResolved, true);
+    }
 
     function onAllScopesResolved()
     {
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-resolve-this-expected.txt b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-resolve-this-expected.txt
new file mode 100644
index 0000000..b72210af6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-resolve-this-expected.txt
@@ -0,0 +1,14 @@
+CONSOLE MESSAGE: line 7: [object Object]
+Tests resolving this object name via source maps.
+
+Set timer for test function.
+Script execution paused.
+
+Scope variables sidebar pane:
+Local
+    this: Foo
+Closure (Foo.bar)
+WindowGlobal
+    <section collapsed>
+Script execution resumed.
+
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-resolve-this.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-resolve-this.html
new file mode 100644
index 0000000..400889ef
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-scope-resolve-this.html
@@ -0,0 +1,40 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script src="resources/resolve-this.js"></script>
+<script>
+function test()
+{
+    Runtime.experiments.enableForTest("resolveVariableNames");
+
+    InspectorTest.waitForScriptSource("resolve-this.ts", onSourceMapLoaded);
+
+    function onSourceMapLoaded()
+    {
+        InspectorTest.startDebuggerTest(() => InspectorTest.runTestFunctionAndWaitUntilPaused());
+        InspectorTest.addSniffer(WebInspector.ScopeChainSidebarPane.prototype, "_sidebarPaneUpdatedForTest", onSidebarRendered, true);
+    }
+
+    function onSidebarRendered()
+    {
+        InspectorTest.expandScopeVariablesSidebarPane(onSidebarsExpanded);
+    }
+
+    function onSidebarsExpanded()
+    {
+        InspectorTest.addResult("");
+        InspectorTest.dumpScopeVariablesSidebarPane();
+        InspectorTest.completeDebuggerTest();
+    }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests resolving this object name via source maps.
+</p>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/resources/resolve-this.js b/third_party/WebKit/LayoutTests/inspector/sources/debugger/resources/resolve-this.js
new file mode 100644
index 0000000..73fdadaf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/resources/resolve-this.js
@@ -0,0 +1,17 @@
+var Foo = (function () {
+    function Foo() {
+    }
+    Foo.prototype.bar = function () {
+        var _this = this;
+        var test = function () {
+            console.log(_this);
+            debugger;
+        };
+        test();
+    };
+    return Foo;
+}());
+function testFunction() {
+    new Foo().bar();
+}
+//# sourceMappingURL=resolve-this.js.map
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/resources/resolve-this.js.map b/third_party/WebKit/LayoutTests/inspector/sources/debugger/resources/resolve-this.js.map
new file mode 100644
index 0000000..825d824f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/resources/resolve-this.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"resolve-this.js","sourceRoot":"","sources":["resolve-this.ts"],"names":[],"mappings":"AAAA;IACI;IACA,CAAC;IAED,iBAAG,GAAH;QAAA,iBAMC;QALG,IAAI,IAAI,GAAG;YACP,OAAO,CAAC,GAAG,CAAC,KAAI,CAAC,CAAC;YAClB,QAAQ,CAAC;QACb,CAAC,CAAC;QACF,IAAI,EAAE,CAAC;IACX,CAAC;IACL,UAAC;AAAD,CAAC,AAXD,IAWC;AAED;IACI,IAAI,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;AACpB,CAAC"}
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/resources/resolve-this.ts b/third_party/WebKit/LayoutTests/inspector/sources/debugger/resources/resolve-this.ts
new file mode 100644
index 0000000..29b3761
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/resources/resolve-this.ts
@@ -0,0 +1,16 @@
+class Foo {
+    constructor() {
+    }
+
+    bar() {
+        let test = () => {
+            console.log(this);
+            debugger;
+        };
+        test();
+    }
+}
+
+function testFunction() {
+    new Foo().bar();
+}
diff --git a/third_party/WebKit/LayoutTests/intersection-observer/remove-element-expected.txt b/third_party/WebKit/LayoutTests/intersection-observer/remove-element-expected.txt
new file mode 100644
index 0000000..0848d0a5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/intersection-observer/remove-element-expected.txt
@@ -0,0 +1,53 @@
+Test that notifications are sent correctly when root and/or target are removed from the DOM tree.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS entries.length is 0
+PASS entries.length is 1
+PASS entries[0].boundingClientRect.left is 11
+PASS entries[0].boundingClientRect.right is 111
+PASS entries[0].boundingClientRect.top is 161
+PASS entries[0].boundingClientRect.bottom is 261
+PASS entries[0].intersectionRect.left is 11
+PASS entries[0].intersectionRect.right is 111
+PASS entries[0].intersectionRect.top is 161
+PASS entries[0].intersectionRect.bottom is 211
+PASS entries[0].rootBounds.left is 11
+PASS entries[0].rootBounds.right is 111
+PASS entries[0].rootBounds.top is 11
+PASS entries[0].rootBounds.bottom is 211
+PASS entries[0].target is [object HTMLDivElement]
+PASS entries.length is 2
+PASS entries[1].boundingClientRect.left is 0
+PASS entries[1].boundingClientRect.right is 0
+PASS entries[1].boundingClientRect.top is 0
+PASS entries[1].boundingClientRect.bottom is 0
+PASS entries[1].intersectionRect.left is 0
+PASS entries[1].intersectionRect.right is 0
+PASS entries[1].intersectionRect.top is 0
+PASS entries[1].intersectionRect.bottom is 0
+PASS entries[1].rootBounds.left is 0
+PASS entries[1].rootBounds.right is 0
+PASS entries[1].rootBounds.top is 0
+PASS entries[1].rootBounds.bottom is 0
+PASS entries[1].target is [object HTMLDivElement]
+PASS entries.length is 2
+PASS entries.length is 3
+PASS entries[2].boundingClientRect.left is 11
+PASS entries[2].boundingClientRect.right is 111
+PASS entries[2].boundingClientRect.top is 161
+PASS entries[2].boundingClientRect.bottom is 261
+PASS entries[2].intersectionRect.left is 11
+PASS entries[2].intersectionRect.right is 111
+PASS entries[2].intersectionRect.top is 161
+PASS entries[2].intersectionRect.bottom is 211
+PASS entries[2].rootBounds.left is 11
+PASS entries[2].rootBounds.right is 111
+PASS entries[2].rootBounds.top is 11
+PASS entries[2].rootBounds.bottom is 211
+PASS entries[2].target is [object HTMLDivElement]
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/intersection-observer/remove-element.html b/third_party/WebKit/LayoutTests/intersection-observer/remove-element.html
new file mode 100644
index 0000000..df0ed116
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/intersection-observer/remove-element.html
@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<script src="../resources/js-test.js"></script>
+<script src="helper-functions.js"></script>
+<div id="root" style="display: inline-block; overflow-y: scroll; height: 200px; border: 3px solid black">
+  <div style="width:100px; height: 300px;"></div>
+  <div id="target" style="background-color: green; width:100px; height:100px"></div>
+  <div id="afterTarget" style="width:100px; height: 300px;"></div>
+</div>
+
+<script>
+description("Test that notifications are sent correctly when root and/or target are removed from the DOM tree.");
+var target = document.getElementById("target");
+var afterTarget = document.getElementById("afterTarget");
+var root = document.getElementById("root");
+var entries = [];
+var observer = new IntersectionObserver(
+    changes => { entries = entries.concat(changes) },
+    { root: document.getElementById("root") }
+);
+
+onload = function() {
+  observer.observe(target);
+  entries = entries.concat(observer.takeRecords());
+  shouldBeEqualToNumber("entries.length", 0);
+  root.scrollTop = 150;
+  requestAnimationFrame(() => { requestAnimationFrame(step1) });
+}
+
+function step1() {
+  entries = entries.concat(observer.takeRecords());
+  shouldBeEqualToNumber("entries.length", 1);
+  if (entries.length > 0) {
+    shouldBeEqualToNumber("entries[0].boundingClientRect.left", 11);
+    shouldBeEqualToNumber("entries[0].boundingClientRect.right", 111);
+    shouldBeEqualToNumber("entries[0].boundingClientRect.top", 161);
+    shouldBeEqualToNumber("entries[0].boundingClientRect.bottom", 261);
+    shouldBeEqualToNumber("entries[0].intersectionRect.left", 11);
+    shouldBeEqualToNumber("entries[0].intersectionRect.right", 111);
+    shouldBeEqualToNumber("entries[0].intersectionRect.top", 161);
+    shouldBeEqualToNumber("entries[0].intersectionRect.bottom", 211);
+    shouldBeEqualToNumber("entries[0].rootBounds.left", 11);
+    shouldBeEqualToNumber("entries[0].rootBounds.right", 111);
+    shouldBeEqualToNumber("entries[0].rootBounds.top", 11);
+    shouldBeEqualToNumber("entries[0].rootBounds.bottom", 211);
+    shouldEvaluateToSameObject("entries[0].target", target);
+  }
+  root.removeChild(target);
+  requestAnimationFrame(step2);
+}
+
+function step2() {
+  entries = entries.concat(observer.takeRecords());
+  shouldBeEqualToNumber("entries.length", 2);
+  if (entries.length > 1) {
+    shouldBeEqualToNumber("entries[1].boundingClientRect.left", 0);
+    shouldBeEqualToNumber("entries[1].boundingClientRect.right", 0);
+    shouldBeEqualToNumber("entries[1].boundingClientRect.top", 0);
+    shouldBeEqualToNumber("entries[1].boundingClientRect.bottom", 0)
+    shouldBeEqualToNumber("entries[1].intersectionRect.left", 0);
+    shouldBeEqualToNumber("entries[1].intersectionRect.right", 0);
+    shouldBeEqualToNumber("entries[1].intersectionRect.top", 0);
+    shouldBeEqualToNumber("entries[1].intersectionRect.bottom", 0);
+    shouldBeEqualToNumber("entries[1].rootBounds.left", 0);
+    shouldBeEqualToNumber("entries[1].rootBounds.right", 0);
+    shouldBeEqualToNumber("entries[1].rootBounds.top", 0);
+    shouldBeEqualToNumber("entries[1].rootBounds.bottom", 0);
+    shouldEvaluateToSameObject("entries[1].target", target);
+  }
+  root.scrollTop = 0;
+  root.insertBefore(target, afterTarget);
+  requestAnimationFrame(step3);
+}
+
+function step3() {
+  entries = entries.concat(observer.takeRecords());
+  shouldBeEqualToNumber("entries.length", 2);
+  root.scrollTop = 150;
+  requestAnimationFrame(step4);
+}
+
+function step4() {
+  entries = entries.concat(observer.takeRecords());
+  shouldBeEqualToNumber("entries.length", 3);
+  if (entries.length > 2) {
+    shouldBeEqualToNumber("entries[2].boundingClientRect.left", 11);
+    shouldBeEqualToNumber("entries[2].boundingClientRect.right", 111);
+    shouldBeEqualToNumber("entries[2].boundingClientRect.top", 161);
+    shouldBeEqualToNumber("entries[2].boundingClientRect.bottom", 261);
+    shouldBeEqualToNumber("entries[2].intersectionRect.left", 11);
+    shouldBeEqualToNumber("entries[2].intersectionRect.right", 111);
+    shouldBeEqualToNumber("entries[2].intersectionRect.top", 161);
+    shouldBeEqualToNumber("entries[2].intersectionRect.bottom", 211);
+    shouldBeEqualToNumber("entries[2].rootBounds.left", 11);
+    shouldBeEqualToNumber("entries[2].rootBounds.right", 111);
+    shouldBeEqualToNumber("entries[2].rootBounds.top", 11);
+    shouldBeEqualToNumber("entries[2].rootBounds.bottom", 211);
+    shouldEvaluateToSameObject("entries[2].target", target);
+  }
+  finishJSTest();
+}
+</script>
diff --git a/third_party/WebKit/LayoutTests/media/media-audio-no-spurious-repaints-expected.txt b/third_party/WebKit/LayoutTests/media/media-audio-no-spurious-repaints-expected.txt
index f98a895..570e437c 100644
--- a/third_party/WebKit/LayoutTests/media/media-audio-no-spurious-repaints-expected.txt
+++ b/third_party/WebKit/LayoutTests/media/media-audio-no-spurious-repaints-expected.txt
@@ -14,12 +14,12 @@
         {
           "object": "LayoutVideo VIDEO",
           "rect": [8, 8, 300, 150],
-          "reason": "style change"
+          "reason": "full"
         },
         {
           "object": "LayoutVideo VIDEO",
           "rect": [8, 8, 300, 150],
-          "reason": "full"
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background-expected.txt
index 352c2e9c9..88f0af4 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background-expected.txt
@@ -7,13 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='targetImage'",
-          "rect": [8, 8, 50, 50],
+          "object": "LayoutImage IMG id='testTarget'",
+          "rect": [8, 58, 50, 50],
           "reason": "full"
         },
         {
-          "object": "LayoutImage IMG id='testTarget'",
-          "rect": [8, 58, 50, 50],
+          "object": "LayoutBlockFlow DIV id='targetImage'",
+          "rect": [8, 8, 50, 50],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-descendants-when-receiving-paint-layer-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-descendants-when-receiving-paint-layer-expected.txt
index 4ecae92c..9e6b255 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-descendants-when-receiving-paint-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-descendants-when-receiving-paint-layer-expected.txt
@@ -8,12 +8,10 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV id='child'",
-          "rect": [0, 0, 0, 0],
           "reason": "layer"
         },
         {
           "object": "LayoutBlockFlow DIV id='target'",
-          "rect": [0, 0, 0, 0],
           "reason": "layer"
         }
       ],
diff --git a/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-expected.txt b/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-expected.txt
index e99caec..5a5f515 100644
--- a/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-expected.txt
@@ -7,33 +7,28 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [8, 8, 48, 32],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'xx'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox 'y'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 8, 48, 32],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-for-rtl-expected.txt b/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-for-rtl-expected.txt
index 76009eca..72424245 100644
--- a/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-for-rtl-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-for-rtl-expected.txt
@@ -7,33 +7,28 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [-8, 8, 48, 32],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'xx'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox 'y'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [-8, 8, 48, 32],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.txt b/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.txt
index f2109b8..e5fff4b 100644
--- a/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.txt
@@ -7,33 +7,28 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [8, 8, 32, 48],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'xx'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox 'y'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 8, 32, 48],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-for-vertical-rl-expected.txt b/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-for-vertical-rl-expected.txt
index f2109b8..e5fff4b 100644
--- a/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-for-vertical-rl-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-includes-newline-for-vertical-rl-expected.txt
@@ -7,33 +7,28 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [8, 8, 32, 48],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'xx'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox 'y'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 8, 32, 48],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-with-br-includes-newline-expected.txt b/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-with-br-includes-newline-expected.txt
index 4c4a1f5..88058d5d 100644
--- a/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-with-br-includes-newline-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/selection/invalidation-rect-with-br-includes-newline-expected.txt
@@ -7,38 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'b'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
           "object": "LayoutBR BR",
           "rect": [24, 8, 16, 16],
           "reason": "selection"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [8, 24, 16, 16],
           "reason": "selection"
         },
         {
@@ -47,8 +22,27 @@
           "reason": "selection"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [8, 24, 16, 16],
+          "object": "InlineTextBox '\n'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'a'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'b'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='container'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/android/media/media-audio-no-spurious-repaints-expected.txt b/third_party/WebKit/LayoutTests/platform/android/media/media-audio-no-spurious-repaints-expected.txt
new file mode 100644
index 0000000..f98a895
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/media/media-audio-no-spurious-repaints-expected.txt
@@ -0,0 +1,32 @@
+CONSOLE MESSAGE: line 29: FAIL! An unexpected number of repaints occurred; expected 3 to 4 with rects of [8, 8, 300, 150]. Actual layer tree: {
+  "bounds": [800, 600],
+  "children": [
+    {
+      "bounds": [800, 600],
+      "contentsOpaque": true,
+      "drawsContent": true,
+      "paintInvalidations": [
+        {
+          "object": "LayoutVideo VIDEO",
+          "rect": [8, 8, 300, 150],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutVideo VIDEO",
+          "rect": [8, 8, 300, 150],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutVideo VIDEO",
+          "rect": [8, 8, 300, 150],
+          "reason": "full"
+        }
+      ]
+    }
+  ]
+}
+
+ This is a testharness.js-based test.
+FAIL Verifies there are no spurious repaints for audio in a video tag. Cannot read property 'length' of undefined
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/platform/android/svg/transforms/animated-path-inside-transformed-html-expected.txt b/third_party/WebKit/LayoutTests/platform/android/svg/transforms/animated-path-inside-transformed-html-expected.txt
new file mode 100644
index 0000000..c4c99c0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/svg/transforms/animated-path-inside-transformed-html-expected.txt
@@ -0,0 +1,35 @@
+{
+  "bounds": [800, 600],
+  "children": [
+    {
+      "bounds": [800, 600],
+      "contentsOpaque": true,
+      "drawsContent": true,
+      "backgroundColor": "#FFFFFF",
+      "repaintRects": [
+        [355, 128, 103, 101],
+        [352, 397, 98, 99],
+        [246, 106, 121, 28],
+        [246, 106, 121, 28],
+        [203, 336, 123, 44],
+        [203, 336, 123, 44],
+        [187, 106, 310, 390],
+        [111, 85, 101, 100],
+        [90, 208, 98, 98],
+        [90, 85, 277, 249]
+      ],
+      "paintInvalidationClients": [
+        "RootInlineBox",
+        "InlineTextBox 'This is some text'",
+        "LayoutSVGRoot svg",
+        "LayoutSVGRect rect id='rect'",
+        "LayoutSVGText text id='text'",
+        "RootInlineBox",
+        "LayoutSVGInlineText #text",
+        "InlineTextBox 'This is some text'",
+        "LayoutSVGImage image id='image'"
+      ]
+    }
+  ]
+}
+
diff --git a/third_party/WebKit/LayoutTests/platform/android/virtual/gpu-rasterization/fast/images/repaint-subrect-grid-expected.txt b/third_party/WebKit/LayoutTests/platform/android/virtual/gpu-rasterization/fast/images/repaint-subrect-grid-expected.txt
new file mode 100644
index 0000000..682a0f2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/virtual/gpu-rasterization/fast/images/repaint-subrect-grid-expected.txt
@@ -0,0 +1,123 @@
+{
+  "bounds": [800, 600],
+  "children": [
+    {
+      "bounds": [800, 600],
+      "contentsOpaque": true,
+      "drawsContent": true,
+      "paintInvalidations": [
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [-100, -100, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [0, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [0, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [18, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [18, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [36, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [36, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [-10, 18, 20, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [-10, 18, 20, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [9, 18, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [9, 18, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [27, 18, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [27, 18, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [45, 18, 20, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [45, 18, 20, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [0, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [0, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [18, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [18, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [36, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [36, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [-100, -100, 19, 19],
+          "reason": "location change"
+        }
+      ]
+    }
+  ]
+}
+
diff --git a/third_party/WebKit/LayoutTests/platform/linux-precise/svg/custom/use-disappears-after-style-update-expected.txt b/third_party/WebKit/LayoutTests/platform/linux-precise/svg/custom/use-disappears-after-style-update-expected.txt
deleted file mode 100644
index 8536af81..0000000
--- a/third_party/WebKit/LayoutTests/platform/linux-precise/svg/custom/use-disappears-after-style-update-expected.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-{
-  "bounds": [800, 600],
-  "children": [
-    {
-      "bounds": [800, 600],
-      "contentsOpaque": true,
-      "drawsContent": true,
-      "paintInvalidations": [
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [50, 10, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 10, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 10, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 10, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 10, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 10, 30, 30],
-          "reason": "location change"
-        }
-      ]
-    }
-  ]
-}
-
diff --git a/third_party/WebKit/LayoutTests/platform/linux-precise/svg/filters/filter-refresh-expected.txt b/third_party/WebKit/LayoutTests/platform/linux-precise/svg/filters/filter-refresh-expected.txt
deleted file mode 100644
index 1522091..0000000
--- a/third_party/WebKit/LayoutTests/platform/linux-precise/svg/filters/filter-refresh-expected.txt
+++ /dev/null
@@ -1,244 +0,0 @@
-CONSOLE WARNING: SVG's SMIL animations (<animate>, <set>, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead.
-{
-  "bounds": [800, 600],
-  "children": [
-    {
-      "bounds": [800, 600],
-      "contentsOpaque": true,
-      "drawsContent": true,
-      "paintInvalidations": [
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 130, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 170, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [140, 60, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 36, 36],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 10, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate1'",
-          "rect": [140, 60, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate2'",
-          "rect": [140, 140, 36, 36],
-          "reason": "style change"
-        }
-      ]
-    }
-  ]
-}
-
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/text-color-change-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/text-color-change-expected.txt
index 8352a89..5b5e344 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/text-color-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/text-color-change-expected.txt
@@ -7,419 +7,337 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [8, 61, 48, 185],
           "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/text-match-highlight-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/text-match-highlight-expected.txt
index 58f2e2309..e3d7ec9c 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/text-match-highlight-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/text-match-highlight-expected.txt
@@ -7,58 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Can you findme in this boring text?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Findme in a typewriter!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Findme on a path! Did you findme?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 135, 208, 19],
           "reason": "full"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [10, 191, 138, 12],
+          "rect": [20, 224, 202, 72],
           "reason": "full"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [20, 224, 202, 72],
+          "rect": [10, 191, 138, 12],
           "reason": "full"
         },
         {
@@ -68,7 +28,7 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [83, 60, 40, 19],
+          "rect": [244, 60, 40, 19],
           "reason": "full"
         },
         {
@@ -78,13 +38,45 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [244, 60, 40, 19],
+          "rect": [83, 60, 40, 19],
           "reason": "full"
         },
         {
           "object": "LayoutText #text",
           "rect": [47, 80, 40, 19],
           "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Can you findme in this boring text?'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Findme in a typewriter!'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Findme on a path! Did you findme?'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/updating-scrolling-container-and-content-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/updating-scrolling-container-and-content-expected.txt
index 838bd6d..692e4a6 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/updating-scrolling-container-and-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/updating-scrolling-container-and-content-expected.txt
@@ -7,113 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 108, 74, 9],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 118, 74, 19],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 138, 74, 19],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 158, 74, 19],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 178, 74, 19],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 198, 74, 19],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 218, 74, 19],
+          "rect": [8, 258, 74, 19],
           "reason": "style change"
         },
         {
@@ -123,7 +18,32 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 258, 74, 19],
+          "rect": [8, 218, 74, 19],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 198, 74, 19],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 178, 74, 19],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 158, 74, 19],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 138, 74, 19],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 118, 74, 19],
           "reason": "style change"
         },
         {
@@ -133,7 +53,71 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [8, 108, 74, 9],
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/fixed-pos-with-abs-pos-child-scroll-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/fixed-pos-with-abs-pos-child-scroll-expected.txt
index d6502b9..a20746f3 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/fixed-pos-with-abs-pos-child-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/fixed-pos-with-abs-pos-child-scroll-expected.txt
@@ -8,21 +8,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Hi!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Hi!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='abs'",
-          "rect": [425, 480, 360, 90],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='abs'",
           "rect": [425, 980, 360, 90],
           "reason": "location change"
@@ -38,18 +23,8 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='fixed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='fixed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [425, 480, 19, 19],
+          "object": "LayoutBlockFlow (positioned) DIV id='abs'",
+          "rect": [425, 480, 360, 90],
           "reason": "location change"
         },
         {
@@ -68,13 +43,32 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [425, 480, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Hi!'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Hi!'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='fixed'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='fixed'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt
index 31306a3..84fda52 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt
@@ -19,7 +19,6 @@
             },
             {
               "object": "RootInlineBox",
-              "rect": [0, 0, 0, 0],
               "reason": "full"
             }
           ],
@@ -39,7 +38,6 @@
                     },
                     {
                       "object": "RootInlineBox",
-                      "rect": [0, 0, 0, 0],
                       "reason": "full"
                     }
                   ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/should-not-clip-composited-viewport-scrolling-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/should-not-clip-composited-viewport-scrolling-layer-expected.txt
index 76aa151..fc88bcd 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/should-not-clip-composited-viewport-scrolling-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/should-not-clip-composited-viewport-scrolling-layer-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/squashing/iframe-inside-squashed-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/squashing/iframe-inside-squashed-layer-expected.txt
index 7b94968..c76bb07 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/squashing/iframe-inside-squashed-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/squashing/iframe-inside-squashed-layer-expected.txt
@@ -22,24 +22,9 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "InlineTextBox 'test1'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "full"
-                },
-                {
-                  "object": "InlineTextBox 'test1'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "full"
-                },
-                {
-                  "object": "LayoutBlockFlow BODY",
-                  "rect": [8, 508, 284, 20],
-                  "reason": "forced by layout"
-                },
-                {
-                  "object": "LayoutBlockFlow BODY",
-                  "rect": [8, 508, 269, 142],
-                  "reason": "forced by layout"
+                  "object": "LayoutView #document",
+                  "rect": [0, 500, 300, 150],
+                  "reason": "style change"
                 },
                 {
                   "object": "LayoutBlockFlow HTML",
@@ -57,9 +42,14 @@
                   "reason": "full"
                 },
                 {
-                  "object": "LayoutView #document",
-                  "rect": [0, 500, 300, 150],
-                  "reason": "style change"
+                  "object": "LayoutBlockFlow BODY",
+                  "rect": [8, 508, 284, 20],
+                  "reason": "forced by layout"
+                },
+                {
+                  "object": "LayoutBlockFlow BODY",
+                  "rect": [8, 508, 269, 142],
+                  "reason": "forced by layout"
                 },
                 {
                   "object": "LayoutView #document",
@@ -67,23 +57,31 @@
                   "reason": "scroll"
                 },
                 {
+                  "object": "InlineTextBox 'test1'",
+                  "reason": "full"
+                },
+                {
+                  "object": "InlineTextBox 'test1'",
+                  "reason": "full"
+                },
+                {
+                  "object": "LayoutView #document",
+                  "reason": "scroll"
+                },
+                {
                   "object": "RootInlineBox",
-                  "rect": [0, 0, 0, 0],
                   "reason": "full"
                 },
                 {
                   "object": "RootInlineBox",
-                  "rect": [0, 0, 0, 0],
                   "reason": "full"
                 },
                 {
                   "object": "RootInlineBox",
-                  "rect": [0, 0, 0, 0],
                   "reason": "full"
                 },
                 {
                   "object": "VerticalScrollbar",
-                  "rect": [0, 0, 0, 0],
                   "reason": "scroll"
                 }
               ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/squashing/remove-squashed-layer-plus-move-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/squashing/remove-squashed-layer-plus-move-expected.txt
index e7a4b1a..656a85cd 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/squashing/remove-squashed-layer-plus-move-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/squashing/remove-squashed-layer-plus-move-expected.txt
@@ -18,42 +18,36 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [8, 63, 769, 55],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='container'",
           "rect": [8, 8, 769, 109],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutBlockFlow DIV id='container'",
+          "rect": [8, 63, 769, 55],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ],
@@ -71,14 +65,14 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "InlineBox",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "full"
+                  "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
+                  "rect": [0, 110, 1000, 50],
+                  "reason": "layer"
                 },
                 {
-                  "object": "InlineBox",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "full"
+                  "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
+                  "rect": [0, 55, 1000, 50],
+                  "reason": "location change"
                 },
                 {
                   "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
@@ -87,23 +81,21 @@
                 },
                 {
                   "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
-                  "rect": [0, 110, 1000, 50],
-                  "reason": "layer"
-                },
-                {
-                  "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
                   "rect": [0, 0, 100, 50],
                   "reason": "location change"
                 },
                 {
-                  "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
-                  "rect": [0, 55, 1000, 50],
-                  "reason": "location change"
-                },
-                {
                   "object": "LayoutBlockFlow (relative positioned) DIV id='foo' class='mv-tile'",
                   "rect": [0, 0, 100, 50],
                   "reason": "layoutObject removal"
+                },
+                {
+                  "object": "InlineBox",
+                  "reason": "full"
+                },
+                {
+                  "object": "InlineBox",
+                  "reason": "full"
                 }
               ]
             }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/squashing/selection-repaint-with-gaps-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/squashing/selection-repaint-with-gaps-expected.txt
index c5aefe1..3e62876 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/squashing/selection-repaint-with-gaps-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/squashing/selection-repaint-with-gaps-expected.txt
@@ -20,28 +20,24 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
+                  "object": "LayoutText #text",
+                  "rect": [0, 80, 38, 39],
+                  "reason": "selection"
+                },
+                {
                   "object": "InlineTextBox 'ipsum'",
-                  "rect": [0, 0, 0, 0],
                   "reason": "selection"
                 },
                 {
                   "object": "InlineTextBox 'lorem'",
-                  "rect": [0, 0, 0, 0],
                   "reason": "selection"
                 },
                 {
                   "object": "LayoutBlockFlow (positioned) DIV id='item1' class='item'",
-                  "rect": [0, 0, 0, 0],
                   "reason": "selection"
                 },
                 {
                   "object": "LayoutBlockFlow DIV class='inline-block'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutText #text",
-                  "rect": [0, 80, 38, 39],
                   "reason": "selection"
                 }
               ]
@@ -73,46 +69,6 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "InlineTextBox 'ipsum'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "InlineTextBox 'ipsum'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "InlineTextBox 'lorem'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "InlineTextBox 'lorem'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutBlockFlow (positioned) DIV id='item1' class='item'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutBlockFlow (positioned) DIV id='item2' class='item'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutBlockFlow DIV class='inline-block'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutBlockFlow DIV class='inline-block'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
                   "object": "LayoutText #text",
                   "rect": [0, 80, 39, 39],
                   "reason": "selection"
@@ -121,6 +77,38 @@
                   "object": "LayoutText #text",
                   "rect": [0, 160, 38, 39],
                   "reason": "selection"
+                },
+                {
+                  "object": "InlineTextBox 'ipsum'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "InlineTextBox 'ipsum'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "InlineTextBox 'lorem'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "InlineTextBox 'lorem'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "LayoutBlockFlow (positioned) DIV id='item1' class='item'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "LayoutBlockFlow (positioned) DIV id='item2' class='item'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "LayoutBlockFlow DIV class='inline-block'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "LayoutBlockFlow DIV class='inline-block'",
+                  "reason": "selection"
                 }
               ]
             }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/css3/flexbox/repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/css3/flexbox/repaint-expected.txt
index 4ce108c0..23de124c 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/css3/flexbox/repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/css3/flexbox/repaint-expected.txt
@@ -7,123 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet. Nulla'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet. Nulla'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet. Nulla'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Sed congue magna vitae dolor feugiat vehicula. Sed volutpat,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'condimentum leo neque sed nulla. Nunc quis porta elit.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'laoreet dolor id urna eleifend aliquet. Nulla vel dolor ipsum.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula. Sed volutpat, tellus'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula. Sed volutpat,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula. Sed volutpat,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'penatibus et magnis dis parturient montes, nascetur ridiculus mus.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'tellus vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed nulla. Nunc quis porta'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'tellus vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed nulla. Nunc quis porta'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'tellus vel varius vestibulum, purus quam mollis sapien, in'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et magnis dis'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et magnis dis'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et magnis dis'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed nulla. Nunc quis porta elit.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='content'",
-          "rect": [400, 128, 392, 160],
+          "rect": [138, 128, 654, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [138, 128, 654, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [138, 128, 651, 99],
           "reason": "location change"
         },
         {
@@ -132,8 +27,33 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow P",
+          "rect": [148, 128, 644, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [148, 128, 640, 99],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow DIV id='content'",
-          "rect": [138, 128, 654, 100],
+          "rect": [400, 128, 392, 160],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [400, 128, 392, 160],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='left'",
+          "rect": [8, 228, 392, 60],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [400, 128, 389, 159],
           "reason": "location change"
         },
         {
@@ -143,117 +63,159 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='left'",
-          "rect": [8, 228, 392, 60],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='left'",
           "rect": [138, 128, 10, 100],
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [400, 128, 392, 160],
+          "object": "InlineTextBox 'Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet. Nulla'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet. Nulla'",
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [148, 128, 644, 100],
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet. Nulla'",
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [138, 128, 654, 100],
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'",
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [400, 128, 389, 159],
+          "object": "InlineTextBox 'Sed congue magna vitae dolor feugiat vehicula. Sed volutpat,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'condimentum leo neque sed nulla. Nunc quis porta elit.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'",
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [148, 128, 640, 99],
+          "object": "InlineTextBox 'laoreet dolor id urna eleifend aliquet. Nulla vel dolor ipsum.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula. Sed volutpat, tellus'",
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [138, 128, 651, 99],
+          "object": "InlineTextBox 'parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula. Sed volutpat,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula. Sed volutpat,'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'penatibus et magnis dis parturient montes, nascetur ridiculus mus.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'tellus vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed nulla. Nunc quis porta'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'tellus vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed nulla. Nunc quis porta'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'tellus vel varius vestibulum, purus quam mollis sapien, in'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et magnis dis'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et magnis dis'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et magnis dis'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed nulla. Nunc quis porta elit.'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/css3/flexbox/repaint-on-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/css3/flexbox/repaint-on-layout-expected.txt
index 4526512..5685066 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/css3/flexbox/repaint-on-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/css3/flexbox/repaint-on-layout-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (floating) DIV class='state'",
           "rect": [712, 8, 80, 24],
           "reason": "location change"
@@ -22,13 +17,15 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root-expected.txt
index 77a28f8b..68fbd26 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root-expected.txt
@@ -7,23 +7,20 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [184, 201, 19, 160],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'Some text in vertical mode'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='test'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [184, 201, 19, 160],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt
index b830ea60..c0c8e86 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt
@@ -8,198 +8,128 @@
       "backgroundColor": "#FFFFFF",
       "paintInvalidations": [
         {
-          "object": "LayoutHTMLCanvas CANVAS id='copycanvas'",
-          "rect": [427, 515, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='copyimage'",
-          "rect": [285, 515, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='copysolid color'",
-          "rect": [143, 515, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='copyvideo'",
           "rect": [569, 515, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-atopcanvas'",
-          "rect": [427, 415, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-atopimage'",
-          "rect": [285, 415, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-atopsolid color'",
-          "rect": [143, 415, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='destination-atopvideo'",
           "rect": [569, 415, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-incanvas'",
-          "rect": [427, 315, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-inimage'",
-          "rect": [285, 315, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-insolid color'",
-          "rect": [143, 315, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='destination-invideo'",
           "rect": [569, 315, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outcanvas'",
-          "rect": [457, 365, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outimage'",
-          "rect": [315, 365, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outsolid color'",
-          "rect": [173, 365, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outvideo'",
-          "rect": [599, 365, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-overcanvas'",
-          "rect": [457, 265, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-overimage'",
-          "rect": [315, 265, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-oversolid color'",
-          "rect": [173, 265, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-overvideo'",
-          "rect": [599, 265, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lightercanvas'",
-          "rect": [457, 465, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lighterimage'",
-          "rect": [315, 465, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lightersolid color'",
-          "rect": [173, 465, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lightervideo'",
-          "rect": [599, 465, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopcanvas'",
-          "rect": [457, 215, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopimage'",
-          "rect": [315, 215, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopsolid color'",
-          "rect": [173, 215, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopvideo'",
-          "rect": [599, 215, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-incanvas'",
-          "rect": [427, 115, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-inimage'",
-          "rect": [285, 115, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-insolid color'",
-          "rect": [143, 115, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-invideo'",
-          "rect": [569, 115, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-outcanvas'",
-          "rect": [427, 165, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-outimage'",
-          "rect": [285, 165, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-outsolid color'",
-          "rect": [143, 165, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='source-outvideo'",
           "rect": [569, 165, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='source-overcanvas'",
-          "rect": [457, 65, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='source-invideo'",
+          "rect": [569, 115, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='source-overimage'",
-          "rect": [315, 65, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='copycanvas'",
+          "rect": [427, 515, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='source-oversolid color'",
-          "rect": [173, 65, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='destination-atopcanvas'",
+          "rect": [427, 415, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-incanvas'",
+          "rect": [427, 315, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-outcanvas'",
+          "rect": [427, 165, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-incanvas'",
+          "rect": [427, 115, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='copyimage'",
+          "rect": [285, 515, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-atopimage'",
+          "rect": [285, 415, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-inimage'",
+          "rect": [285, 315, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-outimage'",
+          "rect": [285, 165, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-inimage'",
+          "rect": [285, 115, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='copysolid color'",
+          "rect": [143, 515, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-atopsolid color'",
+          "rect": [143, 415, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-insolid color'",
+          "rect": [143, 315, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-outsolid color'",
+          "rect": [143, 165, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-insolid color'",
+          "rect": [143, 115, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='xorvideo'",
+          "rect": [599, 565, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='lightervideo'",
+          "rect": [599, 465, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outvideo'",
+          "rect": [599, 365, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-overvideo'",
+          "rect": [599, 265, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopvideo'",
+          "rect": [599, 215, 50, 40],
           "reason": "invalidate paint rectangle"
         },
         {
@@ -213,18 +143,88 @@
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutHTMLCanvas CANVAS id='lightercanvas'",
+          "rect": [457, 465, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outcanvas'",
+          "rect": [457, 365, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-overcanvas'",
+          "rect": [457, 265, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopcanvas'",
+          "rect": [457, 215, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-overcanvas'",
+          "rect": [457, 65, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
           "object": "LayoutHTMLCanvas CANVAS id='xorimage'",
           "rect": [315, 565, 50, 40],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutHTMLCanvas CANVAS id='lighterimage'",
+          "rect": [315, 465, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outimage'",
+          "rect": [315, 365, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-overimage'",
+          "rect": [315, 265, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopimage'",
+          "rect": [315, 215, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-overimage'",
+          "rect": [315, 65, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
           "object": "LayoutHTMLCanvas CANVAS id='xorsolid color'",
           "rect": [173, 565, 50, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='xorvideo'",
-          "rect": [599, 565, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='lightersolid color'",
+          "rect": [173, 465, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outsolid color'",
+          "rect": [173, 365, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-oversolid color'",
+          "rect": [173, 265, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopsolid color'",
+          "rect": [173, 215, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-oversolid color'",
+          "rect": [173, 65, 50, 40],
           "reason": "invalidate paint rectangle"
         }
       ],
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/layers/scroll-descendant-with-cached-cliprects-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/layers/scroll-descendant-with-cached-cliprects-expected.txt
index 6735828f..51d81d101 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/layers/scroll-descendant-with-cached-cliprects-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/layers/scroll-descendant-with-cached-cliprects-expected.txt
@@ -8,8 +8,23 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollpanel'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
+          "rect": [677, 252, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='container'",
+          "rect": [677, 252, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='ul'",
+          "rect": [677, 252, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [677, 252, 100, 100],
+          "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollpanel'",
@@ -17,54 +32,35 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='container'",
+          "rect": [677, 52, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='ul'",
+          "rect": [677, 52, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [677, 52, 100, 100],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) DIV id='scrollpanel'",
-          "rect": [677, 252, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='container'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) DIV class='container'",
-          "rect": [677, 52, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='container'",
-          "rect": [677, 252, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='ul'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) DIV id='ul'",
-          "rect": [677, 52, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='ul'",
-          "rect": [677, 252, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [677, 52, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [677, 252, 100, 100],
-          "reason": "location change"
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/4776765-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/4776765-expected.txt
index af805a30..894d62d9 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/4776765-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/4776765-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [7, 43, 786, 62],
           "reason": "outline"
@@ -28,17 +18,24 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='div'",
-          "rect": [7, 63, 3, 21],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='div'",
           "rect": [7, 83, 3, 21],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutBlockFlow DIV id='div'",
+          "rect": [7, 63, 3, 21],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/abspos-shift-image-incorrect-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/abspos-shift-image-incorrect-repaint-expected.txt
index 41eb96e..dfbfa9d 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/abspos-shift-image-incorrect-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/abspos-shift-image-incorrect-repaint-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='shiftMe'",
           "rect": [0, 0, 1500, 237],
           "reason": "location change"
@@ -22,6 +17,21 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 800, 56],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
+          "rect": [704, 0, 700, 237],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
+          "rect": [454, 0, 700, 237],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
           "rect": [0, 0, 700, 237],
           "reason": "location change"
@@ -32,29 +42,9 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
-          "rect": [704, 0, 700, 237],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
-          "rect": [454, 0, 700, 237],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 800, 56],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutImage IMG",
-          "rect": [0, 0, 214, 232],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutImage IMG",
-          "rect": [-250, 0, 214, 232],
-          "reason": "location change"
+          "object": "LayoutView #document",
+          "rect": [1250, 0, 250, 585],
+          "reason": "incremental"
         },
         {
           "object": "LayoutImage IMG",
@@ -67,8 +57,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutImage IMG",
+          "rect": [0, 0, 214, 232],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutImage IMG",
+          "rect": [-250, 0, 214, 232],
           "reason": "location change"
         },
         {
@@ -82,33 +77,31 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox '\n'",
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [1250, 0, 250, 585],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/backgroundSizeRepaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/backgroundSizeRepaint-expected.txt
index aa2a5c32..6d297225 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/backgroundSizeRepaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/backgroundSizeRepaint-expected.txt
@@ -8,23 +8,23 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [19, 157, 200, 60],
-          "reason": "border box change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
           "rect": [19, 319, 200, 60],
           "reason": "border box change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='a'",
-          "rect": [29, 197, 180, 20],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow DIV",
+          "rect": [19, 157, 200, 60],
+          "reason": "border box change"
         },
         {
           "object": "LayoutBlockFlow DIV id='b'",
           "rect": [29, 359, 180, 20],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='a'",
+          "rect": [29, 197, 180, 20],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/block-layout-inline-children-float-positioned-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/block-layout-inline-children-float-positioned-expected.txt
index 99b18a48..4157910 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/block-layout-inline-children-float-positioned-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/block-layout-inline-children-float-positioned-expected.txt
@@ -7,43 +7,39 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'the quick brown fox jumped over the lazy dog'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'the quick brown fox jumped over the lazy dog'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN",
-          "rect": [324, 37, 278, 20],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) SPAN",
           "rect": [162, 37, 279, 20],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [324, 37, 278, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [162, 37, 279, 19],
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow (floating) SPAN",
+          "rect": [324, 37, 278, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [324, 37, 278, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'the quick brown fox jumped over the lazy dog'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'the quick brown fox jumped over the lazy dog'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/block-no-inflow-children-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/block-no-inflow-children-expected.txt
index 6652478c..fa411ca1 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/block-no-inflow-children-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/block-no-inflow-children-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'La la la la'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [0, 0, 58, 20],
           "reason": "forced by layout"
@@ -27,13 +17,19 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'La la la la'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/body-background-image-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/body-background-image-expected.txt
index abd1e692..5809219 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/body-background-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/body-background-image-expected.txt
@@ -8,13 +8,13 @@
       "backgroundColor": "#FFFFFF",
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [8, 240, 784, 288],
+          "object": "LayoutView #document",
+          "rect": [0, 0, 800, 600],
           "reason": "style change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 800, 600],
+          "object": "LayoutBlockFlow BODY",
+          "rect": [8, 240, 784, 288],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/border-radius-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/border-radius-repaint-expected.txt
index 4c30346..c2c5f26 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/border-radius-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/border-radius-repaint-expected.txt
@@ -8,7 +8,7 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [19, 151, 200, 20],
+          "rect": [19, 301, 200, 32],
           "reason": "incremental"
         },
         {
@@ -23,18 +23,18 @@
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [19, 301, 200, 32],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='a'",
-          "rect": [33, 137, 172, 20],
+          "rect": [19, 151, 200, 20],
           "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow DIV id='b'",
           "rect": [33, 299, 172, 20],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='a'",
+          "rect": [33, 137, 172, 20],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/border-repaint-glitch-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/border-repaint-glitch-expected.txt
index 25dcc4e..d596a81 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/border-repaint-glitch-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/border-repaint-glitch-expected.txt
@@ -8,7 +8,7 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [19, 255, 200, 20],
+          "rect": [19, 413, 200, 24],
           "reason": "incremental"
         },
         {
@@ -23,18 +23,18 @@
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [19, 413, 200, 24],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='a'",
-          "rect": [33, 241, 172, 20],
+          "rect": [19, 255, 200, 20],
           "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow DIV id='b'",
           "rect": [33, 403, 172, 20],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='a'",
+          "rect": [33, 241, 172, 20],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/box-inline-resize-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/box-inline-resize-expected.txt
index 21a68e7..211261a 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/box-inline-resize-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/box-inline-resize-expected.txt
@@ -7,43 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Chromium'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [8, 88, 32, 67],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutBlockFlow H2",
-          "rect": [8, 107, 111, 28],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow H2",
           "rect": [40, 107, 111, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutImage IMG id='foo'",
-          "rect": [8, 88, 32, 32],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 107, 111, 27],
+          "object": "LayoutBlockFlow H2",
+          "rect": [8, 107, 111, 28],
           "reason": "location change"
         },
         {
@@ -52,23 +22,42 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [8, 107, 111, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (anonymous)",
+          "rect": [8, 88, 32, 67],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutImage IMG id='foo'",
+          "rect": [8, 88, 32, 32],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Chromium'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/box-shadow-dynamic-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/box-shadow-dynamic-expected.txt
index a14df06..054275f 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/box-shadow-dynamic-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/box-shadow-dynamic-expected.txt
@@ -17,13 +17,13 @@
           "reason": "border box change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='a'",
-          "rect": [28, 122, 30, 20],
+          "object": "LayoutBlockFlow DIV id='b'",
+          "rect": [28, 222, 30, 20],
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow DIV id='b'",
-          "rect": [28, 222, 30, 20],
+          "object": "LayoutBlockFlow DIV id='a'",
+          "rect": [28, 122, 30, 20],
           "reason": "incremental"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-3509-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-3509-expected.txt
index 62aface..8c99902 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-3509-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-3509-expected.txt
@@ -7,23 +7,20 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='im'",
           "rect": [11, 131, 100, 100],
           "reason": "forced by layout"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox '\u00A0'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-5699-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-5699-expected.txt
index 390473c..94a9e35 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-5699-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-5699-expected.txt
@@ -7,49 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 136, 784, 67],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow P",
@@ -57,9 +17,14 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 136, 784, 67],
-          "reason": "invalidate paint rectangle"
+          "object": "LayoutText #text",
+          "rect": [8, 184, 32, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 156, 32, 19],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutInline SPAN id='d'",
@@ -68,32 +33,56 @@
         },
         {
           "object": "LayoutText #text",
+          "rect": [8, 150, 4, 19],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
           "rect": [8, 136, 4, 19],
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [8, 150, 4, 19],
+          "object": "InlineFlowBox",
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [8, 156, 32, 19],
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [8, 184, 32, 19],
+          "object": "InlineTextBox '\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBR BR",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-6278-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-6278-expected.txt
index 81a474cd..828b107 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-6278-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-6278-expected.txt
@@ -7,178 +7,152 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Curabitur pretium, quam quis semper'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Curabitur pretium, quam quis semper'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'fringilla orci nibh sed neque. Quisque eu'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'laoreet non, suscipit sed, sapien. Phasellus'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'malesuada, est libero feugiat libero, vel fringilla'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'malesuada, est libero feugiat libero, vel'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'molestie accumsan. Etiam tellus urna, laoreet ac,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'molestie nisl, nec ullamcorper lacus ante'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'molestie nisl, nec ullamcorper lacus ante'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'nulla non nisi molestie accumsan. Etiam'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'orci nibh sed neque. Quisque eu nulla non nisi'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'sem at posuere vehicula, augue nibh'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'suscipit sed, sapien. Phasellus vehicula,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'tellus urna, laoreet ac, laoreet non,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'vehicula, sem at posuere vehicula, augue nibh'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'vulputate pede.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'vulputate pede.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [10, 138, 292, 160],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [10, 138, 242, 180],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
           "rect": [10, 303, 292, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV",
+          "rect": [10, 138, 242, 180],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
           "rect": [10, 323, 242, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD id='col1'",
-          "rect": [252, 138, 50, 215],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTableCell TD id='col1'",
           "rect": [10, 353, 242, 20],
           "reason": "incremental"
         },
         {
-          "object": "LayoutTableCell TD id='target'",
-          "rect": [254, 138, 52, 235],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [250, 138, 49, 159],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [10, 297, 240, 20],
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTableCell TD id='target'",
+          "rect": [254, 138, 52, 235],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD id='col1'",
+          "rect": [252, 138, 50, 215],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [250, 138, 49, 159],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Curabitur pretium, quam quis semper'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Curabitur pretium, quam quis semper'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'fringilla orci nibh sed neque. Quisque eu'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'laoreet non, suscipit sed, sapien. Phasellus'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'malesuada, est libero feugiat libero, vel fringilla'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'malesuada, est libero feugiat libero, vel'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'molestie accumsan. Etiam tellus urna, laoreet ac,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'molestie nisl, nec ullamcorper lacus ante'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'molestie nisl, nec ullamcorper lacus ante'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'nulla non nisi molestie accumsan. Etiam'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'orci nibh sed neque. Quisque eu nulla non nisi'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'sem at posuere vehicula, augue nibh'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'suscipit sed, sapien. Phasellus vehicula,'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'tellus urna, laoreet ac, laoreet non,'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'vehicula, sem at posuere vehicula, augue nibh'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'vulputate pede.'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'vulputate pede.'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-6388-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-6388-expected.txt
index 23374d4..0c1ad561 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-6388-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-6388-expected.txt
@@ -12,13 +12,12 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='outside'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 136, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 136, 100, 100],
+          "object": "LayoutBlockFlow (positioned) DIV id='outside'",
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-6473-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-6473-expected.txt
index ea2137c1..37f75659 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-6473-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-6473-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutBlockFlow DIV id='allcontent'",
+          "rect": [8, 136, 784, 52],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) P",
@@ -22,11 +22,6 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='allcontent'",
-          "rect": [8, 136, 784, 52],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [8, 152, 69, 19],
           "reason": "location change"
@@ -37,8 +32,11 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'SUCCESS'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-7235-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-7235-expected.txt
index 9926671..1ee7a5f8f 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-7235-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/bugzilla-7235-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 156, 784, 19],
           "reason": "invalidate paint rectangle"
@@ -32,8 +17,19 @@
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/caret-with-transformation-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/caret-with-transformation-expected.txt
index 887b367..e9ab1f12 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/caret-with-transformation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/caret-with-transformation-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV id='div'",
-          "rect": [41, 35, 14, 20],
+          "rect": [322, 197, 14, 21],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='div'",
-          "rect": [322, 197, 14, 21],
+          "rect": [41, 35, 14, 20],
           "reason": "invalidate paint rectangle"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/change-text-content-and-background-color-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/change-text-content-and-background-color-expected.txt
index a6729a5..ab8898e 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/change-text-content-and-background-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/change-text-content-and-background-color-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'NEW'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTextControl (positioned) INPUT id='input'",
+          "rect": [8, 8, 244, 68],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
@@ -27,13 +22,15 @@
           "reason": "full"
         },
         {
-          "object": "LayoutTextControl (positioned) INPUT id='input'",
-          "rect": [8, 8, 244, 68],
-          "reason": "style change"
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'NEW'",
+          "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/clip-with-layout-delta-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/clip-with-layout-delta-expected.txt
index 11ece5b..a0dffca 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/clip-with-layout-delta-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/clip-with-layout-delta-expected.txt
@@ -7,31 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) DIV",
           "rect": [108, 8, 100, 100],
           "reason": "background obscuration change"
         },
         {
+          "object": "LayoutBlockFlow SPAN id='t2' class='blue'",
+          "rect": [108, 8, 100, 100],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutBlockFlow DIV",
           "rect": [8, 8, 100, 100],
           "reason": "background obscuration change"
@@ -42,9 +27,9 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow SPAN id='t2' class='blue'",
-          "rect": [108, 8, 100, 100],
-          "reason": "style change"
+          "object": "LayoutText #text",
+          "rect": [108, 8, 4, 19],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
@@ -52,28 +37,35 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [108, 8, 4, 19],
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/clipped-relative-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/clipped-relative-expected.txt
index 62c804e..9a62b8b 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/clipped-relative-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/clipped-relative-expected.txt
@@ -7,38 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='inner'",
           "rect": [8, 74, 204, 232],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='i'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutImage IMG",
           "rect": [8, 74, 204, 232],
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='i'",
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/containing-block-position-change-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/containing-block-position-change-expected.txt
index b5d93b2e..b59b0cf 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/containing-block-position-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/containing-block-position-change-expected.txt
@@ -8,17 +8,16 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [100, 74, 50, 50],
-          "reason": "layer"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV",
           "rect": [158, 74, 50, 50],
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "rect": [100, 74, 50, 50],
+          "reason": "layer"
+        },
+        {
           "object": "LayoutBlockFlow (relative positioned) DIV id='t'",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/control-clip-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/control-clip-expected.txt
index 910f246..6538ae56 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/control-clip-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/control-clip-expected.txt
@@ -7,26 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [9, 87, 198, 16],
           "reason": "invalidate paint rectangle"
@@ -47,13 +27,27 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SUCCESS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SUCCESS'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-2-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-2-expected.txt
index d3bb190..57ba651d 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-2-expected.txt
@@ -13,11 +13,6 @@
         },
         {
           "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
-          "rect": [88, 88, 260, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
           "rect": [348, 88, 260, 100],
           "reason": "location change"
         },
@@ -27,21 +22,6 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [88, 88, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [348, 88, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
-          "rect": [88, 88, 260, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
           "rect": [348, 88, 260, 100],
           "reason": "location change"
@@ -52,13 +32,18 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
+          "rect": [88, 88, 260, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='keep' class='item'",
-          "rect": [88, 88, 100, 100],
+          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
+          "rect": [88, 88, 260, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [348, 88, 100, 100],
           "reason": "location change"
         },
         {
@@ -70,6 +55,20 @@
           "object": "LayoutBlockFlow DIV id='to_remove' class='item'",
           "rect": [348, 88, 100, 100],
           "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [88, 88, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='keep' class='item'",
+          "rect": [88, 88, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-3-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-3-expected.txt
index 11436dfc..5ddb1f5 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-3-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-3-expected.txt
@@ -13,11 +13,6 @@
         },
         {
           "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
-          "rect": [408, 88, 100, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
           "rect": [508, 88, 100, 300],
           "reason": "location change"
         },
@@ -27,8 +22,18 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='abs_pos'",
-          "rect": [408, 208, 100, 100],
+          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
+          "rect": [408, 88, 100, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='keep_inner'",
+          "rect": [508, 88, 100, 220],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='keep_inner'",
+          "rect": [408, 88, 100, 220],
           "reason": "location change"
         },
         {
@@ -37,28 +42,23 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow DIV id='keep_child'",
+          "rect": [508, 208, 100, 100],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) DIV id='remove_child'",
           "rect": [508, 88, 100, 100],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='keep_inner'",
-          "rect": [408, 88, 100, 220],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='keep_inner'",
-          "rect": [508, 88, 100, 220],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='keep_child'",
+          "object": "LayoutBlockFlow (positioned) DIV id='abs_pos'",
           "rect": [408, 208, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV id='keep_child'",
-          "rect": [508, 208, 100, 100],
+          "rect": [408, 208, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-4-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-4-expected.txt
index dc0dae7..de2d511 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-4-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-4-expected.txt
@@ -7,42 +7,17 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [208, 88, 100, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
           "rect": [408, 88, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
-          "rect": [208, 88, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
           "rect": [408, 88, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_outer' class='outer'",
-          "rect": [208, 88, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_outer' class='outer'",
           "rect": [408, 88, 100, 100],
           "reason": "location change"
         },
@@ -58,11 +33,6 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='keep' class='item'",
-          "rect": [208, 88, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='keep' class='item'",
           "rect": [408, 88, 100, 100],
           "reason": "location change"
         },
@@ -72,6 +42,31 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [208, 88, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
+          "rect": [208, 88, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_outer' class='outer'",
+          "rect": [208, 88, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='keep' class='item'",
+          "rect": [208, 88, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [408, 88, 4, 19],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [408, 88, 4, 19],
           "reason": "layoutObject removal"
@@ -82,18 +77,19 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [408, 88, 4, 19],
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-expected.txt
index 01521e12..757a6f1 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/crbug-371640-expected.txt
@@ -7,27 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (floating) DIV id='container'",
           "rect": [88, 88, 520, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
-          "rect": [88, 88, 260, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
           "rect": [348, 88, 260, 100],
           "reason": "location change"
         },
@@ -37,21 +22,6 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [88, 88, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [348, 88, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
-          "rect": [88, 88, 260, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
           "rect": [348, 88, 260, 100],
           "reason": "location change"
@@ -62,8 +32,18 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow DIV id='keep' class='item'",
-          "rect": [88, 88, 100, 100],
+          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
+          "rect": [88, 88, 260, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
+          "rect": [88, 88, 260, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [348, 88, 100, 100],
           "reason": "location change"
         },
         {
@@ -77,6 +57,21 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [88, 88, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='keep' class='item'",
+          "rect": [88, 88, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [348, 88, 4, 19],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [348, 88, 4, 19],
           "reason": "layoutObject removal"
@@ -87,18 +82,19 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [348, 88, 4, 19],
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/details-open-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/details-open-repaint-expected.txt
index 1c40892..a8a4dd09 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/details-open-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/details-open-repaint-expected.txt
@@ -7,16 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='details-content'",
           "rect": [8, 72, 784, 22],
           "reason": "location change"
         },
         {
+          "object": "LayoutTextControl INPUT",
+          "rect": [8, 72, 154, 22],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [10, 75, 150, 16],
           "reason": "location change"
@@ -27,28 +27,27 @@
           "reason": "full"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='inner-editor'",
+          "reason": "scroll"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTextControl INPUT",
-          "rect": [8, 72, 154, 22],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/dynamic-table-vertical-alignment-change-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/dynamic-table-vertical-alignment-change-expected.txt
index 77c6a950..8f3cb1f 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/dynamic-table-vertical-alignment-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/dynamic-table-vertical-alignment-change-expected.txt
@@ -7,24 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (floating) DIV id='target'",
-          "rect": [11, 75, 100, 100],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutTableCell TD",
+          "rect": [10, 77, 102, 99],
+          "reason": "incremental"
         },
         {
           "object": "LayoutTableCell TD",
@@ -32,9 +17,14 @@
           "reason": "incremental"
         },
         {
+          "object": "LayoutBlockFlow (floating) DIV id='target'",
+          "rect": [11, 75, 100, 100],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutTableCell TD",
-          "rect": [10, 77, 102, 99],
-          "reason": "incremental"
+          "rect": [114, 74, 2, 102],
+          "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD",
@@ -42,8 +32,15 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [114, 74, 2, 102],
+          "object": "LayoutBlockFlow DIV",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/float-move-during-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/float-move-during-layout-expected.txt
index 023f84c..5fc2f32a 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/float-move-during-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/float-move-during-layout-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [8, 110, 100, 100],
-          "reason": "location change"
+          "object": "LayoutBlockFlow DIV id='t'",
+          "rect": [8, 110, 784, 100],
+          "reason": "became visible"
         },
         {
           "object": "LayoutBlockFlow (floating) DIV",
@@ -17,14 +17,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='s'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [8, 110, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='t'",
-          "rect": [8, 110, 784, 100],
-          "reason": "became visible"
+          "object": "LayoutBlockFlow DIV id='s'",
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/float-overflow-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/float-overflow-expected.txt
index 2626d16..80bb5c2a6 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/float-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/float-overflow-expected.txt
@@ -7,428 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [11, 360, 778, 28],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [11, 366, 778, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [63, 15, 42, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [63, 21, 42, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [57, 54, 48, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [57, 60, 48, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [57, 93, 42, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [57, 99, 42, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 132, 48, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 138, 48, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 171, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 177, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 210, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 216, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 249, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 255, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [66, 291, 44, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [66, 297, 44, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [58, 330, 52, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [58, 336, 52, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [58, 369, 52, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [58, 375, 52, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 420, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 426, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 459, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 465, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 498, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 504, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 537, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [59, 543, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [63, 15, 54, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [63, 21, 54, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [57, 54, 60, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [57, 60, 60, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [57, 93, 60, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [57, 99, 60, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 132, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 138, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 171, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 177, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 210, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 216, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 249, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 255, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [67, 420, 50, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [67, 426, 50, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 459, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 465, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 498, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 504, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 537, 40, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [59, 543, 40, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [61, 9, 62, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [61, 15, 62, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [57, 48, 66, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [57, 54, 66, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [57, 87, 66, 25],
+          "object": "LayoutBlockFlow (anonymous)",
+          "rect": [11, 360, 778, 28],
           "reason": "location change"
         },
         {
@@ -438,52 +23,22 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 126, 64, 25],
+          "rect": [57, 87, 66, 25],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 132, 64, 25],
+          "rect": [57, 54, 66, 25],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 165, 64, 25],
+          "rect": [57, 48, 66, 25],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 171, 64, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [61, 414, 62, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [61, 420, 62, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 453, 64, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 459, 64, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 492, 64, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 498, 64, 25],
+          "rect": [59, 537, 64, 37],
           "reason": "location change"
         },
         {
@@ -493,87 +48,27 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [59, 537, 64, 37],
+          "rect": [59, 498, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer1' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 492, 64, 25],
+          "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer10' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 459, 64, 25],
+          "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer11' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer12' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer13' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer14' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer2' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer3' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer4' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer5' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer6' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer7' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer8' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer9' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
-          "rect": [59, 204, 64, 25],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 453, 64, 25],
           "reason": "location change"
         },
         {
           "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
-          "rect": [59, 210, 64, 25],
+          "rect": [59, 249, 64, 25],
           "reason": "location change"
         },
         {
@@ -583,167 +78,57 @@
         },
         {
           "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
-          "rect": [59, 249, 64, 25],
+          "rect": [59, 210, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [63, 15, 16, 19],
+          "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
+          "rect": [59, 204, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [63, 21, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 171, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [57, 54, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 165, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [57, 60, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 132, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [57, 93, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [59, 126, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [57, 99, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [61, 15, 62, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 132, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [61, 9, 62, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 138, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [61, 420, 62, 22],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 171, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 177, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 210, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 216, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 249, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 255, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [66, 291, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [66, 297, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [58, 330, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [58, 336, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [58, 369, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [58, 375, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 420, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 426, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 459, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 465, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 498, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 504, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 537, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [59, 543, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [61, 414, 62, 22],
           "reason": "location change"
         },
         {
           "object": "LayoutTable TABLE class='outer'",
-          "rect": [61, 282, 58, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTable TABLE class='outer'",
-          "rect": [61, 288, 58, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTable TABLE class='outer'",
-          "rect": [58, 321, 61, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTable TABLE class='outer'",
-          "rect": [58, 327, 61, 28],
+          "rect": [58, 366, 61, 28],
           "reason": "location change"
         },
         {
@@ -753,87 +138,97 @@
         },
         {
           "object": "LayoutTable TABLE class='outer'",
-          "rect": [58, 366, 61, 28],
+          "rect": [58, 327, 61, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [66, 290, 45, 20],
+          "object": "LayoutTable TABLE class='outer'",
+          "rect": [58, 321, 61, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [66, 296, 45, 20],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [57, 99, 60, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [58, 329, 53, 20],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [57, 93, 60, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [58, 335, 53, 20],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [57, 60, 60, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [58, 368, 53, 20],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [57, 54, 60, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [58, 374, 53, 20],
+          "object": "LayoutTable TABLE class='outer'",
+          "rect": [61, 288, 58, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [67, 290, 46, 12],
+          "object": "LayoutTable TABLE class='outer'",
+          "rect": [61, 282, 58, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [67, 296, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 504, 58, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [67, 329, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 498, 58, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [67, 335, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 465, 58, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [67, 368, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 459, 58, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [67, 374, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 216, 58, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 210, 58, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 177, 58, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 171, 58, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 138, 58, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 132, 58, 19],
           "reason": "location change"
         },
         {
           "object": "LayoutTableSection TBODY",
-          "rect": [66, 288, 47, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [66, 294, 47, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [58, 327, 55, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [58, 333, 55, 22],
+          "rect": [58, 372, 55, 22],
           "reason": "location change"
         },
         {
@@ -843,117 +238,402 @@
         },
         {
           "object": "LayoutTableSection TBODY",
-          "rect": [58, 372, 55, 22],
+          "rect": [58, 333, 55, 22],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [63, 17, 16, 16],
+          "object": "LayoutTableSection TBODY",
+          "rect": [58, 327, 55, 22],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [63, 23, 16, 16],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [63, 21, 54, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [63, 15, 54, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [57, 56, 16, 16],
+          "object": "LayoutTableCell TD",
+          "rect": [58, 374, 53, 20],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [57, 62, 16, 16],
+          "object": "LayoutTableCell TD",
+          "rect": [58, 368, 53, 20],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTableCell TD",
+          "rect": [58, 335, 53, 20],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [57, 95, 16, 16],
+          "object": "LayoutTableCell TD",
+          "rect": [58, 329, 53, 20],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [57, 101, 16, 16],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [58, 375, 52, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [58, 369, 52, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 134, 16, 16],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [58, 336, 52, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 140, 16, 16],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [58, 330, 52, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [67, 426, 50, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 173, 16, 16],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [67, 420, 50, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 179, 16, 16],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 138, 48, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 132, 48, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 212, 16, 16],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [57, 60, 48, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 218, 16, 16],
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [57, 54, 48, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTableSection TBODY",
+          "rect": [66, 294, 47, 22],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 251, 16, 16],
+          "object": "LayoutTableSection TBODY",
+          "rect": [66, 288, 47, 22],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [59, 257, 16, 16],
+          "object": "LayoutTableRow TR",
+          "rect": [67, 374, 46, 12],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTableRow TR",
+          "rect": [67, 368, 46, 12],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [66, 293, 16, 16],
+          "object": "LayoutTableRow TR",
+          "rect": [67, 335, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [67, 329, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [67, 296, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [67, 290, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [66, 296, 45, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [66, 290, 45, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [66, 297, 44, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [66, 291, 44, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [63, 21, 42, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [63, 15, 42, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [57, 99, 42, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [57, 93, 42, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 543, 40, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 537, 40, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 543, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 537, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 504, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 498, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 465, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 459, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 426, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 420, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 255, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 255, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 249, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [59, 249, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 216, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 210, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 177, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [59, 171, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [66, 297, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [66, 291, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [63, 21, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [63, 15, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 543, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 537, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 504, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 498, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 465, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 459, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 426, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 420, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 255, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 249, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 216, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 210, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 177, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 171, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 138, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [59, 132, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [58, 375, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [58, 369, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [58, 336, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [58, 330, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [57, 99, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [57, 93, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [57, 60, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [57, 54, 16, 19],
           "reason": "location change"
         },
         {
@@ -963,92 +643,17 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [66, 293, 16, 16],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [58, 332, 16, 16],
+          "rect": [63, 23, 16, 16],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [58, 338, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [58, 371, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [58, 377, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 422, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 428, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 461, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 467, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 500, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 506, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [59, 539, 16, 16],
+          "rect": [63, 17, 16, 16],
           "reason": "location change"
         },
         {
@@ -1058,92 +663,413 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [59, 539, 16, 16],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [59, 506, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 500, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 467, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 461, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 428, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 422, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 257, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 251, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 218, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 212, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 179, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 173, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 140, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [59, 134, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [58, 377, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [58, 371, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [58, 338, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [58, 332, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [57, 101, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [57, 95, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [57, 62, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [57, 56, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer1' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer10' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer11' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer12' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer13' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer14' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer2' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer3' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer4' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer5' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer6' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer7' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer8' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer9' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/float-overflow-right-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/float-overflow-right-expected.txt
index b231af35..4d2347e 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/float-overflow-right-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/float-overflow-right-expected.txt
@@ -7,428 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [11, 360, 778, 28],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [11, 366, 778, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [695, 15, 42, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [695, 21, 42, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [695, 54, 48, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [695, 60, 48, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 93, 42, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 99, 42, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [693, 132, 48, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [693, 138, 48, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 171, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 177, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 210, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 216, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 249, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 255, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [690, 291, 44, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [690, 297, 44, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [690, 330, 52, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [690, 336, 52, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [690, 369, 52, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [690, 375, 52, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 420, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 426, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 459, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 465, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 498, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 504, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 537, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV",
-          "rect": [701, 543, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 15, 54, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 21, 54, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 54, 60, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 60, 60, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 93, 60, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 99, 60, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 132, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 138, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 171, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 177, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 210, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 216, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [701, 249, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [701, 255, 40, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 420, 50, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 426, 50, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 459, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 465, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 498, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [683, 504, 58, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [701, 537, 40, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [701, 543, 40, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 9, 62, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 15, 62, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 48, 66, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 54, 66, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 87, 66, 25],
+          "object": "LayoutBlockFlow (anonymous)",
+          "rect": [11, 360, 778, 28],
           "reason": "location change"
         },
         {
@@ -438,52 +23,22 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 126, 64, 25],
+          "rect": [677, 87, 66, 25],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 132, 64, 25],
+          "rect": [677, 54, 66, 25],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 165, 64, 25],
+          "rect": [677, 48, 66, 25],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 171, 64, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 414, 62, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 420, 62, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 453, 64, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 459, 64, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 492, 64, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 498, 64, 25],
+          "rect": [677, 537, 64, 37],
           "reason": "location change"
         },
         {
@@ -493,87 +48,27 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='outer'",
-          "rect": [677, 537, 64, 37],
+          "rect": [677, 498, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer1' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 492, 64, 25],
+          "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer10' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 459, 64, 25],
+          "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='spacer11' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer12' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer13' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer14' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer2' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer3' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer4' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer5' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer6' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer7' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer8' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='spacer9' class='spacer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "became visible"
-        },
-        {
-          "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
-          "rect": [677, 204, 64, 25],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 453, 64, 25],
           "reason": "location change"
         },
         {
           "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
-          "rect": [677, 210, 64, 25],
+          "rect": [677, 249, 64, 25],
           "reason": "location change"
         },
         {
@@ -583,167 +78,57 @@
         },
         {
           "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
-          "rect": [677, 249, 64, 25],
+          "rect": [677, 210, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [721, 15, 16, 19],
+          "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'",
+          "rect": [677, 204, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [721, 21, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 171, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [727, 54, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 165, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [727, 60, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 132, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [727, 93, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 126, 64, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [727, 99, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 15, 62, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 132, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 9, 62, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 138, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 420, 62, 22],
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 171, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 177, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 210, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 216, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 249, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 255, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [718, 291, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [718, 297, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [726, 330, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [726, 336, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [726, 369, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [726, 375, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 420, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 426, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 459, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 465, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 498, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 504, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 537, 16, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline SPAN",
-          "rect": [725, 543, 16, 19],
+          "object": "LayoutBlockFlow DIV class='outer'",
+          "rect": [677, 414, 62, 22],
           "reason": "location change"
         },
         {
           "object": "LayoutTable TABLE class='outer'",
-          "rect": [681, 282, 58, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTable TABLE class='outer'",
-          "rect": [681, 288, 58, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTable TABLE class='outer'",
-          "rect": [681, 321, 61, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTable TABLE class='outer'",
-          "rect": [681, 327, 61, 28],
+          "rect": [681, 366, 61, 28],
           "reason": "location change"
         },
         {
@@ -753,87 +138,97 @@
         },
         {
           "object": "LayoutTable TABLE class='outer'",
-          "rect": [681, 366, 61, 28],
+          "rect": [681, 327, 61, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [689, 290, 45, 20],
+          "object": "LayoutTable TABLE class='outer'",
+          "rect": [681, 321, 61, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [689, 296, 45, 20],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 99, 60, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [689, 329, 53, 20],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 93, 60, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [689, 335, 53, 20],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 60, 60, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [689, 368, 53, 20],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 54, 60, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [689, 374, 53, 20],
+          "object": "LayoutTable TABLE class='outer'",
+          "rect": [681, 288, 58, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [687, 290, 46, 12],
+          "object": "LayoutTable TABLE class='outer'",
+          "rect": [681, 282, 58, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [687, 296, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 504, 58, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [687, 329, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 498, 58, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [687, 335, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 465, 58, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [687, 368, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 459, 58, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [687, 374, 46, 12],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 216, 58, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 210, 58, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 177, 58, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 171, 58, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 138, 58, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 132, 58, 19],
           "reason": "location change"
         },
         {
           "object": "LayoutTableSection TBODY",
-          "rect": [687, 288, 47, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [687, 294, 47, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [687, 327, 55, 22],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [687, 333, 55, 22],
+          "rect": [687, 372, 55, 22],
           "reason": "location change"
         },
         {
@@ -843,42 +238,402 @@
         },
         {
           "object": "LayoutTableSection TBODY",
-          "rect": [687, 372, 55, 22],
+          "rect": [687, 333, 55, 22],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [721, 17, 16, 16],
+          "object": "LayoutTableSection TBODY",
+          "rect": [687, 327, 55, 22],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [721, 23, 16, 16],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 21, 54, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 15, 54, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [727, 56, 16, 16],
+          "object": "LayoutTableCell TD",
+          "rect": [689, 374, 53, 20],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [727, 62, 16, 16],
+          "object": "LayoutTableCell TD",
+          "rect": [689, 368, 53, 20],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTableCell TD",
+          "rect": [689, 335, 53, 20],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [727, 95, 16, 16],
+          "object": "LayoutTableCell TD",
+          "rect": [689, 329, 53, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [690, 375, 52, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [690, 369, 52, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [690, 336, 52, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [690, 330, 52, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 426, 50, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [683, 420, 50, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [695, 60, 48, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [695, 54, 48, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [693, 138, 48, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [693, 132, 48, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [687, 294, 47, 22],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [687, 288, 47, 22],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [687, 374, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [687, 368, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [687, 335, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [687, 329, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [687, 296, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [687, 290, 46, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [689, 296, 45, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [689, 290, 45, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [690, 297, 44, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [690, 291, 44, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 99, 42, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 93, 42, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [695, 21, 42, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [695, 15, 42, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [701, 543, 40, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [701, 537, 40, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 543, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 537, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 504, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 498, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 465, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 459, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 426, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 420, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 255, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [701, 255, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 249, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [701, 249, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 216, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 210, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 177, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV",
+          "rect": [701, 171, 40, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [727, 99, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [727, 93, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [727, 60, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [727, 54, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [726, 375, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [726, 369, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [726, 336, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [726, 330, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 543, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 537, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 504, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 498, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 465, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 459, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 426, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 420, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 255, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 249, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 216, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 210, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 177, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 171, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 138, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [725, 132, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [721, 21, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [721, 15, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [718, 297, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline SPAN",
+          "rect": [718, 291, 16, 19],
           "reason": "location change"
         },
         {
@@ -888,102 +643,17 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [727, 95, 16, 16],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [725, 134, 16, 16],
+          "rect": [727, 62, 16, 16],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [725, 140, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 173, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 179, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 212, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 218, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 251, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 257, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [718, 293, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [718, 299, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [726, 332, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [726, 338, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [726, 371, 16, 16],
+          "rect": [727, 56, 16, 16],
           "reason": "location change"
         },
         {
@@ -993,62 +663,17 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [726, 371, 16, 16],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [726, 338, 16, 16],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [725, 422, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 428, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 461, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 467, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 500, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 506, 16, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [725, 539, 16, 16],
+          "rect": [726, 332, 16, 16],
           "reason": "location change"
         },
         {
@@ -1058,92 +683,393 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [725, 539, 16, 16],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [725, 506, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 500, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 467, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 461, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 428, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 422, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 257, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 251, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 218, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 212, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 179, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 173, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 140, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [725, 134, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [721, 23, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [721, 17, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [718, 299, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [718, 293, 16, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer1' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer10' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer11' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer12' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer13' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer14' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer2' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer3' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer4' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer5' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer6' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer7' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer8' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='spacer9' class='spacer'",
+          "reason": "became visible"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/focus-continuations-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/focus-continuations-expected.txt
index 3c7d5373..1115808 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/focus-continuations-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/focus-continuations-expected.txt
@@ -12,11 +12,6 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='container'",
           "rect": [7, 87, 85, 22],
           "reason": "bounds change"
@@ -27,8 +22,11 @@
           "reason": "style change"
         },
         {
+          "object": "LayoutBlockFlow (anonymous)",
+          "reason": "forced by layout"
+        },
+        {
           "object": "LayoutInline SPAN id='outer'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/focus-enable-continuations-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/focus-enable-continuations-expected.txt
index 3c7d5373..207301b 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/focus-enable-continuations-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/focus-enable-continuations-expected.txt
@@ -12,11 +12,6 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='container'",
           "rect": [7, 87, 85, 22],
           "reason": "bounds change"
@@ -27,8 +22,15 @@
           "reason": "style change"
         },
         {
+          "object": "LayoutBlockFlow (anonymous)",
+          "reason": "forced by layout"
+        },
+        {
           "object": "LayoutInline SPAN id='outer'",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutInline SPAN id='outer'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/gradients-em-stops-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/gradients-em-stops-repaint-expected.txt
index bcd3755..3676021 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/gradients-em-stops-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/gradients-em-stops-repaint-expected.txt
@@ -7,38 +7,34 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV class='em-units'",
           "rect": [8, 8, 784, 146],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV class='indicator'",
-          "rect": [345, 19, 240, 20],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='box4' class='box'",
           "rect": [344, 18, 302, 122],
           "reason": "style change"
         },
         {
+          "object": "LayoutBlockFlow DIV class='indicator'",
+          "rect": [345, 19, 240, 20],
+          "reason": "style change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-color-change-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-color-change-expected.txt
index 6083f09d..18d32015 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-color-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-color-change-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutInline SPAN id='target'",
           "rect": [8, 72, 37, 19],
           "reason": "style change"
@@ -25,6 +15,14 @@
           "object": "LayoutText #text",
           "rect": [8, 72, 37, 19],
           "reason": "style change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-focus-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-focus-expected.txt
index 21149be..50d2319f 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-focus-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-focus-expected.txt
@@ -7,33 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutInline A id='link'",
+          "rect": [-1, -1, 802, 234],
           "reason": "style change"
         },
         {
-          "object": "InlineTextBox 'Home'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'crbug.com/424078: ensure inline elements get their outline painted'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [-1, -1, 801, 21],
+          "object": "LayoutBlockFlow HTML",
+          "rect": [-1, -1, 801, 233],
           "reason": "bounds change"
         },
         {
@@ -42,8 +22,8 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [-1, -1, 801, 233],
+          "object": "LayoutBlockFlow (anonymous)",
+          "rect": [-1, -1, 801, 21],
           "reason": "bounds change"
         },
         {
@@ -52,23 +32,35 @@
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutInline A id='link'",
-          "rect": [-1, -1, 802, 234],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
           "reason": "style change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'Home'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'crbug.com/424078: ensure inline elements get their outline painted'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-outline-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-outline-repaint-expected.txt
index d3f50c2..60aa84e 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-outline-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-outline-repaint-expected.txt
@@ -7,543 +7,439 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "outline"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "outline"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor sit amet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor sit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor sit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [5, 153, 103, 45],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [43, 174, 3, 22],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutInline SPAN id='test'",
           "rect": [5, 153, 92, 45],
           "reason": "outline"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [8, 156, 86, 39],
           "reason": "full"
         },
         {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [43, 174, 3, 22],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "outline"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "outline"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor sit amet'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor sit'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor sit'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-style-change-in-scrolled-view-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-style-change-in-scrolled-view-expected.txt
index ea775a3..f9335c278 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-style-change-in-scrolled-view-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/inline-style-change-in-scrolled-view-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Text Text Text Text Text Text Text Text Text Text Text Text Text'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [0, 320, 385, 19],
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 320, 385, 19],
+          "object": "InlineTextBox 'Text Text Text Text Text Text Text Text Text Text Text Text Text'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/invalidation-after-opacity-change-subtree-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/invalidation-after-opacity-change-subtree-expected.txt
index e35ea74..a952499 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/invalidation-after-opacity-change-subtree-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/invalidation-after-opacity-change-subtree-expected.txt
@@ -7,43 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'This test checks that switching opacity'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "InlineTextBox 'This test checks that switching opacity'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'This text should be visible in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "InlineTextBox 'This text should be visible in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'invalidates the full subtree.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "InlineTextBox 'invalidates the full subtree.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'output.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "InlineTextBox 'output.'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (positioned) DIV id='absolute'",
+          "rect": [8, 2000, 777, 350],
           "reason": "style change"
         },
         {
@@ -52,24 +17,9 @@
           "reason": "layer"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='absolute'",
-          "rect": [8, 2000, 777, 350],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 2046, 777, 107],
-          "reason": "layer"
+          "rect": [8, 2196, 777, 107],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow P",
@@ -83,7 +33,12 @@
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 2196, 777, 107],
+          "rect": [8, 2046, 777, 107],
+          "reason": "layer"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 2046, 768, 107],
           "reason": "style change"
         },
         {
@@ -94,26 +49,59 @@
         {
           "object": "LayoutText #text",
           "rect": [8, 2196, 639, 107],
-          "reason": "layer"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 2046, 768, 107],
           "reason": "style change"
         },
         {
           "object": "LayoutText #text",
           "rect": [8, 2196, 639, 107],
+          "reason": "layer"
+        },
+        {
+          "object": "InlineTextBox 'This test checks that switching opacity'",
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'This test checks that switching opacity'",
+          "reason": "layer"
+        },
+        {
+          "object": "InlineTextBox 'This text should be visible in the'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'This text should be visible in the'",
+          "reason": "layer"
+        },
+        {
+          "object": "InlineTextBox 'invalidates the full subtree.'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'invalidates the full subtree.'",
+          "reason": "layer"
+        },
+        {
+          "object": "InlineTextBox 'output.'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'output.'",
+          "reason": "layer"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='container'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='container'",
+          "reason": "layer"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/japanese-rl-selection-clear-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/japanese-rl-selection-clear-expected.txt
index 1a85d12..0e3b099 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/japanese-rl-selection-clear-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/japanese-rl-selection-clear-expected.txt
@@ -7,78 +7,64 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [442, 123, 335, 404],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox '\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3059\u3002\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [442, 123, 335, 404],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/japanese-rl-selection-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/japanese-rl-selection-repaint-expected.txt
index 19cdc57..60d7e6a 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/japanese-rl-selection-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/japanese-rl-selection-repaint-expected.txt
@@ -7,68 +7,56 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [538, 23, 239, 556],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox '\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B\u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u306A\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4\u30C8\u30EB'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [538, 23, 239, 556],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-relative-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-relative-expected.txt
index 18843e7..cdedc55 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-relative-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-relative-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) DIV id='target'",
           "rect": [8, 152, 784, 19],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-scrolloffset-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-scrolloffset-expected.txt
index 1719185..a456ce3 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-scrolloffset-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-scrolloffset-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [100, 120, 50, 19],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-scrolloffset2-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-scrolloffset2-expected.txt
index 28d3771..cd79d333 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-scrolloffset2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-scrolloffset2-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [102, 122, 50, 19],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-scrolloffset3-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-scrolloffset3-expected.txt
index f267ac6..0538ab7 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-scrolloffset3-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layout-state-scrolloffset3-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [100, 120, 34, 19],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
index ee4d768..403bd0e5 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
@@ -7,43 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 40, 784, 104],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 200, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 220, 100, 100],
+          "object": "LayoutInline (relative positioned) SPAN id='target'",
+          "rect": [8, 220, 100, 104],
           "reason": "location change"
         },
         {
@@ -52,18 +22,8 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutInline (relative positioned) SPAN id='target'",
-          "rect": [8, 220, 100, 104],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 200, 100, 100],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 220, 100, 100],
           "reason": "location change"
         },
         {
@@ -72,18 +32,49 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 200, 100, 100],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [8, 200, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-1-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-1-expected.txt
index 32dfd60..c4d1271 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-1-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-1-expected.txt
@@ -7,408 +7,38 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' twist itself round and look up in her face, with'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 120, 418, 479],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 359, 407, 20],
           "reason": "incremental"
         },
         {
-          "object": "InlineTextBox ' twist itself round and look up in her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutText #text",
+          "rect": [14, 239, 406, 20],
+          "reason": "incremental"
         },
         {
-          "object": "InlineTextBox ' was in a'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [14, 420, 355, 79],
           "reason": "bounds change"
         },
         {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice soon came to the conclusion that it was a very'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'The chief difficulty Alice found at first was in managing her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [14, 380, 355, 59],
           "reason": "bounds change"
         },
         {
-          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog had'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'blow with its head, it\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'bursting out\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as she had got its neck nicely'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as she had got its neck nicely'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her arm, with its legs hanging'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her arm, with its legs hanging'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [134, 360, 131, 19],
           "reason": "bounds change"
         },
         {
-          "object": "InlineTextBox 'doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'flamingo: she succeeded in getting its body tucked away,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'going to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehog had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'its head, it\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'out, and was going to give the hedgehog a blow with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'out, and was going to give the hedgehog a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'soldiers'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and shouting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'such a puzzled expression that she could not help bursting out'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'such a puzzled expression that she could not help'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the ground,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'there was generally a ridge or furrow in the way wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the way'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'this,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away: besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wanted to send the hedgehog to, and, as the doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'were always getting up and walking off to other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'yet had'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [65, 360, 131, 19],
           "reason": "bounds change"
         },
         {
@@ -417,6 +47,21 @@
           "reason": "incremental"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [303, 420, 67, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [244, 420, 65, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [369, 80, 52, 119],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
           "rect": [14, 363, 48, 65],
           "reason": "location change"
@@ -427,16 +72,6 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 120, 418, 479],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [369, 80, 52, 119],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [151, 180, 40, 19],
           "reason": "bounds change"
@@ -452,163 +87,423 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [14, 239, 406, 20],
+          "object": "InlineTextBox ' twist itself round and look up in her face, with'",
           "reason": "incremental"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [14, 359, 407, 20],
+          "object": "InlineTextBox ' twist itself round and look up in her'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' was in a'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice soon came to the conclusion that it was a very'",
           "reason": "incremental"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [134, 360, 131, 19],
+          "object": "InlineTextBox 'The chief difficulty Alice found at first was in managing her'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [65, 360, 131, 19],
+          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog had'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'besides all\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'blow with its head, it\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'bursting out\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as she had got its neck nicely'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as she had got its neck nicely'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her arm, with its legs hanging'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her arm, with its legs hanging'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [14, 380, 355, 59],
+          "object": "InlineTextBox 'doubled-up\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'down,\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'down,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'face, with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'flamingo: she succeeded in getting its body tucked away,'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for'",
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [303, 420, 67, 19],
+          "object": "InlineTextBox 'furious passion, and went\n'",
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [244, 420, 65, 19],
+          "object": "InlineTextBox 'going to\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehog had\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [14, 420, 355, 79],
+          "object": "InlineTextBox 'her head!\u2019 about once in a'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'its head, it\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going to'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me?'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'minute.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'out, and was going to give the hedgehog a blow with'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'out, and was going to give the hedgehog a'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'soldiers'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and shouting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'straightened\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'straightened\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'such a puzzled expression that she could not help bursting out'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'such a puzzled expression that she could not help'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the ground,'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'there was generally a ridge or furrow in the way wherever\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the way'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'this,'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away: besides all\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wanted to send the hedgehog to, and, as the doubled-up\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'were always getting up and walking off to other parts of\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'wherever\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'yet had'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u2018Off with his head!\u2019 or \u2018Off with\n'",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-10-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-10-expected.txt
index 8961d91..a5e6958 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-10-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-10-expected.txt
@@ -7,149 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'me?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet had'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 340, 418, 259],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
@@ -162,78 +22,176 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 340, 418, 259],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [369, 440, 1, 59],
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'head!\u2019 about once in a minute.\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'me?'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'was in a furious passion, and went\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet had'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-2-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-2-expected.txt
index 5c0ed5e..50fe35ea 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-2-expected.txt
@@ -7,328 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' twist itself round and look up in her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' twist itself round and look up in her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'The chief difficulty Alice found at first was in managing her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'blow with its head, it\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'blow with its head, it\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'bursting out\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as she had got its neck nicely'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her arm, with its legs hanging'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'flamingo: she succeeded in getting its body tucked away,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'going to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'happen any'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'hedgehog had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'me?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'out, and was going to give the hedgehog a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'out, and was going to give the hedgehog a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'such a puzzled expression that she could not help'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the way'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'yet had'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 363, 48, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 364, 48, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 383, 48, 81],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 384, 48, 81],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 485, 600],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow P",
           "rect": [8, 160, 418, 440],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutInline I id='would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
-          "rect": [14, 199, 355, 1],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [149, 180, 45, 20],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 180, 406, 79],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 181, 406, 79],
+          "rect": [14, 241, 407, 139],
           "reason": "bounds change"
         },
         {
@@ -338,57 +28,7 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 241, 407, 139],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [134, 360, 131, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [134, 361, 131, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 380, 287, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 381, 287, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 380, 304, 59],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 381, 304, 59],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [303, 420, 67, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [303, 421, 67, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 440, 355, 59],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 441, 355, 59],
+          "rect": [14, 501, 407, 99],
           "reason": "bounds change"
         },
         {
@@ -398,32 +38,333 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 501, 407, 99],
+          "rect": [14, 181, 406, 79],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [14, 180, 406, 79],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 441, 355, 59],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 440, 355, 59],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 199, 355, 1],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 381, 304, 59],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 380, 304, 59],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 381, 287, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 380, 287, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [134, 361, 131, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [134, 360, 131, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [303, 421, 67, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [303, 420, 67, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 384, 48, 81],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 383, 48, 81],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 364, 48, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 363, 48, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [149, 180, 45, 20],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutView #document",
           "rect": [485, 0, 15, 600],
           "reason": "scroll"
         },
         {
+          "object": "InlineTextBox ' twist itself round and look up in her'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' twist itself round and look up in her'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'The chief difficulty Alice found at first was in managing her'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'besides all\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'blow with its head, it\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'blow with its head, it\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'bursting out\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as she had got its neck nicely'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her arm, with its legs hanging'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'doubled-up\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'down,\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'face, with\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'flamingo: she succeeded in getting its body tucked away,'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'going to\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'happen any'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'hedgehog had\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'me?'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'once in a minute.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'out, and was going to give the hedgehog a'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'out, and was going to give the hedgehog a'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'straightened\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'straightened\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'such a puzzled expression that she could not help'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the way'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'was a very\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'was in a furious passion, and went\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'wherever\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'yet had'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutInline I id='would'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-3-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-3-expected.txt
index 4d4e715..e12c51b 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-3-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-3-expected.txt
@@ -7,179 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'me?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet had'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [356, 383, 64, 81],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 380, 418, 219],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutText #text",
-          "rect": [352, 380, 2, 19],
-          "reason": "incremental"
+          "rect": [14, 420, 339, 39],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
@@ -192,9 +27,9 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [14, 420, 339, 39],
-          "reason": "bounds change"
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [356, 383, 64, 81],
+          "reason": "location change"
         },
         {
           "object": "LayoutText #text",
@@ -202,58 +37,180 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [352, 380, 2, 19],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'head!\u2019 about once in a minute.\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'me?'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet had'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-4-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-4-expected.txt
index 69964b1..24466ff1 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-4-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-4-expected.txt
@@ -7,136 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet had'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 447, 48, 17],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 380, 418, 219],
           "reason": "invalidate paint rectangle"
@@ -147,58 +17,152 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 447, 48, 17],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a minute.\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me?'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'was in a furious passion, and went\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet had'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-5-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-5-expected.txt
index a1b35f4..c25a16f 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-5-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-5-expected.txt
@@ -7,207 +7,27 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'happen any'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'me?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet had'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [46, 363, 16, 65],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 340, 418, 259],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutText #text",
+          "rect": [14, 420, 355, 79],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [49, 380, 320, 59],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [49, 380, 303, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
           "rect": [134, 360, 131, 19],
           "reason": "bounds change"
         },
@@ -218,16 +38,6 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [49, 380, 303, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [49, 380, 320, 59],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [303, 420, 67, 19],
           "reason": "bounds change"
         },
@@ -237,73 +47,212 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [14, 420, 355, 79],
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [46, 363, 16, 65],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' was'",
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'happen any'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'in a furious passion, and went\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'me?'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'once in a minute.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet had'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-6-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-6-expected.txt
index 1dec0fd..96361ef8 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-6-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-6-expected.txt
@@ -7,64 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 340, 418, 99],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
@@ -72,43 +17,80 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 340, 418, 99],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [28, 363, 20, 20],
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'foo'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'was a very\n'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-7-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-7-expected.txt
index b446d6a..1c6fa30 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-7-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-7-expected.txt
@@ -7,43 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 400, 418, 39],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutInline SPAN id='theQueen'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [297, 420, 72, 19],
           "reason": "style change"
         },
         {
@@ -52,18 +22,39 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [297, 420, 72, 19],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutInline SPAN id='theQueen'",
           "reason": "style change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-8-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-8-expected.txt
index cafd2e68f..578ca49 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-8-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-8-expected.txt
@@ -7,319 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' twist itself round and look up in her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'The chief difficulty Alice found at first was in managing her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'blow with its head, it\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'bursting out\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as she had got its neck nicely'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her arm, with its legs hanging'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'flamingo: she succeeded in getting its body tucked away,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'going to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'hedgehog had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'out, and was going to give the hedgehog a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the hedgehogs; and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and shouting \u2018Off with his head!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'such a puzzled expression that she could not help'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the way'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet had'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 363, 48, 65],
-          "reason": "layoutObject removal"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 485, 600],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 586, 418, 14],
-          "reason": "incremental"
+          "rect": [8, 80, 418, 519],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow P",
@@ -328,47 +23,17 @@
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 80, 418, 519],
-          "reason": "invalidate paint rectangle"
+          "rect": [8, 586, 418, 14],
+          "reason": "incremental"
         },
         {
           "object": "LayoutText #text",
-          "rect": [134, 360, 131, 19],
+          "rect": [14, 500, 407, 99],
           "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [83, 360, 131, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 380, 287, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 380, 298, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 380, 304, 59],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 380, 354, 59],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [303, 420, 67, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [143, 420, 65, 19],
+          "rect": [14, 480, 407, 99],
           "reason": "bounds change"
         },
         {
@@ -383,132 +48,384 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 500, 407, 99],
+          "rect": [14, 380, 354, 59],
           "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 480, 407, 99],
+          "rect": [65, 380, 304, 59],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [14, 380, 298, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 380, 287, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [134, 360, 131, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [83, 360, 131, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [303, 420, 67, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [143, 420, 65, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 363, 48, 65],
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "LayoutView #document",
           "rect": [485, 0, 15, 600],
           "reason": "scroll"
         },
         {
+          "object": "InlineTextBox ' twist itself round and look up in her'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion,'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'The chief difficulty Alice found at first was in managing her'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'and went\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'besides all\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'blow with its head, it\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'bursting out\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as she had got its neck nicely'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her arm, with its legs hanging'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'doubled-up\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'down,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'face, with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'flamingo: she succeeded in getting its body tucked away,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'going to\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'hedgehog had\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me?'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'or \u2018Off with\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'out, and was going to give the hedgehog a'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the hedgehogs; and'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and shouting \u2018Off with his head!\u2019'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'straightened\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'such a puzzled expression that she could not help'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the way'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wherever\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet had'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-9-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-9-expected.txt
index e9bf6998..2dac0d1 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-9-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-flow-with-floats-9-expected.txt
@@ -7,304 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' twist itself round and look up in her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The chief difficulty Alice found at first was in managing her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'away: besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'blow with its head, it\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'bursting out\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as she had got its neck nicely'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her arm, with its legs hanging'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'flamingo: she succeeded in getting its body tucked away,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'going to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehog had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehog had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'in the way wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'out, and was going to give the hedgehog a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'such a puzzled expression that she could not help'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the way'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet had'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 80, 418, 519],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow (floating) SPAN id='yellowFloat'",
@@ -312,143 +17,352 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 80, 418, 519],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [420, 240, 1, 139],
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox ' twist itself round and look up in her'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The chief difficulty Alice found at first was in managing her'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'They\u2019re dreadfully fond of beheading people here; the great'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'any dispute with the Queen, but she knew that it might\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'away: besides all\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'besides all\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'blow with its head, it\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'bursting out\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as she had got its neck nicely'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her arm, with its legs hanging'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'doubled-up\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'down,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'face, with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'flamingo: she succeeded in getting its body tucked away,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'going to\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehog had\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'hedgehog had\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'in the way wherever\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me?'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'minute, \u2018and then,\u2019 thought she, \u2018what would become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'out, and was going to give the hedgehog a'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'straightened\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'such a puzzled expression that she could not help'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the doubled-up\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the way'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'was a very\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wherever\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet had'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-in-scrolled-clipped-block-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-in-scrolled-clipped-block-expected.txt
index e6959b3..58c658c 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-in-scrolled-clipped-block-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-in-scrolled-clipped-block-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '                         PASS     .'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [8, 8, 100, 19],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox '                         PASS     .'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-overflow-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-overflow-expected.txt
index a5803b0..e166074a 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/line-overflow-expected.txt
@@ -7,88 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox ' eleifend lacus, at'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox ' eleifend'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Integer sollicitudin nisi ut urna'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'augue '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'blandit convallis.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'enim in scelerisque convallis,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'lacus, at sagittis eros leo pulvinar'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'purus'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'purus'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'sagittis eros leo pulvinar velit.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'urna blandit convallis.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'velit. Integer sollicitudin nisi ut'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [8, 92, 200, 109],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutInline SPAN id='t'",
-          "rect": [77, 122, 33, 19],
+          "rect": [47, 92, 33, 49],
           "reason": "style change"
         },
         {
           "object": "LayoutInline SPAN id='t'",
-          "rect": [47, 92, 33, 49],
+          "rect": [77, 122, 33, 19],
           "reason": "style change"
         },
         {
@@ -107,28 +37,79 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' eleifend lacus, at'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' eleifend'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Integer sollicitudin nisi ut urna'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'augue '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'blandit convallis.'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'enim in scelerisque convallis,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'lacus, at sagittis eros leo pulvinar'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'purus'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'purus'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'sagittis eros leo pulvinar velit.'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'urna blandit convallis.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'velit. Integer sollicitudin nisi ut'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/lines-with-layout-delta-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/lines-with-layout-delta-expected.txt
index 391d858..ee5cc2a9 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/lines-with-layout-delta-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/lines-with-layout-delta-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (floating) DIV id='target'",
           "rect": [8, 58, 200, 19],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/list-marker-2-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/list-marker-2-expected.txt
index 09373127..bcdc8217 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/list-marker-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/list-marker-2-expected.txt
@@ -7,19 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutImage IMG id='target'",
-          "rect": [48, 100, 100, 100],
-          "reason": "forced by layout"
+          "object": "LayoutListItem LI",
+          "rect": [30, 100, 762, 104],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutListItem LI",
@@ -27,14 +17,9 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutListItem LI",
-          "rect": [30, 100, 762, 104],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutListMarker (anonymous)",
-          "rect": [30, 135, 7, 19],
-          "reason": "location change"
+          "object": "LayoutImage IMG id='target'",
+          "rect": [48, 100, 100, 100],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutListMarker (anonymous)",
@@ -42,13 +27,24 @@
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutListMarker (anonymous)",
+          "rect": [30, 135, 7, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/make-children-non-inline-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/make-children-non-inline-expected.txt
index 21889388..ca980a9 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/make-children-non-inline-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/make-children-non-inline-expected.txt
@@ -7,214 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'I could'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'I could'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Word,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Word,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'about all the stuff'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'about all the stuff'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'more words.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'more words.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'that comes'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that comes'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'the break.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the break.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'words,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'words,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'write a book'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'write a book'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 64, 784, 280],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (anonymous)",
@@ -227,23 +22,18 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 64, 784, 280],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='target'",
-          "rect": [8, 164, 10, 100],
+          "object": "LayoutText #text",
+          "rect": [8, 264, 105, 19],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 64, 39, 19],
-          "reason": "layoutObject insertion"
+          "rect": [8, 164, 105, 19],
+          "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 84, 42, 19],
+          "rect": [8, 144, 77, 19],
           "reason": "layoutObject insertion"
         },
         {
@@ -253,22 +43,7 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 124, 42, 19],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 144, 77, 19],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 164, 105, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 264, 105, 19],
+          "rect": [8, 284, 65, 19],
           "reason": "location change"
         },
         {
@@ -278,17 +53,7 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 284, 65, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 204, 27, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 304, 27, 19],
+          "rect": [8, 324, 61, 19],
           "reason": "location change"
         },
         {
@@ -298,62 +63,244 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 324, 61, 19],
+          "rect": [8, 124, 42, 19],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 84, 42, 19],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 64, 39, 19],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 304, 27, 19],
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [8, 204, 27, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='target'",
+          "rect": [8, 164, 10, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'I could'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'I could'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Word,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Word,'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'about all the stuff'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'about all the stuff'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'more words.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'more words.'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'that comes'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that comes'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'the break.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the break.'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'words,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'words,'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'write a book'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'write a book'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/multi-layout-one-frame-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/multi-layout-one-frame-expected.txt
index fad8fb5..3edb0f4 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/multi-layout-one-frame-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/multi-layout-one-frame-expected.txt
@@ -7,24 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASSED'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASSED'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow DIV id='inner-editor'",
+          "rect": [168, 11, 150, 16],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
@@ -32,9 +17,9 @@
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV id='inner-editor'",
-          "rect": [168, 11, 150, 16],
-          "reason": "invalidate paint rectangle"
+          "object": "LayoutText #text",
+          "rect": [168, 11, 53, 16],
+          "reason": "full"
         },
         {
           "object": "LayoutText #text",
@@ -42,18 +27,27 @@
           "reason": "full"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [168, 11, 53, 16],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASSED'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASSED'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/offset-change-wrong-invalidation-with-float-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/offset-change-wrong-invalidation-with-float-expected.txt
index 99546f58a..bd2eb5d 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/offset-change-wrong-invalidation-with-float-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/offset-change-wrong-invalidation-with-float-expected.txt
@@ -38,7 +38,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ],
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/opacity-change-on-overflow-float-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/opacity-change-on-overflow-float-expected.txt
index df2c1a4a..ba43330d 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/opacity-change-on-overflow-float-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/opacity-change-on-overflow-float-expected.txt
@@ -9,12 +9,12 @@
         {
           "object": "LayoutBlockFlow (floating) DIV class='green'",
           "rect": [8, 84, 100, 100],
-          "reason": "layer"
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (floating) DIV class='green'",
           "rect": [8, 84, 100, 100],
-          "reason": "style change"
+          "reason": "layer"
         },
         {
           "object": "LayoutBlockFlow (floating) DIV class='red'",
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-change-invalidation-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-change-invalidation-expected.txt
index 5a480e19..0f87c27 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-change-invalidation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-change-invalidation-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem Ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow UL",
+          "rect": [8, 83, 789, 30],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutBlockFlow A id='link'",
@@ -22,23 +17,24 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow UL",
-          "rect": [8, 83, 789, 30],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutListItem LI",
           "rect": [30, 83, 767, 30],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem Ipsum'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-clip-change-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-clip-change-expected.txt
index da06ebc..b9a35c2 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-clip-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-clip-change-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Lorem Ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem Ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) A id='link' class='updated'",
           "rect": [43, 103, 91, 30],
           "reason": "style change"
@@ -27,13 +17,19 @@
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'Lorem Ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem Ipsum'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-continuations-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-continuations-expected.txt
index 8475586e..e228774 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-continuations-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-continuations-expected.txt
@@ -7,39 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENTS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'CONTENTS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [16, 108, 202, 23],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [16, 148, 202, 23],
           "reason": "bounds change"
         },
         {
           "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
+          "rect": [16, 108, 202, 23],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutInline SPAN id='outer'",
@@ -52,28 +27,43 @@
           "reason": "style change"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENTS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'CONTENTS'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutBlockFlow (anonymous)",
+          "reason": "forced by layout"
+        },
+        {
           "object": "LayoutInline SPAN id='outer'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-inset-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-inset-expected.txt
index 624acfc..0d806d4 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-inset-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-inset-expected.txt
@@ -8,23 +8,23 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [19, 29, 200, 60],
-          "reason": "outline"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
           "rect": [19, 191, 200, 60],
           "reason": "outline"
         },
         {
-          "object": "LayoutBlockFlow DIV id='a'",
-          "rect": [29, 69, 180, 20],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow DIV",
+          "rect": [19, 29, 200, 60],
+          "reason": "outline"
         },
         {
           "object": "LayoutBlockFlow DIV id='b'",
           "rect": [29, 231, 180, 20],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='a'",
+          "rect": [29, 69, 180, 20],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-repaint-glitch-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-repaint-glitch-expected.txt
index 29d145f..d963ada 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-repaint-glitch-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/outline-repaint-glitch-expected.txt
@@ -8,23 +8,23 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [15, 229, 208, 68],
-          "reason": "outline"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
           "rect": [15, 391, 208, 68],
           "reason": "outline"
         },
         {
-          "object": "LayoutBlockFlow DIV id='a'",
-          "rect": [29, 273, 180, 20],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow DIV",
+          "rect": [15, 229, 208, 68],
+          "reason": "outline"
         },
         {
           "object": "LayoutBlockFlow DIV id='b'",
           "rect": [29, 435, 180, 20],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='a'",
+          "rect": [29, 273, 180, 20],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-delete-line-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-delete-line-expected.txt
index 25a097f..524bbe66 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-delete-line-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-delete-line-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsu'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='dv'",
           "rect": [8, 74, 80, 19],
           "reason": "invalidate paint rectangle"
@@ -32,8 +17,19 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsu'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-scroll-body-appear-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-scroll-body-appear-expected.txt
index b88ad9b0..074a2a2 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-scroll-body-appear-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-scroll-body-appear-expected.txt
@@ -7,24 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Bug 36461 - No vertical scrollbar after the CSS class change'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This is the test for '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'You should see both vertical and horizontal scrollbars.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 2008, 2096],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -32,31 +17,26 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 16, 784, 20],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 52, 784, 20],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 785, 585],
           "reason": "full"
         },
         {
           "object": "LayoutView #document",
-          "rect": [0, 0, 2008, 2096],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutView #document",
           "rect": [0, 585, 785, 15],
           "reason": "scroll"
         },
         {
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 52, 784, 20],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 16, 784, 20],
+          "reason": "forced by layout"
+        },
+        {
           "object": "LayoutView #document",
           "rect": [785, 0, 15, 585],
           "reason": "scroll"
@@ -67,23 +47,39 @@
           "reason": "scroll"
         },
         {
+          "object": "InlineTextBox '.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Bug 36461 - No vertical scrollbar after the CSS class change'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This is the test for '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'You should see both vertical and horizontal scrollbars.'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutView #document",
+          "reason": "scroll"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-scroll-delete-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-scroll-delete-expected.txt
index b7c7781..ea19ae2 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-scroll-delete-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overflow-scroll-delete-expected.txt
@@ -7,26 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Passed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Test'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='t'",
           "rect": [8, 136, 80, 17],
           "reason": "invalidate paint rectangle"
@@ -37,13 +17,27 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Passed'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Test'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overhanging-float-detach-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overhanging-float-detach-repaint-expected.txt
index c88d55d..8f265733 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overhanging-float-detach-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/overhanging-float-detach-repaint-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='floatContainer'",
-          "rect": [0, 0, 0, 0],
           "reason": "layoutObject removal"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt
index 20d572c8..45c2350f 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt
@@ -7,13 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'abc'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'abc'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV id='inner-target'",
+          "rect": [8, 187, 784, 20],
           "reason": "location change"
         },
         {
@@ -27,11 +22,6 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow DIV id='inner-target'",
-          "rect": [8, 187, 784, 20],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [18, 18, 22, 19],
           "reason": "layoutObject removal"
@@ -42,13 +32,19 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'abc'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'abc'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/positioned-document-element-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/positioned-document-element-expected.txt
index 56884a87..4e3996f6 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/positioned-document-element-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/positioned-document-element-expected.txt
@@ -8,14 +8,9 @@
       "backgroundColor": "#008000",
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 800, 600],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (positioned) HTML class='changed'",
@@ -23,53 +18,54 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [8, 16, 784, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 16, 784, 20],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) HTML class='changed'",
           "rect": [100, 100, 418, 52],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [8, 16, 784, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
           "rect": [108, 116, 402, 20],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 16, 784, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
           "rect": [108, 116, 402, 20],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 16, 402, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [108, 116, 402, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 800, 600],
-          "reason": "style change"
+          "object": "LayoutText #text",
+          "rect": [8, 16, 402, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'",
+          "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/positioned-great-grandparent-change-location-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/positioned-great-grandparent-change-location-expected.txt
index 56aa20cd..0717f53 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/positioned-great-grandparent-change-location-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/positioned-great-grandparent-change-location-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Target'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV",
           "rect": [100, 200, 100, 100],
           "reason": "location change"
@@ -32,11 +17,6 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='great-grandparent'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [100, 200, 38, 19],
           "reason": "location change"
@@ -47,8 +27,23 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'Target'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='great-grandparent'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/positioned-list-offset-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/positioned-list-offset-change-repaint-expected.txt
index 92cea0a5..e01234e0a 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/positioned-list-offset-change-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/positioned-list-offset-change-repaint-expected.txt
@@ -7,18 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) UL id='list'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutListItem (positioned) LI",
+          "rect": [8, 64, 214, 237],
           "reason": "location change"
         },
         {
@@ -27,28 +17,31 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutListItem (positioned) LI",
-          "rect": [8, 64, 214, 237],
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) UL id='list'",
           "reason": "location change"
         },
         {
           "object": "LayoutListMarker (anonymous)",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/quotes-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/quotes-expected.txt
index e6bc8fde..c9a871f 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/quotes-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/quotes-expected.txt
@@ -7,66 +7,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quote 2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '{'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '}'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [8, 28, 784, 19],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutInline \u003Cpseudo:after\u003E",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutInline \u003Cpseudo:before\u003E",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutInline Q id='q2' class='q-changed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutQuote (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutQuote (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [17, 28, 46, 19],
           "reason": "style change"
@@ -78,12 +23,12 @@
         },
         {
           "object": "LayoutTextFragment (anonymous)",
-          "rect": [8, 28, 9, 19],
+          "rect": [63, 28, 9, 19],
           "reason": "style change"
         },
         {
           "object": "LayoutTextFragment (anonymous)",
-          "rect": [63, 28, 9, 19],
+          "rect": [8, 28, 9, 19],
           "reason": "style change"
         },
         {
@@ -92,8 +37,51 @@
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quote 2'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '{'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '}'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutInline \u003Cpseudo:after\u003E",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutInline \u003Cpseudo:before\u003E",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutInline Q id='q2' class='q-changed'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutQuote (anonymous)",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutQuote (anonymous)",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/reflection-redraw-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/reflection-redraw-expected.txt
index f3c57b97..eaaf6f9 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/reflection-redraw-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/reflection-redraw-expected.txt
@@ -7,68 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'The color of this text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'The color of this text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'The color of this text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'The color of this text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'in the reflection'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'in the reflection'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'in the reflection'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'in the reflection'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'should be green'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'should be green'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'should be green'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'should be green'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
-          "rect": [306, 34, 124, 182],
+          "rect": [381, 267, 284, 59],
           "reason": "style change"
         },
         {
@@ -78,13 +18,61 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [381, 267, 284, 59],
+          "rect": [306, 34, 124, 182],
           "reason": "style change"
         },
         {
           "object": "LayoutText #text",
           "rect": [306, 377, 124, 156],
           "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'The color of this text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'The color of this text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'The color of this text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'The color of this text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'in the reflection'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'in the reflection'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'in the reflection'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'in the reflection'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'should be green'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'should be green'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'should be green'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'should be green'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/relative-inline-positioned-movement-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/relative-inline-positioned-movement-repaint-expected.txt
index 7ba0272..15c1dc7 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/relative-inline-positioned-movement-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/relative-inline-positioned-movement-repaint-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ],
@@ -26,12 +25,10 @@
           "paintInvalidations": [
             {
               "object": "InlineFlowBox",
-              "rect": [0, 0, 0, 0],
               "reason": "full"
             },
             {
               "object": "InlineTextBox 'When this layer moves it shouldn't generate a repaint rect.'",
-              "rect": [0, 0, 0, 0],
               "reason": "full"
             }
           ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/remove-block-after-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/remove-block-after-layout-expected.txt
index 866b83a..a328466 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/remove-block-after-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/remove-block-after-layout-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'This div should'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'disappear.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='target'",
           "rect": [8, 108, 100, 100],
           "reason": "layoutObject removal"
@@ -27,13 +17,19 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'This div should'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'disappear.'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/remove-inline-after-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/remove-inline-after-layout-expected.txt
index 1d4b278..63784b48 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/remove-inline-after-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/remove-inline-after-layout-expected.txt
@@ -7,56 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This span should disappear.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This span should disappear.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 108, 784, 104],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [112, 193, 171, 19],
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "LayoutBlockFlow DIV",
           "rect": [283, 108, 100, 100],
           "reason": "location change"
@@ -67,23 +27,51 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutInline SPAN id='target'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
+          "object": "InlineBox",
+          "reason": "full"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [112, 193, 171, 19],
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This span should disappear.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This span should disappear.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutInline SPAN id='target'",
           "reason": "layoutObject removal"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/remove-inline-layer-after-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/remove-inline-layer-after-layout-expected.txt
index 6db2b81..92ebe7d 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/remove-inline-layer-after-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/remove-inline-layer-after-layout-expected.txt
@@ -7,71 +7,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This span should disappear.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This span should disappear.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 108, 784, 104],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [283, 108, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [112, 108, 100, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutInline SPAN id='target'",
           "rect": [112, 108, 171, 104],
           "reason": "layoutObject removal"
@@ -82,13 +22,61 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [283, 108, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [112, 108, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This span should disappear.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This span should disappear.\n'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/repaint-descandant-on-ancestor-layer-move-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/repaint-descandant-on-ancestor-layer-move-expected.txt
index ec0dcc2..2df44138 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/repaint-descandant-on-ancestor-layer-move-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/repaint-descandant-on-ancestor-layer-move-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'There should only be one copy of this text.'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (relative positioned) DIV",
+          "rect": [428, 38, 300, 20],
           "reason": "location change"
         },
         {
@@ -17,21 +17,16 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='container'",
-          "rect": [8, 18, 300, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV",
-          "rect": [428, 38, 300, 20],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) DIV",
           "rect": [28, 38, 300, 20],
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV id='container'",
+          "rect": [8, 18, 300, 20],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [428, 38, 256, 19],
           "reason": "location change"
@@ -42,18 +37,19 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'There should only be one copy of this text.'",
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/repaint-during-scroll-with-zoom-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/repaint-during-scroll-with-zoom-expected.txt
index 2ef5eb1..4b3b0c9 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/repaint-during-scroll-with-zoom-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/repaint-during-scroll-with-zoom-expected.txt
@@ -8,14 +8,9 @@
       "backgroundColor": "#C0C0C0",
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
-          "object": "InlineTextBox 'scroll me'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutIFrame (positioned) IFRAME",
+          "rect": [2, 64, 235, 236],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -28,16 +23,6 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutIFrame (positioned) IFRAME",
-          "rect": [2, 64, 235, 236],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [2, 65, 52, 17],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [2, 65, 235, 235],
           "reason": "full"
@@ -53,6 +38,11 @@
           "reason": "scroll"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [2, 65, 52, 17],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutView #document",
           "rect": [237, 64, 15, 236],
           "reason": "scroll"
@@ -73,13 +63,19 @@
           "reason": "scroll"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
+          "object": "InlineTextBox 'scroll me'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt
index 0aa8a51..436f9bc 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt
@@ -12,23 +12,20 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV id='shiftMe'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutImage IMG",
           "rect": [8, 8, 194, 232],
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow (relative positioned) DIV id='shiftMe'",
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/resize-scrollable-iframe-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/resize-scrollable-iframe-expected.txt
index 16fa940a..d31aa2bf 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/resize-scrollable-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/resize-scrollable-iframe-expected.txt
@@ -7,28 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [8, 213, 784, 200],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 108, 784, 304],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutIFrame IFRAME id='iframe'",
-          "rect": [108, 108, 200, 300],
+          "object": "LayoutBlockFlow (anonymous)",
+          "rect": [8, 213, 784, 200],
           "reason": "incremental"
         },
         {
@@ -43,12 +28,22 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [93, 108, 200, 285],
+          "rect": [8, 193, 285, 200],
           "reason": "incremental"
         },
         {
           "object": "LayoutView #document",
-          "rect": [8, 193, 285, 200],
+          "rect": [8, 393, 285, 15],
+          "reason": "scroll"
+        },
+        {
+          "object": "LayoutIFrame IFRAME id='iframe'",
+          "rect": [108, 108, 200, 300],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [93, 108, 200, 285],
           "reason": "incremental"
         },
         {
@@ -58,7 +53,7 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [8, 393, 285, 15],
+          "rect": [293, 108, 15, 285],
           "reason": "scroll"
         },
         {
@@ -68,7 +63,7 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [293, 108, 15, 285],
+          "rect": [293, 393, 15, 15],
           "reason": "scroll"
         },
         {
@@ -77,23 +72,27 @@
           "reason": "scroll"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "LayoutView #document",
-          "rect": [293, 393, 15, 15],
           "reason": "scroll"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/scroll-stacking-context-backface-visiblity-leaves-traces-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/scroll-stacking-context-backface-visiblity-leaves-traces-expected.txt
index 0c51b2e..712b9a5 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/scroll-stacking-context-backface-visiblity-leaves-traces-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/scroll-stacking-context-backface-visiblity-leaves-traces-expected.txt
@@ -14,22 +14,22 @@
           "paintInvalidations": [
             {
               "object": "LayoutBlockFlow (positioned) DIV id='searchbar'",
-              "rect": [10, 1422, 150, 150],
+              "rect": [10, 1822, 150, 150],
+              "reason": "full"
+            },
+            {
+              "object": "LayoutBlockFlow DIV id='recentlink'",
+              "rect": [10, 1822, 150, 150],
               "reason": "full"
             },
             {
               "object": "LayoutBlockFlow (positioned) DIV id='searchbar'",
-              "rect": [10, 1822, 150, 150],
-              "reason": "full"
-            },
-            {
-              "object": "LayoutBlockFlow DIV id='recentlink'",
               "rect": [10, 1422, 150, 150],
               "reason": "full"
             },
             {
               "object": "LayoutBlockFlow DIV id='recentlink'",
-              "rect": [10, 1822, 150, 150],
+              "rect": [10, 1422, 150, 150],
               "reason": "full"
             }
           ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/search-field-cancel-expected.txt
index c74cfd40..c503345 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/search-field-cancel-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/search-field-cancel-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'some text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [12, 47, 136, 16],
           "reason": "forced by layout"
@@ -22,8 +17,11 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'some text'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/select-option-background-color-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/select-option-background-color-expected.txt
index 2fe196c8..0b503e8d 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/select-option-background-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/select-option-background-color-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selected-replaced-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selected-replaced-expected.txt
index 0d4deae..8ea26810 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selected-replaced-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selected-replaced-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 52, 784, 236],
           "reason": "invalidate paint rectangle"
@@ -27,8 +22,11 @@
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-after-delete-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-after-delete-expected.txt
index bb79249..c8a7827 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-after-delete-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-after-delete-expected.txt
@@ -7,69 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 100, 152, 80],
-          "reason": "incremental"
+          "rect": [38, 79, 152, 99],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='test'",
@@ -78,13 +18,8 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 79, 152, 99],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 78, 3, 21],
-          "reason": "invalidate paint rectangle"
+          "rect": [38, 100, 152, 80],
+          "reason": "incremental"
         },
         {
           "object": "LayoutText #text",
@@ -92,33 +27,80 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutBlockFlow DIV id='test'",
+          "rect": [38, 78, 3, 21],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-after-remove-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-after-remove-expected.txt
index 94f89fee..664e1fa 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-after-remove-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-after-remove-expected.txt
@@ -7,104 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello '",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 100, 152, 80],
-          "reason": "incremental"
+          "rect": [38, 79, 152, 99],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='test'",
@@ -113,18 +18,8 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 79, 152, 99],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutInline SPAN id='removeme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
+          "rect": [38, 100, 152, 80],
+          "reason": "incremental"
         },
         {
           "object": "LayoutText #text",
@@ -133,16 +28,6 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [39, 79, 32, 19],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [67, 159, 39, 19],
           "reason": "bounds change"
         },
@@ -152,33 +37,120 @@
           "reason": "bounds change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [39, 79, 32, 19],
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello '",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'world'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='test'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutInline SPAN id='removeme'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "selection"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-clear-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-clear-expected.txt
index 38ab4e6..065a919 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-clear-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-clear-expected.txt
@@ -7,49 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'FAIL: Test did'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'not run'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
+          "object": "LayoutBlockFlow DIV id='firstLine'",
+          "rect": [8, 8, 100, 200],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutBlockFlow (anonymous)",
@@ -62,31 +22,6 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='firstLine'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='firstLine'",
-          "rect": [8, 8, 100, 200],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='root'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [8, 48, 88, 119],
           "reason": "layoutObject removal"
@@ -97,23 +32,75 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'FAIL: Test did'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'not run'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow (anonymous)",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='firstLine'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='root'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "selection"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt
index 01815c6a..9d79ba4 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt
@@ -7,38 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'First cell'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'Second cell'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutTableCell TD id='firstCell'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutTableCell TD id='secondCell'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [11, 35, 74, 19],
           "reason": "selection"
         },
         {
@@ -47,8 +17,31 @@
           "reason": "selection"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [11, 35, 74, 19],
+          "object": "InlineTextBox 'First cell'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'Second cell'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutTableCell TD id='firstCell'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutTableCell TD id='secondCell'",
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-rl-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-rl-expected.txt
index 8bd637d..a454e7b 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-rl-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/selection-rl-expected.txt
@@ -7,23 +7,20 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [773, 43, 19, 77],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'Testing both hit testing'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [773, 43, 19, 77],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/shift-relative-positioned-container-with-image-addition-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/shift-relative-positioned-container-with-image-addition-expected.txt
index 74881bf5..8abd6ecf 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/shift-relative-positioned-container-with-image-addition-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/shift-relative-positioned-container-with-image-addition-expected.txt
@@ -7,38 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
-          "rect": [8, 92, 769, 642],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
-          "rect": [8, 186, 769, 642],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
-          "rect": [8, 92, 769, 642],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
-          "rect": [8, 186, 769, 642],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [18, 102, 712, 74],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 785, 836],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [10, 94, 728, 90],
+          "object": "LayoutView #document",
+          "rect": [0, 742, 785, 94],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
+          "rect": [8, 186, 769, 642],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
+          "rect": [8, 186, 769, 642],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
+          "rect": [8, 92, 769, 642],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
+          "rect": [8, 92, 769, 642],
           "reason": "location change"
         },
         {
@@ -47,8 +42,23 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutImage IMG",
-          "rect": [58, 142, 489, 537],
+          "object": "LayoutBlockFlow HTML",
+          "rect": [10, 94, 728, 90],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [10, 94, 728, 90],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [10, 94, 728, 90],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [18, 102, 712, 74],
           "reason": "location change"
         },
         {
@@ -57,33 +67,24 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutImage IMG",
+          "rect": [58, 142, 489, 537],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutView #document",
-          "rect": [0, 742, 785, 94],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [10, 94, 728, 90],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [10, 94, 728, 90],
-          "reason": "location change"
+          "reason": "scroll"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/shift-relative-positioned-container-with-image-removal-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/shift-relative-positioned-container-with-image-removal-expected.txt
index 46f04c7d..ccaa3197 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/shift-relative-positioned-container-with-image-removal-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/shift-relative-positioned-container-with-image-removal-expected.txt
@@ -7,9 +7,34 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 785, 841],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [0, 742, 785, 99],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
+          "rect": [8, 191, 769, 642],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
+          "rect": [8, 191, 769, 642],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
+          "rect": [8, 92, 769, 642],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
+          "rect": [8, 92, 769, 642],
+          "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (anonymous)",
@@ -17,31 +42,6 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
-          "rect": [8, 191, 769, 642],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'",
-          "rect": [8, 92, 769, 642],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
-          "rect": [8, 191, 769, 642],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='relative'",
-          "rect": [8, 92, 769, 642],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 785, 841],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutIFrame IFRAME id='iframe'",
           "rect": [8, 92, 732, 94],
           "reason": "layoutObject removal"
@@ -57,28 +57,23 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
+          "object": "InlineBox",
+          "reason": "full"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 742, 785, 99],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "reason": "layoutObject removal"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/stacked-diacritics-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/stacked-diacritics-expected.txt
index 45b13f3..2d61a77 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/stacked-diacritics-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/stacked-diacritics-expected.txt
@@ -7,18 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u1EA6\u1EA4\u1EAA\u1EA8\u1EB0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [19, 148, 126, 41],
           "reason": "layoutObject removal"
         },
         {
+          "object": "InlineTextBox '\u1EA6\u1EA4\u1EAA\u1EA8\u1EB0'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/static-to-positioned-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/static-to-positioned-expected.txt
index d6946f0..7e1444f 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/static-to-positioned-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/static-to-positioned-expected.txt
@@ -18,12 +18,12 @@
         },
         {
           "object": "LayoutBlockFlow (relative positioned) DIV id='a'",
-          "rect": [8, 82, 100, 100],
+          "rect": [8, 132, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) DIV id='a'",
-          "rect": [8, 132, 100, 100],
+          "rect": [8, 82, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/subtree-root-skipped-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/subtree-root-skipped-expected.txt
index 7a11ce1..58807e4 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/subtree-root-skipped-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/subtree-root-skipped-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='div'",
-          "rect": [8, 288, 10, 20],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [10, 11, 150, 16],
           "reason": "invalidate paint rectangle"
@@ -32,8 +17,20 @@
           "reason": "full"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV id='div'",
+          "rect": [8, 288, 10, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-cell-collapsed-border-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-cell-collapsed-border-expected.txt
index f4e8d8a..e733ea0 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-cell-collapsed-border-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-cell-collapsed-border-expected.txt
@@ -7,49 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD id='t1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableCell TD id='t3'",
+          "rect": [220, 264, 122, 110],
+          "reason": "style change"
         },
         {
           "object": "LayoutTableCell TD id='t1'",
@@ -58,23 +18,52 @@
         },
         {
           "object": "LayoutTableCell TD id='t2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD id='t2'",
           "rect": [3, 264, 118, 110],
           "reason": "style change"
         },
         {
-          "object": "LayoutTableCell TD id='t3'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD id='t1'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD id='t2'",
           "reason": "full"
         },
         {
           "object": "LayoutTableCell TD id='t3'",
-          "rect": [220, 264, 122, 110],
-          "reason": "style change"
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-cell-move-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-cell-move-expected.txt
index 6133d98..4693808 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-cell-move-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-cell-move-expected.txt
@@ -7,8 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 206, 60, 60],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 206, 60, 180],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 206, 60, 180],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 146, 60, 180],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 146, 60, 180],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 326, 60, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 326, 60, 60],
           "reason": "location change"
         },
         {
@@ -17,54 +42,26 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 206, 60, 60],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutTableCell TD",
           "rect": [8, 146, 60, 60],
           "reason": "became visible"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [8, 146, 60, 180],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 206, 60, 180],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 326, 60, 60],
           "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD id='s'",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD id='t'",
-          "rect": [0, 0, 0, 0],
           "reason": "became visible"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 146, 60, 180],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 206, 60, 180],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 326, 60, 60],
-          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-collapsed-border-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-collapsed-border-expected.txt
index 9b0b725..0f11e9c 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-collapsed-border-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-collapsed-border-expected.txt
@@ -7,43 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Lorem'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ipsum dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ipsum dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ipsum dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'sit amet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'sit amet'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTable TABLE",
+          "rect": [8, 194, 103, 82],
           "reason": "full"
         },
         {
@@ -52,19 +17,9 @@
           "reason": "full"
         },
         {
-          "object": "LayoutTable TABLE",
-          "rect": [8, 194, 103, 82],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [78, 286, 25, 82],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [74, 286, 29, 82],
-          "reason": "incremental"
+          "object": "LayoutTableSection TBODY",
+          "rect": [12, 198, 95, 74],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutTable TABLE id='t'",
@@ -72,63 +27,23 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableCell TD id='d2'",
+          "rect": [22, 224, 89, 22],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [12, 106, 87, 74],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "rect": [22, 338, 81, 30],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [22, 102, 81, 30],
+          "rect": [22, 286, 81, 30],
           "reason": "forced by layout"
         },
         {
@@ -138,37 +53,12 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [22, 286, 81, 30],
+          "rect": [22, 102, 81, 30],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [22, 338, 81, 30],
+          "object": "LayoutTableCell TD id='d3'",
+          "rect": [22, 316, 81, 22],
           "reason": "forced by layout"
         },
         {
@@ -177,24 +67,9 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutTableCell TD id='d2'",
-          "rect": [22, 224, 89, 22],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutTableCell TD id='d3'",
-          "rect": [22, 316, 81, 22],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [12, 106, 87, 74],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [12, 198, 95, 74],
-          "reason": "forced by layout"
+          "object": "LayoutText #text",
+          "rect": [23, 317, 71, 19],
+          "reason": "location change"
         },
         {
           "object": "LayoutText #text",
@@ -207,68 +82,157 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [23, 317, 71, 19],
+          "object": "LayoutTable TABLE",
+          "rect": [74, 286, 29, 82],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "rect": [78, 286, 25, 82],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Lorem'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ipsum dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ipsum dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ipsum dolor'",
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'sit amet'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'sit amet'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-shrink-row-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-shrink-row-repaint-expected.txt
index 247a40cf..9ef70971 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-shrink-row-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/table-shrink-row-repaint-expected.txt
@@ -7,193 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '10'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '11'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '12'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '13'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '5'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '6'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '7'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '8'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '9'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 785, 1050],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 322, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 122, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 382, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 182, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 442, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 242, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 502, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 302, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 562, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 362, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 622, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 422, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 682, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 482, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 742, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 542, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 802, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 602, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 862, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 662, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 922, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 722, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 982, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 782, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD id='resizeMe'",
-          "rect": [8, 122, 769, 200],
+          "object": "LayoutView #document",
+          "rect": [0, 850, 785, 200],
           "reason": "incremental"
         },
         {
@@ -202,113 +22,13 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 322, 769, 60],
-          "reason": "location change"
+          "object": "LayoutTableCell TD id='resizeMe'",
+          "rect": [8, 122, 769, 200],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 122, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 382, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 182, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 442, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 242, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 502, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 302, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 562, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 362, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 622, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 422, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 682, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 482, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 742, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 542, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 802, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 602, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 862, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 662, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 922, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 722, 769, 60],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 982, 769, 60],
           "reason": "location change"
         },
         {
@@ -317,118 +37,233 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 922, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 922, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 862, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 862, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 802, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 802, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 782, 769, 60],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutTableRow TR",
           "rect": [8, 782, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 342, 8, 19],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 742, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 142, 8, 19],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 742, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 402, 8, 19],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 722, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 202, 8, 19],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 722, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 462, 8, 19],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 682, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 262, 8, 19],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 682, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 522, 8, 19],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 662, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 322, 8, 19],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 662, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 582, 8, 19],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 622, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 382, 8, 19],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 622, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 642, 8, 19],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 602, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 442, 8, 19],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 602, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 702, 8, 19],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 562, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 502, 8, 19],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 562, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 762, 8, 19],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 542, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 562, 8, 19],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 542, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 822, 16, 19],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 502, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 622, 16, 19],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 502, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 882, 16, 19],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 482, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 682, 16, 19],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 482, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 942, 16, 19],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 442, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 742, 16, 19],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 442, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 422, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 422, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 382, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 382, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 362, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 362, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 322, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 322, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 302, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 302, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 242, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 242, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 182, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 182, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 122, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 122, 769, 60],
           "reason": "location change"
         },
         {
@@ -438,72 +273,213 @@
         },
         {
           "object": "LayoutText #text",
+          "rect": [13, 942, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 882, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 822, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
           "rect": [13, 802, 16, 19],
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 850, 785, 200],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "rect": [13, 742, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 682, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 622, 16, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 762, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 702, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 642, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 582, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 562, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 522, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 502, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 462, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 442, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 402, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 382, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 342, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 322, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 262, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 202, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 142, 8, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '10'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '11'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '12'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '13'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '5'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '6'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '7'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '8'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '9'",
+          "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-append-dirty-lines-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-append-dirty-lines-expected.txt
index b35fd70..3e109a9 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-append-dirty-lines-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-append-dirty-lines-expected.txt
@@ -7,46 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse placerat. Morbi tristique. Mauris eu lacus sed felis'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Quisque enim metus, luctus tincidunt, vestibulum eu, vestibulum eu, libero. Mauris sagittis aliquam nunc. Nullam pharetra molestie'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Quisque enim metus, luctus tincidunt, vestibulum eu, vestibulum eu, libero. Mauris sagittis aliquam nunc. Nullam pharetra molestie'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris. Curabitur a velit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris. Curabitur a velit.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'feugiat. Phasellus mollis pulvinar mi. Etiam ut neque sed eros egestas laoreet. Vestibulum ullamcorper, nulla non feugiat molestie, mi'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'lorem bibendum leo, ac gravida orci nunc nec nulla. Nunc nunc lorem, rhoncus et, rutrum ac, fermentum ut, tortor. Sed rhoncus.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'pellentesque cursus. Proin vitae nulla. Vivamus in ipsum. Etiam mi. Nam malesuada purus in sem. Sed eget elit vel erat laoreet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow P id='target'",
           "rect": [8, 124, 784, 39],
           "reason": "invalidate paint rectangle"
@@ -57,13 +17,43 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse placerat. Morbi tristique. Mauris eu lacus sed felis'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Quisque enim metus, luctus tincidunt, vestibulum eu, vestibulum eu, libero. Mauris sagittis aliquam nunc. Nullam pharetra molestie'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Quisque enim metus, luctus tincidunt, vestibulum eu, vestibulum eu, libero. Mauris sagittis aliquam nunc. Nullam pharetra molestie'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris. Curabitur a velit'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris. Curabitur a velit.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'feugiat. Phasellus mollis pulvinar mi. Etiam ut neque sed eros egestas laoreet. Vestibulum ullamcorper, nulla non feugiat molestie, mi'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'lorem bibendum leo, ac gravida orci nunc nec nulla. Nunc nunc lorem, rhoncus et, rutrum ac, fermentum ut, tortor. Sed rhoncus.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'pellentesque cursus. Proin vitae nulla. Vivamus in ipsum. Etiam mi. Nam malesuada purus in sem. Sed eget elit vel erat laoreet'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-match-document-change-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-match-document-change-expected.txt
index e85d9b2..6efe4f966 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-match-document-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-match-document-change-expected.txt
@@ -7,19 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'After change'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Find-in-page 'findme', then click here)'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'To be changed: findme (Manual testing:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow HTML",
+          "rect": [10, 102, 285, 400],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutBlockFlow DIV",
@@ -32,11 +22,6 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [10, 102, 285, 400],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [18, 130, 235, 39],
           "reason": "layoutObject removal"
@@ -52,23 +37,31 @@
           "reason": "scroll"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'After change'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Find-in-page 'findme', then click here)'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'To be changed: findme (Manual testing:'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-selection-rect-in-overflow-2-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-selection-rect-in-overflow-2-expected.txt
index dbc2336..53e520a 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-selection-rect-in-overflow-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-selection-rect-in-overflow-2-expected.txt
@@ -7,28 +7,24 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [18, 18, 216, 19],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'Should have blue, not gray, highlight'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV id='t'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [18, 18, 216, 19],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-selection-rect-in-overflow-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-selection-rect-in-overflow-expected.txt
index fc33a372..690c961 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-selection-rect-in-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/text-selection-rect-in-overflow-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Should have green background'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [8, 8, 187, 19],
           "reason": "selection"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [8, 8, 187, 19],
+          "object": "InlineTextBox 'Should have green background'",
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/transform-inline-layered-child-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/transform-inline-layered-child-expected.txt
index 2e28bd2..e0ed385a9 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/transform-inline-layered-child-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/transform-inline-layered-child-expected.txt
@@ -7,118 +7,28 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'A B C'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'D E F'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'G H I'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'J K L'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'M N O'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'P Q R'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'S T U'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'V W X'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Y Z'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='box'",
           "rect": [61, 87, 178, 206],
           "reason": "location change"
         },
         {
           "object": "LayoutInline (relative positioned) SPAN id='child'",
-          "rect": [300, 300, 80, 179],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutInline (relative positioned) SPAN id='child'",
           "rect": [135, 360, 160, 196],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [300, 302, 80, 176],
+          "rect": [135, 361, 159, 194],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutInline (relative positioned) SPAN id='child'",
+          "rect": [300, 300, 80, 179],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [135, 361, 159, 194],
+          "rect": [300, 302, 80, 176],
           "reason": "location change"
         },
         {
@@ -127,8 +37,79 @@
           "reason": "location change"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'A B C'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'D E F'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'G H I'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'J K L'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'M N O'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'P Q R'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'S T U'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'V W X'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Y Z'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/transform-layout-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/transform-layout-repaint-expected.txt
index d900d05..ffad95e 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/transform-layout-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/transform-layout-repaint-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [51, 50, 197, 88],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align-length1-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align-length1-expected.txt
index eb1995e..4f227f9 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align-length1-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align-length1-expected.txt
@@ -7,19 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow BODY",
+          "rect": [0, 0, 800, 154],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -27,18 +17,8 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 800, 154],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [0, 100, 20, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [0, 130, 20, 20],
+          "rect": [120, 130, 20, 20],
           "reason": "location change"
         },
         {
@@ -48,17 +28,32 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [120, 130, 20, 20],
+          "rect": [0, 130, 20, 20],
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV class='other'",
+          "rect": [0, 100, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align-length2-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align-length2-expected.txt
index 812dc08..f8ebc8af 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align-length2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align-length2-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow BODY",
           "rect": [0, 0, 800, 204],
           "reason": "invalidate paint rectangle"
@@ -37,8 +22,19 @@
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align1-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align1-expected.txt
index 20ccebd6..0b97062 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align1-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align1-expected.txt
@@ -7,39 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 100, 800, 5],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow BODY",
           "rect": [0, 0, 800, 104],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [0, 80, 20, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [0, 33, 20, 20],
-          "reason": "location change"
+          "object": "LayoutBlockFlow BODY",
+          "rect": [0, 100, 800, 5],
+          "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow DIV class='other'",
@@ -52,13 +27,33 @@
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV class='other'",
+          "rect": [0, 80, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='other'",
+          "rect": [0, 33, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align2-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align2-expected.txt
index db346958..17ab48b 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/vertical-align2-expected.txt
@@ -7,19 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow BODY",
+          "rect": [0, 0, 800, 247],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -27,9 +17,9 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 800, 247],
-          "reason": "invalidate paint rectangle"
+          "object": "LayoutBlockFlow DIV id='target'",
+          "rect": [200, 147, 100, 100],
+          "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV id='target'",
@@ -37,18 +27,23 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='target'",
-          "rect": [200, 147, 100, 100],
-          "reason": "location change"
+          "object": "InlineBox",
+          "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/window-resize-vertical-writing-mode-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/window-resize-vertical-writing-mode-expected.txt
index 53cf384..4e03842 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/window-resize-vertical-writing-mode-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/window-resize-vertical-writing-mode-expected.txt
@@ -7,51 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [152, 8, 40, 184],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [172, 8, 20, 284],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [144, 0, 56, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [164, 0, 36, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [153, 8, 39, 140],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [173, 8, 19, 236],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 200, 300],
           "reason": "full"
@@ -62,18 +17,57 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow HTML",
+          "rect": [144, 0, 56, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [152, 8, 40, 184],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [153, 8, 39, 140],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [164, 0, 36, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [172, 8, 20, 284],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [173, 8, 19, 236],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
@@ -89,41 +83,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [172, 8, 20, 284],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [272, 8, 20, 284],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [164, 0, 36, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [264, 0, 36, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [173, 8, 19, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [273, 8, 19, 236],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 300, 300],
           "reason": "full"
@@ -134,8 +93,41 @@
           "reason": "incremental"
         },
         {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [264, 0, 36, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [164, 0, 36, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [272, 8, 20, 284],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [172, 8, 20, 284],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [273, 8, 19, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [173, 8, 19, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
@@ -151,51 +143,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [272, 8, 20, 284],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [252, 8, 40, 234],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [264, 0, 36, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [244, 0, 56, 250],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [273, 8, 19, 236],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [253, 8, 39, 188],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 300, 250],
           "reason": "full"
@@ -206,13 +153,53 @@
           "reason": "incremental"
         },
         {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [244, 0, 56, 250],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [252, 8, 40, 234],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [253, 8, 39, 188],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [264, 0, 36, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [272, 8, 20, 284],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [273, 8, 19, 236],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
@@ -228,24 +215,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [252, 8, 40, 234],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [202, 8, 40, 234],
-          "reason": "location change"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 250, 250],
+          "reason": "full"
         },
         {
           "object": "LayoutBlockFlow HTML",
@@ -258,6 +230,21 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutView #document",
+          "rect": [250, 0, 50, 250],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [252, 8, 40, 234],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [202, 8, 40, 234],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [253, 8, 39, 188],
           "reason": "location change"
@@ -268,18 +255,15 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 250, 250],
-          "reason": "full"
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA'",
+          "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [250, 0, 50, 250],
-          "reason": "incremental"
+          "object": "InlineTextBox 'AAAA'",
+          "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt
index 629deb8..4949cf6 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD id='foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableCell TD id='foo'",
           "rect": [8, 8, 60, 54],
           "reason": "style change"
@@ -32,8 +17,19 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "InlineTextBox 'A'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD id='foo'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/table/resize-table-repaint-percent-size-cell-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/table/resize-table-repaint-percent-size-cell-expected.txt
index 8b678fb..3ebca23 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/table/resize-table-repaint-percent-size-cell-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/table/resize-table-repaint-percent-size-cell-expected.txt
@@ -7,43 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'ROW1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ROW1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'ROW2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ROW2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutTable (positioned) TABLE id='table'",
           "rect": [0, 150, 106, 380],
           "reason": "incremental"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [2, 52, 102, 238],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [2, 102, 102, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [2, 292, 102, 236],
+          "object": "LayoutTableRow TR",
+          "rect": [0, 292, 106, 236],
           "reason": "location change"
         },
         {
@@ -57,14 +27,24 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [0, 292, 106, 236],
+          "object": "LayoutTableCell TD",
+          "rect": [2, 52, 102, 238],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [2, 292, 102, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [2, 102, 102, 46],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [3, 66, 45, 19],
-          "reason": "bounds change"
+          "rect": [3, 400, 45, 19],
+          "reason": "location change"
         },
         {
           "object": "LayoutText #text",
@@ -78,27 +58,39 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [3, 400, 45, 19],
+          "rect": [3, 66, 45, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'ROW1'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ROW1'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'ROW2'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ROW2'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/table/resize-table-repaint-vertical-align-cell-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/table/resize-table-repaint-vertical-align-cell-expected.txt
index 195540a..0fb17258 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/table/resize-table-repaint-vertical-align-cell-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/table/resize-table-repaint-vertical-align-cell-expected.txt
@@ -7,29 +7,24 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'MIDDLE'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'MIDDLE'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutTable (positioned) TABLE id='table'",
           "rect": [0, 150, 106, 380],
           "reason": "incremental"
         },
         {
+          "object": "LayoutTableRow TR",
+          "rect": [0, 148, 106, 380],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutTableCell TD",
           "rect": [2, 52, 102, 476],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [0, 148, 106, 380],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "rect": [3, 280, 59, 19],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
@@ -37,18 +32,19 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [3, 280, 59, 19],
+          "object": "InlineTextBox 'MIDDLE'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'MIDDLE'",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/table/resize-table-row-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/table/resize-table-row-repaint-expected.txt
index 6d7fe3b5..c9596c5 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/table/resize-table-row-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/table/resize-table-row-repaint-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'MIDDLE'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'MIDDLE'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
+          "object": "LayoutTableRow TR id='row'",
+          "rect": [0, 202, 106, 100],
+          "reason": "incremental"
         },
         {
           "object": "LayoutTableCell TD",
@@ -22,9 +17,9 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableRow TR id='row'",
-          "rect": [0, 202, 106, 100],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "rect": [3, 192, 59, 19],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
@@ -32,18 +27,19 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [3, 192, 59, 19],
+          "object": "InlineTextBox 'MIDDLE'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'MIDDLE'",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/invalidate-box-shadow-currentColor-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/invalidate-box-shadow-currentColor-expected.txt
index 8fdb49a..fcc9117 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/invalidate-box-shadow-currentColor-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/invalidate-box-shadow-currentColor-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutInline SPAN id='target'",
           "rect": [8, 8, 26, 24],
           "reason": "style change"
@@ -25,6 +15,14 @@
           "object": "LayoutText #text",
           "rect": [8, 8, 26, 19],
           "reason": "style change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'Text'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/non-text-link-invalidation-optimization-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/non-text-link-invalidation-optimization-expected.txt
index 46ac3e2..6e88b6e 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/non-text-link-invalidation-optimization-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/non-text-link-invalidation-optimization-expected.txt
@@ -7,38 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' images.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox ' no '",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox ' passes if '",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox ' text is invalidated and '",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'This test '",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'only'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
-          "rect": [8, 8, 54, 19],
+          "rect": [156, 8, 137, 19],
           "reason": "style change"
         },
         {
@@ -48,12 +18,17 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [131, 8, 26, 19],
+          "rect": [8, 8, 54, 19],
           "reason": "style change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [156, 8, 137, 19],
+          "rect": [336, 8, 49, 19],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [131, 8, 26, 19],
           "reason": "style change"
         },
         {
@@ -62,8 +37,27 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [336, 8, 49, 19],
+          "object": "InlineTextBox ' images.'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' no '",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' passes if '",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' text is invalidated and '",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'This test '",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'only'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/selection/selection-within-composited-scroller-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/selection/selection-within-composited-scroller-expected.txt
index dd00c36..d94e618c 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/paint/selection/selection-within-composited-scroller-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/paint/selection/selection-within-composited-scroller-expected.txt
@@ -8,12 +8,10 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         }
       ],
@@ -27,23 +25,20 @@
           "backgroundColor": "#D3D3D3",
           "paintInvalidations": [
             {
+              "object": "LayoutText #text",
+              "rect": [0, 160, 21, 19],
+              "reason": "selection"
+            },
+            {
               "object": "InlineTextBox 'test'",
-              "rect": [0, 0, 0, 0],
               "reason": "selection"
             },
             {
               "object": "LayoutBlockFlow DIV id='scroller'",
-              "rect": [0, 0, 0, 0],
               "reason": "selection"
             },
             {
               "object": "LayoutBlockFlow DIV id='target'",
-              "rect": [0, 0, 0, 0],
-              "reason": "selection"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 160, 21, 19],
               "reason": "selection"
             }
           ],
@@ -57,23 +52,20 @@
                   "drawsContent": true,
                   "paintInvalidations": [
                     {
+                      "object": "LayoutText #text",
+                      "rect": [0, 610, 21, 19],
+                      "reason": "selection"
+                    },
+                    {
                       "object": "InlineTextBox 'test'",
-                      "rect": [0, 0, 0, 0],
                       "reason": "selection"
                     },
                     {
                       "object": "LayoutBlockFlow DIV id='scroller'",
-                      "rect": [0, 0, 0, 0],
                       "reason": "selection"
                     },
                     {
                       "object": "LayoutBlockFlow DIV id='target'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "selection"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 610, 21, 19],
                       "reason": "selection"
                     }
                   ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/as-image/svg-image-change-content-size-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/as-image/svg-image-change-content-size-expected.txt
index 81efd9b..4d04cc1 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/as-image/svg-image-change-content-size-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/as-image/svg-image-change-content-size-expected.txt
@@ -7,23 +7,20 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 52, 602, 425],
           "reason": "forced by layout"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/absolute-sized-content-with-resources-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/absolute-sized-content-with-resources-expected.txt
index 9917d10..dbb2413 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/absolute-sized-content-with-resources-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/absolute-sized-content-with-resources-expected.txt
@@ -7,33 +7,30 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 52, 402, 405],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [17, 219, 84, 68],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
           "rect": [42, 119, 334, 268],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRoot svg",
+          "rect": [17, 219, 84, 68],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-clipPath-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-clipPath-and-object-creation-expected.txt
index ce100b60..6261ec9 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-clipPath-and-object-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-clipPath-and-object-creation-expected.txt
@@ -7,37 +7,42 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [16, 42, 784, 170],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 42, 784, 170],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRoot svg id='svg-root'",
+          "rect": [16, 42, 784, 170],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [16, 42, 784, 170],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [16, 42, 784, 170],
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [334, 42, 466, 170],
           "reason": "incremental"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [16, 42, 784, 170],
-          "reason": "layoutObject insertion"
+          "rect": [334, 42, 466, 170],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutSVGInlineText #text",
+          "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [334, 42, 466, 170],
           "reason": "incremental"
         },
@@ -47,43 +52,31 @@
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGResourceClipper clipPath id='dynClip'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRoot svg id='svg-root'",
-          "rect": [16, 42, 784, 170],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg id='svg-root'",
-          "rect": [334, 42, 466, 170],
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [16, 42, 784, 170],
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [16, 42, 784, 170],
-          "reason": "style change"
+          "object": "LayoutSVGResourceClipper clipPath id='dynClip'",
+          "reason": "layoutObject insertion"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-clipPath-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-clipPath-creation-expected.txt
index d1fd889..fad8585 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-clipPath-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-clipPath-creation-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
+          "object": "LayoutSVGText text",
+          "rect": [16, 42, 784, 170],
+          "reason": "style change"
         },
         {
           "object": "LayoutSVGContainer g id='content'",
@@ -27,33 +22,33 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 334, 500],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceClipper clipPath id='dynClip'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [334, 42, 466, 170],
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [16, 42, 784, 170],
-          "reason": "style change"
+          "object": "LayoutSVGPath path",
+          "rect": [0, 0, 334, 500],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGResourceClipper clipPath id='dynClip'",
+          "reason": "layoutObject insertion"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-gradient-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-gradient-and-object-creation-expected.txt
index 20a0f1a..fc30a211 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-gradient-and-object-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-gradient-and-object-creation-expected.txt
@@ -7,78 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Gradient on fill'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Gradient on fill/stroke'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Gradient on stroke'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [0, 15, 756, 364],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 15, 446, 129],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 130, 595, 133],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 247, 756, 132],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceLinearGradient linearGradient id='fillLinearGradient'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceLinearGradient linearGradient id='strokeLinearGradient'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [0, 15, 756, 364],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [0, 15, 446, 129],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 130, 595, 133],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 247, 756, 132],
           "reason": "layoutObject insertion"
         },
         {
@@ -87,18 +27,67 @@
           "reason": "layoutObject insertion"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 130, 595, 133],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 130, 595, 133],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 15, 446, 129],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 15, 446, 129],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Gradient on fill'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Gradient on fill/stroke'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Gradient on stroke'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourceLinearGradient linearGradient id='fillLinearGradient'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourceLinearGradient linearGradient id='strokeLinearGradient'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-gradient-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-gradient-creation-expected.txt
index c358615b..21651dc8 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-gradient-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-gradient-creation-expected.txt
@@ -7,38 +7,32 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Gradient on fill'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceLinearGradient linearGradient id='dynGrad'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGText text",
           "rect": [33, 23, 697, 194],
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'Gradient on fill'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourceLinearGradient linearGradient id='dynGrad'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-pattern-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-pattern-and-object-creation-expected.txt
index 0a1988b5..d2e7b32 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-pattern-and-object-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-pattern-and-object-creation-expected.txt
@@ -7,83 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Pattern on fill'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Pattern on fill/stroke'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Pattern on stroke'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [0, 15, 680, 364],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 15, 370, 129],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 130, 519, 133],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 247, 680, 132],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [8, 8, 17, 17],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [16, 16, 18, 18],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [8, 8, 17, 17],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [16, 16, 18, 18],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourcePattern pattern id='fillPattern'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourcePattern pattern id='strokePattern'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [0, 15, 680, 364],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [0, 15, 370, 129],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 130, 519, 133],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 247, 680, 132],
           "reason": "layoutObject insertion"
         },
         {
@@ -92,18 +27,75 @@
           "reason": "layoutObject insertion"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 130, 519, 133],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 130, 519, 133],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 15, 370, 129],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 15, 370, 129],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [16, 16, 18, 18],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [16, 16, 18, 18],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [8, 8, 17, 17],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [8, 8, 17, 17],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Pattern on fill'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Pattern on fill/stroke'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Pattern on stroke'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourcePattern pattern id='fillPattern'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourcePattern pattern id='strokePattern'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-pattern-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-pattern-creation-expected.txt
index 5fbfcb2..fe86ebc 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-pattern-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/js-late-pattern-creation-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Pattern on fill'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [8, 12, 17, 26],
-          "reason": "layoutObject insertion"
+          "object": "LayoutSVGText text",
+          "rect": [33, 23, 622, 194],
+          "reason": "style change"
         },
         {
           "object": "LayoutSVGRect rect",
@@ -22,23 +17,24 @@
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGResourcePattern pattern id='dynPattern'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRect rect",
+          "rect": [8, 12, 17, 26],
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [33, 23, 622, 194],
-          "reason": "style change"
+          "object": "InlineTextBox 'Pattern on fill'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGResourcePattern pattern id='dynPattern'",
+          "reason": "layoutObject insertion"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.txt
index 119dfc29..65fcde82 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.txt
@@ -7,31 +7,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 8, 402, 405],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutEmbeddedObject object",
-          "rect": [209, 9, 200, 400],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGEllipse circle",
-          "rect": [89, 189, 40, 40],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGEllipse circle",
-          "rect": [169, 169, 80, 80],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRect rect",
           "rect": [9, 9, 400, 400],
           "reason": "location change"
@@ -47,18 +27,35 @@
           "reason": "full"
         },
         {
+          "object": "LayoutEmbeddedObject object",
+          "rect": [209, 9, 200, 400],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutView #document",
           "rect": [209, 9, 200, 400],
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGEllipse circle",
+          "rect": [169, 169, 80, 80],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGEllipse circle",
+          "rect": [89, 189, 40, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-content-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-content-expected.txt
index 77f96088..f9a616b 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-content-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 72, 402, 405],
           "reason": "forced by layout"
@@ -27,13 +22,15 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-content-with-resources-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-content-with-resources-expected.txt
index 04f027e8..bf04aff 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-content-with-resources-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-content-with-resources-expected.txt
@@ -7,23 +7,23 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 72, 402, 405],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGEllipse circle",
-          "rect": [9, 155, 100, 236],
+          "rect": [48, 112, 322, 322],
           "reason": "SVG resource change"
         },
         {
+          "object": "LayoutSVGRoot svg",
+          "rect": [48, 112, 322, 322],
+          "reason": "bounds change"
+        },
+        {
           "object": "LayoutSVGEllipse circle",
-          "rect": [48, 112, 322, 322],
+          "rect": [9, 155, 100, 236],
           "reason": "SVG resource change"
         },
         {
@@ -32,18 +32,15 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [48, 112, 322, 322],
-          "reason": "bounds change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-deep-shadow-tree-content-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-deep-shadow-tree-content-expected.txt
index 78ff812..751bac35 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-deep-shadow-tree-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-deep-shadow-tree-content-expected.txt
@@ -7,88 +7,85 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 72, 402, 405],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGContainer g id='targetUse'",
-          "rect": [59, 273, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='targetUse'",
           "rect": [209, 273, 200, 200],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [59, 273, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
           "rect": [209, 273, 200, 200],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='targetUse'",
-          "rect": [34, 173, 50, 200],
+          "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [209, 273, 200, 200],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGRoot svg",
+          "rect": [209, 273, 200, 200],
+          "reason": "bounds change"
+        },
+        {
           "object": "LayoutSVGContainer use id='targetUse'",
           "rect": [109, 173, 200, 200],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [109, 173, 200, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='targetRect'",
           "rect": [59, 173, 150, 200],
           "reason": "incremental"
         },
         {
+          "object": "LayoutSVGContainer g id='targetUse'",
+          "rect": [59, 273, 50, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [59, 273, 50, 200],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [59, 273, 50, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [59, 273, 50, 200],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='targetUse'",
           "rect": [34, 173, 50, 200],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [109, 173, 200, 200],
+          "rect": [34, 173, 50, 200],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [59, 273, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [209, 273, 200, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [59, 273, 50, 200],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [209, 273, 200, 200],
-          "reason": "bounds change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-image-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-image-expected.txt
index e28d928..5ac54afc 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-image-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 72, 402, 405],
           "reason": "forced by layout"
@@ -27,13 +22,15 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-inner-svg-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-inner-svg-expected.txt
index 6ac3059..6d112b9 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-inner-svg-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-inner-svg-expected.txt
@@ -7,23 +7,28 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 52, 402, 405],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGPath path",
-          "rect": [13, 207, 92, 91],
+          "rect": [27, 69, 364, 364],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [27, 69, 364, 364],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg",
+          "rect": [27, 69, 364, 364],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGPath path",
-          "rect": [27, 69, 364, 364],
+          "rect": [13, 207, 92, 91],
           "reason": "location change"
         },
         {
@@ -32,28 +37,20 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [27, 69, 364, 364],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg",
           "rect": [13, 207, 92, 91],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGViewportContainer svg",
-          "rect": [27, 69, 364, 364],
-          "reason": "location change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-shadow-tree-content-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-shadow-tree-content-expected.txt
index 1179c67..2982e852 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-shadow-tree-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-shadow-tree-content-expected.txt
@@ -7,31 +7,36 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 72, 402, 405],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutSVGContainer g id='targetUse'",
-          "rect": [59, 73, 150, 200],
+          "object": "LayoutSVGRoot svg",
+          "rect": [109, 73, 300, 400],
           "reason": "incremental"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [59, 273, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
           "rect": [209, 273, 200, 200],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [209, 273, 200, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [59, 273, 150, 200],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGContainer g id='targetUse'",
+          "rect": [59, 73, 150, 200],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutSVGContainer use",
           "rect": [59, 73, 150, 200],
           "reason": "incremental"
@@ -42,48 +47,40 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [59, 273, 150, 200],
+          "object": "LayoutSVGRect rect id='targetRect1'",
+          "rect": [59, 73, 150, 200],
           "reason": "incremental"
         },
         {
+          "object": "LayoutSVGRect rect id='targetRect1'",
+          "rect": [59, 73, 150, 200],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGRect rect id='targetRect1'",
+          "rect": [59, 73, 150, 200],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [59, 273, 50, 200],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRect rect id='targetRect'",
           "rect": [59, 273, 50, 200],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [209, 273, 200, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='targetRect1'",
-          "rect": [59, 73, 150, 200],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGRect rect id='targetRect1'",
-          "rect": [59, 73, 150, 200],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGRect rect id='targetRect1'",
-          "rect": [59, 73, 150, 200],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [109, 73, 300, 400],
-          "reason": "incremental"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.txt
index 6fc3800..77e59813f0 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 72, 402, 405],
           "reason": "forced by layout"
@@ -22,8 +17,13 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [59, 273, 50, 50],
+          "object": "LayoutSVGRoot svg",
+          "rect": [9, 73, 400, 400],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='targetSymbol'",
+          "rect": [9, 73, 400, 400],
           "reason": "location change"
         },
         {
@@ -37,23 +37,20 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [9, 73, 400, 400],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='targetSymbol'",
-          "rect": [9, 73, 400, 400],
+          "object": "LayoutSVGRect rect",
+          "rect": [59, 273, 50, 50],
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-use-on-symbol-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-use-on-symbol-expected.txt
index e27c8183..fdd2c226 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-use-on-symbol-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-use-on-symbol-expected.txt
@@ -7,33 +7,38 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 52, 402, 405],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [18, 211, 82, 83],
+          "rect": [45, 87, 328, 328],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [45, 87, 328, 328],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [45, 87, 328, 328],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
+          "rect": [45, 87, 328, 328],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [45, 87, 328, 328],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
           "rect": [18, 211, 82, 83],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGPath path",
-          "rect": [45, 87, 328, 328],
+          "rect": [18, 211, 82, 83],
           "reason": "location change"
         },
         {
@@ -42,28 +47,20 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [45, 87, 328, 328],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
           "rect": [18, 211, 82, 83],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
-          "rect": [45, 87, 328, 328],
-          "reason": "location change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt
index fcf29d2..ad3a6cc2 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt
@@ -7,23 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 52, 402, 405],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [13, 207, 92, 91],
+          "rect": [27, 69, 364, 364],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutSVGPath path",
+          "rect": [27, 69, 364, 364],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [27, 69, 364, 364],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
+          "rect": [27, 69, 364, 364],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGContainer use",
-          "rect": [27, 69, 364, 364],
+          "rect": [13, 207, 92, 91],
           "reason": "bounds change"
         },
         {
@@ -32,38 +42,25 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGPath path",
-          "rect": [27, 69, 364, 364],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [13, 207, 92, 91],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [27, 69, 364, 364],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
           "rect": [13, 207, 92, 91],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
-          "rect": [27, 69, 364, 364],
-          "reason": "location change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
index c0a33974..b664f7a 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
@@ -7,36 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'index'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'pservers-pattern-01-b \u2190'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u2192 script-handle-01-b'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [24, 1011, 737, 21],
           "reason": "invalidate paint rectangle"
@@ -47,8 +17,31 @@
           "reason": "style change"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'index'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'pservers-pattern-01-b \u2190'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u2192 script-handle-01-b'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-dom-removal-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-dom-removal-expected.txt
index bf08059..98c6f85 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-dom-removal-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-dom-removal-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGContainer g id='objectsToRemove'",
           "rect": [0, 0, 201, 129],
           "reason": "became invisible"
@@ -22,18 +17,21 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [0, 0, 20, 20],
-          "reason": "layoutObject removal"
-        },
-        {
           "object": "LayoutSVGText text",
           "rect": [50, 110, 151, 19],
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutSVGRect rect",
+          "rect": [0, 0, 20, 20],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-repaint-including-stroke-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-repaint-including-stroke-expected.txt
index 1733c9163..8bc779e 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-repaint-including-stroke-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-repaint-including-stroke-expected.txt
@@ -7,53 +7,49 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Repaint me!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Repaint me!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [30, 0, 403, 59],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [80, 0, 550, 117],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [30, 0, 403, 59],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
           "rect": [80, 0, 550, 117],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGText text id='bounce'",
-          "rect": [30, 0, 403, 59],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='bounce'",
           "rect": [80, 0, 550, 117],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [30, 0, 403, 59],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [30, 0, 403, 59],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text id='bounce'",
+          "rect": [30, 0, 403, 59],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Repaint me!'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Repaint me!'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-xy-updates-SVGList-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-xy-updates-SVGList-expected.txt
index fc68538..a6f8214 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-xy-updates-SVGList-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-xy-updates-SVGList-expected.txt
@@ -7,53 +7,49 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Passes, if text is at 200x20'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Passes, if text is at 200x20'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [18, 193, 161, 19],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [208, 13, 161, 19],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGRoot svg:svg",
-          "rect": [18, 193, 161, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg:svg",
           "rect": [208, 13, 161, 19],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGText text id='ttt'",
-          "rect": [18, 193, 161, 19],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGText text id='ttt'",
           "rect": [208, 13, 161, 19],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [18, 193, 161, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGRoot svg:svg",
+          "rect": [18, 193, 161, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text id='ttt'",
+          "rect": [18, 193, 161, 19],
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Passes, if text is at 200x20'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Passes, if text is at 200x20'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/use-clipped-hit-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/use-clipped-hit-expected.txt
index 7bf8119c..202ed3e 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/use-clipped-hit-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/use-clipped-hit-expected.txt
@@ -7,21 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Passed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [90, 115, 60, 19],
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutSVGText text id='status'",
+          "rect": [90, 115, 60, 19],
+          "reason": "full"
+        },
+        {
           "object": "LayoutSVGInlineText #text",
           "rect": [90, 115, 43, 19],
           "reason": "layoutObject insertion"
@@ -32,18 +27,19 @@
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutSVGText text id='status'",
-          "rect": [90, 115, 60, 19],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Passed'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/use-detach-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/use-detach-expected.txt
index c5585f4..b5e3baf 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/use-detach-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/use-detach-expected.txt
@@ -7,33 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'use'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'use'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'use'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g id='use'",
+          "rect": [210, 58, 44, 64],
           "reason": "location change"
         },
         {
@@ -47,8 +22,18 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGContainer g id='use'",
-          "rect": [210, 58, 44, 64],
+          "object": "LayoutSVGContainer use",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [210, 58, 44, 38],
           "reason": "location change"
         },
         {
@@ -58,12 +43,77 @@
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [218, 94, 28, 28],
+          "rect": [210, 58, 44, 38],
           "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGContainer use",
           "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [218, 94, 28, 28],
           "reason": "location change"
         },
         {
@@ -73,7 +123,12 @@
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [210, 58, 44, 38],
+          "rect": [218, 94, 28, 28],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [218, 94, 28, 28],
           "reason": "layoutObject removal"
         },
         {
@@ -83,38 +138,18 @@
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [218, 94, 28, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [210, 58, 44, 38],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer use",
           "rect": [218, 94, 28, 28],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGContainer use",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
+          "object": "LayoutSVGEllipse circle id='use_circle'",
           "rect": [218, 94, 28, 28],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGEllipse circle id='use_circle'",
           "rect": [218, 94, 28, 28],
-          "reason": "layoutObject removal"
+          "reason": "location change"
         },
         {
           "object": "LayoutSVGEllipse circle id='use_circle'",
@@ -129,7 +164,7 @@
         {
           "object": "LayoutSVGEllipse circle id='use_circle'",
           "rect": [218, 94, 28, 28],
-          "reason": "location change"
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGEllipse circle id='use_circle'",
@@ -137,113 +172,63 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGEllipse circle id='use_circle'",
-          "rect": [218, 94, 28, 28],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'use'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'use'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'use'",
           "reason": "location change"
         },
         {
           "object": "LayoutSVGHiddenContainer g id='use'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='use'",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGHiddenContainer g id='use'",
-          "rect": [0, 0, 0, 0],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 38],
+          "object": "LayoutSVGHiddenContainer g id='use'",
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 38],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 38],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 38],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 38],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 38],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/use-setAttribute-crash-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/use-setAttribute-crash-expected.txt
index 0e95e5252..9c9579a 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/use-setAttribute-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/use-setAttribute-crash-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow body",
+          "rect": [8, 8, 784, 204],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow body",
@@ -17,27 +17,12 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow body",
-          "rect": [8, 8, 784, 204],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutSVGContainer svg:use id='use'",
           "rect": [33, 33, 50, 50],
           "reason": "full"
         },
         {
           "object": "LayoutSVGEllipse svg:circle id='circle'",
-          "rect": [53, 53, 10, 10],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGEllipse svg:circle id='circle'",
-          "rect": [8, 8, 25, 25],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGEllipse svg:circle id='circle'",
           "rect": [33, 33, 50, 50],
           "reason": "location change"
         },
@@ -48,22 +33,34 @@
         },
         {
           "object": "LayoutSVGViewportContainer svg id='symbol'",
+          "rect": [33, 33, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGEllipse svg:circle id='circle'",
+          "rect": [8, 8, 25, 25],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGEllipse svg:circle id='circle'",
           "rect": [53, 53, 10, 10],
           "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGViewportContainer svg id='symbol'",
-          "rect": [33, 33, 50, 50],
-          "reason": "location change"
+          "rect": [53, 53, 10, 10],
+          "reason": "layoutObject removal"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/filter-refresh-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/filters/filter-refresh-expected.txt
deleted file mode 100644
index f4c9586..0000000
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/filter-refresh-expected.txt
+++ /dev/null
@@ -1,244 +0,0 @@
-CONSOLE WARNING: SVG's SMIL animations (<animate>, <set>, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead.
-{
-  "bounds": [800, 600],
-  "children": [
-    {
-      "bounds": [800, 600],
-      "contentsOpaque": true,
-      "drawsContent": true,
-      "paintInvalidations": [
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 130, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 170, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [140, 60, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 36, 36],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 10, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate1'",
-          "rect": [140, 60, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate2'",
-          "rect": [140, 140, 36, 36],
-          "reason": "style change"
-        }
-      ]
-    }
-  ]
-}
-
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/add-background-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/add-background-property-on-root-expected.txt
index 7af92f7..5cd4b7b 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/add-background-property-on-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/add-background-property-on-root-expected.txt
@@ -18,7 +18,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/add-outline-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/add-outline-property-on-root-expected.txt
index 24ddb41..fb1b78a 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/add-outline-property-on-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/add-outline-property-on-root-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow HTML",
+          "rect": [-2, -2, 802, 123],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -17,23 +17,20 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [-2, -2, 802, 123],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [-2, -2, 120, 120],
           "reason": "style change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/image-with-clip-path-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/image-with-clip-path-expected.txt
index 65cd7f6..e2b9a92 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/image-with-clip-path-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/image-with-clip-path-expected.txt
@@ -7,94 +7,90 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGContainer g id='g'",
-          "rect": [0, 0, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='g'",
-          "rect": [20, 20, 60, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='g'",
-          "rect": [20, 20, 60, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='g'",
-          "rect": [175, 25, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer defs",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer defs",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGImage image",
-          "rect": [0, 0, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGImage image",
-          "rect": [20, 20, 60, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGImage image",
-          "rect": [20, 20, 60, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGImage image",
-          "rect": [175, 25, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='r'",
-          "rect": [0, 0, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='r'",
-          "rect": [0, 0, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='r'",
-          "rect": [175, 25, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGResourceClipper clipPath id='p'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGResourceClipper clipPath id='p'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [0, 10, 222, 70],
           "reason": "incremental"
         },
         {
           "object": "LayoutSVGRoot svg",
+          "rect": [0, 75, 222, 5],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGRect rect id='r'",
+          "rect": [0, 0, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='r'",
+          "rect": [0, 0, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='g'",
+          "rect": [20, 20, 60, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='g'",
+          "rect": [20, 20, 60, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGImage image",
+          "rect": [20, 20, 60, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGImage image",
+          "rect": [20, 20, 60, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='g'",
+          "rect": [175, 25, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGImage image",
+          "rect": [175, 25, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='r'",
+          "rect": [175, 25, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='g'",
+          "rect": [0, 0, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGImage image",
+          "rect": [0, 0, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
           "rect": [222, 0, 3, 75],
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [0, 75, 222, 5],
-          "reason": "incremental"
+          "object": "LayoutSVGHiddenContainer defs",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer defs",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGResourceClipper clipPath id='p'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGResourceClipper clipPath id='p'",
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/inner-svg-change-viewPort-relative-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/inner-svg-change-viewPort-relative-expected.txt
index 2d04287d..999e345 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/inner-svg-change-viewPort-relative-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/inner-svg-change-viewPort-relative-expected.txt
@@ -7,88 +7,84 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'right-aligned text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'right-aligned text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [80, 120, 20, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [180, 120, 20, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 85, 100, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [100, 85, 100, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGPath polygon id='triangle'",
-          "rect": [80, 120, 20, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath polygon id='triangle'",
-          "rect": [180, 120, 20, 20],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRect rect",
           "rect": [0, 0, 200, 200],
           "reason": "full"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [80, 60, 20, 20],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [180, 60, 20, 20],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [100, 0, 100, 200],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 85, 100, 19],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [100, 85, 100, 19],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg id='inner'",
           "rect": [0, 0, 200, 200],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGRoot svg",
+          "rect": [100, 0, 100, 200],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [100, 85, 100, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [100, 85, 100, 19],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 85, 100, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 85, 100, 19],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [180, 120, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath polygon id='triangle'",
+          "rect": [180, 120, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [180, 60, 20, 20],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [80, 120, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath polygon id='triangle'",
+          "rect": [80, 120, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [80, 60, 20, 20],
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'right-aligned text'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'right-aligned text'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/modify-transferred-listitem-different-attr-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/modify-transferred-listitem-different-attr-expected.txt
index 17836f4d..6a82a15 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/modify-transferred-listitem-different-attr-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/modify-transferred-listitem-different-attr-expected.txt
@@ -7,51 +7,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' B C'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGText text id='target'",
+          "rect": [23, 8, 85, 23],
           "reason": "full"
         },
         {
-          "object": "InlineTextBox ' B C'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox ' Y Z'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'X Y Z'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'X'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [103, 8, 5, 23],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [58, 61, 50, 10],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [23, 61, 85, 10],
           "reason": "incremental"
@@ -62,28 +22,57 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSVGText text id='target'",
-          "rect": [23, 8, 85, 23],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [58, 61, 50, 10],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [103, 8, 5, 23],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' B C'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' B C'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' Y Z'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'A'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'A'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'X Y Z'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'X'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/outline-offset-text-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/outline-offset-text-expected.txt
index 71c8099..e6acf75 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/outline-offset-text-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/outline-offset-text-expected.txt
@@ -7,26 +7,26 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "outline"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [103, 26, 160, 113],
           "reason": "outline"
         },
         {
+          "object": "LayoutSVGText text",
+          "rect": [103, 26, 160, 113],
+          "reason": "full"
+        },
+        {
           "object": "LayoutSVGInlineText #text",
           "rect": [63, 26, 160, 113],
           "reason": "outline"
         },
         {
+          "object": "LayoutSVGText text",
+          "rect": [63, 26, 160, 113],
+          "reason": "full"
+        },
+        {
           "object": "LayoutSVGRoot svg",
           "rect": [118, 41, 130, 83],
           "reason": "bounds change"
@@ -37,23 +37,19 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [103, 26, 160, 113],
+          "object": "InlineTextBox 'Foo'",
           "reason": "full"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [63, 26, 160, 113],
+          "object": "InlineTextBox 'Foo'",
+          "reason": "outline"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/remove-background-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/remove-background-property-on-root-expected.txt
index 7af92f7..5cd4b7b 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/remove-background-property-on-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/remove-background-property-on-root-expected.txt
@@ -18,7 +18,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/remove-outline-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/remove-outline-property-on-root-expected.txt
index 24ddb41..fb1b78a 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/remove-outline-property-on-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/remove-outline-property-on-root-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow HTML",
+          "rect": [-2, -2, 802, 123],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -17,23 +17,20 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [-2, -2, 802, 123],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [-2, -2, 120, 120],
           "reason": "style change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
index a4333f6..e29b74e 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutSVGContainer g",
           "rect": [9, 13, 46, 28],
           "reason": "bounds change"
@@ -37,13 +27,19 @@
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/repaint-non-scaling-stroke-text-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
index a4333f6..e29b74e 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutSVGContainer g",
           "rect": [9, 13, 46, 28],
           "reason": "bounds change"
@@ -37,13 +27,19 @@
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/text-mask-update-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/text-mask-update-expected.txt
index 62e9ced..4b8d90c 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/text-mask-update-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/repaint/text-mask-update-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [10, 33, 41, 22],
-          "reason": "layoutObject removal"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 3, 46, 22],
           "reason": "layoutObject insertion"
@@ -32,16 +17,6 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [10, 33, 41, 17],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [10, 33, 41, 17],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [10, 3, 46, 22],
           "reason": "bounds change"
@@ -52,18 +27,39 @@
           "reason": "style change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [10, 33, 41, 22],
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "LayoutSVGText text id='text2'",
           "rect": [10, 33, 41, 22],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGRect rect",
+          "rect": [10, 33, 41, 17],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [10, 33, 41, 17],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/text/append-text-node-to-tspan-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/text/append-text-node-to-tspan-expected.txt
index 5d933f0..82445081 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/text/append-text-node-to-tspan-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/text/append-text-node-to-tspan-expected.txt
@@ -7,51 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 63, 307, 377],
           "reason": "location change"
@@ -62,13 +17,47 @@
           "reason": "style change"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SS'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/text/ems-display-none-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/text/ems-display-none-expected.txt
index 48986e1d..6f31843 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/text/ems-display-none-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/text/ems-display-none-expected.txt
@@ -7,31 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Two lines of text should be visible.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Two lines of text should be visible.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGContainer g",
           "rect": [50, 54, 561, 86],
           "reason": "bounds change"
@@ -72,8 +47,27 @@
           "reason": "layoutObject insertion"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Two lines of text should be visible.'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Two lines of text should be visible.'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/text/exs-display-none-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/text/exs-display-none-expected.txt
index ab173b2..42d4a832 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/text/exs-display-none-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/text/exs-display-none-expected.txt
@@ -7,31 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Two lines of text should be visible.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Two lines of text should be visible.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGContainer g",
           "rect": [50, 50, 561, 82],
           "reason": "bounds change"
@@ -72,8 +47,27 @@
           "reason": "layoutObject insertion"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Two lines of text should be visible.'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Two lines of text should be visible.'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/text/modify-text-node-in-tspan-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/text/modify-text-node-in-tspan-expected.txt
index 8cf0d53..15df770 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/text/modify-text-node-in-tspan-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/text/modify-text-node-in-tspan-expected.txt
@@ -7,51 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 63, 307, 377],
           "reason": "full"
@@ -62,13 +17,47 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/text/remove-text-node-from-tspan-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/text/remove-text-node-from-tspan-expected.txt
index 96817552..71fb07af 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/text/remove-text-node-from-tspan-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/text/remove-text-node-from-tspan-expected.txt
@@ -7,74 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'FAIL'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 63, 307, 377],
-          "reason": "layoutObject removal"
+          "reason": "bounds change"
         },
         {
           "object": "LayoutSVGInlineText #text",
@@ -99,7 +34,7 @@
         {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 63, 307, 377],
-          "reason": "bounds change"
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGRoot (positioned) svg",
@@ -127,13 +62,63 @@
           "reason": "full"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'FAIL'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/text/remove-tspan-from-text-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/text/remove-tspan-from-text-expected.txt
index 5d26d84..9849f36 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/text/remove-tspan-from-text-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/text/remove-tspan-from-text-expected.txt
@@ -7,46 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'FAIL'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 63, 307, 257],
           "reason": "layoutObject removal"
@@ -62,13 +22,43 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'FAIL'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-rescale-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-rescale-expected.txt
index 7ae187b0..6ac6aa3 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-rescale-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-rescale-expected.txt
@@ -7,138 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRoot (positioned) svg",
+          "rect": [0, 13, 402, 187],
           "reason": "bounds change"
         },
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRoot (positioned) svg",
+          "rect": [0, 0, 402, 163],
           "reason": "bounds change"
         },
         {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [0, 0, 1, 1],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [210, 13, 100, 48],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [6, 3, 4, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [210, 113, 100, 48],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='text1g'",
-          "rect": [0, 0, 1, 1],
+          "object": "LayoutSVGContainer g id='text2g'",
+          "rect": [0, 63, 402, 100],
           "reason": "full"
         },
         {
@@ -147,24 +27,64 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSVGContainer g id='text2g'",
-          "rect": [0, 63, 402, 100],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGContainer g id='text3g'",
-          "rect": [0, 3, 14, 4],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGContainer g id='text3g'",
           "rect": [0, 113, 402, 87],
           "reason": "full"
         },
         {
-          "object": "LayoutSVGForeignObject foreignObject",
-          "rect": [0, 0, 1, 1],
-          "reason": "location change"
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 114, 193, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 114, 193, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 114, 193, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [0, 114, 193, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 114, 193, 46],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 64, 193, 46],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 14, 193, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 14, 193, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 14, 193, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [0, 14, 193, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 14, 193, 46],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGForeignObject foreignObject",
@@ -173,67 +93,17 @@
         },
         {
           "object": "LayoutSVGForeignObject foreignObject",
-          "rect": [6, 3, 4, 4],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGForeignObject foreignObject",
           "rect": [210, 113, 100, 87],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 14, 193, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 14, 193, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 14, 193, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [310, 14, 92, 46],
+          "object": "LayoutBlockFlow P",
+          "rect": [210, 113, 100, 48],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 3, 7, 2],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 114, 193, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 3, 7, 2],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 114, 193, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 3, 7, 2],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 114, 193, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [9, 3, 5, 2],
+          "object": "LayoutBlockFlow P",
+          "rect": [210, 13, 100, 48],
           "reason": "location change"
         },
         {
@@ -242,44 +112,14 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg",
-          "rect": [0, 0, 402, 163],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot (positioned) svg",
-          "rect": [0, 13, 402, 187],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 14, 193, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 3, 7, 2],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 114, 193, 46],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGText text",
-          "rect": [0, 14, 193, 46],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [310, 14, 92, 46],
+          "rect": [310, 114, 92, 46],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [0, 64, 193, 46],
-          "reason": "forced by layout"
+          "object": "LayoutSVGViewportContainer svg",
+          "rect": [310, 114, 92, 46],
+          "reason": "location change"
         },
         {
           "object": "LayoutSVGText text",
@@ -287,53 +127,18 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [0, 3, 7, 2],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 114, 193, 46],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [9, 3, 5, 2],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [310, 14, 92, 46],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [310, 114, 92, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg",
           "rect": [310, 14, 92, 46],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGViewportContainer svg",
-          "rect": [9, 3, 5, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg",
-          "rect": [310, 114, 92, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 1, 1],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [210, 14, 92, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [6, 3, 4, 2],
+          "rect": [310, 14, 92, 46],
           "reason": "location change"
         },
         {
@@ -342,73 +147,232 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [210, 14, 92, 46],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='text3g'",
+          "rect": [0, 3, 14, 4],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 3, 7, 2],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 3, 7, 2],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 3, 7, 2],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [0, 3, 7, 2],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 3, 7, 2],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [9, 3, 5, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [9, 3, 5, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg",
+          "rect": [9, 3, 5, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGForeignObject foreignObject",
+          "rect": [6, 3, 4, 4],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [6, 3, 4, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [6, 3, 4, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [0, 0, 1, 1],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='text1g'",
+          "rect": [0, 0, 1, 1],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGForeignObject foreignObject",
+          "rect": [0, 0, 1, 1],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [0, 0, 1, 1],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-selection-text-05-t-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-selection-text-05-t-expected.txt
index c08193cb..006906e6 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-selection-text-05-t-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-selection-text-05-t-expected.txt
@@ -7,533 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '$Revision: 1.8 $'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1.x 1.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1.x 2.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1.x 4.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2.x 1.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2.x 2.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2.x 4.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4.x 1.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4.x 2.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4.x 4.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'end'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'middle'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'start'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'text-anchor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'text-anchor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'text-anchor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
-          "rect": [16, 91, 76, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 141, 76, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 191, 76, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 241, 76, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 291, 76, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 341, 76, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 391, 76, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 441, 76, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 491, 76, 34],
+          "rect": [16, 523, 446, 77],
           "reason": "selection"
         },
         {
@@ -543,52 +18,7 @@
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [225, 36, 50, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [250, 101, 37, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 151, 61, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 201, 113, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [250, 235, 37, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 285, 61, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 335, 44, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [250, 385, 37, 45],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 435, 61, 29],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 485, 113, 29],
+          "rect": [520, 13, 127, 34],
           "reason": "selection"
         },
         {
@@ -598,47 +28,12 @@
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [378, 36, 77, 34],
+          "rect": [266, 485, 113, 29],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [398, 101, 37, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 151, 61, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 201, 104, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [411, 235, 39, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 285, 61, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 335, 46, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [411, 385, 29, 45],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 435, 61, 29],
+          "rect": [266, 201, 113, 21],
           "reason": "selection"
         },
         {
@@ -648,52 +43,7 @@
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [520, 13, 127, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [563, 36, 41, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [546, 101, 38, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [590, 151, 62, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [590, 201, 95, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [573, 235, 39, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [590, 285, 62, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [590, 335, 45, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [565, 385, 29, 45],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [590, 435, 62, 29],
+          "rect": [428, 201, 104, 21],
           "reason": "selection"
         },
         {
@@ -703,222 +53,732 @@
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [16, 523, 446, 77],
+          "rect": [590, 201, 95, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [378, 36, 77, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 491, 76, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 441, 76, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 391, 76, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 341, 76, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 291, 76, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 241, 76, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 191, 76, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 141, 76, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 91, 76, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [590, 285, 62, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [590, 435, 62, 29],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [590, 151, 62, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [428, 285, 61, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [266, 285, 61, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [428, 435, 61, 29],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [266, 435, 61, 29],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [428, 151, 61, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [266, 151, 61, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [225, 36, 50, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [428, 335, 46, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [590, 335, 45, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [266, 335, 44, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [563, 36, 41, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [573, 235, 39, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [411, 235, 39, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [546, 101, 38, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [250, 235, 37, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [250, 385, 37, 45],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [398, 101, 37, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [250, 101, 37, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [565, 385, 29, 45],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [411, 385, 29, 45],
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '$Revision: 1.8 $'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1.x 1.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1.x 2.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1.x 4.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2.x 1.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2.x 2.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2.x 4.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4.x 1.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4.x 2.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4.x 4.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'end'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'middle'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'start'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'text-anchor'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'text-anchor'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'text-anchor'",
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text id='revision'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/text/tspan-dynamic-positioning-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/text/tspan-dynamic-positioning-expected.txt
index 7d9d803d..265afd99 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/text/tspan-dynamic-positioning-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/text/tspan-dynamic-positioning-expected.txt
@@ -7,53 +7,38 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This text should be at visible at 200,200'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This text should be at visible at 200,200'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [20, 5, 240, 19],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [200, 185, 240, 19],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [20, 5, 240, 19],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
           "rect": [200, 185, 240, 19],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGTSpan tspan id='ts'",
-          "rect": [20, 5, 240, 19],
+          "rect": [200, 185, 240, 19],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGText text",
+          "rect": [200, 185, 240, 19],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [20, 5, 240, 19],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [20, 5, 240, 19],
+          "reason": "bounds change"
+        },
+        {
           "object": "LayoutSVGTSpan tspan id='ts'",
-          "rect": [200, 185, 240, 19],
+          "rect": [20, 5, 240, 19],
           "reason": "full"
         },
         {
@@ -62,18 +47,27 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [200, 185, 240, 19],
-          "reason": "forced by layout"
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This text should be at visible at 200,200'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This text should be at visible at 200,200'",
+          "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/transforms/animated-path-inside-transformed-html-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/transforms/animated-path-inside-transformed-html-expected.txt
index c4c99c0..c90c5ad 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/transforms/animated-path-inside-transformed-html-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/transforms/animated-path-inside-transformed-html-expected.txt
@@ -6,28 +6,73 @@
       "contentsOpaque": true,
       "drawsContent": true,
       "backgroundColor": "#FFFFFF",
-      "repaintRects": [
-        [355, 128, 103, 101],
-        [352, 397, 98, 99],
-        [246, 106, 121, 28],
-        [246, 106, 121, 28],
-        [203, 336, 123, 44],
-        [203, 336, 123, 44],
-        [187, 106, 310, 390],
-        [111, 85, 101, 100],
-        [90, 208, 98, 98],
-        [90, 85, 277, 249]
-      ],
-      "paintInvalidationClients": [
-        "RootInlineBox",
-        "InlineTextBox 'This is some text'",
-        "LayoutSVGRoot svg",
-        "LayoutSVGRect rect id='rect'",
-        "LayoutSVGText text id='text'",
-        "RootInlineBox",
-        "LayoutSVGInlineText #text",
-        "InlineTextBox 'This is some text'",
-        "LayoutSVGImage image id='image'"
+      "paintInvalidations": [
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [187, 106, 310, 390],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [90, 85, 277, 249],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [203, 336, 123, 44],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text id='text'",
+          "rect": [203, 336, 123, 44],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [246, 106, 121, 28],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text id='text'",
+          "rect": [246, 106, 121, 28],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [355, 128, 103, 101],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [111, 85, 101, 100],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGImage image id='image'",
+          "rect": [352, 397, 98, 99],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGImage image id='image'",
+          "rect": [90, 208, 98, 98],
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This is some text'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This is some text'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "RootInlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
+          "reason": "full"
+        }
       ]
     }
   ]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt
index b830ea60..c0c8e86 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt
@@ -8,198 +8,128 @@
       "backgroundColor": "#FFFFFF",
       "paintInvalidations": [
         {
-          "object": "LayoutHTMLCanvas CANVAS id='copycanvas'",
-          "rect": [427, 515, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='copyimage'",
-          "rect": [285, 515, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='copysolid color'",
-          "rect": [143, 515, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='copyvideo'",
           "rect": [569, 515, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-atopcanvas'",
-          "rect": [427, 415, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-atopimage'",
-          "rect": [285, 415, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-atopsolid color'",
-          "rect": [143, 415, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='destination-atopvideo'",
           "rect": [569, 415, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-incanvas'",
-          "rect": [427, 315, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-inimage'",
-          "rect": [285, 315, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-insolid color'",
-          "rect": [143, 315, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='destination-invideo'",
           "rect": [569, 315, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outcanvas'",
-          "rect": [457, 365, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outimage'",
-          "rect": [315, 365, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outsolid color'",
-          "rect": [173, 365, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outvideo'",
-          "rect": [599, 365, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-overcanvas'",
-          "rect": [457, 265, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-overimage'",
-          "rect": [315, 265, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-oversolid color'",
-          "rect": [173, 265, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-overvideo'",
-          "rect": [599, 265, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lightercanvas'",
-          "rect": [457, 465, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lighterimage'",
-          "rect": [315, 465, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lightersolid color'",
-          "rect": [173, 465, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lightervideo'",
-          "rect": [599, 465, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopcanvas'",
-          "rect": [457, 215, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopimage'",
-          "rect": [315, 215, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopsolid color'",
-          "rect": [173, 215, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopvideo'",
-          "rect": [599, 215, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-incanvas'",
-          "rect": [427, 115, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-inimage'",
-          "rect": [285, 115, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-insolid color'",
-          "rect": [143, 115, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-invideo'",
-          "rect": [569, 115, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-outcanvas'",
-          "rect": [427, 165, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-outimage'",
-          "rect": [285, 165, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-outsolid color'",
-          "rect": [143, 165, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='source-outvideo'",
           "rect": [569, 165, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='source-overcanvas'",
-          "rect": [457, 65, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='source-invideo'",
+          "rect": [569, 115, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='source-overimage'",
-          "rect": [315, 65, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='copycanvas'",
+          "rect": [427, 515, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='source-oversolid color'",
-          "rect": [173, 65, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='destination-atopcanvas'",
+          "rect": [427, 415, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-incanvas'",
+          "rect": [427, 315, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-outcanvas'",
+          "rect": [427, 165, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-incanvas'",
+          "rect": [427, 115, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='copyimage'",
+          "rect": [285, 515, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-atopimage'",
+          "rect": [285, 415, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-inimage'",
+          "rect": [285, 315, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-outimage'",
+          "rect": [285, 165, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-inimage'",
+          "rect": [285, 115, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='copysolid color'",
+          "rect": [143, 515, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-atopsolid color'",
+          "rect": [143, 415, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-insolid color'",
+          "rect": [143, 315, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-outsolid color'",
+          "rect": [143, 165, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-insolid color'",
+          "rect": [143, 115, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='xorvideo'",
+          "rect": [599, 565, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='lightervideo'",
+          "rect": [599, 465, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outvideo'",
+          "rect": [599, 365, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-overvideo'",
+          "rect": [599, 265, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopvideo'",
+          "rect": [599, 215, 50, 40],
           "reason": "invalidate paint rectangle"
         },
         {
@@ -213,18 +143,88 @@
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutHTMLCanvas CANVAS id='lightercanvas'",
+          "rect": [457, 465, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outcanvas'",
+          "rect": [457, 365, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-overcanvas'",
+          "rect": [457, 265, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopcanvas'",
+          "rect": [457, 215, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-overcanvas'",
+          "rect": [457, 65, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
           "object": "LayoutHTMLCanvas CANVAS id='xorimage'",
           "rect": [315, 565, 50, 40],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutHTMLCanvas CANVAS id='lighterimage'",
+          "rect": [315, 465, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outimage'",
+          "rect": [315, 365, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-overimage'",
+          "rect": [315, 265, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopimage'",
+          "rect": [315, 215, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-overimage'",
+          "rect": [315, 65, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
           "object": "LayoutHTMLCanvas CANVAS id='xorsolid color'",
           "rect": [173, 565, 50, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='xorvideo'",
-          "rect": [599, 565, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='lightersolid color'",
+          "rect": [173, 465, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outsolid color'",
+          "rect": [173, 365, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-oversolid color'",
+          "rect": [173, 265, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopsolid color'",
+          "rect": [173, 215, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-oversolid color'",
+          "rect": [173, 65, 50, 40],
           "reason": "invalidate paint rectangle"
         }
       ],
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt
index 2bd450f..e16094ec 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt
@@ -13,419 +13,337 @@
           "drawsContent": true,
           "paintInvalidations": [
             {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
               "object": "LayoutText #text",
               "rect": [0, 0, 48, 656],
               "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
             }
           ],
           "children": [
@@ -438,419 +356,337 @@
                   "drawsContent": true,
                   "paintInvalidations": [
                     {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
                       "object": "LayoutText #text",
                       "rect": [0, 0, 48, 656],
                       "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
                     }
                   ]
                 }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt
index 4745135..1ed7999 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [259, 40, 40, 19],
           "reason": "full"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [259, 40, 40, 19],
+          "object": "InlineTextBox 'findme'",
           "reason": "full"
         }
       ],
@@ -25,63 +24,18 @@
           "drawsContent": true,
           "paintInvalidations": [
             {
-              "object": "InlineTextBox 'Can you findme in this boring text?'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'Findme in a typewriter!'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'Findme on a path! Did you findme?'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'findme'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'findme'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'findme'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'findme'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
               "object": "LayoutSVGInlineText #text",
               "rect": [10, 75, 208, 19],
               "reason": "full"
             },
             {
               "object": "LayoutSVGInlineText #text",
-              "rect": [10, 131, 138, 12],
-              "reason": "full"
-            },
-            {
-              "object": "LayoutSVGInlineText #text",
               "rect": [20, 164, 202, 72],
               "reason": "full"
             },
             {
-              "object": "LayoutText #text",
-              "rect": [83, 0, 40, 19],
-              "reason": "full"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [204, 0, 40, 19],
+              "object": "LayoutSVGInlineText #text",
+              "rect": [10, 131, 138, 12],
               "reason": "full"
             },
             {
@@ -91,8 +45,46 @@
             },
             {
               "object": "LayoutText #text",
+              "rect": [204, 0, 40, 19],
+              "reason": "full"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [83, 0, 40, 19],
+              "reason": "full"
+            },
+            {
+              "object": "LayoutText #text",
               "rect": [47, 20, 40, 19],
               "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'Can you findme in this boring text?'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'Findme in a typewriter!'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'Findme on a path! Did you findme?'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'findme'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'findme'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'findme'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'findme'",
+              "reason": "full"
             }
           ],
           "children": [
@@ -105,63 +97,18 @@
                   "drawsContent": true,
                   "paintInvalidations": [
                     {
-                      "object": "InlineTextBox 'Can you findme in this boring text?'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'Findme in a typewriter!'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'Findme on a path! Did you findme?'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'findme'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'findme'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'findme'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'findme'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
                       "object": "LayoutSVGInlineText #text",
                       "rect": [10, 75, 208, 19],
                       "reason": "full"
                     },
                     {
                       "object": "LayoutSVGInlineText #text",
-                      "rect": [10, 131, 138, 12],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "LayoutSVGInlineText #text",
                       "rect": [20, 164, 202, 72],
                       "reason": "full"
                     },
                     {
-                      "object": "LayoutText #text",
-                      "rect": [83, 0, 40, 19],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [204, 0, 40, 19],
+                      "object": "LayoutSVGInlineText #text",
+                      "rect": [10, 131, 138, 12],
                       "reason": "full"
                     },
                     {
@@ -171,8 +118,46 @@
                     },
                     {
                       "object": "LayoutText #text",
+                      "rect": [204, 0, 40, 19],
+                      "reason": "full"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [83, 0, 40, 19],
+                      "reason": "full"
+                    },
+                    {
+                      "object": "LayoutText #text",
                       "rect": [47, 20, 40, 19],
                       "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'Can you findme in this boring text?'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'Findme in a typewriter!'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'Findme on a path! Did you findme?'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'findme'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'findme'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'findme'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'findme'",
+                      "reason": "full"
                     }
                   ]
                 }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt
index 6ea8c1f2e..de5b4ad0 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt
@@ -13,123 +13,8 @@
           "drawsContent": true,
           "paintInvalidations": [
             {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
               "object": "LayoutText #text",
-              "rect": [0, -50, 74, 19],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, -30, 74, 19],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, -10, 74, 19],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 10, 74, 19],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 30, 74, 19],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 50, 74, 19],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 70, 74, 19],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 90, 74, 19],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 110, 74, 19],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 130, 74, 19],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 150, 74, 19],
+              "rect": [0, 190, 74, 19],
               "reason": "style change"
             },
             {
@@ -139,7 +24,109 @@
             },
             {
               "object": "LayoutText #text",
-              "rect": [0, 190, 74, 19],
+              "rect": [0, 150, 74, 19],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 130, 74, 19],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 110, 74, 19],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 90, 74, 19],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 70, 74, 19],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 50, 74, 19],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 30, 74, 19],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 10, 74, 19],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, -10, 74, 19],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, -30, 74, 19],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, -50, 74, 19],
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
               "reason": "style change"
             }
           ],
@@ -153,123 +140,8 @@
                   "drawsContent": true,
                   "paintInvalidations": [
                     {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
                       "object": "LayoutText #text",
-                      "rect": [0, 0, 74, 19],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 20, 74, 19],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 40, 74, 19],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 60, 74, 19],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 80, 74, 19],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 100, 74, 19],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 120, 74, 19],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 140, 74, 19],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 160, 74, 19],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 180, 74, 19],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 200, 74, 19],
+                      "rect": [0, 240, 74, 19],
                       "reason": "style change"
                     },
                     {
@@ -279,7 +151,109 @@
                     },
                     {
                       "object": "LayoutText #text",
-                      "rect": [0, 240, 74, 19],
+                      "rect": [0, 200, 74, 19],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 180, 74, 19],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 160, 74, 19],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 140, 74, 19],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 120, 74, 19],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 100, 74, 19],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 80, 74, 19],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 60, 74, 19],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 40, 74, 19],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 20, 74, 19],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 0, 74, 19],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
                       "reason": "style change"
                     }
                   ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/button/button-reset-focus-by-mouse-then-keydown-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/button/button-reset-focus-by-mouse-then-keydown-expected.txt
index a919449..1a3b088d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/button/button-reset-focus-by-mouse-then-keydown-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/button/button-reset-focus-by-mouse-then-keydown-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Reset'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutButton BUTTON",
+          "rect": [3, 4, 55, 29],
           "reason": "full"
         },
         {
@@ -17,18 +17,16 @@
           "reason": "full"
         },
         {
-          "object": "LayoutButton BUTTON",
-          "rect": [3, 4, 55, 29],
-          "reason": "full"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [16, 11, 29, 13],
           "reason": "full"
         },
         {
+          "object": "InlineTextBox 'Reset'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt
index 4cf1e515..a2e91fb 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Submit'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutButton INPUT",
+          "rect": [3, 4, 62, 29],
           "reason": "full"
         },
         {
@@ -17,18 +17,16 @@
           "reason": "full"
         },
         {
-          "object": "LayoutButton INPUT",
-          "rect": [3, 4, 62, 29],
-          "reason": "full"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [16, 11, 36, 13],
           "reason": "full"
         },
         {
+          "object": "InlineTextBox 'Submit'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/change-text-content-and-background-color-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/change-text-content-and-background-color-expected.txt
index 3784293..3e1d7c1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/change-text-content-and-background-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/change-text-content-and-background-color-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'NEW'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTextControl (positioned) INPUT id='input'",
+          "rect": [8, 8, 244, 67],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
@@ -27,13 +22,15 @@
           "reason": "full"
         },
         {
-          "object": "LayoutTextControl (positioned) INPUT id='input'",
-          "rect": [8, 8, 244, 67],
-          "reason": "style change"
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'NEW'",
+          "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/control-clip-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/control-clip-expected.txt
index 4c53a72..61d75c2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/control-clip-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/control-clip-expected.txt
@@ -7,26 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [9, 84, 198, 14],
           "reason": "invalidate paint rectangle"
@@ -47,13 +27,27 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SUCCESS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SUCCESS'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/search-field-cancel-expected.txt
index a8a01c2..446f0bb 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/search-field-cancel-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/search-field-cancel-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'some text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [17, 45, 108, 13],
           "reason": "forced by layout"
@@ -22,8 +17,11 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'some text'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/subtree-root-skipped-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/subtree-root-skipped-expected.txt
index 20d13826a..f554382 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/subtree-root-skipped-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/repaint/subtree-root-skipped-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='div'",
-          "rect": [8, 288, 10, 20],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [11, 11, 125, 13],
           "reason": "invalidate paint rectangle"
@@ -32,8 +17,20 @@
           "reason": "full"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV id='div'",
+          "rect": [8, 288, 10, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/filters/filter-refresh-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/filters/filter-refresh-expected.txt
deleted file mode 100644
index 2e861532..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/filters/filter-refresh-expected.txt
+++ /dev/null
@@ -1,244 +0,0 @@
-CONSOLE WARNING: SVG's SMIL animations (<animate>, <set>, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead.
-{
-  "bounds": [800, 600],
-  "children": [
-    {
-      "bounds": [800, 600],
-      "contentsOpaque": true,
-      "drawsContent": true,
-      "paintInvalidations": [
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 130, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 170, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [140, 60, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 36, 36],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 10, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate1'",
-          "rect": [140, 60, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate2'",
-          "rect": [140, 140, 36, 36],
-          "reason": "style change"
-        }
-      ]
-    }
-  ]
-}
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt
index a7110ac..96e8d0a7 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Submit'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutButton INPUT",
+          "rect": [3, 4, 64, 29],
           "reason": "full"
         },
         {
@@ -17,18 +17,16 @@
           "reason": "full"
         },
         {
-          "object": "LayoutButton INPUT",
-          "rect": [3, 4, 64, 29],
-          "reason": "full"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [16, 11, 38, 13],
           "reason": "full"
         },
         {
+          "object": "InlineTextBox 'Submit'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/change-text-content-and-background-color-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/change-text-content-and-background-color-expected.txt
index 77d7754..05ecb45 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/change-text-content-and-background-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/change-text-content-and-background-color-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'NEW'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTextControl (positioned) INPUT id='input'",
+          "rect": [8, 8, 244, 67],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
@@ -27,13 +22,15 @@
           "reason": "full"
         },
         {
-          "object": "LayoutTextControl (positioned) INPUT id='input'",
-          "rect": [8, 8, 244, 67],
-          "reason": "style change"
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'NEW'",
+          "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/control-clip-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/control-clip-expected.txt
index b8db344..cbc21f2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/control-clip-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/control-clip-expected.txt
@@ -7,26 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [9, 84, 198, 14],
           "reason": "invalidate paint rectangle"
@@ -47,13 +27,27 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SUCCESS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SUCCESS'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/details-open-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/details-open-repaint-expected.txt
index 09ddb91d..c16262b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/details-open-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/details-open-repaint-expected.txt
@@ -7,16 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='details-content'",
           "rect": [8, 68, 784, 19],
           "reason": "location change"
         },
         {
+          "object": "LayoutTextControl INPUT",
+          "rect": [8, 68, 123, 19],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [11, 71, 117, 13],
           "reason": "location change"
@@ -27,28 +27,27 @@
           "reason": "full"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='inner-editor'",
+          "reason": "scroll"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTextControl INPUT",
-          "rect": [8, 68, 123, 19],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/japanese-rl-selection-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/japanese-rl-selection-repaint-expected.txt
index bad222e..28ff4dc 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/japanese-rl-selection-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/japanese-rl-selection-repaint-expected.txt
@@ -7,73 +7,60 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [420, 23, 352, 548],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox '\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B\u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u8A2A\u554F\u3057'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [420, 23, 352, 548],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/multi-layout-one-frame-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/multi-layout-one-frame-expected.txt
index da1d16c..91f6aea275 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/multi-layout-one-frame-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/multi-layout-one-frame-expected.txt
@@ -7,24 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASSED'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASSED'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow DIV id='inner-editor'",
+          "rect": [138, 11, 117, 13],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
@@ -32,9 +17,9 @@
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV id='inner-editor'",
-          "rect": [138, 11, 117, 13],
-          "reason": "invalidate paint rectangle"
+          "object": "LayoutText #text",
+          "rect": [138, 11, 40, 13],
+          "reason": "full"
         },
         {
           "object": "LayoutText #text",
@@ -42,18 +27,27 @@
           "reason": "full"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [138, 11, 40, 13],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASSED'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASSED'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/search-field-cancel-expected.txt
index 9b65753..1be4df8d2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/search-field-cancel-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/search-field-cancel-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'some text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [17, 45, 100, 13],
           "reason": "forced by layout"
@@ -22,8 +17,11 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'some text'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/stacked-diacritics-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/stacked-diacritics-expected.txt
index aa8dbb9..8ffd2eb2d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/stacked-diacritics-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/stacked-diacritics-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u1EA6\u1EA4\u1EAA\u1EA8\u1EB0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='stacked'",
           "rect": [19, 153, 200, 47],
           "reason": "bounds change"
@@ -22,8 +17,11 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "InlineTextBox '\u1EA6\u1EA4\u1EAA\u1EA8\u1EB0'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/subtree-root-skipped-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/subtree-root-skipped-expected.txt
index c2dab1eb..2820e31 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/subtree-root-skipped-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/repaint/subtree-root-skipped-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='div'",
-          "rect": [8, 288, 10, 20],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [11, 11, 117, 13],
           "reason": "invalidate paint rectangle"
@@ -32,8 +17,20 @@
           "reason": "full"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV id='div'",
+          "rect": [8, 288, 10, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/filters/filter-refresh-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/filters/filter-refresh-expected.txt
deleted file mode 100644
index 44e3cab..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/filters/filter-refresh-expected.txt
+++ /dev/null
@@ -1,244 +0,0 @@
-CONSOLE WARNING: SVG's SMIL animations (<animate>, <set>, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead.
-{
-  "bounds": [800, 600],
-  "children": [
-    {
-      "bounds": [800, 600],
-      "contentsOpaque": true,
-      "drawsContent": true,
-      "paintInvalidations": [
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 130, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 170, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [140, 60, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 36, 36],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 10, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate1'",
-          "rect": [140, 60, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate2'",
-          "rect": [140, 140, 36, 36],
-          "reason": "style change"
-        }
-      ]
-    }
-  ]
-}
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/text-color-change-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/text-color-change-expected.txt
index c7cc6d6..39e0c8382 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/text-color-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/text-color-change-expected.txt
@@ -7,419 +7,337 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [8, 57, 47, 185],
           "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/text-match-highlight-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/text-match-highlight-expected.txt
index 91c72126..b5899c5 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/text-match-highlight-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/text-match-highlight-expected.txt
@@ -7,73 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Can you findme in this boring text?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Findme in a typewriter!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Findme on a path! Did you findme?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 126, 227, 18],
           "reason": "full"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [10, 180, 139, 12],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
           "rect": [20, 214, 200, 72],
           "reason": "full"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [282, 36, 45, 18],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [90, 54, 46, 18],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [224, 54, 45, 18],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [10, 180, 139, 12],
           "reason": "full"
         },
         {
@@ -83,8 +28,55 @@
         },
         {
           "object": "LayoutText #text",
+          "rect": [90, 54, 46, 18],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [282, 36, 45, 18],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [224, 54, 45, 18],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutText #text",
           "rect": [52, 72, 45, 18],
           "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Can you findme in this boring text?'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Findme in a typewriter!'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Findme on a path! Did you findme?'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/updating-scrolling-container-and-content-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/updating-scrolling-container-and-content-expected.txt
index 7517999..ab272b1a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/updating-scrolling-container-and-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/updating-scrolling-container-and-content-expected.txt
@@ -7,123 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 108, 75, 5],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 113, 75, 18],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 131, 75, 18],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 149, 75, 18],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 167, 75, 18],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 185, 75, 18],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 203, 75, 18],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 221, 75, 18],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 239, 75, 18],
+          "rect": [8, 275, 75, 18],
           "reason": "style change"
         },
         {
@@ -133,7 +18,107 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 275, 75, 18],
+          "rect": [8, 239, 75, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 221, 75, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 203, 75, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 185, 75, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 167, 75, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 149, 75, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 131, 75, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 113, 75, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 108, 75, 5],
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/repaint/fixed-pos-with-abs-pos-child-scroll-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/repaint/fixed-pos-with-abs-pos-child-scroll-expected.txt
index 6d702c8a..7dee22f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/repaint/fixed-pos-with-abs-pos-child-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/repaint/fixed-pos-with-abs-pos-child-scroll-expected.txt
@@ -8,21 +8,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Hi!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Hi!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='abs'",
-          "rect": [425, 480, 360, 90],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='abs'",
           "rect": [425, 980, 360, 90],
           "reason": "location change"
@@ -38,18 +23,8 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='fixed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='fixed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [425, 480, 22, 18],
+          "object": "LayoutBlockFlow (positioned) DIV id='abs'",
+          "rect": [425, 480, 360, 90],
           "reason": "location change"
         },
         {
@@ -68,13 +43,32 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [425, 480, 22, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Hi!'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Hi!'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='fixed'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='fixed'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt
index 31306a3..84fda52 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt
@@ -19,7 +19,6 @@
             },
             {
               "object": "RootInlineBox",
-              "rect": [0, 0, 0, 0],
               "reason": "full"
             }
           ],
@@ -39,7 +38,6 @@
                     },
                     {
                       "object": "RootInlineBox",
-                      "rect": [0, 0, 0, 0],
                       "reason": "full"
                     }
                   ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/repaint/should-not-clip-composited-viewport-scrolling-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/repaint/should-not-clip-composited-viewport-scrolling-layer-expected.txt
index 76aa151..fc88bcd 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/repaint/should-not-clip-composited-viewport-scrolling-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/repaint/should-not-clip-composited-viewport-scrolling-layer-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/iframe-inside-squashed-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/iframe-inside-squashed-layer-expected.txt
index 697b8bdc1..815af49 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/iframe-inside-squashed-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/iframe-inside-squashed-layer-expected.txt
@@ -22,24 +22,9 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "InlineTextBox 'test1'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "full"
-                },
-                {
-                  "object": "InlineTextBox 'test1'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "full"
-                },
-                {
-                  "object": "LayoutBlockFlow BODY",
-                  "rect": [8, 508, 284, 18],
-                  "reason": "forced by layout"
-                },
-                {
-                  "object": "LayoutBlockFlow BODY",
-                  "rect": [8, 508, 269, 142],
-                  "reason": "forced by layout"
+                  "object": "LayoutView #document",
+                  "rect": [0, 500, 300, 150],
+                  "reason": "style change"
                 },
                 {
                   "object": "LayoutBlockFlow HTML",
@@ -57,9 +42,14 @@
                   "reason": "full"
                 },
                 {
-                  "object": "LayoutView #document",
-                  "rect": [0, 500, 300, 150],
-                  "reason": "style change"
+                  "object": "LayoutBlockFlow BODY",
+                  "rect": [8, 508, 284, 18],
+                  "reason": "forced by layout"
+                },
+                {
+                  "object": "LayoutBlockFlow BODY",
+                  "rect": [8, 508, 269, 142],
+                  "reason": "forced by layout"
                 },
                 {
                   "object": "LayoutView #document",
@@ -67,23 +57,31 @@
                   "reason": "scroll"
                 },
                 {
+                  "object": "InlineTextBox 'test1'",
+                  "reason": "full"
+                },
+                {
+                  "object": "InlineTextBox 'test1'",
+                  "reason": "full"
+                },
+                {
+                  "object": "LayoutView #document",
+                  "reason": "scroll"
+                },
+                {
                   "object": "RootInlineBox",
-                  "rect": [0, 0, 0, 0],
                   "reason": "full"
                 },
                 {
                   "object": "RootInlineBox",
-                  "rect": [0, 0, 0, 0],
                   "reason": "full"
                 },
                 {
                   "object": "RootInlineBox",
-                  "rect": [0, 0, 0, 0],
                   "reason": "full"
                 },
                 {
                   "object": "VerticalScrollbar",
-                  "rect": [0, 0, 0, 0],
                   "reason": "scroll"
                 }
               ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/remove-squashed-layer-plus-move-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/remove-squashed-layer-plus-move-expected.txt
index 2b192a8c..d0a67955 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/remove-squashed-layer-plus-move-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/remove-squashed-layer-plus-move-expected.txt
@@ -18,42 +18,36 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [8, 62, 769, 54],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='container'",
           "rect": [8, 8, 769, 108],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutBlockFlow DIV id='container'",
+          "rect": [8, 62, 769, 54],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ],
@@ -71,14 +65,14 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "InlineBox",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "full"
+                  "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
+                  "rect": [0, 108, 1000, 50],
+                  "reason": "layer"
                 },
                 {
-                  "object": "InlineBox",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "full"
+                  "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
+                  "rect": [0, 54, 1000, 50],
+                  "reason": "location change"
                 },
                 {
                   "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
@@ -87,23 +81,21 @@
                 },
                 {
                   "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
-                  "rect": [0, 108, 1000, 50],
-                  "reason": "layer"
-                },
-                {
-                  "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
                   "rect": [0, 0, 100, 50],
                   "reason": "location change"
                 },
                 {
-                  "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
-                  "rect": [0, 54, 1000, 50],
-                  "reason": "location change"
-                },
-                {
                   "object": "LayoutBlockFlow (relative positioned) DIV id='foo' class='mv-tile'",
                   "rect": [0, 0, 100, 50],
                   "reason": "layoutObject removal"
+                },
+                {
+                  "object": "InlineBox",
+                  "reason": "full"
+                },
+                {
+                  "object": "InlineBox",
+                  "reason": "full"
                 }
               ]
             }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/selection-repaint-with-gaps-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/selection-repaint-with-gaps-expected.txt
index f6f6fa9..c3c71ead 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/selection-repaint-with-gaps-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/selection-repaint-with-gaps-expected.txt
@@ -20,28 +20,24 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
+                  "object": "LayoutText #text",
+                  "rect": [0, 80, 42, 36],
+                  "reason": "selection"
+                },
+                {
                   "object": "InlineTextBox 'ipsum'",
-                  "rect": [0, 0, 0, 0],
                   "reason": "selection"
                 },
                 {
                   "object": "InlineTextBox 'lorem'",
-                  "rect": [0, 0, 0, 0],
                   "reason": "selection"
                 },
                 {
                   "object": "LayoutBlockFlow (positioned) DIV id='item1' class='item'",
-                  "rect": [0, 0, 0, 0],
                   "reason": "selection"
                 },
                 {
                   "object": "LayoutBlockFlow DIV class='inline-block'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutText #text",
-                  "rect": [0, 80, 42, 36],
                   "reason": "selection"
                 }
               ]
@@ -73,46 +69,6 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "InlineTextBox 'ipsum'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "InlineTextBox 'ipsum'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "InlineTextBox 'lorem'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "InlineTextBox 'lorem'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutBlockFlow (positioned) DIV id='item1' class='item'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutBlockFlow (positioned) DIV id='item2' class='item'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutBlockFlow DIV class='inline-block'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutBlockFlow DIV class='inline-block'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
                   "object": "LayoutText #text",
                   "rect": [0, 80, 44, 36],
                   "reason": "selection"
@@ -121,6 +77,38 @@
                   "object": "LayoutText #text",
                   "rect": [0, 160, 42, 36],
                   "reason": "selection"
+                },
+                {
+                  "object": "InlineTextBox 'ipsum'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "InlineTextBox 'ipsum'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "InlineTextBox 'lorem'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "InlineTextBox 'lorem'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "LayoutBlockFlow (positioned) DIV id='item1' class='item'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "LayoutBlockFlow (positioned) DIV id='item2' class='item'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "LayoutBlockFlow DIV class='inline-block'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "LayoutBlockFlow DIV class='inline-block'",
+                  "reason": "selection"
                 }
               ]
             }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css3/flexbox/repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/css3/flexbox/repaint-expected.txt
index 275bd4c..2ac73e0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css3/flexbox/repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/css3/flexbox/repaint-expected.txt
@@ -7,153 +7,68 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Aenean laoreet dolor id urna eleifend aliquet. Nulla vel dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet.'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV id='content'",
+          "rect": [138, 116, 654, 90],
           "reason": "location change"
         },
         {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow P",
+          "rect": [138, 116, 654, 90],
           "reason": "location change"
         },
         {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [138, 116, 652, 90],
           "reason": "location change"
         },
         {
-          "object": "InlineTextBox 'Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV id='content'",
+          "rect": [148, 116, 644, 108],
           "reason": "location change"
         },
         {
-          "object": "InlineTextBox 'a lobortis id, faucibus id quam.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'aliquet. Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV id='content'",
+          "rect": [148, 116, 644, 108],
           "reason": "location change"
         },
         {
-          "object": "InlineTextBox 'aliquet. Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'condimentum leo neque sed nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow P",
+          "rect": [148, 116, 644, 108],
           "reason": "location change"
         },
         {
-          "object": "InlineTextBox 'condimentum leo neque sed nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'feugiat vehicula. Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow P",
+          "rect": [148, 116, 644, 108],
           "reason": "location change"
         },
         {
-          "object": "InlineTextBox 'feugiat vehicula. Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'feugiat vehicula. Sed volutpat, tellus vel varius vestibulum,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'id, faucibus id quam.'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [148, 116, 632, 108],
           "reason": "location change"
         },
         {
-          "object": "InlineTextBox 'id, faucibus id quam.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula.'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [148, 116, 632, 108],
           "reason": "location change"
         },
         {
-          "object": "InlineTextBox 'nascetur ridiculus mus. Sed congue magna vitae dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'purus quam mollis sapien, in condimentum leo neque sed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'sociis natoque penatibus et magnis dis parturient montes,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='content'",
           "rect": [400, 116, 392, 162],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='content'",
-          "rect": [148, 116, 644, 108],
+          "object": "LayoutBlockFlow P",
+          "rect": [400, 116, 392, 162],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='content'",
-          "rect": [148, 116, 644, 108],
-          "reason": "location change"
+          "object": "LayoutBlockFlow DIV id='left'",
+          "rect": [8, 224, 392, 54],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow DIV id='content'",
-          "rect": [138, 116, 654, 90],
+          "object": "LayoutText #text",
+          "rect": [400, 116, 391, 162],
           "reason": "location change"
         },
         {
@@ -163,7 +78,7 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='left'",
-          "rect": [8, 224, 392, 54],
+          "rect": [8, 206, 140, 18],
           "reason": "incremental"
         },
         {
@@ -172,133 +87,175 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow DIV id='left'",
-          "rect": [8, 206, 140, 18],
-          "reason": "incremental"
+          "object": "InlineTextBox 'Aenean laoreet dolor id urna eleifend aliquet. Nulla vel dolor'",
+          "reason": "full"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [400, 116, 392, 162],
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet.'",
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [148, 116, 644, 108],
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend'",
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [148, 116, 644, 108],
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et'",
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [138, 116, 654, 90],
+          "object": "InlineTextBox 'Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed'",
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [400, 116, 391, 162],
+          "object": "InlineTextBox 'a lobortis id, faucibus id quam.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'aliquet. Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'aliquet. Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque'",
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [148, 116, 632, 108],
+          "object": "InlineTextBox 'condimentum leo neque sed nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'condimentum leo neque sed nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis'",
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [148, 116, 632, 108],
+          "object": "InlineTextBox 'feugiat vehicula. Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'feugiat vehicula. Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in'",
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [138, 116, 652, 90],
+          "object": "InlineTextBox 'feugiat vehicula. Sed volutpat, tellus vel varius vestibulum,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'id, faucibus id quam.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'id, faucibus id quam.'",
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula.'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'nascetur ridiculus mus. Sed congue magna vitae dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'purus quam mollis sapien, in condimentum leo neque sed'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'sociis natoque penatibus et magnis dis parturient montes,'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css3/flexbox/repaint-on-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/css3/flexbox/repaint-on-layout-expected.txt
index 4526512..5685066 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css3/flexbox/repaint-on-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/css3/flexbox/repaint-on-layout-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (floating) DIV class='state'",
           "rect": [712, 8, 80, 24],
           "reason": "location change"
@@ -22,13 +17,15 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root-expected.txt
index 66caeda1..7a50083 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root-expected.txt
@@ -7,23 +7,20 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [185, 201, 18, 173],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'Some text in vertical mode'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='test'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [185, 201, 18, 173],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/button/button-reset-focus-by-mouse-then-keydown-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/button/button-reset-focus-by-mouse-then-keydown-expected.txt
index 391d15372..29b0bca1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/button/button-reset-focus-by-mouse-then-keydown-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/button/button-reset-focus-by-mouse-then-keydown-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Reset'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutButton BUTTON",
+          "rect": [3, 4, 56, 29],
           "reason": "full"
         },
         {
@@ -17,18 +17,16 @@
           "reason": "full"
         },
         {
-          "object": "LayoutButton BUTTON",
-          "rect": [3, 4, 56, 29],
-          "reason": "full"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [16, 11, 30, 13],
           "reason": "full"
         },
         {
+          "object": "InlineTextBox 'Reset'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-focus-by-mouse-then-keydown-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-focus-by-mouse-then-keydown-expected.txt
index 6e878b6..9bc6949 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-focus-by-mouse-then-keydown-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-focus-by-mouse-then-keydown-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='thumb'",
-          "rect": [67, 10, 15, 16],
+          "object": "LayoutSlider INPUT",
+          "rect": [7, 7, 135, 21],
           "reason": "full"
         },
         {
@@ -22,8 +22,8 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSlider INPUT",
-          "rect": [7, 7, 135, 21],
+          "object": "LayoutBlockFlow DIV id='thumb'",
+          "rect": [67, 10, 15, 16],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt
index f8d54a7e..f5ae228 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Submit'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutButton INPUT",
+          "rect": [3, 4, 63, 29],
           "reason": "full"
         },
         {
@@ -17,18 +17,16 @@
           "reason": "full"
         },
         {
-          "object": "LayoutButton INPUT",
-          "rect": [3, 4, 63, 29],
-          "reason": "full"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [16, 11, 37, 13],
           "reason": "full"
         },
         {
+          "object": "InlineTextBox 'Submit'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/4776765-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/4776765-expected.txt
index 041b29f..95ec3a26 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/4776765-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/4776765-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [3, 37, 794, 64],
           "reason": "outline"
@@ -28,17 +18,24 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='div'",
-          "rect": [7, 59, 3, 20],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='div'",
           "rect": [7, 77, 3, 20],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutBlockFlow DIV id='div'",
+          "rect": [7, 59, 3, 20],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/abspos-shift-image-incorrect-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/abspos-shift-image-incorrect-repaint-expected.txt
index 10e68f41..190fdd2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/abspos-shift-image-incorrect-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/abspos-shift-image-incorrect-repaint-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='shiftMe'",
           "rect": [0, 0, 1500, 236],
           "reason": "location change"
@@ -22,6 +17,21 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 800, 52],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
+          "rect": [704, 0, 700, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
+          "rect": [454, 0, 700, 236],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
           "rect": [0, 0, 700, 236],
           "reason": "location change"
@@ -32,29 +42,9 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
-          "rect": [704, 0, 700, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
-          "rect": [454, 0, 700, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 800, 52],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutImage IMG",
-          "rect": [0, 0, 214, 232],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutImage IMG",
-          "rect": [-250, 0, 214, 232],
-          "reason": "location change"
+          "object": "LayoutView #document",
+          "rect": [1250, 0, 250, 585],
+          "reason": "incremental"
         },
         {
           "object": "LayoutImage IMG",
@@ -67,8 +57,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutImage IMG",
+          "rect": [0, 0, 214, 232],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutImage IMG",
+          "rect": [-250, 0, 214, 232],
           "reason": "location change"
         },
         {
@@ -82,33 +77,31 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox '\n'",
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [1250, 0, 250, 585],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/block-layout-inline-children-float-positioned-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/block-layout-inline-children-float-positioned-expected.txt
index c089334..8f884bf3 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/block-layout-inline-children-float-positioned-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/block-layout-inline-children-float-positioned-expected.txt
@@ -7,13 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'the quick brown fox jumped over the lazy dog'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [305, 35, 297, 18],
           "reason": "location change"
         },
         {
-          "object": "InlineTextBox 'the quick brown fox jumped over the lazy dog'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [153, 35, 297, 18],
           "reason": "location change"
         },
         {
@@ -27,23 +27,19 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [305, 35, 297, 18],
+          "object": "InlineTextBox 'the quick brown fox jumped over the lazy dog'",
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [153, 35, 297, 18],
+          "object": "InlineTextBox 'the quick brown fox jumped over the lazy dog'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/block-no-inflow-children-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/block-no-inflow-children-expected.txt
index 8355de0..ec60fc0f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/block-no-inflow-children-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/block-no-inflow-children-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'La la la la'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [0, 0, 64, 18],
           "reason": "forced by layout"
@@ -27,13 +17,19 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'La la la la'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/box-inline-resize-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/box-inline-resize-expected.txt
index 0dd83d4..f502c31 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/box-inline-resize-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/box-inline-resize-expected.txt
@@ -7,18 +7,23 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow H2",
+          "rect": [40, 103, 113, 29],
+          "reason": "location change"
         },
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutText #text",
+          "rect": [40, 103, 113, 29],
+          "reason": "location change"
         },
         {
-          "object": "InlineTextBox 'Chromium'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow H2",
+          "rect": [8, 103, 113, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 103, 113, 29],
           "reason": "location change"
         },
         {
@@ -27,48 +32,32 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow H2",
-          "rect": [8, 103, 113, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow H2",
-          "rect": [40, 103, 113, 29],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutImage IMG id='foo'",
           "rect": [8, 84, 32, 32],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [8, 103, 113, 29],
-          "reason": "location change"
+          "object": "InlineBox",
+          "reason": "full"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [40, 103, 113, 29],
+          "object": "InlineTextBox 'Chromium'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-5699-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-5699-expected.txt
index d5254f0..759280be 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-5699-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-5699-expected.txt
@@ -7,54 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [43, 148, 1, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [43, 178, 1, 18],
-          "reason": "bounds change"
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 130, 784, 66],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow P",
@@ -62,9 +17,14 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 130, 784, 66],
-          "reason": "invalidate paint rectangle"
+          "object": "LayoutText #text",
+          "rect": [8, 178, 36, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 148, 36, 18],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutInline SPAN id='d'",
@@ -73,32 +33,62 @@
         },
         {
           "object": "LayoutText #text",
+          "rect": [8, 145, 4, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
           "rect": [8, 130, 4, 18],
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [8, 145, 4, 18],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 148, 36, 18],
+          "object": "LayoutBR BR",
+          "rect": [43, 178, 1, 18],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [8, 178, 36, 18],
+          "object": "LayoutBR BR",
+          "rect": [43, 148, 1, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBR BR",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-6278-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-6278-expected.txt
index 3f40540..76316be 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-6278-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-6278-expected.txt
@@ -7,183 +7,156 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Curabitur pretium, quam quis semper'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Curabitur pretium, quam quis semper'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'Phasellus vehicula, sem at posuere'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'Quisque eu nulla non nisi molestie'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'ac, laoreet non, suscipit sed, sapien.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'accumsan. Etiam tellus urna, laoreet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'fringilla orci nibh sed neque. Quisque eu'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'malesuada, est libero feugiat libero, vel'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'malesuada, est libero feugiat libero,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'nec ullamcorper lacus ante vulputate pede.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'nec ullamcorper lacus ante vulputate'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'nulla non nisi molestie accumsan. Etiam'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'pede.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'posuere vehicula, augue nibh molestie nisl,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'sed, sapien. Phasellus vehicula, sem at'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'tellus urna, laoreet ac, laoreet non, suscipit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'vehicula, augue nibh molestie nisl,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'vel fringilla orci nibh sed neque.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [10, 132, 292, 144],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [10, 132, 242, 180],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
           "rect": [10, 281, 292, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV",
+          "rect": [10, 132, 242, 180],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
           "rect": [10, 317, 242, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD id='col1'",
-          "rect": [252, 132, 50, 199],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTableCell TD id='col1'",
           "rect": [10, 331, 242, 36],
           "reason": "incremental"
         },
         {
-          "object": "LayoutTableCell TD id='target'",
-          "rect": [254, 132, 52, 235],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [250, 132, 36, 144],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [10, 276, 240, 36],
           "reason": "incremental"
         },
         {
+          "object": "LayoutTableCell TD id='target'",
+          "rect": [254, 132, 52, 235],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD id='col1'",
+          "rect": [252, 132, 50, 199],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [250, 132, 36, 144],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Curabitur pretium, quam quis semper'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Curabitur pretium, quam quis semper'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Phasellus vehicula, sem at posuere'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Quisque eu nulla non nisi molestie'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'ac, laoreet non, suscipit sed, sapien.'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'accumsan. Etiam tellus urna, laoreet'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'fringilla orci nibh sed neque. Quisque eu'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'malesuada, est libero feugiat libero, vel'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'malesuada, est libero feugiat libero,'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'nec ullamcorper lacus ante vulputate pede.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'nec ullamcorper lacus ante vulputate'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'nulla non nisi molestie accumsan. Etiam'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'pede.'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'posuere vehicula, augue nibh molestie nisl,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'sed, sapien. Phasellus vehicula, sem at'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'tellus urna, laoreet ac, laoreet non, suscipit'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'vehicula, augue nibh molestie nisl,'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'vel fringilla orci nibh sed neque.'",
+          "reason": "incremental"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-6473-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-6473-expected.txt
index 014a2426..5b0aa808 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-6473-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-6473-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutBlockFlow DIV id='allcontent'",
+          "rect": [8, 130, 784, 50],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) P",
@@ -22,11 +22,6 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='allcontent'",
-          "rect": [8, 130, 784, 50],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [8, 146, 70, 18],
           "reason": "location change"
@@ -37,8 +32,11 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'SUCCESS'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-7235-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-7235-expected.txt
index 8d07728c..1acdcf8e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-7235-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/bugzilla-7235-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 148, 784, 18],
           "reason": "invalidate paint rectangle"
@@ -32,8 +17,19 @@
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/caret-with-transformation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/caret-with-transformation-expected.txt
index 1ea7b50..2e0251f7 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/caret-with-transformation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/caret-with-transformation-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV id='div'",
-          "rect": [41, 35, 13, 19],
+          "rect": [344, 210, 13, 19],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='div'",
-          "rect": [344, 210, 13, 19],
+          "rect": [41, 35, 13, 19],
           "reason": "invalidate paint rectangle"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/change-text-content-and-background-color-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/change-text-content-and-background-color-expected.txt
index 30011b7..5490d875 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/change-text-content-and-background-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/change-text-content-and-background-color-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'NEW'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTextControl (positioned) INPUT id='input'",
+          "rect": [8, 8, 244, 67],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
@@ -27,13 +22,15 @@
           "reason": "full"
         },
         {
-          "object": "LayoutTextControl (positioned) INPUT id='input'",
-          "rect": [8, 8, 244, 67],
-          "reason": "style change"
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'NEW'",
+          "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/clip-with-layout-delta-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/clip-with-layout-delta-expected.txt
index d03132be..bbaa705 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/clip-with-layout-delta-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/clip-with-layout-delta-expected.txt
@@ -7,31 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) DIV",
           "rect": [108, 8, 100, 100],
           "reason": "background obscuration change"
         },
         {
+          "object": "LayoutBlockFlow SPAN id='t2' class='blue'",
+          "rect": [108, 8, 100, 100],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutBlockFlow DIV",
           "rect": [8, 8, 100, 100],
           "reason": "background obscuration change"
@@ -42,9 +27,9 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow SPAN id='t2' class='blue'",
-          "rect": [108, 8, 100, 100],
-          "reason": "style change"
+          "object": "LayoutText #text",
+          "rect": [108, 8, 4, 18],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
@@ -52,28 +37,35 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [108, 8, 4, 18],
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/control-clip-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/control-clip-expected.txt
index 482a9239..4b97918 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/control-clip-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/control-clip-expected.txt
@@ -7,26 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [9, 84, 198, 14],
           "reason": "invalidate paint rectangle"
@@ -37,23 +17,37 @@
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [82, 114, 52, 13],
-          "reason": "full"
-        },
-        {
           "object": "LayoutText (anonymous)",
           "rect": [9, 84, 52, 14],
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [82, 114, 52, 13],
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SUCCESS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SUCCESS'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/crbug-371640-4-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/crbug-371640-4-expected.txt
index 85f52e21..7d6dc72 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/crbug-371640-4-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/crbug-371640-4-expected.txt
@@ -7,42 +7,17 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [208, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
           "rect": [408, 84, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
-          "rect": [208, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
           "rect": [408, 84, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_outer' class='outer'",
-          "rect": [208, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_outer' class='outer'",
           "rect": [408, 84, 100, 100],
           "reason": "location change"
         },
@@ -58,11 +33,6 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='keep' class='item'",
-          "rect": [208, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='keep' class='item'",
           "rect": [408, 84, 100, 100],
           "reason": "location change"
         },
@@ -72,6 +42,31 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [208, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
+          "rect": [208, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_outer' class='outer'",
+          "rect": [208, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='keep' class='item'",
+          "rect": [208, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [408, 84, 4, 18],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [408, 84, 4, 18],
           "reason": "layoutObject removal"
@@ -82,18 +77,19 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [408, 84, 4, 18],
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/crbug-371640-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/crbug-371640-expected.txt
index 18ba9d6..9040b55d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/crbug-371640-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/crbug-371640-expected.txt
@@ -7,27 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (floating) DIV id='container'",
           "rect": [88, 84, 520, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
-          "rect": [88, 84, 260, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
           "rect": [348, 84, 260, 100],
           "reason": "location change"
         },
@@ -37,21 +22,6 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [88, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [348, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
-          "rect": [88, 84, 260, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
           "rect": [348, 84, 260, 100],
           "reason": "location change"
@@ -62,8 +32,18 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow DIV id='keep' class='item'",
-          "rect": [88, 84, 100, 100],
+          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
+          "rect": [88, 84, 260, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
+          "rect": [88, 84, 260, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [348, 84, 100, 100],
           "reason": "location change"
         },
         {
@@ -77,6 +57,21 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [88, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='keep' class='item'",
+          "rect": [88, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [348, 84, 4, 18],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [348, 84, 4, 18],
           "reason": "layoutObject removal"
@@ -87,18 +82,19 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [348, 84, 4, 18],
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/details-open-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/details-open-repaint-expected.txt
index 25fc16c..d3988c4 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/details-open-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/details-open-repaint-expected.txt
@@ -7,16 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='details-content'",
           "rect": [8, 68, 784, 19],
           "reason": "location change"
         },
         {
+          "object": "LayoutTextControl INPUT",
+          "rect": [8, 68, 131, 19],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [11, 71, 125, 13],
           "reason": "location change"
@@ -27,28 +27,27 @@
           "reason": "full"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='inner-editor'",
+          "reason": "scroll"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTextControl INPUT",
-          "rect": [8, 68, 131, 19],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/focus-continuations-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/focus-continuations-expected.txt
index 7cb6c8320..e1e641a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/focus-continuations-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/focus-continuations-expected.txt
@@ -12,11 +12,6 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='container'",
           "rect": [3, 83, 94, 30],
           "reason": "bounds change"
@@ -27,8 +22,11 @@
           "reason": "style change"
         },
         {
+          "object": "LayoutBlockFlow (anonymous)",
+          "reason": "forced by layout"
+        },
+        {
           "object": "LayoutInline SPAN id='outer'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/focus-enable-continuations-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/focus-enable-continuations-expected.txt
index 7cb6c8320..b379660 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/focus-enable-continuations-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/focus-enable-continuations-expected.txt
@@ -12,11 +12,6 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='container'",
           "rect": [3, 83, 94, 30],
           "reason": "bounds change"
@@ -27,8 +22,15 @@
           "reason": "style change"
         },
         {
+          "object": "LayoutBlockFlow (anonymous)",
+          "reason": "forced by layout"
+        },
+        {
           "object": "LayoutInline SPAN id='outer'",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutInline SPAN id='outer'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/focus-ring-on-child-move-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/focus-ring-on-child-move-expected.txt
index 4321283..3dd5a139 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/focus-ring-on-child-move-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/focus-ring-on-child-move-expected.txt
@@ -13,12 +13,12 @@
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='child'",
-          "rect": [150, 50, 20, 300],
+          "rect": [300, 50, 20, 300],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='child'",
-          "rect": [300, 50, 20, 300],
+          "rect": [150, 50, 20, 300],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/gradients-em-stops-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/gradients-em-stops-repaint-expected.txt
index bcd3755..3676021 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/gradients-em-stops-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/gradients-em-stops-repaint-expected.txt
@@ -7,38 +7,34 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV class='em-units'",
           "rect": [8, 8, 784, 146],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV class='indicator'",
-          "rect": [345, 19, 240, 20],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='box4' class='box'",
           "rect": [344, 18, 302, 122],
           "reason": "style change"
         },
         {
+          "object": "LayoutBlockFlow DIV class='indicator'",
+          "rect": [345, 19, 240, 20],
+          "reason": "style change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-color-change-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-color-change-expected.txt
index fb101c6..8d50a07 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-color-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-color-change-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutInline SPAN id='target'",
           "rect": [8, 68, 37, 18],
           "reason": "style change"
@@ -25,6 +15,14 @@
           "object": "LayoutText #text",
           "rect": [8, 68, 37, 18],
           "reason": "style change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-focus-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-focus-expected.txt
index 00fa32ae..93c2c945 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-focus-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-focus-expected.txt
@@ -7,33 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutInline A id='link'",
+          "rect": [-5, -5, 810, 242],
           "reason": "style change"
         },
         {
-          "object": "InlineTextBox 'Home'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'crbug.com/424078: ensure inline elements get their outline painted'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [-5, -5, 805, 28],
+          "object": "LayoutBlockFlow HTML",
+          "rect": [-5, -5, 805, 237],
           "reason": "bounds change"
         },
         {
@@ -42,8 +22,8 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [-5, -5, 805, 237],
+          "object": "LayoutBlockFlow (anonymous)",
+          "rect": [-5, -5, 805, 28],
           "reason": "bounds change"
         },
         {
@@ -52,23 +32,35 @@
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutInline A id='link'",
-          "rect": [-5, -5, 810, 242],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
           "reason": "style change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'Home'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'crbug.com/424078: ensure inline elements get their outline painted'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-outline-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-outline-repaint-expected.txt
index 77c1f51b..e8146c3a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-outline-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-outline-repaint-expected.txt
@@ -7,543 +7,439 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "outline"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "outline"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor sit amet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor sit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor sit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [5, 163, 103, 42],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [45, 183, 3, 20],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutInline SPAN id='test'",
           "rect": [5, 163, 98, 42],
           "reason": "outline"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [8, 166, 92, 36],
           "reason": "full"
         },
         {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [45, 183, 3, 20],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "outline"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "outline"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor sit amet'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor sit'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor sit'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-style-change-in-scrolled-view-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-style-change-in-scrolled-view-expected.txt
index 93bd57f..c66e9a1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-style-change-in-scrolled-view-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/inline-style-change-in-scrolled-view-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Text Text Text Text Text Text Text Text Text Text Text Text Text'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [0, 288, 415, 18],
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 288, 415, 18],
+          "object": "InlineTextBox 'Text Text Text Text Text Text Text Text Text Text Text Text Text'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/invalidation-after-opacity-change-subtree-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/invalidation-after-opacity-change-subtree-expected.txt
index cc72ab883..45c094f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/invalidation-after-opacity-change-subtree-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/invalidation-after-opacity-change-subtree-expected.txt
@@ -7,43 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'This test checks that switching opacity'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "InlineTextBox 'This test checks that switching opacity'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'This text should be visible in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "InlineTextBox 'This text should be visible in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'invalidates the full subtree.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "InlineTextBox 'invalidates the full subtree.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'output.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "InlineTextBox 'output.'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (positioned) DIV id='absolute'",
+          "rect": [8, 2000, 777, 350],
           "reason": "style change"
         },
         {
@@ -52,24 +17,9 @@
           "reason": "layer"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='absolute'",
-          "rect": [8, 2000, 777, 350],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 2045, 777, 109],
-          "reason": "layer"
+          "rect": [8, 2195, 777, 109],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow P",
@@ -83,7 +33,12 @@
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 2195, 777, 109],
+          "rect": [8, 2045, 777, 109],
+          "reason": "layer"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 2045, 774, 109],
           "reason": "style change"
         },
         {
@@ -94,26 +49,59 @@
         {
           "object": "LayoutText #text",
           "rect": [8, 2195, 653, 109],
-          "reason": "layer"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 2045, 774, 109],
           "reason": "style change"
         },
         {
           "object": "LayoutText #text",
           "rect": [8, 2195, 653, 109],
+          "reason": "layer"
+        },
+        {
+          "object": "InlineTextBox 'This test checks that switching opacity'",
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'This test checks that switching opacity'",
+          "reason": "layer"
+        },
+        {
+          "object": "InlineTextBox 'This text should be visible in the'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'This text should be visible in the'",
+          "reason": "layer"
+        },
+        {
+          "object": "InlineTextBox 'invalidates the full subtree.'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'invalidates the full subtree.'",
+          "reason": "layer"
+        },
+        {
+          "object": "InlineTextBox 'output.'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'output.'",
+          "reason": "layer"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='container'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='container'",
+          "reason": "layer"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/japanese-rl-selection-clear-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/japanese-rl-selection-clear-expected.txt
index 086efd6..dbeeb71 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/japanese-rl-selection-clear-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/japanese-rl-selection-clear-expected.txt
@@ -7,83 +7,68 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [387, 123, 385, 399],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox '\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3059\u304B\u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [387, 123, 385, 399],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/japanese-rl-selection-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/japanese-rl-selection-repaint-expected.txt
index 4b2315ce..79b89a18 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/japanese-rl-selection-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/japanese-rl-selection-repaint-expected.txt
@@ -7,73 +7,60 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [420, 23, 352, 560],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox '\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B\u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u8A2A\u554F\u3057\u305F\u30A6'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [420, 23, 352, 560],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-relative-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-relative-expected.txt
index 2c0a3bb..0f7e923 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-relative-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-relative-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) DIV id='target'",
           "rect": [8, 150, 784, 18],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset-expected.txt
index b24ad5c2..fc598a77 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [100, 118, 50, 18],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset2-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset2-expected.txt
index 39aa3f7..8804807 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset2-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [102, 120, 50, 18],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset3-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset3-expected.txt
index 9c8b08b1..259feb4 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset3-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset3-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [100, 118, 34, 18],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
index ee4d768..403bd0e5 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
@@ -7,43 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 40, 784, 104],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 200, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 220, 100, 100],
+          "object": "LayoutInline (relative positioned) SPAN id='target'",
+          "rect": [8, 220, 100, 104],
           "reason": "location change"
         },
         {
@@ -52,18 +22,8 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutInline (relative positioned) SPAN id='target'",
-          "rect": [8, 220, 100, 104],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 200, 100, 100],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 220, 100, 100],
           "reason": "location change"
         },
         {
@@ -72,18 +32,49 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 200, 100, 100],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [8, 200, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-1-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-1-expected.txt
index f5ae79c..6f78fdd8 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-1-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-1-expected.txt
@@ -7,447 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' twist itself'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice soon came to the conclusion that it was a very'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The chief difficulty Alice found at first was in'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'always getting up and walking off to other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'and was in the act of crawling away: besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'body tucked away,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'body tucked away,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'flamingo: she succeeded in getting its'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'generally a ridge or furrow in the way wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'give the hedgehog a blow with its head, it\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had got its head down, and was going to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'managing her\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'out, and was going to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'out, and was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'round and look up in her face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'send the hedgehog to, and, as the doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'such a puzzled expression'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'such a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that she could not help bursting out\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the ground,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'this, there was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'very provoking to find that the hedgehog had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'way wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='pinkFloat'",
-          "rect": [378, 138, 70, 30],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 353, 48, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 335, 48, 65],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 116, 418, 450],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutText #text",
-          "rect": [368, 80, 52, 108],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 188, 40, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [305, 170, 40, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 188, 406, 72],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [14, 170, 407, 72],
           "reason": "bounds change"
         },
@@ -463,12 +28,12 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [178, 350, 145, 18],
+          "rect": [14, 188, 406, 72],
           "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [65, 350, 145, 18],
+          "rect": [14, 404, 355, 36],
           "reason": "bounds change"
         },
         {
@@ -478,132 +43,462 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 404, 355, 36],
+          "rect": [178, 350, 145, 18],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [65, 350, 145, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV id='pinkFloat'",
+          "rect": [378, 138, 70, 30],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [368, 80, 52, 108],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 353, 48, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 335, 48, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [305, 170, 40, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 188, 40, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' twist itself'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice soon came to the conclusion that it was a very'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The chief difficulty Alice found at first was in'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'always getting up and walking off to other parts of\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'and was in the act of crawling away: besides all\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'besides all\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'body tucked away,\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'body tucked away,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'doubled-up\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'flamingo: she succeeded in getting its'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'generally a ridge or furrow in the way wherever\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'give the hedgehog a blow with its head, it\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had got its head down, and was going to\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'managing her\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'out, and was going to'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'out, and was'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'round and look up in her face, with\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'send the hedgehog to, and, as the doubled-up\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'such a puzzled expression'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'such a'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that she could not help bursting out\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the ground,'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'this, there was'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'to\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself,'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'very provoking to find that the hedgehog had\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'way wherever\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-10-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-10-expected.txt
index 8cf0cca..5197637 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-10-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-10-expected.txt
@@ -7,151 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 332, 418, 234],
+          "reason": "invalidate paint rectangle"
         },
         {
-          "object": "InlineTextBox ' was in a furious passion, and went'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [14, 404, 355, 36],
           "reason": "bounds change"
         },
         {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and shouting \u2018Off with his head!\u2019 or'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
           "rect": [14, 353, 48, 65],
           "reason": "location change"
@@ -162,83 +27,176 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 332, 418, 234],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 404, 355, 36],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [368, 422, 1, 54],
           "reason": "incremental"
         },
         {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and shouting \u2018Off with his head!\u2019 or'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u2018Off with\n'",
+          "reason": "incremental"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-2-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-2-expected.txt
index 2a7263cb..07d8f18 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-2-expected.txt
@@ -7,239 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'such a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'such a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'way wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 353, 48, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 357, 48, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 371, 48, 81],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 375, 48, 81],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 572, 418, 4],
-          "reason": "incremental"
+          "rect": [8, 170, 418, 400],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow P",
@@ -248,27 +18,12 @@
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 170, 418, 400],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutInline I id='would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
+          "rect": [8, 572, 418, 4],
+          "reason": "incremental"
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 188, 45, 22],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 188, 406, 72],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 191, 406, 73],
+          "rect": [14, 246, 406, 126],
           "reason": "bounds change"
         },
         {
@@ -278,57 +33,7 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 246, 406, 126],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [178, 350, 145, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [178, 354, 145, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 368, 304, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 372, 304, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 386, 304, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 390, 304, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 404, 355, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 408, 355, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 422, 355, 54],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 426, 355, 54],
+          "rect": [14, 480, 406, 90],
           "reason": "bounds change"
         },
         {
@@ -338,22 +43,271 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 480, 406, 90],
+          "rect": [14, 191, 406, 73],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [14, 188, 406, 72],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 426, 355, 54],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 422, 355, 54],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 408, 355, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 404, 355, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 390, 304, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 386, 304, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 372, 304, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 368, 304, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [178, 354, 145, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [178, 350, 145, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 375, 48, 81],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 371, 48, 81],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 357, 48, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 353, 48, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 188, 45, 22],
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'besides all\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'doubled-up\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'such a'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'such a'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'to\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'way wherever\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutInline I id='would'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-3-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-3-expected.txt
index f0ed2ca..69ec9d2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-3-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-3-expected.txt
@@ -7,177 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion, and went'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and shouting \u2018Off with his head!\u2019 or'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 371, 48, 81],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [356, 389, 64, 81],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 368, 418, 198],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutText #text",
-          "rect": [369, 368, 32, 18],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [65, 368, 355, 54],
           "reason": "bounds change"
         },
@@ -187,63 +22,187 @@
           "reason": "bounds change"
         },
         {
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [356, 389, 64, 81],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 371, 48, 81],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [369, 368, 32, 18],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [353, 422, 16, 54],
           "reason": "incremental"
         },
         {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and shouting \u2018Off with his head!\u2019 or'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u2018Off with\n'",
+          "reason": "incremental"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-4-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-4-expected.txt
index 82275b17..e5ae4168 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-4-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-4-expected.txt
@@ -7,131 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 435, 48, 17],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 368, 418, 198],
           "reason": "invalidate paint rectangle"
@@ -142,58 +17,148 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 435, 48, 17],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'head!\u2019 about once in a minute.\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-5-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-5-expected.txt
index 60777b2..b3eefcb 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-5-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-5-expected.txt
@@ -7,173 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [46, 353, 16, 65],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 332, 418, 234],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutText #text",
-          "rect": [178, 350, 145, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [162, 350, 145, 18],
+          "rect": [49, 368, 320, 54],
           "reason": "bounds change"
         },
         {
@@ -188,72 +28,189 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [49, 368, 320, 54],
+          "rect": [178, 350, 145, 18],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [162, 350, 145, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [46, 353, 16, 65],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-6-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-6-expected.txt
index 3f95c72..fc3dba3 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-6-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-6-expected.txt
@@ -7,59 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 332, 418, 90],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
@@ -67,43 +17,76 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 332, 418, 90],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [27, 353, 22, 19],
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'foo'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-8-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-8-expected.txt
index 6a68585d..5404f38 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-8-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-8-expected.txt
@@ -7,303 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' was in a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The chief difficulty Alice found at first was in'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'body tucked away,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'flamingo: she succeeded in getting its'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'managing her\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'out, and was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'such a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'way wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 353, 48, 65],
-          "reason": "layoutObject removal"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 80, 418, 396],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutText #text",
-          "rect": [178, 350, 145, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [127, 350, 145, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 368, 304, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 368, 336, 18],
+          "rect": [14, 404, 355, 72],
           "reason": "bounds change"
         },
         {
@@ -318,117 +28,331 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 404, 355, 72],
+          "rect": [14, 368, 336, 18],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [65, 368, 304, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [178, 350, 145, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [127, 350, 145, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 353, 48, 65],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' was in a'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The chief difficulty Alice found at first was in'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about once in a minute.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'besides all\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'body tucked away,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'doubled-up\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'flamingo: she succeeded in getting its'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'furious passion, and went\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'managing her\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'out, and was'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'such a'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'to\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'way wherever\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'would'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-9-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-9-expected.txt
index 237891e..1331e4e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-9-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-9-expected.txt
@@ -7,384 +7,69 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The chief difficulty Alice found at first was in'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'body tucked away,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'flamingo: she succeeded in getting its'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'managing her\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'out, and was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'such a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'way wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 371, 48, 81],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 389, 48, 81],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='yellowFloat'",
-          "rect": [372, 245, 48, 49],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 500, 600],
           "reason": "forced by layout"
         },
         {
+          "object": "LayoutView #document",
+          "rect": [0, 0, 485, 600],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 569, 418, 21],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 572, 418, 18],
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 569, 418, 21],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "rect": [14, 494, 406, 90],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 476, 406, 90],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 440, 355, 54],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 422, 355, 54],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 404, 355, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 404, 355, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 386, 304, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 386, 304, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 368, 304, 18],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
@@ -397,54 +82,19 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [65, 368, 304, 18],
-          "reason": "bounds change"
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 389, 48, 81],
+          "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [65, 386, 304, 18],
-          "reason": "bounds change"
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 371, 48, 81],
+          "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [65, 386, 304, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 404, 355, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 404, 355, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 422, 355, 54],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 440, 355, 54],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 476, 406, 90],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 494, 406, 90],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 485, 600],
-          "reason": "full"
+          "object": "LayoutBlockFlow (floating) SPAN id='yellowFloat'",
+          "rect": [372, 245, 48, 49],
+          "reason": "location change"
         },
         {
           "object": "LayoutView #document",
@@ -457,153 +107,407 @@
           "reason": "scroll"
         },
         {
+          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The chief difficulty Alice found at first was in'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about once in a minute.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'besides all\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'body tucked away,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'doubled-up\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'flamingo: she succeeded in getting its'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'managing her\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'out, and was'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'such a'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'to\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'was in a furious passion, and went\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'way wherever\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutView #document",
+          "reason": "scroll"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-in-scrolled-clipped-block-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-in-scrolled-clipped-block-expected.txt
index 76cc841..3102233 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-in-scrolled-clipped-block-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-in-scrolled-clipped-block-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '                         PASS     .'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [8, 8, 100, 18],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox '                         PASS     .'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-overflow-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-overflow-expected.txt
index 5c7dbee..d56cd4a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/line-overflow-expected.txt
@@ -7,89 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox ' eleifend lacus,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' eleifend'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'at sagittis eros leo pulvinar'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'augue'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'convallis,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'convallis.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'lacus, at sagittis eros leo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'pulvinar velit. Integer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'purus'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'purus'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'sollicitudin nisi ut urna blandit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'ut urna blandit convallis.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'velit. Integer sollicitudin nisi'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [8, 84, 200, 120],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutInline SPAN id='t'",
-          "rect": [38, 132, 36, 18],
-          "reason": "style change"
+          "object": "LayoutText #text",
+          "rect": [8, 114, 200, 90],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutInline SPAN id='t'",
@@ -98,42 +23,97 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [38, 132, 36, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [115, 114, 37, 18],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutInline SPAN id='t'",
+          "rect": [38, 132, 36, 18],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [8, 114, 200, 90],
+          "rect": [38, 132, 36, 18],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' eleifend lacus,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' eleifend'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'at sagittis eros leo pulvinar'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'augue'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'convallis,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'convallis.'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'lacus, at sagittis eros leo'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'pulvinar velit. Integer'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'purus'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'purus'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'sollicitudin nisi ut urna blandit'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'ut urna blandit convallis.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'velit. Integer sollicitudin nisi'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/lines-with-layout-delta-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/lines-with-layout-delta-expected.txt
index 1f2b433..937fdf1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/lines-with-layout-delta-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/lines-with-layout-delta-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (floating) DIV id='target'",
           "rect": [8, 58, 200, 18],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/list-marker-2-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/list-marker-2-expected.txt
index addb6e5..48f8cba 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/list-marker-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/list-marker-2-expected.txt
@@ -7,19 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutImage IMG id='target'",
-          "rect": [48, 94, 100, 100],
-          "reason": "forced by layout"
+          "object": "LayoutListItem LI",
+          "rect": [31, 94, 761, 104],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutListItem LI",
@@ -27,14 +17,9 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutListItem LI",
-          "rect": [31, 94, 761, 104],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutListMarker (anonymous)",
-          "rect": [31, 130, 7, 18],
-          "reason": "location change"
+          "object": "LayoutImage IMG id='target'",
+          "rect": [48, 94, 100, 100],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutListMarker (anonymous)",
@@ -42,13 +27,24 @@
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutListMarker (anonymous)",
+          "rect": [31, 130, 7, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/make-children-non-inline-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/make-children-non-inline-expected.txt
index 2476244..cf70bd5 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/make-children-non-inline-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/make-children-non-inline-expected.txt
@@ -7,214 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'I could'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'I could'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Word,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Word,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'about all the stuff'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'about all the stuff'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'more words.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'more words.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'that comes'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that comes'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'the break.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the break.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'words,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'words,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'write a book'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'write a book'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 60, 784, 262],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (anonymous)",
@@ -227,23 +22,18 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 60, 784, 262],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='target'",
-          "rect": [8, 150, 10, 100],
+          "object": "LayoutText #text",
+          "rect": [8, 250, 113, 18],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 60, 40, 18],
-          "reason": "layoutObject insertion"
+          "rect": [8, 150, 113, 18],
+          "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 78, 44, 18],
+          "rect": [8, 132, 80, 18],
           "reason": "layoutObject insertion"
         },
         {
@@ -253,22 +43,7 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 114, 45, 18],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 132, 80, 18],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 150, 113, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 250, 113, 18],
+          "rect": [8, 268, 69, 18],
           "reason": "location change"
         },
         {
@@ -278,17 +53,7 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 268, 69, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 186, 30, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 286, 30, 18],
+          "rect": [8, 304, 64, 18],
           "reason": "location change"
         },
         {
@@ -298,62 +63,244 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 304, 64, 18],
+          "rect": [8, 114, 45, 18],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 78, 44, 18],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 60, 40, 18],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 286, 30, 18],
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [8, 186, 30, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='target'",
+          "rect": [8, 150, 10, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'I could'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'I could'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Word,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Word,'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'about all the stuff'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'about all the stuff'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'more words.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'more words.'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'that comes'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that comes'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'the break.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the break.'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'words,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'words,'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'write a book'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'write a book'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/multi-layout-one-frame-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/multi-layout-one-frame-expected.txt
index 975cf19..c42de85 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/multi-layout-one-frame-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/multi-layout-one-frame-expected.txt
@@ -7,24 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASSED'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASSED'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow DIV id='inner-editor'",
+          "rect": [146, 11, 125, 13],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
@@ -32,9 +17,9 @@
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV id='inner-editor'",
-          "rect": [146, 11, 125, 13],
-          "reason": "invalidate paint rectangle"
+          "object": "LayoutText #text",
+          "rect": [146, 11, 43, 13],
+          "reason": "full"
         },
         {
           "object": "LayoutText #text",
@@ -42,18 +27,27 @@
           "reason": "full"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [146, 11, 43, 13],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASSED'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASSED'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/offset-change-wrong-invalidation-with-float-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/offset-change-wrong-invalidation-with-float-expected.txt
index 36bdfa96..10d370e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/offset-change-wrong-invalidation-with-float-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/offset-change-wrong-invalidation-with-float-expected.txt
@@ -38,7 +38,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ],
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/outline-continuations-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/outline-continuations-expected.txt
index 4e4c113..ae0b9c23 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/outline-continuations-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/outline-continuations-expected.txt
@@ -7,39 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENTS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'CONTENTS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [16, 108, 202, 22],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [16, 146, 202, 22],
           "reason": "bounds change"
         },
         {
           "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
+          "rect": [16, 108, 202, 22],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutInline SPAN id='outer'",
@@ -52,28 +27,43 @@
           "reason": "style change"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENTS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'CONTENTS'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutBlockFlow (anonymous)",
+          "reason": "forced by layout"
+        },
+        {
           "object": "LayoutInline SPAN id='outer'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt
index 071fd59..0101b9b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt
@@ -7,13 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'abc'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'abc'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV id='inner-target'",
+          "rect": [8, 184, 784, 18],
           "reason": "location change"
         },
         {
@@ -27,11 +22,6 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow DIV id='inner-target'",
-          "rect": [8, 184, 784, 18],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [18, 18, 23, 18],
           "reason": "layoutObject removal"
@@ -42,13 +32,19 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'abc'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'abc'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/positioned-document-element-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/positioned-document-element-expected.txt
index a8e753f..dda4a8d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/positioned-document-element-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/positioned-document-element-expected.txt
@@ -8,14 +8,9 @@
       "backgroundColor": "#008000",
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 800, 600],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (positioned) HTML class='changed'",
@@ -23,27 +18,32 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [8, 16, 784, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 16, 784, 18],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) HTML class='changed'",
           "rect": [100, 100, 451, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [8, 16, 784, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
           "rect": [108, 116, 435, 18],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 16, 784, 18],
+          "rect": [108, 116, 435, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow P",
+          "object": "LayoutText #text",
           "rect": [108, 116, 435, 18],
           "reason": "location change"
         },
@@ -53,23 +53,19 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [108, 116, 435, 18],
+          "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'",
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 800, 600],
-          "reason": "style change"
-        },
-        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/quotes-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/quotes-expected.txt
index 120add7b0..8b38293 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/quotes-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/quotes-expected.txt
@@ -7,78 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quote 2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '{'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '}'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [8, 26, 784, 18],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutInline \u003Cpseudo:after\u003E",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutInline \u003Cpseudo:before\u003E",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutInline Q id='q2' class='q-changed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutQuote (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutQuote (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [17, 26, 48, 18],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [15, 26, 49, 18],
           "reason": "style change"
         },
         {
-          "object": "LayoutTextFragment (anonymous)",
-          "rect": [8, 26, 10, 18],
+          "object": "LayoutText #text",
+          "rect": [17, 26, 48, 18],
           "reason": "style change"
         },
         {
@@ -88,12 +28,60 @@
         },
         {
           "object": "LayoutTextFragment (anonymous)",
+          "rect": [8, 26, 10, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutTextFragment (anonymous)",
           "rect": [63, 26, 8, 18],
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quote 2'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '{'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '}'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutInline \u003Cpseudo:after\u003E",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutInline \u003Cpseudo:before\u003E",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutInline Q id='q2' class='q-changed'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutQuote (anonymous)",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutQuote (anonymous)",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/relative-inline-positioned-movement-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/relative-inline-positioned-movement-repaint-expected.txt
index 8f7548c..4d2408d2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/relative-inline-positioned-movement-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/relative-inline-positioned-movement-repaint-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ],
@@ -26,12 +25,10 @@
           "paintInvalidations": [
             {
               "object": "InlineFlowBox",
-              "rect": [0, 0, 0, 0],
               "reason": "full"
             },
             {
               "object": "InlineTextBox 'When this layer moves it shouldn't generate a repaint rect.'",
-              "rect": [0, 0, 0, 0],
               "reason": "full"
             }
           ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/remove-inline-after-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/remove-inline-after-layout-expected.txt
index 214a56a..1624cf0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/remove-inline-after-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/remove-inline-after-layout-expected.txt
@@ -7,56 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This span should disappear.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This span should disappear.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 108, 784, 208],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [112, 194, 182, 18],
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "LayoutBlockFlow DIV",
           "rect": [293, 108, 101, 100],
           "reason": "location change"
@@ -67,28 +27,55 @@
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This span should disappear.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This span should disappear.'",
+          "reason": "full"
+        },
+        {
           "object": "LayoutInline SPAN id='target'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [112, 194, 182, 18],
           "reason": "layoutObject removal"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/remove-inline-layer-after-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/remove-inline-layer-after-layout-expected.txt
index a19d1fc..afabdc3 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/remove-inline-layer-after-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/remove-inline-layer-after-layout-expected.txt
@@ -7,71 +7,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This span should disappear.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This span should disappear.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 108, 784, 104],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [293, 108, 101, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [112, 108, 100, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutInline SPAN id='target'",
           "rect": [112, 108, 182, 104],
           "reason": "layoutObject removal"
@@ -82,13 +22,61 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [293, 108, 101, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [112, 108, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This span should disappear.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This span should disappear.\n'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/repaint-across-writing-mode-boundary-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/repaint-across-writing-mode-boundary-expected.txt
index 82171c69..156448c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/repaint-across-writing-mode-boundary-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/repaint-across-writing-mode-boundary-expected.txt
@@ -7,38 +7,32 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [548, 191, 24, 35],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox '\u7B2C\u4E00\u6BB5\u843D paragraph 1'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV class='basic d1 vert'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV class='lrblock'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [548, 191, 24, 35],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-with-zoom-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-with-zoom-expected.txt
index 7017a0bcf..dafa52be 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-with-zoom-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-with-zoom-expected.txt
@@ -8,14 +8,9 @@
       "backgroundColor": "#C0C0C0",
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
-          "object": "InlineTextBox 'scroll me'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutIFrame (positioned) IFRAME",
+          "rect": [2, 64, 235, 236],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -28,16 +23,6 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutIFrame (positioned) IFRAME",
-          "rect": [2, 64, 235, 236],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [2, 65, 58, 16],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [2, 65, 235, 235],
           "reason": "full"
@@ -53,6 +38,11 @@
           "reason": "scroll"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [2, 65, 58, 16],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutView #document",
           "rect": [237, 64, 15, 236],
           "reason": "scroll"
@@ -73,13 +63,19 @@
           "reason": "scroll"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
+          "object": "InlineTextBox 'scroll me'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/resize-scrollable-iframe-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/resize-scrollable-iframe-expected.txt
index d9a967d1..c99df1b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/resize-scrollable-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/resize-scrollable-iframe-expected.txt
@@ -7,28 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [8, 212, 784, 200],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 108, 784, 304],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutIFrame IFRAME id='iframe'",
-          "rect": [108, 108, 200, 300],
+          "object": "LayoutBlockFlow (anonymous)",
+          "rect": [8, 212, 784, 200],
           "reason": "incremental"
         },
         {
@@ -43,12 +28,22 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [93, 108, 200, 285],
+          "rect": [8, 193, 285, 200],
           "reason": "incremental"
         },
         {
           "object": "LayoutView #document",
-          "rect": [8, 193, 285, 200],
+          "rect": [8, 393, 285, 15],
+          "reason": "scroll"
+        },
+        {
+          "object": "LayoutIFrame IFRAME id='iframe'",
+          "rect": [108, 108, 200, 300],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [93, 108, 200, 285],
           "reason": "incremental"
         },
         {
@@ -58,7 +53,7 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [8, 393, 285, 15],
+          "rect": [293, 108, 15, 285],
           "reason": "scroll"
         },
         {
@@ -68,7 +63,7 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [293, 108, 15, 285],
+          "rect": [293, 393, 15, 15],
           "reason": "scroll"
         },
         {
@@ -77,23 +72,27 @@
           "reason": "scroll"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "LayoutView #document",
-          "rect": [293, 393, 15, 15],
           "reason": "scroll"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/search-field-cancel-expected.txt
index ab7ff639..903841f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/search-field-cancel-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/search-field-cancel-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'some text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [17, 45, 108, 13],
           "reason": "forced by layout"
@@ -22,8 +17,11 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'some text'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/select-option-background-color-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/select-option-background-color-expected.txt
index 8f3565a..efb52d1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/select-option-background-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/select-option-background-color-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selected-replaced-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selected-replaced-expected.txt
index 59e18fd7..df112d2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selected-replaced-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selected-replaced-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 68, 784, 236],
           "reason": "invalidate paint rectangle"
@@ -27,8 +22,11 @@
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-after-delete-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-after-delete-expected.txt
index c4d8fdd..d94cb52 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-after-delete-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-after-delete-expected.txt
@@ -7,79 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 94, 152, 90],
-          "reason": "incremental"
+          "rect": [38, 75, 152, 108],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='test'",
@@ -88,13 +18,8 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 75, 152, 108],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 74, 3, 20],
-          "reason": "invalidate paint rectangle"
+          "rect": [38, 94, 152, 90],
+          "reason": "incremental"
         },
         {
           "object": "LayoutText #text",
@@ -102,38 +27,92 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutBlockFlow DIV id='test'",
+          "rect": [38, 74, 3, 20],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-after-remove-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-after-remove-expected.txt
index 2ed555f1..1812e47 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-after-remove-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-after-remove-expected.txt
@@ -7,114 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello '",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 94, 152, 90],
-          "reason": "incremental"
+          "rect": [38, 75, 152, 108],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='test'",
@@ -123,18 +18,8 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 75, 152, 108],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutInline SPAN id='removeme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
+          "rect": [38, 94, 152, 90],
+          "reason": "incremental"
         },
         {
           "object": "LayoutText #text",
@@ -143,16 +28,6 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [39, 75, 36, 18],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [112, 165, 42, 18],
           "reason": "bounds change"
         },
@@ -162,38 +37,132 @@
           "reason": "bounds change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [39, 75, 36, 18],
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello '",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'world'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='test'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutInline SPAN id='removeme'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "selection"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-clear-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-clear-expected.txt
index 379ed67..1a8b1b0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-clear-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-clear-expected.txt
@@ -7,49 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'FAIL: Test did'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'not run'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
+          "object": "LayoutBlockFlow DIV id='firstLine'",
+          "rect": [8, 8, 100, 200],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutBlockFlow (anonymous)",
@@ -62,31 +22,6 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='firstLine'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='firstLine'",
-          "rect": [8, 8, 100, 200],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='root'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [8, 49, 94, 118],
           "reason": "layoutObject removal"
@@ -97,23 +32,75 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'FAIL: Test did'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'not run'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow (anonymous)",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='firstLine'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='root'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "selection"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt
index 3289e4b1..9775c524 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt
@@ -7,38 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'First cell'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'Second cell'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutTableCell TD id='firstCell'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutTableCell TD id='secondCell'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [11, 33, 79, 18],
           "reason": "selection"
         },
         {
@@ -47,8 +17,31 @@
           "reason": "selection"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [11, 33, 79, 18],
+          "object": "InlineTextBox 'First cell'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'Second cell'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutTableCell TD id='firstCell'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutTableCell TD id='secondCell'",
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-rl-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-rl-expected.txt
index 51ee837..aa17e1183d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-rl-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/selection-rl-expected.txt
@@ -7,23 +7,20 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [774, 39, 18, 78],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'Testing both hit testing'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [774, 39, 18, 78],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/stacked-diacritics-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/stacked-diacritics-expected.txt
index 8a4e3754..2296cab6 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/stacked-diacritics-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/stacked-diacritics-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u1EA6\u1EA4\u1EAA\u1EA8\u1EB0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='stacked'",
           "rect": [18, 153, 201, 47],
           "reason": "bounds change"
@@ -22,8 +17,11 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "InlineTextBox '\u1EA6\u1EA4\u1EAA\u1EA8\u1EB0'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/subtree-root-skipped-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/subtree-root-skipped-expected.txt
index 687eacbc..1736e2f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/subtree-root-skipped-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/subtree-root-skipped-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='div'",
-          "rect": [8, 288, 10, 20],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [11, 11, 125, 13],
           "reason": "invalidate paint rectangle"
@@ -32,8 +17,20 @@
           "reason": "full"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV id='div'",
+          "rect": [8, 288, 10, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/table-collapsed-border-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/table-collapsed-border-expected.txt
index f35ab01..0f823f4 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/table-collapsed-border-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/table-collapsed-border-expected.txt
@@ -7,44 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Lorem'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTable TABLE",
+          "rect": [8, 182, 110, 76],
           "reason": "full"
         },
         {
-          "object": "InlineTextBox 'Lorem'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ipsum dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ipsum dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ipsum dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'sit amet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'sit amet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableSection TBODY",
+          "rect": [12, 186, 102, 68],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutTable TABLE",
@@ -52,83 +22,28 @@
           "reason": "full"
         },
         {
-          "object": "LayoutTable TABLE",
-          "rect": [8, 182, 110, 76],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [83, 268, 26, 76],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [79, 268, 30, 76],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutTable TABLE id='t'",
           "rect": [8, 10, 97, 76],
           "reason": "style change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableCell TD id='d2'",
+          "rect": [22, 210, 96, 20],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [12, 100, 93, 68],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "rect": [22, 316, 87, 28],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [22, 96, 87, 28],
+          "rect": [22, 268, 87, 28],
           "reason": "forced by layout"
         },
         {
@@ -138,37 +53,12 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [22, 268, 87, 28],
+          "rect": [22, 96, 87, 28],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [22, 316, 87, 28],
+          "object": "LayoutTableCell TD id='d3'",
+          "rect": [22, 296, 87, 20],
           "reason": "forced by layout"
         },
         {
@@ -177,24 +67,9 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutTableCell TD id='d2'",
-          "rect": [22, 210, 96, 20],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutTableCell TD id='d3'",
-          "rect": [22, 296, 87, 20],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [12, 100, 93, 68],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [12, 186, 102, 68],
-          "reason": "forced by layout"
+          "object": "LayoutText #text",
+          "rect": [23, 297, 77, 18],
+          "reason": "location change"
         },
         {
           "object": "LayoutText #text",
@@ -207,68 +82,157 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [23, 297, 77, 18],
+          "object": "LayoutTable TABLE",
+          "rect": [79, 268, 30, 76],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "rect": [83, 268, 26, 76],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Lorem'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ipsum dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ipsum dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ipsum dolor'",
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'sit amet'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'sit amet'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/table-shrink-row-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/table-shrink-row-repaint-expected.txt
index fcc9fda0..3fd5734b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/table-shrink-row-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/table-shrink-row-repaint-expected.txt
@@ -7,193 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '10'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '11'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '12'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '13'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '5'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '6'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '7'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '8'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '9'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 785, 1048],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 320, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 120, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 380, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 180, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 440, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 240, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 500, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 300, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 560, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 360, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 620, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 420, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 680, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 480, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 740, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 540, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 800, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 600, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 860, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 660, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 920, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 720, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 980, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 780, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD id='resizeMe'",
-          "rect": [8, 120, 769, 200],
+          "object": "LayoutView #document",
+          "rect": [0, 848, 785, 200],
           "reason": "incremental"
         },
         {
@@ -202,113 +22,13 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 320, 769, 60],
-          "reason": "location change"
+          "object": "LayoutTableCell TD id='resizeMe'",
+          "rect": [8, 120, 769, 200],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 120, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 380, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 180, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 440, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 240, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 500, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 300, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 560, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 360, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 620, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 420, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 680, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 480, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 740, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 540, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 800, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 600, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 860, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 660, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 920, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 720, 769, 60],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 980, 769, 60],
           "reason": "location change"
         },
         {
@@ -317,118 +37,233 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 920, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 920, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 860, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 860, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 800, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 800, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 780, 769, 60],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutTableRow TR",
           "rect": [8, 780, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 341, 8, 18],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 740, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 141, 8, 18],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 740, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 401, 8, 18],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 720, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 201, 8, 18],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 720, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 461, 8, 18],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 680, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 261, 8, 18],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 680, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 521, 8, 18],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 660, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 321, 8, 18],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 660, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 581, 8, 18],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 620, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 381, 8, 18],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 620, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 641, 8, 18],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 600, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 441, 8, 18],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 600, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 701, 8, 18],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 560, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 501, 8, 18],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 560, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 761, 8, 18],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 540, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 561, 8, 18],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 540, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 821, 16, 18],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 500, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 621, 16, 18],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 500, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 881, 16, 18],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 480, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 681, 16, 18],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 480, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 941, 16, 18],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 440, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 741, 16, 18],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 440, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 420, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 420, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 380, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 380, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 360, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 360, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 320, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 320, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 300, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 300, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 240, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 240, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 180, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 180, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 120, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 120, 769, 60],
           "reason": "location change"
         },
         {
@@ -438,72 +273,213 @@
         },
         {
           "object": "LayoutText #text",
+          "rect": [13, 941, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 881, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 821, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
           "rect": [13, 801, 16, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 848, 785, 200],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "rect": [13, 741, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 681, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 621, 16, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 761, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 701, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 641, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 581, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 561, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 521, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 501, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 461, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 441, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 401, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 381, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 341, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 321, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 261, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 201, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 141, 8, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '10'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '11'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '12'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '13'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '5'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '6'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '7'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '8'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '9'",
+          "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-append-dirty-lines-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-append-dirty-lines-expected.txt
index d9af630d..b86ae9f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-append-dirty-lines-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-append-dirty-lines-expected.txt
@@ -7,51 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Curabitur a velit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Curabitur a velit.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse placerat. Morbi tristique. Mauris eu lacus sed felis'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'fermentum ut, tortor. Sed rhoncus. Quisque enim metus, luctus tincidunt, vestibulum eu, vestibulum eu, libero. Mauris'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'feugiat molestie, mi lorem bibendum leo, ac gravida orci nunc nec nulla. Nunc nunc lorem, rhoncus et, rutrum ac,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'laoreet feugiat. Phasellus mollis pulvinar mi. Etiam ut neque sed eros egestas laoreet. Vestibulum ullamcorper, nulla non'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'pellentesque cursus. Proin vitae nulla. Vivamus in ipsum. Etiam mi. Nam malesuada purus in sem. Sed eget elit vel erat'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'sagittis aliquam nunc. Nullam pharetra molestie eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'sagittis aliquam nunc. Nullam pharetra molestie eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow P id='target'",
           "rect": [8, 132, 784, 36],
           "reason": "invalidate paint rectangle"
@@ -62,13 +17,47 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'Curabitur a velit'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Curabitur a velit.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse placerat. Morbi tristique. Mauris eu lacus sed felis'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'fermentum ut, tortor. Sed rhoncus. Quisque enim metus, luctus tincidunt, vestibulum eu, vestibulum eu, libero. Mauris'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'feugiat molestie, mi lorem bibendum leo, ac gravida orci nunc nec nulla. Nunc nunc lorem, rhoncus et, rutrum ac,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'laoreet feugiat. Phasellus mollis pulvinar mi. Etiam ut neque sed eros egestas laoreet. Vestibulum ullamcorper, nulla non'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'pellentesque cursus. Proin vitae nulla. Vivamus in ipsum. Etiam mi. Nam malesuada purus in sem. Sed eget elit vel erat'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'sagittis aliquam nunc. Nullam pharetra molestie eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'sagittis aliquam nunc. Nullam pharetra molestie eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris.'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-match-document-change-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-match-document-change-expected.txt
index f1b3b997..45f0d7b2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-match-document-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-match-document-change-expected.txt
@@ -7,19 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'After change'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Find-in-page 'findme', then click here)'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'To be changed: findme (Manual testing:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow HTML",
+          "rect": [10, 102, 285, 400],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutBlockFlow DIV",
@@ -32,11 +22,6 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [10, 102, 285, 400],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [18, 128, 256, 36],
           "reason": "layoutObject removal"
@@ -52,23 +37,31 @@
           "reason": "scroll"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'After change'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Find-in-page 'findme', then click here)'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'To be changed: findme (Manual testing:'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-selection-rect-in-overflow-2-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-selection-rect-in-overflow-2-expected.txt
index 4e61fbd..ceb9ea2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-selection-rect-in-overflow-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-selection-rect-in-overflow-2-expected.txt
@@ -7,28 +7,24 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [18, 28, 238, 18],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'Should have blue, not gray, highlight'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV id='t'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [18, 28, 238, 18],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-selection-rect-in-overflow-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-selection-rect-in-overflow-expected.txt
index 29c3e186..c783894 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-selection-rect-in-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/text-selection-rect-in-overflow-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Should have green background'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [8, 18, 199, 18],
           "reason": "selection"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [8, 18, 199, 18],
+          "object": "InlineTextBox 'Should have green background'",
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/transform-layout-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/transform-layout-repaint-expected.txt
index 527f62a..df33a8b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/transform-layout-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/transform-layout-repaint-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [51, 50, 197, 87],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/vertical-align-length1-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/vertical-align-length1-expected.txt
index 81ba946..0340dae 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/vertical-align-length1-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/vertical-align-length1-expected.txt
@@ -7,19 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow BODY",
+          "rect": [0, 0, 800, 154],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -27,18 +17,8 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 800, 154],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [0, 100, 20, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [0, 130, 20, 20],
+          "rect": [120, 130, 20, 20],
           "reason": "location change"
         },
         {
@@ -48,17 +28,32 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [120, 130, 20, 20],
+          "rect": [0, 130, 20, 20],
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV class='other'",
+          "rect": [0, 100, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/vertical-align-length2-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/vertical-align-length2-expected.txt
index 812dc08..f8ebc8af 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/vertical-align-length2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/vertical-align-length2-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow BODY",
           "rect": [0, 0, 800, 204],
           "reason": "invalidate paint rectangle"
@@ -37,8 +22,19 @@
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/vertical-align1-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/vertical-align1-expected.txt
index 59e5e0d..eb7331c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/vertical-align1-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/vertical-align1-expected.txt
@@ -7,39 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 100, 800, 4],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow BODY",
           "rect": [0, 0, 800, 104],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [0, 80, 20, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [0, 34, 20, 20],
-          "reason": "location change"
+          "object": "LayoutBlockFlow BODY",
+          "rect": [0, 100, 800, 4],
+          "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow DIV class='other'",
@@ -52,13 +27,33 @@
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV class='other'",
+          "rect": [0, 80, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='other'",
+          "rect": [0, 34, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/window-resize-vertical-writing-mode-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/window-resize-vertical-writing-mode-expected.txt
index 589b66f..a09cdb7 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/window-resize-vertical-writing-mode-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/window-resize-vertical-writing-mode-expected.txt
@@ -7,51 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [156, 8, 36, 184],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [174, 8, 18, 284],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [148, 0, 52, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [166, 0, 34, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [156, 8, 36, 147],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [174, 8, 18, 248],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 200, 300],
           "reason": "full"
@@ -62,18 +17,57 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow HTML",
+          "rect": [148, 0, 52, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [156, 8, 36, 184],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [156, 8, 36, 147],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [166, 0, 34, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [174, 8, 18, 284],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [174, 8, 18, 248],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
@@ -89,41 +83,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [174, 8, 18, 284],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [274, 8, 18, 284],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [166, 0, 34, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [266, 0, 34, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [174, 8, 18, 248],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [274, 8, 18, 248],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 300, 300],
           "reason": "full"
@@ -134,8 +93,41 @@
           "reason": "incremental"
         },
         {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [266, 0, 34, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [166, 0, 34, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [274, 8, 18, 284],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [174, 8, 18, 284],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [274, 8, 18, 248],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [174, 8, 18, 248],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
@@ -151,51 +143,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [274, 8, 18, 284],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [256, 8, 36, 234],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [266, 0, 34, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [248, 0, 52, 250],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [274, 8, 18, 248],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [256, 8, 36, 197],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 300, 250],
           "reason": "full"
@@ -206,13 +153,53 @@
           "reason": "incremental"
         },
         {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [248, 0, 52, 250],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [256, 8, 36, 234],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [256, 8, 36, 197],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [266, 0, 34, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [274, 8, 18, 284],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [274, 8, 18, 248],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
@@ -228,24 +215,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [256, 8, 36, 234],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [206, 8, 36, 234],
-          "reason": "location change"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 250, 250],
+          "reason": "full"
         },
         {
           "object": "LayoutBlockFlow HTML",
@@ -258,6 +230,21 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutView #document",
+          "rect": [250, 0, 50, 250],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [256, 8, 36, 234],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [206, 8, 36, 234],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [256, 8, 36, 197],
           "reason": "location change"
@@ -268,18 +255,15 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 250, 250],
-          "reason": "full"
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA'",
+          "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [250, 0, 50, 250],
-          "reason": "incremental"
+          "object": "InlineTextBox 'AAAA'",
+          "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt
index b21aded..968080c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD id='foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableCell TD id='foo'",
           "rect": [8, 8, 60, 54],
           "reason": "style change"
@@ -32,8 +17,19 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "InlineTextBox 'A'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD id='foo'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/table/resize-table-repaint-percent-size-cell-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/table/resize-table-repaint-percent-size-cell-expected.txt
index 889e42791..e3df4320 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/table/resize-table-repaint-percent-size-cell-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/table/resize-table-repaint-percent-size-cell-expected.txt
@@ -7,43 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'ROW1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ROW1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'ROW2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ROW2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutTable (positioned) TABLE id='table'",
           "rect": [0, 150, 106, 380],
           "reason": "incremental"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [2, 52, 102, 238],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [2, 102, 102, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [2, 292, 102, 236],
+          "object": "LayoutTableRow TR",
+          "rect": [0, 292, 106, 236],
           "reason": "location change"
         },
         {
@@ -57,14 +27,24 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [0, 292, 106, 236],
+          "object": "LayoutTableCell TD",
+          "rect": [2, 52, 102, 238],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [2, 292, 102, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [2, 102, 102, 46],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [3, 67, 46, 18],
-          "reason": "bounds change"
+          "rect": [3, 401, 46, 18],
+          "reason": "location change"
         },
         {
           "object": "LayoutText #text",
@@ -78,27 +58,39 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [3, 401, 46, 18],
+          "rect": [3, 67, 46, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'ROW1'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ROW1'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'ROW2'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ROW2'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/table/resize-table-repaint-vertical-align-cell-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/table/resize-table-repaint-vertical-align-cell-expected.txt
index 73398e1..f1f52a9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/table/resize-table-repaint-vertical-align-cell-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/table/resize-table-repaint-vertical-align-cell-expected.txt
@@ -7,29 +7,24 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'MIDDLE'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'MIDDLE'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutTable (positioned) TABLE id='table'",
           "rect": [0, 150, 106, 380],
           "reason": "incremental"
         },
         {
+          "object": "LayoutTableRow TR",
+          "rect": [0, 148, 106, 380],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutTableCell TD",
           "rect": [2, 52, 102, 476],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [0, 148, 106, 380],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "rect": [3, 281, 63, 18],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
@@ -37,18 +32,19 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [3, 281, 63, 18],
+          "object": "InlineTextBox 'MIDDLE'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'MIDDLE'",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/table/resize-table-row-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/table/resize-table-row-repaint-expected.txt
index 01bf8161..5c433b4 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/table/resize-table-row-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/table/resize-table-row-repaint-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'MIDDLE'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'MIDDLE'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
+          "object": "LayoutTableRow TR id='row'",
+          "rect": [0, 202, 106, 100],
+          "reason": "incremental"
         },
         {
           "object": "LayoutTableCell TD",
@@ -22,9 +17,9 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableRow TR id='row'",
-          "rect": [0, 202, 106, 100],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "rect": [3, 193, 63, 18],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
@@ -32,18 +27,19 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [3, 193, 63, 18],
+          "object": "InlineTextBox 'MIDDLE'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'MIDDLE'",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-paint-invalidation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-paint-invalidation-expected.txt
index ff56ea3..8b02cfa 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-paint-invalidation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-paint-invalidation-expected.txt
@@ -24,19 +24,24 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "InlineTextBox ''",
-                  "rect": [0, 0, 0, 0],
+                  "object": "LayoutFlexibleBox DIV",
+                  "rect": [47, 208, 111, 24],
+                  "reason": "forced by layout"
+                },
+                {
+                  "object": "LayoutSlider INPUT",
+                  "rect": [47, 208, 111, 24],
                   "reason": "full"
                 },
                 {
-                  "object": "InlineTextBox '0:00'",
-                  "rect": [0, 0, 0, 0],
+                  "object": "LayoutSlider INPUT",
+                  "rect": [229, 208, 50, 24],
                   "reason": "full"
                 },
                 {
-                  "object": "LayoutBlockFlow (anonymous)",
-                  "rect": [159, 205, 27, 22],
-                  "reason": "invalidate paint rectangle"
+                  "object": "LayoutButton INPUT",
+                  "rect": [194, 205, 36, 30],
+                  "reason": "full"
                 },
                 {
                   "object": "LayoutBlockFlow DIV id='thumb'",
@@ -54,33 +59,25 @@
                   "reason": "full"
                 },
                 {
-                  "object": "LayoutButton INPUT",
-                  "rect": [194, 205, 36, 30],
-                  "reason": "full"
-                },
-                {
-                  "object": "LayoutFlexibleBox DIV",
-                  "rect": [47, 208, 111, 24],
-                  "reason": "forced by layout"
-                },
-                {
-                  "object": "LayoutSlider INPUT",
-                  "rect": [47, 208, 111, 24],
-                  "reason": "full"
-                },
-                {
-                  "object": "LayoutSlider INPUT",
-                  "rect": [229, 208, 50, 24],
-                  "reason": "full"
-                },
-                {
                   "object": "LayoutText #text",
                   "rect": [159, 212, 28, 15],
                   "reason": "full"
                 },
                 {
+                  "object": "LayoutBlockFlow (anonymous)",
+                  "rect": [159, 205, 27, 22],
+                  "reason": "invalidate paint rectangle"
+                },
+                {
+                  "object": "InlineTextBox ''",
+                  "reason": "full"
+                },
+                {
+                  "object": "InlineTextBox '0:00'",
+                  "reason": "full"
+                },
+                {
                   "object": "RootInlineBox",
-                  "rect": [0, 0, 0, 0],
                   "reason": "full"
                 }
               ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/invalidate-box-shadow-currentColor-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/invalidate-box-shadow-currentColor-expected.txt
index 0d955f7..7ebaa1cb 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/invalidate-box-shadow-currentColor-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/invalidate-box-shadow-currentColor-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutInline SPAN id='target'",
           "rect": [8, 8, 29, 23],
           "reason": "style change"
@@ -25,6 +15,14 @@
           "object": "LayoutText #text",
           "rect": [8, 8, 29, 18],
           "reason": "style change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'Text'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/non-text-link-invalidation-optimization-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/non-text-link-invalidation-optimization-expected.txt
index a0affb3..52ec04c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/non-text-link-invalidation-optimization-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/non-text-link-invalidation-optimization-expected.txt
@@ -7,38 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' images.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox ' no '",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox ' passes if '",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox ' text is invalidated and '",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'This test '",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'only'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
-          "rect": [8, 8, 59, 18],
+          "rect": [167, 8, 150, 18],
           "reason": "style change"
         },
         {
@@ -48,12 +18,17 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [139, 8, 29, 18],
+          "rect": [8, 8, 59, 18],
           "reason": "style change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [167, 8, 150, 18],
+          "rect": [360, 8, 54, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [139, 8, 29, 18],
           "reason": "style change"
         },
         {
@@ -62,8 +37,27 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [360, 8, 54, 18],
+          "object": "InlineTextBox ' images.'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' no '",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' passes if '",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' text is invalidated and '",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'This test '",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'only'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/selection/selection-within-composited-scroller-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/selection/selection-within-composited-scroller-expected.txt
index 1df10fd..a829035 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/paint/selection/selection-within-composited-scroller-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/selection/selection-within-composited-scroller-expected.txt
@@ -8,12 +8,10 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         }
       ],
@@ -27,23 +25,20 @@
           "backgroundColor": "#D3D3D3",
           "paintInvalidations": [
             {
+              "object": "LayoutText #text",
+              "rect": [0, 160, 23, 18],
+              "reason": "selection"
+            },
+            {
               "object": "InlineTextBox 'test'",
-              "rect": [0, 0, 0, 0],
               "reason": "selection"
             },
             {
               "object": "LayoutBlockFlow DIV id='scroller'",
-              "rect": [0, 0, 0, 0],
               "reason": "selection"
             },
             {
               "object": "LayoutBlockFlow DIV id='target'",
-              "rect": [0, 0, 0, 0],
-              "reason": "selection"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 160, 23, 18],
               "reason": "selection"
             }
           ],
@@ -57,23 +52,20 @@
                   "drawsContent": true,
                   "paintInvalidations": [
                     {
+                      "object": "LayoutText #text",
+                      "rect": [0, 610, 23, 18],
+                      "reason": "selection"
+                    },
+                    {
                       "object": "InlineTextBox 'test'",
-                      "rect": [0, 0, 0, 0],
                       "reason": "selection"
                     },
                     {
                       "object": "LayoutBlockFlow DIV id='scroller'",
-                      "rect": [0, 0, 0, 0],
                       "reason": "selection"
                     },
                     {
                       "object": "LayoutBlockFlow DIV id='target'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "selection"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 610, 23, 18],
                       "reason": "selection"
                     }
                   ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/as-image/svg-image-change-content-size-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/as-image/svg-image-change-content-size-expected.txt
index eb44479c..94a85ef9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/as-image/svg-image-change-content-size-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/as-image/svg-image-change-content-size-expected.txt
@@ -7,23 +7,20 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 50, 602, 425],
           "reason": "forced by layout"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/carto.net/tabgroup-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/carto.net/tabgroup-expected.txt
index 9cf953a..85d393f4 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/carto.net/tabgroup-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/carto.net/tabgroup-expected.txt
@@ -7,678 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '& Info'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '& Info'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Account'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Account'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Biography'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Biography'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Biography'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Biography'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Biography'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Browser'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Browser'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Browser'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Click on the second tab to see oversize content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Download'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Download'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Events'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Events'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Events'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Events'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Events'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Folder'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Folder'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Geodata'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Geodata'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Geodata'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Help'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Help'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Portrait'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Portrait'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Portrait'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Portrait'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Relations'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Relations'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Relations'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Relations'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Relations'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Relations'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This is a tabgroup with triangular tab corners'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This is oversize content that can be'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Your'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Your'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'and a double line tab. (use \"\\n\" as a line separator)'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'hidden on tab-change'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hidden on tab-change'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRect'",
-          "rect": [38, 7, 158, 236],
+          "object": "LayoutSVGRoot svg",
+          "rect": [7, 7, 736, 573],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRectRound'",
-          "rect": [263, 279, 301, 301],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectRound__0_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectRound__0_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRectRound__1_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRectRound__2_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRectRound__3_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRectTriangle'",
-          "rect": [507, 233, 236, 159],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__0_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__1_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__2_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__2_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__3_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRect__0_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRect__1_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRect__1_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRect__2_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRect__3_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
@@ -687,28 +42,148 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRound__0_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGPath path",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRound__1_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRound__1_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGPath path",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRound__2_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGPath path",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRound__3_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGPath path",
+          "rect": [390, 38, 314, 80],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectRound'",
+          "rect": [263, 279, 301, 301],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectTriangle'",
+          "rect": [507, 233, 236, 159],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [7, 257, 236, 158],
           "reason": "location change"
         },
         {
@@ -717,151 +192,31 @@
           "reason": "bounds change"
         },
         {
+          "object": "LayoutSVGPath path",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGContainer g id='tabgroupTriangle__0_content'",
           "rect": [15, 292, 211, 35],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGHiddenContainer g id='oversizeContent'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='oversizeContent'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__0_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__1_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__2_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__3_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [7, 34, 148, 23],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [7, 34, 148, 23],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [181, 11, 14, 54],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [181, 128, 14, 36],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [181, 171, 14, 39],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [181, 71, 14, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [64, 258, 53, 27],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [64, 258, 53, 27],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [15, 292, 148, 23],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [15, 292, 148, 23],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [124, 258, 44, 27],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [124, 258, 44, 27],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [174, 258, 32, 27],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [174, 258, 32, 27],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [11, 258, 46, 27],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [11, 258, 46, 27],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [15, 292, 211, 35],
           "reason": "location change"
@@ -877,319 +232,24 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [511, 235, 54, 14],
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [15, 292, 211, 35],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [571, 235, 50, 14],
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [15, 292, 211, 35],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [671, 235, 39, 14],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [628, 235, 36, 14],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [394, 39, 54, 15],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [510, 39, 37, 14],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [554, 39, 39, 14],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [454, 39, 50, 14],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [421, 336, 45, 45],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [469, 385, 36, 35],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [508, 424, 37, 37],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [370, 286, 48, 47],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectRound__0'",
-          "rect": [363, 279, 61, 61],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectRound__1'",
-          "rect": [414, 330, 58, 58],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectRound__2'",
-          "rect": [462, 378, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectRound__3'",
-          "rect": [501, 417, 51, 51],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectTriangle__0'",
-          "rect": [507, 233, 62, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectTriangle__1'",
-          "rect": [567, 233, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectTriangle__2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectTriangle__2'",
-          "rect": [623, 233, 46, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectTriangle__3'",
-          "rect": [667, 233, 47, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRect__0'",
-          "rect": [179, 7, 17, 62],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRect__1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRect__1'",
-          "rect": [179, 67, 17, 58],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRect__2'",
-          "rect": [179, 123, 17, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRect__3'",
-          "rect": [179, 167, 17, 47],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRound__0'",
-          "rect": [390, 38, 62, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRound__1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRound__1'",
-          "rect": [450, 38, 58, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRound__2'",
-          "rect": [506, 38, 46, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRound__3'",
-          "rect": [550, 38, 47, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupTriangle__0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupTriangle__0'",
-          "rect": [7, 257, 55, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupTriangle__1'",
-          "rect": [60, 257, 62, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupTriangle__2'",
-          "rect": [120, 257, 52, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupTriangle__3'",
-          "rect": [170, 257, 40, 29],
+          "object": "LayoutSVGText text id='contentTabGroupTriangle0'",
+          "rect": [15, 292, 211, 35],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [30, 147, 174, 96],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [31, 146, 172, 96],
-          "reason": "layoutObject removal"
+          "rect": [31, 404, 188, 10],
+          "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect",
@@ -1203,82 +263,77 @@
         },
         {
           "object": "LayoutSVGRect rect",
+          "rect": [30, 147, 174, 96],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect",
           "rect": [39, 404, 172, 96],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [31, 404, 188, 10],
+          "rect": [31, 146, 172, 96],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [38, 7, 158, 236],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [7, 7, 736, 573],
+          "object": "LayoutSVGContainer g",
+          "rect": [38, 7, 158, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [38, 7, 158, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [38, 7, 158, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [38, 7, 158, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRect'",
+          "rect": [38, 7, 158, 236],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [7, 34, 148, 23],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [181, 11, 14, 54],
+          "object": "LayoutSVGPath path",
+          "rect": [38, 7, 158, 236],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [181, 128, 14, 36],
+          "object": "LayoutSVGPath path",
+          "rect": [38, 7, 158, 236],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [181, 171, 14, 39],
+          "object": "LayoutSVGPath path",
+          "rect": [38, 7, 158, 236],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [181, 71, 14, 50],
+          "object": "LayoutSVGPath path",
+          "rect": [38, 7, 158, 236],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [64, 258, 53, 27],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [15, 292, 148, 23],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [64, 258, 53, 27],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [15, 292, 148, 23],
           "reason": "location change"
         },
         {
@@ -1287,63 +342,73 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [124, 258, 44, 27],
+          "object": "LayoutSVGText text",
+          "rect": [15, 292, 148, 23],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [124, 258, 44, 27],
-          "reason": "location change"
+          "object": "LayoutSVGInlineText #text",
+          "rect": [7, 34, 148, 23],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [7, 34, 148, 23],
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGTSpan tspan",
-          "rect": [174, 258, 32, 27],
+          "rect": [7, 34, 148, 23],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [7, 34, 148, 23],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupTriangle__1'",
+          "rect": [60, 257, 62, 29],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [174, 258, 32, 27],
+          "object": "LayoutSVGPath path id='tabgroupRectTriangle__0'",
+          "rect": [507, 233, 62, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [11, 258, 46, 27],
+          "object": "LayoutSVGPath path id='tabgroupRound__0'",
+          "rect": [390, 38, 62, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [11, 258, 46, 27],
+          "object": "LayoutSVGPath path id='tabgroupRectRound__0'",
+          "rect": [363, 279, 61, 61],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [15, 292, 211, 35],
+          "object": "LayoutSVGPath path id='tabgroupRectRound__1'",
+          "rect": [414, 330, 58, 58],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [15, 292, 211, 35],
+          "object": "LayoutSVGPath path id='tabgroupRectTriangle__1'",
+          "rect": [567, 233, 58, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [511, 235, 54, 14],
+          "object": "LayoutSVGPath path id='tabgroupRound__1'",
+          "rect": [450, 38, 58, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [571, 235, 50, 14],
+          "object": "LayoutSVGPath path id='tabgroupTriangle__0'",
+          "rect": [7, 257, 55, 29],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [671, 235, 39, 14],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [628, 235, 36, 14],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [394, 39, 54, 15],
           "reason": "location change"
         },
         {
@@ -1352,13 +417,83 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [510, 39, 37, 14],
+          "object": "LayoutSVGText text",
+          "rect": [394, 39, 54, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [511, 235, 54, 14],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGTSpan tspan",
-          "rect": [554, 39, 39, 14],
+          "rect": [511, 235, 54, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [511, 235, 54, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [64, 258, 53, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [64, 258, 53, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [64, 258, 53, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [64, 258, 53, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [64, 258, 53, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupTriangle__2'",
+          "rect": [120, 257, 52, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRectRound__3'",
+          "rect": [501, 417, 51, 51],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRectRound__2'",
+          "rect": [462, 378, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [571, 235, 50, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [571, 235, 50, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [571, 235, 50, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [454, 39, 50, 14],
           "reason": "location change"
         },
         {
@@ -1367,18 +502,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [421, 336, 45, 45],
+          "object": "LayoutSVGText text",
+          "rect": [454, 39, 50, 14],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [469, 385, 36, 35],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [508, 424, 37, 37],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [370, 286, 48, 47],
           "reason": "location change"
         },
         {
@@ -1388,72 +518,37 @@
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [7, 34, 148, 23],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [181, 11, 14, 54],
+          "rect": [370, 286, 48, 47],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [181, 128, 14, 36],
+          "object": "LayoutSVGPath path id='tabgroupRectTriangle__3'",
+          "rect": [667, 233, 47, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [181, 171, 14, 39],
+          "object": "LayoutSVGPath path id='tabgroupRound__3'",
+          "rect": [550, 38, 47, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [181, 71, 14, 50],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [11, 258, 46, 27],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [64, 258, 53, 27],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [11, 258, 46, 27],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [15, 292, 148, 23],
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [11, 258, 46, 27],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [124, 258, 44, 27],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [174, 258, 32, 27],
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [11, 258, 46, 27],
           "reason": "location change"
         },
         {
@@ -1462,43 +557,23 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [511, 235, 54, 14],
+          "object": "LayoutSVGPath path id='tabgroupRectTriangle__2'",
+          "rect": [623, 233, 46, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [571, 235, 50, 14],
+          "object": "LayoutSVGPath path id='tabgroupRound__2'",
+          "rect": [506, 38, 46, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [671, 235, 39, 14],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [421, 336, 45, 45],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [628, 235, 36, 14],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [394, 39, 54, 15],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [510, 39, 37, 14],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [554, 39, 39, 14],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [454, 39, 50, 14],
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [421, 336, 45, 45],
           "reason": "location change"
         },
         {
@@ -1507,8 +582,73 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [124, 258, 44, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [124, 258, 44, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [124, 258, 44, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [124, 258, 44, 27],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGText text",
-          "rect": [469, 385, 36, 35],
+          "rect": [124, 258, 44, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupTriangle__3'",
+          "rect": [170, 257, 40, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [671, 235, 39, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [671, 235, 39, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [671, 235, 39, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [554, 39, 39, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [554, 39, 39, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [554, 39, 39, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [508, 424, 37, 37],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [508, 424, 37, 37],
           "reason": "location change"
         },
         {
@@ -1517,173 +657,861 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [510, 39, 37, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [510, 39, 37, 14],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGText text",
-          "rect": [370, 286, 48, 47],
+          "rect": [510, 39, 37, 14],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text id='contentTabGroupTriangle0'",
-          "rect": [15, 292, 211, 35],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [469, 385, 36, 35],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [469, 385, 36, 35],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [469, 385, 36, 35],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [628, 235, 36, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [628, 235, 36, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [628, 235, 36, 14],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [174, 258, 32, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [174, 258, 32, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [174, 258, 32, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [174, 258, 32, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [174, 258, 32, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRect__0'",
+          "rect": [179, 7, 17, 62],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRect__1'",
+          "rect": [179, 67, 17, 58],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRect__3'",
+          "rect": [179, 167, 17, 47],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRect__2'",
+          "rect": [179, 123, 17, 46],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [181, 11, 14, 54],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [181, 11, 14, 54],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [181, 11, 14, 54],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [181, 71, 14, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [181, 71, 14, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [181, 71, 14, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [181, 171, 14, 39],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [181, 171, 14, 39],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [181, 171, 14, 39],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [181, 128, 14, 36],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [181, 128, 14, 36],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [181, 128, 14, 36],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '& Info'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '& Info'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Account'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Account'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Biography'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Biography'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Biography'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Biography'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Biography'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Browser'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Browser'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Browser'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Click on the second tab to see oversize content'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Download'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Download'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Events'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Events'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Events'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Events'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Events'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Folder'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Folder'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Geodata'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Geodata'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Geodata'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Help'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Help'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Portrait'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Portrait'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Portrait'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Portrait'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Relations'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Relations'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Relations'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Relations'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Relations'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Relations'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'This is a tabgroup with triangular tab corners'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'This is oversize content that can be'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Your'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Your'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'and a double line tab. (use \"\\n\" as a line separator)'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'hidden on tab-change'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hidden on tab-change'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectRound__0_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectRound__0_content'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectRound__1_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectRound__2_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectRound__3_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__0_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__1_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__2_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__2_content'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__3_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRect__0_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRect__1_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRect__1_content'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRect__2_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRect__3_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRound__0_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRound__1_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRound__1_content'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRound__2_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRound__3_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer g id='oversizeContent'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer g id='oversizeContent'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__0_content'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__1_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__2_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__3_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRectRound__0'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRectTriangle__2'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRect__1'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRound__1'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupTriangle__0'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/carto.net/window-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/carto.net/window-expected.txt
index fa6a3f5..c5597c6 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/carto.net/window-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/carto.net/window-expected.txt
@@ -7,254 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox ''Resize Navigation Window' for a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Big Window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Callback function is active'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Changing a colour changes background'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Click on button'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Colour Picker'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Navigation Window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Nested middlesize Window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Note that this window also'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Small Window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Status Window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Statusbar'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This is a big movable window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This is a minimal window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This is a none-moveable'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This window contains other windows'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This window has a callback'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This window should'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'and alerting window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'contain navigation tools'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'events'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'features a window decoration'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'function indicating mouse'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'it is also not moveable'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'movements in the statusbar'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'none-closeable status'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'random resize of this Window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'without title and status bar.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [632, 102, 160, 97],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [257, 365, 120, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [320, 399, 135, 63],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [43, 481, 113, 36],
-          "reason": "location change"
+          "object": "LayoutSVGContainer g id='Windows'",
+          "rect": [38, 81, 760, 454],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutSVGContainer g id='Windows'",
@@ -262,88 +17,18 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='Windows'",
-          "rect": [38, 81, 760, 454],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGContainer g id='bigWindow'",
           "rect": [38, 143, 549, 392],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='colourPickerWindow'",
-          "rect": [77, 195, 174, 143],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='decoGroupnavWindow'",
-          "rect": [613, 81, 185, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='minimalWindow'",
-          "rect": [39, 476, 119, 48],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='navWindow'",
-          "rect": [624, 92, 174, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='navWindow'",
-          "rect": [613, 81, 185, 169],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='nestedWindow'",
-          "rect": [77, 182, 315, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='smallWindow'",
-          "rect": [312, 377, 158, 143],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='statusWindow'",
-          "rect": [249, 344, 143, 64],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGContainer g id='windowMainGroupbigWindow'",
           "rect": [38, 143, 549, 392],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='windowMainGroupcolourPickerWindow'",
-          "rect": [77, 195, 174, 143],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='windowMainGroupminimalWindow'",
-          "rect": [39, 476, 119, 48],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='windowMainGroupnavWindow'",
-          "rect": [624, 92, 174, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='windowMainGroupnestedWindow'",
-          "rect": [77, 182, 315, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='windowMainGroupsmallWindow'",
-          "rect": [312, 377, 158, 143],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='windowMainGroupstatusWindow'",
-          "rect": [249, 344, 143, 64],
+          "object": "LayoutSVGRect rect",
+          "rect": [38, 143, 549, 392],
           "reason": "location change"
         },
         {
@@ -352,18 +37,53 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='windowTitlebarGroupcolourPickerWindow'",
-          "rect": [77, 195, 174, 15],
+          "object": "LayoutSVGRect rect id='titleBarbigWindow'",
+          "rect": [38, 143, 549, 15],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='windowTitlebarGroupminimalWindow'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRect rect",
+          "rect": [38, 523, 549, 12],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='windowTitlebarGroupnavWindow'",
-          "rect": [757, 94, 36, 11],
+          "object": "LayoutSVGContainer g id='nestedWindow'",
+          "rect": [77, 182, 315, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowMainGroupnestedWindow'",
+          "rect": [77, 182, 315, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [77, 182, 315, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowTitlebarGroupnestedWindow'",
+          "rect": [77, 182, 315, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='titleBarnestedWindow'",
+          "rect": [77, 182, 315, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [77, 406, 315, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='navWindow'",
+          "rect": [613, 81, 185, 169],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='decoGroupnavWindow'",
+          "rect": [613, 81, 185, 159],
           "reason": "location change"
         },
         {
@@ -372,8 +92,148 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGContainer g id='windowTitlebarGroupnestedWindow'",
-          "rect": [77, 182, 315, 15],
+          "object": "LayoutSVGRect rect id='decoGroupMinimizednavWindow'",
+          "rect": [613, 81, 185, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='navWindow'",
+          "rect": [624, 92, 174, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowMainGroupnavWindow'",
+          "rect": [624, 92, 174, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [624, 92, 174, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='colourPickerWindow'",
+          "rect": [77, 195, 174, 143],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowMainGroupcolourPickerWindow'",
+          "rect": [77, 195, 174, 143],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [77, 195, 174, 143],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowTitlebarGroupcolourPickerWindow'",
+          "rect": [77, 195, 174, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='titleBarcolourPickerWindow'",
+          "rect": [77, 195, 174, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [624, 238, 174, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [77, 326, 174, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='textNavWindow'",
+          "rect": [632, 102, 160, 97],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='smallWindow'",
+          "rect": [312, 377, 158, 143],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowMainGroupsmallWindow'",
+          "rect": [312, 377, 158, 143],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [312, 377, 158, 143],
           "reason": "location change"
         },
         {
@@ -382,43 +242,328 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGRect rect id='titleBarsmallWindow'",
+          "rect": [312, 377, 158, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [312, 508, 158, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='statusWindow'",
+          "rect": [249, 344, 143, 64],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowMainGroupstatusWindow'",
+          "rect": [249, 344, 143, 64],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [249, 344, 143, 64],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGContainer g id='windowTitlebarGroupstatusWindow'",
           "rect": [249, 344, 143, 15],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtonbigWindow'",
-          "rect": [572, 145, 10, 10],
+          "object": "LayoutSVGRect rect id='titleBarstatusWindow'",
+          "rect": [249, 344, 143, 15],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtoncolourPickerWindow'",
-          "rect": [236, 198, 10, 10],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [80, 327, 139, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtonnavWindow'",
-          "rect": [783, 95, 10, 10],
+          "object": "LayoutSVGText text",
+          "rect": [80, 327, 139, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtonnavWindow'",
-          "rect": [783, 95, 10, 10],
+          "object": "LayoutSVGContainer g",
+          "rect": [320, 399, 135, 63],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtonnavWindow'",
-          "rect": [616, 84, 10, 10],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [320, 399, 135, 63],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtonnestedWindow'",
-          "rect": [377, 184, 10, 11],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [320, 399, 135, 63],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtonsmallWindow'",
-          "rect": [455, 380, 10, 10],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [320, 399, 135, 63],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [320, 399, 135, 63],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [320, 399, 135, 63],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [320, 399, 135, 63],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [320, 399, 135, 63],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [320, 399, 135, 63],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [320, 399, 135, 63],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='textSmallWindow'",
+          "rect": [320, 399, 135, 63],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [80, 183, 132, 13],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [80, 183, 132, 13],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [80, 407, 127, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [80, 407, 127, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [257, 365, 120, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [257, 365, 120, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [257, 365, 120, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [257, 365, 120, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [257, 365, 120, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [257, 365, 120, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='textStatusWindow'",
+          "rect": [257, 365, 120, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='minimalWindow'",
+          "rect": [39, 476, 119, 48],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowMainGroupminimalWindow'",
+          "rect": [39, 476, 119, 48],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [39, 476, 119, 48],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [43, 481, 113, 36],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [43, 481, 113, 36],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [43, 481, 113, 36],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [43, 481, 113, 36],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [43, 481, 113, 36],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [43, 481, 113, 36],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='textMinimalWindow'",
+          "rect": [43, 481, 113, 36],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [41, 525, 102, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [41, 525, 102, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [314, 509, 91, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [314, 509, 91, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [252, 345, 74, 13],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [252, 345, 74, 13],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [314, 379, 71, 13],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [314, 379, 71, 13],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [80, 197, 67, 13],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [80, 197, 67, 13],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [41, 144, 59, 13],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [41, 144, 59, 13],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowTitlebarGroupnavWindow'",
+          "rect": [757, 94, 36, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [627, 239, 34, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [627, 239, 34, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [613, 81, 16, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [617, 153, 11, 81],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [617, 153, 11, 81],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'",
+          "rect": [769, 94, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'",
+          "rect": [769, 94, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [769, 94, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [769, 94, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [769, 94, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [769, 94, 11, 11],
           "reason": "location change"
         },
         {
@@ -427,23 +572,28 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='maximizeButtoncolourPickerWindow'",
-          "rect": [223, 198, 10, 10],
+          "object": "LayoutSVGRect rect",
+          "rect": [558, 145, 11, 11],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'",
-          "rect": [769, 94, 11, 11],
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [558, 145, 11, 11],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'",
-          "rect": [769, 94, 11, 11],
+          "object": "LayoutSVGRect rect",
+          "rect": [441, 379, 11, 11],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'",
-          "rect": [616, 100, 10, 10],
+          "object": "LayoutSVGPath line",
+          "rect": [376, 184, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [376, 184, 11, 11],
           "reason": "location change"
         },
         {
@@ -452,43 +602,178 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGRect rect",
+          "rect": [363, 184, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [363, 184, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [222, 197, 11, 11],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGContainer use id='maximizeButtonsmallWindow'",
           "rect": [441, 380, 11, 10],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [441, 380, 11, 10],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGContainer use id='maximizeButtonstatusWindow'",
           "rect": [376, 346, 11, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtonbigWindow'",
-          "rect": [546, 146, 9, 10],
+          "object": "LayoutSVGRect rect",
+          "rect": [376, 346, 11, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtoncolourPickerWindow'",
-          "rect": [210, 198, 9, 10],
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [376, 346, 11, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'",
-          "rect": [757, 95, 9, 10],
+          "object": "LayoutSVGPath line",
+          "rect": [783, 94, 10, 11],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'",
-          "rect": [757, 95, 9, 10],
+          "object": "LayoutSVGPath line",
+          "rect": [783, 94, 10, 11],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'",
-          "rect": [616, 116, 10, 9],
+          "object": "LayoutSVGPath line",
+          "rect": [783, 94, 10, 11],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtonnestedWindow'",
-          "rect": [350, 185, 10, 10],
+          "object": "LayoutSVGPath line",
+          "rect": [783, 94, 10, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [616, 99, 10, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [572, 145, 10, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [572, 145, 10, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='closeButtonnestedWindow'",
+          "rect": [377, 184, 10, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [377, 184, 10, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='closeButtonnavWindow'",
+          "rect": [783, 95, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='closeButtonnavWindow'",
+          "rect": [783, 95, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [783, 95, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [783, 95, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'",
+          "rect": [616, 100, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [616, 100, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='closeButtonnavWindow'",
+          "rect": [616, 84, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [616, 84, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [616, 84, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [616, 84, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [616, 84, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='closeButtonbigWindow'",
+          "rect": [572, 145, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [572, 145, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='closeButtonsmallWindow'",
+          "rect": [455, 380, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [455, 380, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [455, 380, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [455, 380, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [455, 380, 10, 10],
           "reason": "location change"
         },
         {
@@ -497,193 +782,93 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtonstatusWindow'",
-          "rect": [364, 346, 9, 10],
+          "object": "LayoutSVGRect rect",
+          "rect": [428, 380, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGHiddenContainer symbol id='closeButton'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [428, 380, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGHiddenContainer symbol id='maximizeButton'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer use id='minimizeButtonnestedWindow'",
+          "rect": [350, 185, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGHiddenContainer symbol id='minimizeButton'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [350, 185, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 102, 160, 97],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 102, 160, 97],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 102, 160, 97],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 102, 160, 97],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 102, 160, 97],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 102, 160, 97],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 102, 160, 97],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [627, 239, 34, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [41, 525, 102, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [80, 407, 127, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [80, 327, 139, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [80, 197, 67, 13],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [257, 365, 120, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [257, 365, 120, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [257, 365, 120, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [252, 345, 74, 13],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [80, 183, 132, 13],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [320, 399, 135, 63],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [320, 399, 135, 63],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [320, 399, 135, 63],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [320, 399, 135, 63],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [320, 399, 135, 63],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [314, 509, 91, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [314, 379, 71, 13],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [43, 481, 113, 36],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [43, 481, 113, 36],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [43, 481, 113, 36],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [41, 144, 59, 13],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [617, 153, 11, 81],
+          "object": "LayoutSVGContainer use id='closeButtoncolourPickerWindow'",
+          "rect": [236, 198, 10, 10],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGPath line",
-          "rect": [0, 21, 5, 11],
+          "rect": [236, 198, 10, 10],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGPath line",
-          "rect": [0, 21, 5, 11],
+          "rect": [236, 198, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGPath line",
-          "rect": [0, 30, 5, 2],
+          "object": "LayoutSVGRect rect",
+          "rect": [236, 198, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGPath line",
-          "rect": [783, 94, 10, 11],
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [236, 198, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGPath line",
-          "rect": [783, 94, 10, 11],
+          "object": "LayoutSVGContainer use id='maximizeButtoncolourPickerWindow'",
+          "rect": [223, 198, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [223, 198, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [783, 95, 10, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [783, 95, 10, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'",
+          "rect": [616, 116, 10, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [616, 116, 10, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [616, 116, 10, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [572, 146, 10, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [350, 185, 10, 9],
           "reason": "location change"
         },
         {
@@ -693,91 +878,6 @@
         },
         {
           "object": "LayoutSVGPath line",
-          "rect": [236, 198, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [236, 198, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [210, 206, 9, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [363, 354, 10, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [376, 184, 11, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [376, 184, 11, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [350, 193, 10, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [455, 380, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [455, 380, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [428, 388, 10, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [572, 145, 10, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [572, 145, 10, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [545, 154, 10, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [783, 94, 10, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [616, 84, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [783, 94, 10, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [616, 84, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
           "rect": [756, 103, 10, 2],
           "reason": "location change"
         },
@@ -787,8 +887,118 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGPath line",
+          "rect": [545, 154, 10, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [428, 388, 10, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [363, 354, 10, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [350, 193, 10, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'",
+          "rect": [757, 95, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'",
+          "rect": [757, 95, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [757, 95, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [757, 95, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='minimizeButtonbigWindow'",
+          "rect": [546, 146, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [546, 146, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='minimizeButtonstatusWindow'",
+          "rect": [364, 346, 9, 10],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRect rect",
-          "rect": [0, 22, 5, 9],
+          "rect": [364, 346, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [364, 346, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='minimizeButtoncolourPickerWindow'",
+          "rect": [210, 198, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [210, 198, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [210, 198, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [757, 95, 9, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [757, 95, 9, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [546, 146, 9, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [377, 185, 9, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [210, 206, 9, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [0, 21, 5, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [0, 21, 5, 11],
           "reason": "location change"
         },
         {
@@ -803,547 +1013,272 @@
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [624, 92, 174, 158],
+          "rect": [0, 22, 5, 9],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [624, 238, 174, 12],
+          "object": "LayoutSVGPath line",
+          "rect": [0, 30, 5, 2],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [783, 95, 10, 9],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [769, 94, 11, 11],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [757, 95, 9, 9],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [38, 143, 549, 392],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [38, 523, 549, 12],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [77, 182, 315, 236],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [77, 406, 315, 12],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [77, 195, 174, 143],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [77, 326, 174, 12],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [236, 198, 10, 10],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [222, 197, 11, 11],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [210, 198, 9, 10],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [249, 344, 143, 64],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [376, 346, 11, 10],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [364, 346, 9, 10],
+          "object": "InlineTextBox ''Resize Navigation Window' for a'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [377, 185, 9, 9],
+          "object": "InlineTextBox 'Big Window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [363, 184, 11, 11],
+          "object": "InlineTextBox 'Callback function is active'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [350, 185, 10, 9],
+          "object": "InlineTextBox 'Changing a colour changes background'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [312, 377, 158, 143],
+          "object": "InlineTextBox 'Click on button'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [312, 508, 158, 12],
+          "object": "InlineTextBox 'Colour Picker'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [455, 380, 10, 10],
+          "object": "InlineTextBox 'Navigation Window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [441, 379, 11, 11],
+          "object": "InlineTextBox 'Nested middlesize Window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [428, 380, 10, 10],
+          "object": "InlineTextBox 'Note that this window also'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [39, 476, 119, 48],
+          "object": "InlineTextBox 'Small Window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [572, 146, 10, 9],
+          "object": "InlineTextBox 'Status Window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [558, 145, 11, 11],
+          "object": "InlineTextBox 'Statusbar'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [546, 146, 9, 9],
+          "object": "InlineTextBox 'This is a big movable window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [613, 81, 16, 159],
+          "object": "InlineTextBox 'This is a minimal window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [783, 95, 10, 9],
+          "object": "InlineTextBox 'This is a none-moveable'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [616, 84, 10, 10],
+          "object": "InlineTextBox 'This window contains other windows'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [769, 94, 11, 11],
+          "object": "InlineTextBox 'This window has a callback'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [616, 99, 10, 11],
+          "object": "InlineTextBox 'This window should'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [757, 95, 9, 9],
+          "object": "InlineTextBox 'and alerting window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [616, 116, 10, 9],
+          "object": "InlineTextBox 'contain navigation tools'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='decoGroupMinimizednavWindow'",
-          "rect": [613, 81, 185, 16],
+          "object": "InlineTextBox 'events'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='titleBarbigWindow'",
-          "rect": [38, 143, 549, 15],
+          "object": "InlineTextBox 'features a window decoration'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='titleBarcolourPickerWindow'",
-          "rect": [77, 195, 174, 15],
+          "object": "InlineTextBox 'function indicating mouse'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='titleBarnestedWindow'",
-          "rect": [77, 182, 315, 15],
+          "object": "InlineTextBox 'it is also not moveable'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='titleBarsmallWindow'",
-          "rect": [312, 377, 158, 15],
+          "object": "InlineTextBox 'movements in the statusbar'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='titleBarstatusWindow'",
-          "rect": [249, 344, 143, 15],
+          "object": "InlineTextBox 'none-closeable status'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [632, 102, 160, 97],
+          "object": "InlineTextBox 'random resize of this Window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [632, 102, 160, 97],
+          "object": "InlineTextBox 'window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [632, 102, 160, 97],
+          "object": "InlineTextBox 'without title and status bar.'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [632, 102, 160, 97],
+          "object": "LayoutSVGContainer g",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [632, 102, 160, 97],
+          "object": "LayoutSVGContainer g",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [632, 102, 160, 97],
+          "object": "LayoutSVGContainer g",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [257, 365, 120, 38],
+          "object": "LayoutSVGContainer g id='windowTitlebarGroupminimalWindow'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [257, 365, 120, 38],
+          "object": "LayoutSVGHiddenContainer symbol id='closeButton'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [320, 399, 135, 63],
+          "object": "LayoutSVGHiddenContainer symbol id='maximizeButton'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [320, 399, 135, 63],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [320, 399, 135, 63],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [320, 399, 135, 63],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [43, 481, 113, 36],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [43, 481, 113, 36],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [627, 239, 34, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [41, 525, 102, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [80, 407, 127, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [80, 327, 139, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [80, 197, 67, 13],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [252, 345, 74, 13],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [80, 183, 132, 13],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [314, 509, 91, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [314, 379, 71, 13],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [41, 144, 59, 13],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [617, 153, 11, 81],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='textMinimalWindow'",
-          "rect": [43, 481, 113, 36],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='textNavWindow'",
-          "rect": [632, 102, 160, 97],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='textSmallWindow'",
-          "rect": [320, 399, 135, 63],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='textStatusWindow'",
-          "rect": [257, 365, 120, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [783, 95, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [236, 198, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [377, 184, 10, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [455, 380, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [572, 145, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [783, 95, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [616, 84, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [769, 94, 11, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [223, 198, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [376, 346, 11, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [363, 184, 11, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [441, 380, 11, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [558, 145, 11, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [769, 94, 11, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [616, 100, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [757, 95, 9, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [210, 198, 9, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [364, 346, 9, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [350, 185, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [428, 380, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [546, 146, 9, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [757, 95, 9, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [616, 116, 10, 9],
+          "object": "LayoutSVGHiddenContainer symbol id='minimizeButton'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/absolute-sized-content-with-resources-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/absolute-sized-content-with-resources-expected.txt
index 84ea8d9..dfb7722e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/absolute-sized-content-with-resources-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/absolute-sized-content-with-resources-expected.txt
@@ -7,33 +7,30 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 50, 402, 405],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [17, 217, 84, 68],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
           "rect": [42, 117, 334, 268],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRoot svg",
+          "rect": [17, 217, 84, 68],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.txt
index d2ddf235..25dbb9b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.txt
@@ -7,37 +7,42 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [16, 39, 784, 174],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 39, 784, 174],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRoot svg id='svg-root'",
+          "rect": [16, 39, 784, 174],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [16, 39, 784, 174],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [16, 39, 784, 174],
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [334, 39, 466, 174],
           "reason": "incremental"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [16, 39, 784, 174],
-          "reason": "layoutObject insertion"
+          "rect": [334, 39, 466, 174],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutSVGInlineText #text",
+          "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [334, 39, 466, 174],
           "reason": "incremental"
         },
@@ -47,43 +52,31 @@
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGResourceClipper clipPath id='dynClip'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRoot svg id='svg-root'",
-          "rect": [16, 39, 784, 174],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg id='svg-root'",
-          "rect": [334, 39, 466, 174],
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [16, 39, 784, 174],
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [16, 39, 784, 174],
-          "reason": "style change"
+          "object": "LayoutSVGResourceClipper clipPath id='dynClip'",
+          "reason": "layoutObject insertion"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-clipPath-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-clipPath-creation-expected.txt
index a4e0825..a5d9dcb 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-clipPath-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-clipPath-creation-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
+          "object": "LayoutSVGText text",
+          "rect": [16, 39, 784, 174],
+          "reason": "style change"
         },
         {
           "object": "LayoutSVGContainer g id='content'",
@@ -27,33 +22,33 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 334, 500],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceClipper clipPath id='dynClip'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [334, 39, 466, 174],
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [16, 39, 784, 174],
-          "reason": "style change"
+          "object": "LayoutSVGPath path",
+          "rect": [0, 0, 334, 500],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGResourceClipper clipPath id='dynClip'",
+          "reason": "layoutObject insertion"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.txt
index b2881da6..c0df99a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.txt
@@ -7,78 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Gradient on fill'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Gradient on fill/stroke'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Gradient on stroke'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [0, 14, 753, 366],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 14, 443, 131],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 129, 596, 135],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 246, 753, 134],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceLinearGradient linearGradient id='fillLinearGradient'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceLinearGradient linearGradient id='strokeLinearGradient'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [0, 14, 753, 366],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [0, 14, 443, 131],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 129, 596, 135],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 246, 753, 134],
           "reason": "layoutObject insertion"
         },
         {
@@ -87,18 +27,67 @@
           "reason": "layoutObject insertion"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 129, 596, 135],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 129, 596, 135],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 14, 443, 131],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 14, 443, 131],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Gradient on fill'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Gradient on fill/stroke'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Gradient on stroke'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourceLinearGradient linearGradient id='fillLinearGradient'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourceLinearGradient linearGradient id='strokeLinearGradient'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-gradient-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-gradient-creation-expected.txt
index f3977b5..06d4bc0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-gradient-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-gradient-creation-expected.txt
@@ -7,38 +7,32 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Gradient on fill'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceLinearGradient linearGradient id='dynGrad'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGText text",
           "rect": [33, 22, 693, 196],
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'Gradient on fill'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourceLinearGradient linearGradient id='dynGrad'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-pattern-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-pattern-and-object-creation-expected.txt
index a4ed227d..6b5a392 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-pattern-and-object-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-pattern-and-object-creation-expected.txt
@@ -7,83 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Pattern on fill'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Pattern on fill/stroke'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Pattern on stroke'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [0, 14, 678, 366],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 14, 368, 131],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 129, 520, 135],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 246, 678, 134],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [8, 8, 17, 17],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [16, 16, 18, 18],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [8, 8, 17, 17],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [16, 16, 18, 18],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourcePattern pattern id='fillPattern'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourcePattern pattern id='strokePattern'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [0, 14, 678, 366],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [0, 14, 368, 131],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 129, 520, 135],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 246, 678, 134],
           "reason": "layoutObject insertion"
         },
         {
@@ -92,18 +27,75 @@
           "reason": "layoutObject insertion"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 129, 520, 135],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 129, 520, 135],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 14, 368, 131],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 14, 368, 131],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [16, 16, 18, 18],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [16, 16, 18, 18],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [8, 8, 17, 17],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [8, 8, 17, 17],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Pattern on fill'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Pattern on fill/stroke'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Pattern on stroke'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourcePattern pattern id='fillPattern'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourcePattern pattern id='strokePattern'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-pattern-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-pattern-creation-expected.txt
index 1367d14..268ac8d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-pattern-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/js-late-pattern-creation-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Pattern on fill'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [8, 12, 17, 26],
-          "reason": "layoutObject insertion"
+          "object": "LayoutSVGText text",
+          "rect": [33, 22, 618, 196],
+          "reason": "style change"
         },
         {
           "object": "LayoutSVGRect rect",
@@ -22,23 +17,24 @@
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGResourcePattern pattern id='dynPattern'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRect rect",
+          "rect": [8, 12, 17, 26],
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [33, 22, 618, 196],
-          "reason": "style change"
+          "object": "InlineTextBox 'Pattern on fill'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGResourcePattern pattern id='dynPattern'",
+          "reason": "layoutObject insertion"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.txt
index 119dfc29..65fcde82 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.txt
@@ -7,31 +7,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 8, 402, 405],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutEmbeddedObject object",
-          "rect": [209, 9, 200, 400],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGEllipse circle",
-          "rect": [89, 189, 40, 40],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGEllipse circle",
-          "rect": [169, 169, 80, 80],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRect rect",
           "rect": [9, 9, 400, 400],
           "reason": "location change"
@@ -47,18 +27,35 @@
           "reason": "full"
         },
         {
+          "object": "LayoutEmbeddedObject object",
+          "rect": [209, 9, 200, 400],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutView #document",
           "rect": [209, 9, 200, 400],
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGEllipse circle",
+          "rect": [169, 169, 80, 80],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGEllipse circle",
+          "rect": [89, 189, 40, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-content-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-content-expected.txt
index e74f29a..38a862f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-content-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 68, 402, 405],
           "reason": "forced by layout"
@@ -27,13 +22,15 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-content-with-resources-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-content-with-resources-expected.txt
index 4c384d4..5aa492a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-content-with-resources-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-content-with-resources-expected.txt
@@ -7,23 +7,23 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 68, 402, 405],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGEllipse circle",
-          "rect": [9, 151, 100, 236],
+          "rect": [48, 108, 322, 322],
           "reason": "SVG resource change"
         },
         {
+          "object": "LayoutSVGRoot svg",
+          "rect": [48, 108, 322, 322],
+          "reason": "bounds change"
+        },
+        {
           "object": "LayoutSVGEllipse circle",
-          "rect": [48, 108, 322, 322],
+          "rect": [9, 151, 100, 236],
           "reason": "SVG resource change"
         },
         {
@@ -32,18 +32,15 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [48, 108, 322, 322],
-          "reason": "bounds change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-deep-shadow-tree-content-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-deep-shadow-tree-content-expected.txt
index 5840225..381d71ba 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-deep-shadow-tree-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-deep-shadow-tree-content-expected.txt
@@ -7,88 +7,85 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 68, 402, 405],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGContainer g id='targetUse'",
-          "rect": [59, 269, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='targetUse'",
           "rect": [209, 269, 200, 200],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [59, 269, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
           "rect": [209, 269, 200, 200],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='targetUse'",
-          "rect": [34, 169, 50, 200],
+          "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [209, 269, 200, 200],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGRoot svg",
+          "rect": [209, 269, 200, 200],
+          "reason": "bounds change"
+        },
+        {
           "object": "LayoutSVGContainer use id='targetUse'",
           "rect": [109, 169, 200, 200],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [109, 169, 200, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='targetRect'",
           "rect": [59, 169, 150, 200],
           "reason": "incremental"
         },
         {
+          "object": "LayoutSVGContainer g id='targetUse'",
+          "rect": [59, 269, 50, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [59, 269, 50, 200],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [59, 269, 50, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [59, 269, 50, 200],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='targetUse'",
           "rect": [34, 169, 50, 200],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [109, 169, 200, 200],
+          "rect": [34, 169, 50, 200],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [59, 269, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [209, 269, 200, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [59, 269, 50, 200],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [209, 269, 200, 200],
-          "reason": "bounds change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-image-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-image-expected.txt
index 9c4a5507..84c2d7b02 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-image-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 68, 402, 405],
           "reason": "forced by layout"
@@ -27,13 +22,15 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-inner-svg-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-inner-svg-expected.txt
index b80f10c..4877aea 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-inner-svg-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-inner-svg-expected.txt
@@ -7,23 +7,28 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 50, 402, 405],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGPath path",
-          "rect": [13, 205, 92, 91],
+          "rect": [27, 67, 364, 364],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [27, 67, 364, 364],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg",
+          "rect": [27, 67, 364, 364],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGPath path",
-          "rect": [27, 67, 364, 364],
+          "rect": [13, 205, 92, 91],
           "reason": "location change"
         },
         {
@@ -32,28 +37,20 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [27, 67, 364, 364],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg",
           "rect": [13, 205, 92, 91],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGViewportContainer svg",
-          "rect": [27, 67, 364, 364],
-          "reason": "location change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-shadow-tree-content-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-shadow-tree-content-expected.txt
index 2187227..ccff7c8 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-shadow-tree-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-shadow-tree-content-expected.txt
@@ -7,31 +7,36 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 68, 402, 405],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutSVGContainer g id='targetUse'",
-          "rect": [59, 69, 150, 200],
+          "object": "LayoutSVGRoot svg",
+          "rect": [109, 69, 300, 400],
           "reason": "incremental"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [59, 269, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
           "rect": [209, 269, 200, 200],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [209, 269, 200, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [59, 269, 150, 200],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGContainer g id='targetUse'",
+          "rect": [59, 69, 150, 200],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutSVGContainer use",
           "rect": [59, 69, 150, 200],
           "reason": "incremental"
@@ -42,48 +47,40 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [59, 269, 150, 200],
+          "object": "LayoutSVGRect rect id='targetRect1'",
+          "rect": [59, 69, 150, 200],
           "reason": "incremental"
         },
         {
+          "object": "LayoutSVGRect rect id='targetRect1'",
+          "rect": [59, 69, 150, 200],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGRect rect id='targetRect1'",
+          "rect": [59, 69, 150, 200],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [59, 269, 50, 200],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRect rect id='targetRect'",
           "rect": [59, 269, 50, 200],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [209, 269, 200, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='targetRect1'",
-          "rect": [59, 69, 150, 200],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGRect rect id='targetRect1'",
-          "rect": [59, 69, 150, 200],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGRect rect id='targetRect1'",
-          "rect": [59, 69, 150, 200],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [109, 69, 300, 400],
-          "reason": "incremental"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.txt
index dd2ae96..0dced59d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 68, 402, 405],
           "reason": "forced by layout"
@@ -22,8 +17,13 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [59, 269, 50, 50],
+          "object": "LayoutSVGRoot svg",
+          "rect": [9, 69, 400, 400],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='targetSymbol'",
+          "rect": [9, 69, 400, 400],
           "reason": "location change"
         },
         {
@@ -37,23 +37,20 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [9, 69, 400, 400],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='targetSymbol'",
-          "rect": [9, 69, 400, 400],
+          "object": "LayoutSVGRect rect",
+          "rect": [59, 269, 50, 50],
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-use-on-symbol-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-use-on-symbol-expected.txt
index 73de876..2d7e591 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-use-on-symbol-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-use-on-symbol-expected.txt
@@ -7,33 +7,38 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 50, 402, 405],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [18, 209, 82, 83],
+          "rect": [45, 85, 328, 328],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [45, 85, 328, 328],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [45, 85, 328, 328],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
+          "rect": [45, 85, 328, 328],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [45, 85, 328, 328],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
           "rect": [18, 209, 82, 83],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGPath path",
-          "rect": [45, 85, 328, 328],
+          "rect": [18, 209, 82, 83],
           "reason": "location change"
         },
         {
@@ -42,28 +47,20 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [45, 85, 328, 328],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
           "rect": [18, 209, 82, 83],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
-          "rect": [45, 85, 328, 328],
-          "reason": "location change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt
index 7d2fdc089..ed85609 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt
@@ -7,23 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 50, 402, 405],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [13, 205, 92, 91],
+          "rect": [27, 67, 364, 364],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutSVGPath path",
+          "rect": [27, 67, 364, 364],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [27, 67, 364, 364],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
+          "rect": [27, 67, 364, 364],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGContainer use",
-          "rect": [27, 67, 364, 364],
+          "rect": [13, 205, 92, 91],
           "reason": "bounds change"
         },
         {
@@ -32,38 +42,25 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGPath path",
-          "rect": [27, 67, 364, 364],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [13, 205, 92, 91],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [27, 67, 364, 364],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
           "rect": [13, 205, 92, 91],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
-          "rect": [27, 67, 364, 364],
-          "reason": "location change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
index d2095600..59f09b5a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
@@ -7,36 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'index'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'pservers-pattern-01-b \u2190'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u2192 script-handle-01-b'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV class='linkbar'",
           "rect": [24, 987, 737, 29],
           "reason": "bounds change"
@@ -52,13 +22,35 @@
           "reason": "style change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'index'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'pservers-pattern-01-b \u2190'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u2192 script-handle-01-b'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-dom-removal-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-dom-removal-expected.txt
index 2562ca7..163dfe7 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-dom-removal-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-dom-removal-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGContainer g id='objectsToRemove'",
           "rect": [0, 0, 216, 129],
           "reason": "became invisible"
@@ -22,18 +17,21 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [0, 0, 20, 20],
-          "reason": "layoutObject removal"
-        },
-        {
           "object": "LayoutSVGText text",
           "rect": [50, 111, 166, 18],
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutSVGRect rect",
+          "rect": [0, 0, 20, 20],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-repaint-including-stroke-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-repaint-including-stroke-expected.txt
index 431d511..62a0f99 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-repaint-including-stroke-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-repaint-including-stroke-expected.txt
@@ -7,53 +7,49 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Repaint me!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Repaint me!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [30, 0, 404, 60],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [80, 0, 551, 118],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [30, 0, 404, 60],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
           "rect": [80, 0, 551, 118],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGText text id='bounce'",
-          "rect": [30, 0, 404, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='bounce'",
           "rect": [80, 0, 551, 118],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [30, 0, 404, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [30, 0, 404, 60],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text id='bounce'",
+          "rect": [30, 0, 404, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Repaint me!'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Repaint me!'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.txt
index 0c386a6..f807ec7 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.txt
@@ -7,53 +7,49 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Passes, if text is at 200x20'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Passes, if text is at 200x20'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [18, 194, 170, 18],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [208, 14, 170, 18],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGRoot svg:svg",
-          "rect": [18, 194, 170, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg:svg",
           "rect": [208, 14, 170, 18],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGText text id='ttt'",
-          "rect": [18, 194, 170, 18],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGText text id='ttt'",
           "rect": [208, 14, 170, 18],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [18, 194, 170, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGRoot svg:svg",
+          "rect": [18, 194, 170, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text id='ttt'",
+          "rect": [18, 194, 170, 18],
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Passes, if text is at 200x20'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Passes, if text is at 200x20'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-clipped-hit-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-clipped-hit-expected.txt
index 2d91a92..a205d52 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-clipped-hit-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-clipped-hit-expected.txt
@@ -7,21 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Passed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [90, 116, 64, 18],
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutSVGText text id='status'",
+          "rect": [90, 116, 64, 18],
+          "reason": "full"
+        },
+        {
           "object": "LayoutSVGInlineText #text",
           "rect": [90, 116, 44, 18],
           "reason": "layoutObject insertion"
@@ -32,18 +27,19 @@
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutSVGText text id='status'",
-          "rect": [90, 116, 64, 18],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Passed'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-detach-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-detach-expected.txt
index c5585f4..b5e3baf 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-detach-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-detach-expected.txt
@@ -7,33 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'use'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'use'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'use'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g id='use'",
+          "rect": [210, 58, 44, 64],
           "reason": "location change"
         },
         {
@@ -47,8 +22,18 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGContainer g id='use'",
-          "rect": [210, 58, 44, 64],
+          "object": "LayoutSVGContainer use",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [210, 58, 44, 38],
           "reason": "location change"
         },
         {
@@ -58,12 +43,77 @@
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [218, 94, 28, 28],
+          "rect": [210, 58, 44, 38],
           "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGContainer use",
           "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 38],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [218, 94, 28, 28],
           "reason": "location change"
         },
         {
@@ -73,7 +123,12 @@
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [210, 58, 44, 38],
+          "rect": [218, 94, 28, 28],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [218, 94, 28, 28],
           "reason": "layoutObject removal"
         },
         {
@@ -83,38 +138,18 @@
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [218, 94, 28, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [210, 58, 44, 38],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer use",
           "rect": [218, 94, 28, 28],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGContainer use",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
+          "object": "LayoutSVGEllipse circle id='use_circle'",
           "rect": [218, 94, 28, 28],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGEllipse circle id='use_circle'",
           "rect": [218, 94, 28, 28],
-          "reason": "layoutObject removal"
+          "reason": "location change"
         },
         {
           "object": "LayoutSVGEllipse circle id='use_circle'",
@@ -129,7 +164,7 @@
         {
           "object": "LayoutSVGEllipse circle id='use_circle'",
           "rect": [218, 94, 28, 28],
-          "reason": "location change"
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGEllipse circle id='use_circle'",
@@ -137,113 +172,63 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGEllipse circle id='use_circle'",
-          "rect": [218, 94, 28, 28],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'use'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'use'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'use'",
           "reason": "location change"
         },
         {
           "object": "LayoutSVGHiddenContainer g id='use'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='use'",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGHiddenContainer g id='use'",
-          "rect": [0, 0, 0, 0],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 38],
+          "object": "LayoutSVGHiddenContainer g id='use'",
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 38],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 38],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 38],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 38],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 38],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 38],
-          "reason": "location change"
-        },
-        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-disappears-after-style-update-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-disappears-after-style-update-expected.txt
deleted file mode 100644
index 8536af81..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-disappears-after-style-update-expected.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-{
-  "bounds": [800, 600],
-  "children": [
-    {
-      "bounds": [800, 600],
-      "contentsOpaque": true,
-      "drawsContent": true,
-      "paintInvalidations": [
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [50, 10, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 10, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 10, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 10, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 10, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 10, 30, 30],
-          "reason": "location change"
-        }
-      ]
-    }
-  ]
-}
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-setAttribute-crash-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-setAttribute-crash-expected.txt
index 3f8b2cf..7fa9c62 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-setAttribute-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/use-setAttribute-crash-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow body",
+          "rect": [8, 8, 784, 204],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow body",
@@ -17,27 +17,12 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow body",
-          "rect": [8, 8, 784, 204],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutSVGContainer svg:use id='use'",
           "rect": [33, 33, 50, 50],
           "reason": "full"
         },
         {
           "object": "LayoutSVGEllipse svg:circle id='circle'",
-          "rect": [53, 53, 10, 10],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGEllipse svg:circle id='circle'",
-          "rect": [8, 8, 25, 25],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGEllipse svg:circle id='circle'",
           "rect": [33, 33, 50, 50],
           "reason": "location change"
         },
@@ -48,22 +33,34 @@
         },
         {
           "object": "LayoutSVGViewportContainer svg id='symbol'",
+          "rect": [33, 33, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGEllipse svg:circle id='circle'",
+          "rect": [8, 8, 25, 25],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGEllipse svg:circle id='circle'",
           "rect": [53, 53, 10, 10],
           "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGViewportContainer svg id='symbol'",
-          "rect": [33, 33, 50, 50],
-          "reason": "location change"
+          "rect": [53, 53, 10, 10],
+          "reason": "layoutObject removal"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/filter-refresh-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/filter-refresh-expected.txt
deleted file mode 100644
index 5261d85..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/filter-refresh-expected.txt
+++ /dev/null
@@ -1,244 +0,0 @@
-CONSOLE WARNING: SVG's SMIL animations (<animate>, <set>, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead.
-{
-  "bounds": [800, 600],
-  "children": [
-    {
-      "bounds": [800, 600],
-      "contentsOpaque": true,
-      "drawsContent": true,
-      "paintInvalidations": [
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 130, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 170, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [140, 60, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 36, 36],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 10, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate1'",
-          "rect": [140, 60, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate2'",
-          "rect": [140, 140, 36, 36],
-          "reason": "style change"
-        }
-      ]
-    }
-  ]
-}
-
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/add-background-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/add-background-property-on-root-expected.txt
index 7af92f7..5cd4b7b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/add-background-property-on-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/add-background-property-on-root-expected.txt
@@ -18,7 +18,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/outline-offset-text-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/outline-offset-text-expected.txt
index 557117b..af429a3 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/outline-offset-text-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/outline-offset-text-expected.txt
@@ -7,26 +7,26 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "outline"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [103, 24, 160, 116],
           "reason": "outline"
         },
         {
+          "object": "LayoutSVGText text",
+          "rect": [103, 24, 160, 116],
+          "reason": "full"
+        },
+        {
           "object": "LayoutSVGInlineText #text",
           "rect": [63, 24, 160, 116],
           "reason": "outline"
         },
         {
+          "object": "LayoutSVGText text",
+          "rect": [63, 24, 160, 116],
+          "reason": "full"
+        },
+        {
           "object": "LayoutSVGRoot svg",
           "rect": [118, 39, 130, 86],
           "reason": "bounds change"
@@ -37,23 +37,19 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [103, 24, 160, 116],
+          "object": "InlineTextBox 'Foo'",
           "reason": "full"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [63, 24, 160, 116],
+          "object": "InlineTextBox 'Foo'",
+          "reason": "outline"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/remove-background-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/remove-background-property-on-root-expected.txt
index 7af92f7..5cd4b7b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/remove-background-property-on-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/remove-background-property-on-root-expected.txt
@@ -18,7 +18,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
index 9303b02..687c674 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutSVGContainer g",
           "rect": [9, 12, 48, 30],
           "reason": "bounds change"
@@ -37,13 +27,19 @@
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/repaint-non-scaling-stroke-text-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
index 9303b02..687c674 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutSVGContainer g",
           "rect": [9, 12, 48, 30],
           "reason": "bounds change"
@@ -37,13 +27,19 @@
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/text-mask-update-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/text-mask-update-expected.txt
index 147932b..89436c6 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/text-mask-update-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/repaint/text-mask-update-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [10, 32, 43, 23],
-          "reason": "layoutObject removal"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 2, 46, 23],
           "reason": "layoutObject insertion"
@@ -32,16 +17,6 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [10, 32, 43, 18],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [10, 32, 43, 18],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [10, 2, 46, 23],
           "reason": "bounds change"
@@ -52,18 +27,39 @@
           "reason": "style change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [10, 32, 43, 23],
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "LayoutSVGText text id='text2'",
           "rect": [10, 32, 43, 23],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGRect rect",
+          "rect": [10, 32, 43, 18],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [10, 32, 43, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/append-text-node-to-tspan-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/text/append-text-node-to-tspan-expected.txt
index b704451..2471e81 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/append-text-node-to-tspan-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/append-text-node-to-tspan-expected.txt
@@ -7,51 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 62, 306, 378],
           "reason": "location change"
@@ -62,13 +17,47 @@
           "reason": "style change"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SS'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/ems-display-none-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/text/ems-display-none-expected.txt
index 4d1807b..5d7296c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/ems-display-none-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/ems-display-none-expected.txt
@@ -7,31 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Two lines of text should be visible.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Two lines of text should be visible.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGContainer g",
           "rect": [50, 54, 571, 86],
           "reason": "bounds change"
@@ -72,8 +47,27 @@
           "reason": "layoutObject insertion"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Two lines of text should be visible.'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Two lines of text should be visible.'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/exs-display-none-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/text/exs-display-none-expected.txt
index a0346bd..a8b6095 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/exs-display-none-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/exs-display-none-expected.txt
@@ -7,31 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Two lines of text should be visible.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Two lines of text should be visible.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGContainer g",
           "rect": [50, 50, 571, 82],
           "reason": "bounds change"
@@ -72,8 +47,27 @@
           "reason": "layoutObject insertion"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Two lines of text should be visible.'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Two lines of text should be visible.'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/modify-text-node-in-tspan-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/text/modify-text-node-in-tspan-expected.txt
index 66209ac..c9230569 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/modify-text-node-in-tspan-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/modify-text-node-in-tspan-expected.txt
@@ -7,51 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 62, 306, 378],
           "reason": "full"
@@ -62,13 +17,47 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/remove-text-node-from-tspan-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/text/remove-text-node-from-tspan-expected.txt
index 553f4107..4f58d8b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/remove-text-node-from-tspan-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/remove-text-node-from-tspan-expected.txt
@@ -7,74 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'FAIL'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 62, 306, 378],
-          "reason": "layoutObject removal"
+          "reason": "bounds change"
         },
         {
           "object": "LayoutSVGInlineText #text",
@@ -99,7 +34,7 @@
         {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 62, 306, 378],
-          "reason": "bounds change"
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGRoot (positioned) svg",
@@ -127,13 +62,63 @@
           "reason": "full"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'FAIL'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/remove-tspan-from-text-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/text/remove-tspan-from-text-expected.txt
index dddd430..c5d0f94 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/remove-tspan-from-text-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/remove-tspan-from-text-expected.txt
@@ -7,46 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'FAIL'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 62, 306, 258],
           "reason": "layoutObject removal"
@@ -62,13 +22,43 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'FAIL'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-rescale-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-rescale-expected.txt
index 30b4d94..c97e697c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-rescale-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-rescale-expected.txt
@@ -7,138 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRoot (positioned) svg",
+          "rect": [0, 13, 402, 187],
           "reason": "bounds change"
         },
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRoot (positioned) svg",
+          "rect": [0, 0, 402, 163],
           "reason": "bounds change"
         },
         {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [0, 0, 1, 1],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [210, 13, 100, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [6, 3, 4, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [210, 113, 100, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='text1g'",
-          "rect": [0, 0, 1, 1],
+          "object": "LayoutSVGContainer g id='text2g'",
+          "rect": [0, 63, 402, 100],
           "reason": "full"
         },
         {
@@ -147,24 +27,64 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSVGContainer g id='text2g'",
-          "rect": [0, 63, 402, 100],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGContainer g id='text3g'",
-          "rect": [0, 3, 13, 4],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGContainer g id='text3g'",
           "rect": [0, 113, 402, 87],
           "reason": "full"
         },
         {
-          "object": "LayoutSVGForeignObject foreignObject",
-          "rect": [0, 0, 1, 1],
-          "reason": "location change"
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 114, 194, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 114, 194, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 114, 194, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [0, 114, 194, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 114, 194, 46],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 64, 194, 46],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 14, 194, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 14, 194, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 14, 194, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [0, 14, 194, 46],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 14, 194, 46],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGForeignObject foreignObject",
@@ -173,87 +93,17 @@
         },
         {
           "object": "LayoutSVGForeignObject foreignObject",
-          "rect": [6, 3, 4, 4],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGForeignObject foreignObject",
           "rect": [210, 113, 100, 87],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 1, 1],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 14, 194, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 1, 1],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 14, 194, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 1, 1],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 14, 194, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 1, 1],
+          "object": "LayoutBlockFlow P",
+          "rect": [210, 113, 100, 46],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [310, 14, 92, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 3, 6, 2],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 114, 194, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 3, 6, 2],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 114, 194, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 3, 6, 2],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 114, 194, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [9, 3, 4, 2],
+          "object": "LayoutBlockFlow P",
+          "rect": [210, 13, 100, 46],
           "reason": "location change"
         },
         {
@@ -262,118 +112,33 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg",
-          "rect": [0, 0, 402, 163],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot (positioned) svg",
-          "rect": [0, 13, 402, 187],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 1, 1],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 14, 194, 46],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 3, 6, 2],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 114, 194, 46],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 1, 1],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 14, 194, 46],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 0, 1, 1],
+          "rect": [310, 114, 92, 46],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [310, 14, 92, 46],
+          "object": "LayoutSVGViewportContainer svg",
+          "rect": [310, 114, 92, 46],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 64, 194, 46],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutSVGText text",
           "rect": [310, 64, 92, 46],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [0, 3, 6, 2],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 114, 194, 46],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [9, 3, 4, 2],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [310, 14, 92, 46],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [310, 114, 92, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg",
-          "rect": [0, 0, 1, 1],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg",
           "rect": [310, 14, 92, 46],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGViewportContainer svg",
-          "rect": [9, 3, 4, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg",
-          "rect": [310, 114, 92, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 1, 1],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [210, 13, 92, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [6, 3, 4, 2],
+          "rect": [310, 14, 92, 46],
           "reason": "location change"
         },
         {
@@ -382,73 +147,272 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [210, 13, 92, 46],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='text3g'",
+          "rect": [0, 3, 13, 4],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 3, 6, 2],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 3, 6, 2],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 3, 6, 2],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [0, 3, 6, 2],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 3, 6, 2],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGForeignObject foreignObject",
+          "rect": [6, 3, 4, 4],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [9, 3, 4, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [9, 3, 4, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg",
+          "rect": [9, 3, 4, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [6, 3, 4, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [6, 3, 4, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [0, 0, 1, 1],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='text1g'",
+          "rect": [0, 0, 1, 1],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGForeignObject foreignObject",
+          "rect": [0, 0, 1, 1],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 0, 1, 1],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 0, 1, 1],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 0, 1, 1],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 0, 1, 1],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [0, 0, 1, 1],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 0, 1, 1],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 0, 1, 1],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg",
+          "rect": [0, 0, 1, 1],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [0, 0, 1, 1],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-text-05-t-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-text-05-t-expected.txt
index b1bb70c..82324dba 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-text-05-t-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-text-05-t-expected.txt
@@ -7,643 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '$Revision: 1.8 $'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1.x 1.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1.x 2.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1.x 4.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2.x 1.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2.x 2.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2.x 4.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4.x 1.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4.x 2.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4.x 4.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'end'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'middle'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'start'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'text-anchor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'text-anchor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'text-anchor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
-          "rect": [16, 91, 74, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 141, 74, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 191, 74, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 241, 74, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 291, 74, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 341, 74, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 391, 74, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 441, 74, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 491, 74, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [188, 13, 124, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [226, 36, 48, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [250, 101, 34, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 151, 59, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 201, 111, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [250, 235, 34, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 285, 59, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 335, 43, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [250, 385, 34, 45],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 435, 59, 29],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 485, 111, 29],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [355, 13, 124, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [378, 36, 77, 34],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [398, 101, 37, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 151, 61, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 201, 102, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [411, 235, 36, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 285, 61, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 335, 44, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [411, 385, 28, 45],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 435, 61, 29],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 485, 102, 29],
+          "rect": [16, 523, 441, 77],
           "reason": "selection"
         },
         {
@@ -653,47 +18,32 @@
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [563, 36, 41, 34],
+          "rect": [355, 13, 124, 34],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [550, 101, 34, 21],
+          "rect": [188, 13, 124, 34],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [590, 151, 62, 21],
+          "rect": [266, 485, 111, 29],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [590, 201, 94, 21],
+          "rect": [266, 201, 111, 21],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [575, 235, 35, 54],
+          "rect": [428, 485, 102, 29],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [590, 285, 62, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [590, 335, 44, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [565, 385, 27, 45],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [590, 435, 62, 29],
+          "rect": [428, 201, 102, 21],
           "reason": "selection"
         },
         {
@@ -703,222 +53,732 @@
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [16, 523, 441, 77],
+          "rect": [590, 201, 94, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [378, 36, 77, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 491, 74, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 441, 74, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 391, 74, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 341, 74, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 291, 74, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 241, 74, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 191, 74, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 141, 74, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 91, 74, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [590, 285, 62, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [590, 435, 62, 29],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [590, 151, 62, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [428, 285, 61, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [428, 435, 61, 29],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [428, 151, 61, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [266, 285, 59, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [266, 435, 59, 29],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [266, 151, 59, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [226, 36, 48, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [590, 335, 44, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [428, 335, 44, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [266, 335, 43, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [563, 36, 41, 34],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [398, 101, 37, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [411, 235, 36, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [575, 235, 35, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [250, 235, 34, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [250, 385, 34, 45],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [550, 101, 34, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [250, 101, 34, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [411, 385, 28, 45],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [565, 385, 27, 45],
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '$Revision: 1.8 $'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1.x 1.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1.x 2.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1.x 4.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2.x 1.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2.x 2.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2.x 4.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4.x 1.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4.x 2.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4.x 4.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'end'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'middle'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'start'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'text-anchor'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'text-anchor'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'text-anchor'",
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text id='revision'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-viewbox-rescale-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-viewbox-rescale-expected.txt
index c0cd97b..4887a962 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-viewbox-rescale-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-viewbox-rescale-expected.txt
@@ -7,153 +7,139 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 2, 1],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [59, 43, 95, 23],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 2, 1],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [59, 43, 95, 23],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 2, 1],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [59, 43, 95, 23],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGRoot (positioned) svg",
           "rect": [0, 0, 154, 166],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 2, 1],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [59, 43, 95, 23],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
           "rect": [59, 143, 95, 23],
           "reason": "full"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 2, 1],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [59, 43, 95, 23],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGText text",
           "rect": [59, 143, 95, 23],
           "reason": "full"
         },
         {
-          "object": "LayoutSVGViewportContainer svg id='inner1'",
-          "rect": [0, 0, 2, 1],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='inner1'",
-          "rect": [59, 43, 95, 23],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg id='inner2'",
           "rect": [59, 143, 95, 23],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [59, 43, 95, 23],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [59, 43, 95, 23],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [59, 43, 95, 23],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [59, 43, 95, 23],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [59, 43, 95, 23],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='inner1'",
+          "rect": [59, 43, 95, 23],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 0, 2, 1],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 0, 2, 1],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 0, 2, 1],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [0, 0, 2, 1],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 0, 2, 1],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='inner1'",
+          "rect": [0, 0, 2, 1],
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/tspan-dynamic-positioning-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/text/tspan-dynamic-positioning-expected.txt
index c43542b3..ce870bd 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/tspan-dynamic-positioning-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/tspan-dynamic-positioning-expected.txt
@@ -7,53 +7,38 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This text should be at visible at 200,200'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This text should be at visible at 200,200'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [20, 6, 256, 18],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [200, 186, 256, 18],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [20, 6, 256, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
           "rect": [200, 186, 256, 18],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGTSpan tspan id='ts'",
-          "rect": [20, 6, 256, 18],
+          "rect": [200, 186, 256, 18],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGText text",
+          "rect": [200, 186, 256, 18],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [20, 6, 256, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [20, 6, 256, 18],
+          "reason": "bounds change"
+        },
+        {
           "object": "LayoutSVGTSpan tspan id='ts'",
-          "rect": [200, 186, 256, 18],
+          "rect": [20, 6, 256, 18],
           "reason": "full"
         },
         {
@@ -62,18 +47,27 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [200, 186, 256, 18],
-          "reason": "forced by layout"
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This text should be at visible at 200,200'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This text should be at visible at 200,200'",
+          "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.txt
index 4836e0a..d7361e9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.txt
@@ -6,28 +6,73 @@
       "contentsOpaque": true,
       "drawsContent": true,
       "backgroundColor": "#FFFFFF",
-      "repaintRects": [
-        [355, 126, 103, 101],
-        [352, 395, 98, 99],
-        [246, 104, 119, 28],
-        [246, 104, 119, 28],
-        [203, 335, 121, 43],
-        [203, 335, 121, 43],
-        [187, 104, 310, 390],
-        [111, 83, 101, 100],
-        [90, 206, 98, 98],
-        [90, 83, 275, 248]
-      ],
-      "paintInvalidationClients": [
-        "RootInlineBox",
-        "InlineTextBox 'This is some text'",
-        "LayoutSVGRoot svg",
-        "LayoutSVGRect rect id='rect'",
-        "LayoutSVGText text id='text'",
-        "RootInlineBox",
-        "LayoutSVGInlineText #text",
-        "InlineTextBox 'This is some text'",
-        "LayoutSVGImage image id='image'"
+      "paintInvalidations": [
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [187, 104, 310, 390],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [90, 83, 275, 248],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [203, 335, 121, 43],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text id='text'",
+          "rect": [203, 335, 121, 43],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [246, 104, 119, 28],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text id='text'",
+          "rect": [246, 104, 119, 28],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [355, 126, 103, 101],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [111, 83, 101, 100],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGImage image id='image'",
+          "rect": [352, 395, 98, 99],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGImage image id='image'",
+          "rect": [90, 206, 98, 98],
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This is some text'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This is some text'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "RootInlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
+          "reason": "full"
+        }
       ]
     }
   ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/transforms/transform-focus-ring-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/transforms/transform-focus-ring-repaint-expected.txt
index d79d1ea4..4b36009 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/transforms/transform-focus-ring-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/transforms/transform-focus-ring-repaint-expected.txt
@@ -15,13 +15,13 @@
           "paintInvalidations": [
             {
               "object": "LayoutBlockFlow (positioned) DIV id='target'",
-              "rect": [0, 0, 200, 200],
-              "reason": "full"
+              "rect": [0, 0, 406, 546],
+              "reason": "style change"
             },
             {
               "object": "LayoutBlockFlow (positioned) DIV id='target'",
-              "rect": [0, 0, 406, 546],
-              "reason": "style change"
+              "rect": [0, 0, 200, 200],
+              "reason": "full"
             }
           ]
         },
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt
index e3ff5ab..0f4e0e73 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt
@@ -13,419 +13,337 @@
           "drawsContent": true,
           "paintInvalidations": [
             {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
               "object": "LayoutText #text",
               "rect": [0, 0, 47, 615],
               "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
             }
           ],
           "children": [
@@ -438,419 +356,337 @@
                   "drawsContent": true,
                   "paintInvalidations": [
                     {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
                       "object": "LayoutText #text",
                       "rect": [0, 0, 47, 615],
                       "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
                     }
                   ]
                 }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt
index 654368ef..bce81d73 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [282, 36, 45, 18],
           "reason": "full"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [282, 36, 45, 18],
+          "object": "InlineTextBox 'findme'",
           "reason": "full"
         }
       ],
@@ -25,43 +24,13 @@
           "drawsContent": true,
           "paintInvalidations": [
             {
-              "object": "InlineTextBox 'Can you findme in this boring text?'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'Findme in a typewriter!'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'Findme on a path! Did you findme?'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'findme'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'findme'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'findme'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'findme'",
-              "rect": [0, 0, 0, 0],
+              "object": "LayoutSVGInlineText #text",
+              "rect": [10, 72, 227, 18],
               "reason": "full"
             },
             {
               "object": "LayoutSVGInlineText #text",
-              "rect": [10, 72, 227, 18],
+              "rect": [20, 160, 200, 72],
               "reason": "full"
             },
             {
@@ -70,8 +39,8 @@
               "reason": "full"
             },
             {
-              "object": "LayoutSVGInlineText #text",
-              "rect": [20, 160, 200, 72],
+              "object": "LayoutText #text",
+              "rect": [268, 0, 46, 18],
               "reason": "full"
             },
             {
@@ -86,12 +55,35 @@
             },
             {
               "object": "LayoutText #text",
-              "rect": [268, 0, 46, 18],
+              "rect": [52, 18, 45, 18],
               "reason": "full"
             },
             {
-              "object": "LayoutText #text",
-              "rect": [52, 18, 45, 18],
+              "object": "InlineTextBox 'Can you findme in this boring text?'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'Findme in a typewriter!'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'Findme on a path! Did you findme?'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'findme'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'findme'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'findme'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'findme'",
               "reason": "full"
             }
           ],
@@ -105,43 +97,13 @@
                   "drawsContent": true,
                   "paintInvalidations": [
                     {
-                      "object": "InlineTextBox 'Can you findme in this boring text?'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'Findme in a typewriter!'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'Findme on a path! Did you findme?'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'findme'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'findme'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'findme'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'findme'",
-                      "rect": [0, 0, 0, 0],
+                      "object": "LayoutSVGInlineText #text",
+                      "rect": [10, 72, 227, 18],
                       "reason": "full"
                     },
                     {
                       "object": "LayoutSVGInlineText #text",
-                      "rect": [10, 72, 227, 18],
+                      "rect": [20, 160, 200, 72],
                       "reason": "full"
                     },
                     {
@@ -150,8 +112,8 @@
                       "reason": "full"
                     },
                     {
-                      "object": "LayoutSVGInlineText #text",
-                      "rect": [20, 160, 200, 72],
+                      "object": "LayoutText #text",
+                      "rect": [268, 0, 46, 18],
                       "reason": "full"
                     },
                     {
@@ -166,12 +128,35 @@
                     },
                     {
                       "object": "LayoutText #text",
-                      "rect": [268, 0, 46, 18],
+                      "rect": [52, 18, 45, 18],
                       "reason": "full"
                     },
                     {
-                      "object": "LayoutText #text",
-                      "rect": [52, 18, 45, 18],
+                      "object": "InlineTextBox 'Can you findme in this boring text?'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'Findme in a typewriter!'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'Findme on a path! Did you findme?'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'findme'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'findme'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'findme'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'findme'",
                       "reason": "full"
                     }
                   ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt
index 0d08b4c..9601bf3 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt
@@ -13,123 +13,8 @@
           "drawsContent": true,
           "paintInvalidations": [
             {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
               "object": "LayoutText #text",
-              "rect": [0, -49, 75, 18],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, -31, 75, 18],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, -13, 75, 18],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 5, 75, 18],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 23, 75, 18],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 41, 75, 18],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 59, 75, 18],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 77, 75, 18],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 95, 75, 18],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 113, 75, 18],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 131, 75, 18],
+              "rect": [0, 167, 75, 18],
               "reason": "style change"
             },
             {
@@ -139,7 +24,109 @@
             },
             {
               "object": "LayoutText #text",
-              "rect": [0, 167, 75, 18],
+              "rect": [0, 131, 75, 18],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 113, 75, 18],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 95, 75, 18],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 77, 75, 18],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 59, 75, 18],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 41, 75, 18],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 23, 75, 18],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 5, 75, 18],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, -13, 75, 18],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, -31, 75, 18],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, -49, 75, 18],
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
               "reason": "style change"
             }
           ],
@@ -153,123 +140,8 @@
                   "drawsContent": true,
                   "paintInvalidations": [
                     {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
                       "object": "LayoutText #text",
-                      "rect": [0, 0, 75, 18],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 18, 75, 18],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 36, 75, 18],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 54, 75, 18],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 72, 75, 18],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 90, 75, 18],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 108, 75, 18],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 126, 75, 18],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 144, 75, 18],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 162, 75, 18],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 180, 75, 18],
+                      "rect": [0, 216, 75, 18],
                       "reason": "style change"
                     },
                     {
@@ -279,7 +151,109 @@
                     },
                     {
                       "object": "LayoutText #text",
-                      "rect": [0, 216, 75, 18],
+                      "rect": [0, 180, 75, 18],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 162, 75, 18],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 144, 75, 18],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 126, 75, 18],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 108, 75, 18],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 90, 75, 18],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 72, 75, 18],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 54, 75, 18],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 36, 75, 18],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 18, 75, 18],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 0, 75, 18],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
                       "reason": "style change"
                     }
                   ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/text-color-change-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/text-color-change-expected.txt
index 8ba39b63..2943eaa 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/text-color-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/text-color-change-expected.txt
@@ -7,419 +7,337 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '  Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [8, 57, 48, 185],
           "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '  Text'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/text-match-highlight-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/text-match-highlight-expected.txt
index 80a6956..b38b232 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/text-match-highlight-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/text-match-highlight-expected.txt
@@ -7,58 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Can you findme in this boring text?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Findme in a typewriter!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Findme on a path! Did you findme?'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 126, 228, 18],
           "reason": "full"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [10, 181, 138, 12],
+          "rect": [20, 214, 202, 72],
           "reason": "full"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [20, 214, 202, 72],
+          "rect": [10, 181, 138, 12],
           "reason": "full"
         },
         {
@@ -68,7 +28,7 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [90, 54, 46, 17],
+          "rect": [270, 54, 46, 17],
           "reason": "full"
         },
         {
@@ -78,13 +38,45 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [270, 54, 46, 17],
+          "rect": [90, 54, 46, 17],
           "reason": "full"
         },
         {
           "object": "LayoutText #text",
           "rect": [52, 72, 46, 17],
           "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Can you findme in this boring text?'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Findme in a typewriter!'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Findme on a path! Did you findme?'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'findme'",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/updating-scrolling-container-and-content-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/updating-scrolling-container-and-content-expected.txt
index 174acd9..94758ca 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/updating-scrolling-container-and-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/updating-scrolling-container-and-content-expected.txt
@@ -7,123 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENT'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 108, 75, 4],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 113, 75, 17],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 131, 75, 17],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 149, 75, 17],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 167, 75, 17],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 185, 75, 17],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 203, 75, 17],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 221, 75, 17],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 239, 75, 17],
+          "rect": [8, 275, 75, 17],
           "reason": "style change"
         },
         {
@@ -133,7 +18,107 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 275, 75, 17],
+          "rect": [8, 239, 75, 17],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 221, 75, 17],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 203, 75, 17],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 185, 75, 17],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 167, 75, 17],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 149, 75, 17],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 131, 75, 17],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 113, 75, 17],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 108, 75, 4],
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENT'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/repaint/fixed-pos-with-abs-pos-child-scroll-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/repaint/fixed-pos-with-abs-pos-child-scroll-expected.txt
index 459abae..c73d905 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/repaint/fixed-pos-with-abs-pos-child-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/repaint/fixed-pos-with-abs-pos-child-scroll-expected.txt
@@ -8,21 +8,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Hi!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Hi!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='abs'",
-          "rect": [425, 480, 360, 90],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='abs'",
           "rect": [425, 980, 360, 90],
           "reason": "location change"
@@ -38,18 +23,8 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='fixed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='fixed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [425, 480, 22, 17],
+          "object": "LayoutBlockFlow (positioned) DIV id='abs'",
+          "rect": [425, 480, 360, 90],
           "reason": "location change"
         },
         {
@@ -68,13 +43,32 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [425, 480, 22, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Hi!'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Hi!'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='fixed'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='fixed'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt
index 1d626ff..941c4b3 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt
@@ -19,7 +19,6 @@
             },
             {
               "object": "RootInlineBox",
-              "rect": [0, 0, 0, 0],
               "reason": "full"
             }
           ],
@@ -39,7 +38,6 @@
                     },
                     {
                       "object": "RootInlineBox",
-                      "rect": [0, 0, 0, 0],
                       "reason": "full"
                     }
                   ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/repaint/should-not-clip-composited-viewport-scrolling-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/repaint/should-not-clip-composited-viewport-scrolling-layer-expected.txt
index 00b901d9..69228d269 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/repaint/should-not-clip-composited-viewport-scrolling-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/repaint/should-not-clip-composited-viewport-scrolling-layer-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/iframe-inside-squashed-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/iframe-inside-squashed-layer-expected.txt
index b078574..dd52ebf 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/iframe-inside-squashed-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/iframe-inside-squashed-layer-expected.txt
@@ -22,24 +22,9 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "InlineTextBox 'test1'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "full"
-                },
-                {
-                  "object": "InlineTextBox 'test1'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "full"
-                },
-                {
-                  "object": "LayoutBlockFlow BODY",
-                  "rect": [8, 508, 284, 18],
-                  "reason": "forced by layout"
-                },
-                {
-                  "object": "LayoutBlockFlow BODY",
-                  "rect": [8, 508, 269, 142],
-                  "reason": "forced by layout"
+                  "object": "LayoutView #document",
+                  "rect": [0, 500, 300, 150],
+                  "reason": "style change"
                 },
                 {
                   "object": "LayoutBlockFlow HTML",
@@ -57,9 +42,14 @@
                   "reason": "full"
                 },
                 {
-                  "object": "LayoutView #document",
-                  "rect": [0, 500, 300, 150],
-                  "reason": "style change"
+                  "object": "LayoutBlockFlow BODY",
+                  "rect": [8, 508, 284, 18],
+                  "reason": "forced by layout"
+                },
+                {
+                  "object": "LayoutBlockFlow BODY",
+                  "rect": [8, 508, 269, 142],
+                  "reason": "forced by layout"
                 },
                 {
                   "object": "LayoutView #document",
@@ -67,23 +57,31 @@
                   "reason": "scroll"
                 },
                 {
+                  "object": "InlineTextBox 'test1'",
+                  "reason": "full"
+                },
+                {
+                  "object": "InlineTextBox 'test1'",
+                  "reason": "full"
+                },
+                {
+                  "object": "LayoutView #document",
+                  "reason": "scroll"
+                },
+                {
                   "object": "RootInlineBox",
-                  "rect": [0, 0, 0, 0],
                   "reason": "full"
                 },
                 {
                   "object": "RootInlineBox",
-                  "rect": [0, 0, 0, 0],
                   "reason": "full"
                 },
                 {
                   "object": "RootInlineBox",
-                  "rect": [0, 0, 0, 0],
                   "reason": "full"
                 },
                 {
                   "object": "VerticalScrollbar",
-                  "rect": [0, 0, 0, 0],
                   "reason": "scroll"
                 }
               ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/remove-squashed-layer-plus-move-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/remove-squashed-layer-plus-move-expected.txt
index 355ac45..1d83313 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/remove-squashed-layer-plus-move-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/remove-squashed-layer-plus-move-expected.txt
@@ -18,42 +18,36 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [8, 62, 769, 54],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='container'",
           "rect": [8, 8, 769, 107],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutBlockFlow DIV id='container'",
+          "rect": [8, 62, 769, 54],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ],
@@ -71,14 +65,14 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "InlineBox",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "full"
+                  "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
+                  "rect": [0, 108, 1000, 50],
+                  "reason": "layer"
                 },
                 {
-                  "object": "InlineBox",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "full"
+                  "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
+                  "rect": [0, 54, 1000, 50],
+                  "reason": "location change"
                 },
                 {
                   "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
@@ -87,23 +81,21 @@
                 },
                 {
                   "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
-                  "rect": [0, 108, 1000, 50],
-                  "reason": "layer"
-                },
-                {
-                  "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
                   "rect": [0, 0, 100, 50],
                   "reason": "location change"
                 },
                 {
-                  "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'",
-                  "rect": [0, 54, 1000, 50],
-                  "reason": "location change"
-                },
-                {
                   "object": "LayoutBlockFlow (relative positioned) DIV id='foo' class='mv-tile'",
                   "rect": [0, 0, 100, 50],
                   "reason": "layoutObject removal"
+                },
+                {
+                  "object": "InlineBox",
+                  "reason": "full"
+                },
+                {
+                  "object": "InlineBox",
+                  "reason": "full"
                 }
               ]
             }
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/selection-repaint-with-gaps-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/selection-repaint-with-gaps-expected.txt
index 3db56ec..6b817b1 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/selection-repaint-with-gaps-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/selection-repaint-with-gaps-expected.txt
@@ -20,28 +20,24 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
+                  "object": "LayoutText #text",
+                  "rect": [0, 80, 42, 35],
+                  "reason": "selection"
+                },
+                {
                   "object": "InlineTextBox 'ipsum'",
-                  "rect": [0, 0, 0, 0],
                   "reason": "selection"
                 },
                 {
                   "object": "InlineTextBox 'lorem'",
-                  "rect": [0, 0, 0, 0],
                   "reason": "selection"
                 },
                 {
                   "object": "LayoutBlockFlow (positioned) DIV id='item1' class='item'",
-                  "rect": [0, 0, 0, 0],
                   "reason": "selection"
                 },
                 {
                   "object": "LayoutBlockFlow DIV class='inline-block'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutText #text",
-                  "rect": [0, 80, 42, 35],
                   "reason": "selection"
                 }
               ]
@@ -73,46 +69,6 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "InlineTextBox 'ipsum'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "InlineTextBox 'ipsum'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "InlineTextBox 'lorem'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "InlineTextBox 'lorem'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutBlockFlow (positioned) DIV id='item1' class='item'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutBlockFlow (positioned) DIV id='item2' class='item'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutBlockFlow DIV class='inline-block'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
-                  "object": "LayoutBlockFlow DIV class='inline-block'",
-                  "rect": [0, 0, 0, 0],
-                  "reason": "selection"
-                },
-                {
                   "object": "LayoutText #text",
                   "rect": [0, 80, 44, 35],
                   "reason": "selection"
@@ -121,6 +77,38 @@
                   "object": "LayoutText #text",
                   "rect": [0, 160, 42, 35],
                   "reason": "selection"
+                },
+                {
+                  "object": "InlineTextBox 'ipsum'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "InlineTextBox 'ipsum'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "InlineTextBox 'lorem'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "InlineTextBox 'lorem'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "LayoutBlockFlow (positioned) DIV id='item1' class='item'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "LayoutBlockFlow (positioned) DIV id='item2' class='item'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "LayoutBlockFlow DIV class='inline-block'",
+                  "reason": "selection"
+                },
+                {
+                  "object": "LayoutBlockFlow DIV class='inline-block'",
+                  "reason": "selection"
                 }
               ]
             }
diff --git a/third_party/WebKit/LayoutTests/platform/win/css3/flexbox/repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/css3/flexbox/repaint-expected.txt
index afb942c..0553a29 100644
--- a/third_party/WebKit/LayoutTests/platform/win/css3/flexbox/repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/css3/flexbox/repaint-expected.txt
@@ -7,298 +7,255 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Aenean laoreet dolor id urna eleifend aliquet. Nulla vel dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'a lobortis id, faucibus id quam.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'aliquet. Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'aliquet. Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'condimentum leo neque sed nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'condimentum leo neque sed nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'feugiat vehicula. Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'feugiat vehicula. Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'feugiat vehicula. Sed volutpat, tellus vel varius vestibulum,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'id, faucibus id quam.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'id, faucibus id quam.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'nascetur ridiculus mus. Sed congue magna vitae dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'purus quam mollis sapien, in condimentum leo neque sed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'sociis natoque penatibus et magnis dis parturient montes,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='content'",
-          "rect": [399, 116, 393, 162],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='content'",
-          "rect": [147, 116, 645, 108],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='content'",
-          "rect": [147, 116, 645, 108],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='content'",
           "rect": [137, 116, 655, 90],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='left'",
-          "rect": [148, 116, 252, 162],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='left'",
-          "rect": [8, 224, 392, 54],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='left'",
-          "rect": [138, 116, 10, 108],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='left'",
-          "rect": [8, 206, 140, 18],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [399, 116, 393, 162],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [147, 116, 645, 108],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [147, 116, 645, 108],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [137, 116, 655, 90],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [399, 116, 393, 162],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [147, 116, 633, 108],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [147, 116, 633, 108],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [137, 116, 653, 90],
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV id='content'",
+          "rect": [147, 116, 645, 108],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='content'",
+          "rect": [147, 116, 645, 108],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [147, 116, 645, 108],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [147, 116, 645, 108],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [147, 116, 633, 108],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [147, 116, 633, 108],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='content'",
+          "rect": [399, 116, 393, 162],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [399, 116, 393, 162],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [399, 116, 393, 162],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='left'",
+          "rect": [8, 224, 392, 54],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='left'",
+          "rect": [148, 116, 252, 162],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='left'",
+          "rect": [8, 206, 140, 18],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='left'",
+          "rect": [138, 116, 10, 108],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Aenean laoreet dolor id urna eleifend aliquet. Nulla vel dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet.'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'a lobortis id, faucibus id quam.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'aliquet. Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'aliquet. Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'condimentum leo neque sed nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'condimentum leo neque sed nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'feugiat vehicula. Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'feugiat vehicula. Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'feugiat vehicula. Sed volutpat, tellus vel varius vestibulum,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'id, faucibus id quam.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'id, faucibus id quam.'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula.'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'nascetur ridiculus mus. Sed congue magna vitae dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'purus quam mollis sapien, in condimentum leo neque sed'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'sociis natoque penatibus et magnis dis parturient montes,'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/css3/flexbox/repaint-on-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/win/css3/flexbox/repaint-on-layout-expected.txt
index d439409..d14b098 100644
--- a/third_party/WebKit/LayoutTests/platform/win/css3/flexbox/repaint-on-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/css3/flexbox/repaint-on-layout-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (floating) DIV class='state'",
           "rect": [712, 8, 80, 23],
           "reason": "location change"
@@ -22,13 +17,15 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root-expected.txt b/third_party/WebKit/LayoutTests/platform/win/editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root-expected.txt
index 3814248..41c8d11 100644
--- a/third_party/WebKit/LayoutTests/platform/win/editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/editing/selection/repaint-rect-for-vertical-writing-mode-with-positioned-root-expected.txt
@@ -7,23 +7,20 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [186, 201, 17, 173],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'Some text in vertical mode'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='test'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [186, 201, 17, 173],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/button/button-reset-focus-by-mouse-then-keydown-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/forms/button/button-reset-focus-by-mouse-then-keydown-expected.txt
index 41e9706..470cc1a 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/button/button-reset-focus-by-mouse-then-keydown-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/button/button-reset-focus-by-mouse-then-keydown-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Reset'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutButton BUTTON",
+          "rect": [7, 7, 52, 24],
           "reason": "full"
         },
         {
@@ -17,18 +17,16 @@
           "reason": "full"
         },
         {
-          "object": "LayoutButton BUTTON",
-          "rect": [7, 7, 52, 24],
-          "reason": "full"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [16, 11, 34, 16],
           "reason": "full"
         },
         {
+          "object": "InlineTextBox 'Reset'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/range/range-focus-by-mouse-then-keydown-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/forms/range/range-focus-by-mouse-then-keydown-expected.txt
index dddc362..75b4907c 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/range/range-focus-by-mouse-then-keydown-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/range/range-focus-by-mouse-then-keydown-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow DIV id='thumb'",
-          "rect": [69, 10, 11, 21],
+          "object": "LayoutSlider INPUT",
+          "rect": [9, 9, 131, 23],
           "reason": "full"
         },
         {
@@ -22,8 +22,8 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSlider INPUT",
-          "rect": [9, 9, 131, 23],
+          "object": "LayoutBlockFlow DIV id='thumb'",
+          "rect": [69, 10, 11, 21],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt
index 3b3eb709..6cb9fe25 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Submit'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutButton INPUT",
+          "rect": [7, 7, 59, 24],
           "reason": "full"
         },
         {
@@ -17,18 +17,16 @@
           "reason": "full"
         },
         {
-          "object": "LayoutButton INPUT",
-          "rect": [7, 7, 59, 24],
-          "reason": "full"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [16, 11, 41, 16],
           "reason": "full"
         },
         {
+          "object": "InlineTextBox 'Submit'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/4776765-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/4776765-expected.txt
index 6afc875..26b3a286 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/4776765-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/4776765-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [7, 41, 786, 56],
           "reason": "outline"
@@ -28,17 +18,24 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='div'",
-          "rect": [7, 59, 3, 19],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='div'",
           "rect": [7, 77, 3, 19],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutBlockFlow DIV id='div'",
+          "rect": [7, 59, 3, 19],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/abspos-shift-image-incorrect-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/abspos-shift-image-incorrect-repaint-expected.txt
index 00068ca8..8653a66 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/abspos-shift-image-incorrect-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/abspos-shift-image-incorrect-repaint-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='shiftMe'",
           "rect": [0, 0, 1500, 236],
           "reason": "location change"
@@ -22,6 +17,21 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 800, 52],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
+          "rect": [704, 0, 700, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
+          "rect": [454, 0, 700, 236],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
           "rect": [0, 0, 700, 236],
           "reason": "location change"
@@ -32,29 +42,9 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
-          "rect": [704, 0, 700, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'",
-          "rect": [454, 0, 700, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 800, 52],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutImage IMG",
-          "rect": [0, 0, 214, 232],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutImage IMG",
-          "rect": [-250, 0, 214, 232],
-          "reason": "location change"
+          "object": "LayoutView #document",
+          "rect": [1250, 0, 250, 585],
+          "reason": "incremental"
         },
         {
           "object": "LayoutImage IMG",
@@ -67,8 +57,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutImage IMG",
+          "rect": [0, 0, 214, 232],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutImage IMG",
+          "rect": [-250, 0, 214, 232],
           "reason": "location change"
         },
         {
@@ -82,33 +77,31 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox '\n'",
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [1250, 0, 250, 585],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/block-layout-inline-children-float-positioned-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/block-layout-inline-children-float-positioned-expected.txt
index 846e8096..06c1a6d 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/block-layout-inline-children-float-positioned-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/block-layout-inline-children-float-positioned-expected.txt
@@ -7,43 +7,39 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'the quick brown fox jumped over the lazy dog'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'the quick brown fox jumped over the lazy dog'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (floating) SPAN",
           "rect": [305, 35, 297, 18],
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [305, 35, 297, 18],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) SPAN",
           "rect": [153, 35, 297, 18],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [305, 35, 297, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [153, 35, 297, 18],
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'the quick brown fox jumped over the lazy dog'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'the quick brown fox jumped over the lazy dog'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/block-no-inflow-children-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/block-no-inflow-children-expected.txt
index 7436f22..84196c16 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/block-no-inflow-children-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/block-no-inflow-children-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'La la la la'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [0, 0, 64, 18],
           "reason": "forced by layout"
@@ -27,13 +17,19 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'La la la la'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/box-inline-resize-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/box-inline-resize-expected.txt
index 8587f1b..f5008cf 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/box-inline-resize-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/box-inline-resize-expected.txt
@@ -7,43 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Chromium'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [8, 84, 32, 67],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutBlockFlow H2",
-          "rect": [8, 103, 113, 28],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow H2",
           "rect": [40, 103, 113, 28],
           "reason": "location change"
         },
         {
-          "object": "LayoutImage IMG id='foo'",
-          "rect": [8, 84, 32, 32],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 103, 113, 27],
+          "object": "LayoutBlockFlow H2",
+          "rect": [8, 103, 113, 28],
           "reason": "location change"
         },
         {
@@ -52,23 +22,42 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [8, 103, 113, 27],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (anonymous)",
+          "rect": [8, 84, 32, 67],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutImage IMG id='foo'",
+          "rect": [8, 84, 32, 32],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Chromium'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-5699-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-5699-expected.txt
index 7d561b18..82fb023b 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-5699-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-5699-expected.txt
@@ -7,54 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [43, 148, 1, 17],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [43, 178, 1, 17],
-          "reason": "bounds change"
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 130, 784, 65],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow P",
@@ -62,9 +17,14 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 130, 784, 65],
-          "reason": "invalidate paint rectangle"
+          "object": "LayoutText #text",
+          "rect": [8, 178, 36, 17],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 148, 36, 17],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutInline SPAN id='d'",
@@ -73,32 +33,62 @@
         },
         {
           "object": "LayoutText #text",
+          "rect": [8, 145, 4, 17],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
           "rect": [8, 130, 4, 17],
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [8, 145, 4, 17],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 148, 36, 17],
+          "object": "LayoutBR BR",
+          "rect": [43, 178, 1, 17],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [8, 178, 36, 17],
+          "object": "LayoutBR BR",
+          "rect": [43, 148, 1, 17],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBR BR",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-6278-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-6278-expected.txt
index c22ba9c3..eddc9f7 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-6278-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-6278-expected.txt
@@ -7,119 +7,19 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Curabitur pretium, quam quis semper'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Curabitur pretium, quam quis semper'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'Phasellus vehicula, sem at posuere'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'Quisque eu nulla non nisi molestie'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'ac, laoreet non, suscipit sed, sapien.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'accumsan. Etiam tellus urna, laoreet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'fringilla orci nibh sed neque. Quisque eu'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'malesuada, est libero feugiat libero, vel'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'malesuada, est libero feugiat libero,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'nec ullamcorper lacus ante vulputate pede.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'nec ullamcorper lacus ante vulputate'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'nulla non nisi molestie accumsan. Etiam'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'pede.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'posuere vehicula, augue nibh molestie nisl,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'sed, sapien. Phasellus vehicula, sem at'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'tellus urna, laoreet ac, laoreet non, suscipit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'vehicula, augue nibh molestie nisl,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'vel fringilla orci nibh sed neque.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [9, 132, 293, 144],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [9, 132, 243, 180],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
           "rect": [10, 281, 292, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [10, 317, 242, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD id='col1'",
-          "rect": [252, 132, 50, 199],
-          "reason": "incremental"
+          "rect": [9, 132, 243, 180],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutTableCell TD id='col1'",
@@ -127,9 +27,9 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutTableCell TD id='col1'",
-          "rect": [252, 132, 50, 199],
-          "reason": "incremental"
+          "object": "LayoutBlockFlow DIV",
+          "rect": [10, 317, 242, 50],
+          "reason": "location change"
         },
         {
           "object": "LayoutTableCell TD id='col1'",
@@ -137,63 +37,136 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutTableCell TD id='target'",
-          "rect": [254, 132, 52, 235],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [250, 132, 36, 144],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [9, 276, 241, 36],
           "reason": "incremental"
         },
         {
+          "object": "LayoutTableCell TD id='target'",
+          "rect": [254, 132, 52, 235],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD id='col1'",
+          "rect": [252, 132, 50, 199],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTableCell TD id='col1'",
+          "rect": [252, 132, 50, 199],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [250, 132, 36, 144],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Curabitur pretium, quam quis semper'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Curabitur pretium, quam quis semper'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Phasellus vehicula, sem at posuere'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Quisque eu nulla non nisi molestie'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'ac, laoreet non, suscipit sed, sapien.'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'accumsan. Etiam tellus urna, laoreet'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'fringilla orci nibh sed neque. Quisque eu'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'malesuada, est libero feugiat libero, vel'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'malesuada, est libero feugiat libero,'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'nec ullamcorper lacus ante vulputate pede.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'nec ullamcorper lacus ante vulputate'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'nulla non nisi molestie accumsan. Etiam'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'pede.'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'posuere vehicula, augue nibh molestie nisl,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'sed, sapien. Phasellus vehicula, sem at'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'tellus urna, laoreet ac, laoreet non, suscipit'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'vehicula, augue nibh molestie nisl,'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'vel fringilla orci nibh sed neque.'",
+          "reason": "incremental"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-6473-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-6473-expected.txt
index e60dc258..5938290 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-6473-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-6473-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutBlockFlow DIV id='allcontent'",
+          "rect": [8, 130, 784, 50],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) P",
@@ -22,11 +22,6 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV id='allcontent'",
-          "rect": [8, 130, 784, 50],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [8, 146, 70, 17],
           "reason": "location change"
@@ -37,8 +32,11 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'SUCCESS'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-7235-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-7235-expected.txt
index 9888769..93985989 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-7235-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/bugzilla-7235-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 148, 784, 17],
           "reason": "invalidate paint rectangle"
@@ -32,8 +17,19 @@
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/caret-with-transformation-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/caret-with-transformation-expected.txt
index 3fd58b7..62ded70 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/caret-with-transformation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/caret-with-transformation-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV id='div'",
-          "rect": [41, 35, 13, 18],
+          "rect": [345, 210, 13, 19],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='div'",
-          "rect": [345, 210, 13, 19],
+          "rect": [41, 35, 13, 18],
           "reason": "invalidate paint rectangle"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/change-text-content-and-background-color-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/change-text-content-and-background-color-expected.txt
index b87464c..313b342 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/change-text-content-and-background-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/change-text-content-and-background-color-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'NEW'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTextControl (positioned) INPUT id='input'",
+          "rect": [8, 8, 244, 67],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
@@ -27,13 +22,15 @@
           "reason": "full"
         },
         {
-          "object": "LayoutTextControl (positioned) INPUT id='input'",
-          "rect": [8, 8, 244, 67],
-          "reason": "style change"
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'NEW'",
+          "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/clip-with-layout-delta-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/clip-with-layout-delta-expected.txt
index ff908d5..6ff38ca8e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/clip-with-layout-delta-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/clip-with-layout-delta-expected.txt
@@ -7,31 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) DIV",
           "rect": [108, 8, 100, 100],
           "reason": "background obscuration change"
         },
         {
+          "object": "LayoutBlockFlow SPAN id='t2' class='blue'",
+          "rect": [108, 8, 100, 100],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutBlockFlow DIV",
           "rect": [8, 8, 100, 100],
           "reason": "background obscuration change"
@@ -42,9 +27,9 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow SPAN id='t2' class='blue'",
-          "rect": [108, 8, 100, 100],
-          "reason": "style change"
+          "object": "LayoutText #text",
+          "rect": [108, 8, 4, 17],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
@@ -52,28 +37,35 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [108, 8, 4, 17],
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/control-clip-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/control-clip-expected.txt
index a0f7bc9..b40c6051 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/control-clip-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/control-clip-expected.txt
@@ -7,26 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SUCCESS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [9, 83, 198, 16],
           "reason": "invalidate paint rectangle"
@@ -47,13 +27,27 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SUCCESS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SUCCESS'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/crbug-371640-4-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/crbug-371640-4-expected.txt
index 1fab624..d908136e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/crbug-371640-4-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/crbug-371640-4-expected.txt
@@ -7,42 +7,17 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [208, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
           "rect": [408, 84, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
-          "rect": [208, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
           "rect": [408, 84, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_outer' class='outer'",
-          "rect": [208, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_outer' class='outer'",
           "rect": [408, 84, 100, 100],
           "reason": "location change"
         },
@@ -58,11 +33,6 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='keep' class='item'",
-          "rect": [208, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='keep' class='item'",
           "rect": [408, 84, 100, 100],
           "reason": "location change"
         },
@@ -72,6 +42,31 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [208, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
+          "rect": [208, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_outer' class='outer'",
+          "rect": [208, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='keep' class='item'",
+          "rect": [208, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [408, 84, 4, 17],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [408, 84, 4, 17],
           "reason": "layoutObject removal"
@@ -82,18 +77,19 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [408, 84, 4, 17],
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/crbug-371640-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/crbug-371640-expected.txt
index c5f4f95..1bdf67a 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/crbug-371640-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/crbug-371640-expected.txt
@@ -7,27 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (floating) DIV id='container'",
           "rect": [88, 84, 520, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
-          "rect": [88, 84, 260, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
           "rect": [348, 84, 260, 100],
           "reason": "location change"
         },
@@ -37,21 +22,6 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [88, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
-          "rect": [348, 84, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
-          "rect": [88, 84, 260, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
           "rect": [348, 84, 260, 100],
           "reason": "location change"
@@ -62,8 +32,18 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow DIV id='keep' class='item'",
-          "rect": [88, 84, 100, 100],
+          "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'",
+          "rect": [88, 84, 260, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'",
+          "rect": [88, 84, 260, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [348, 84, 100, 100],
           "reason": "location change"
         },
         {
@@ -77,6 +57,21 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'",
+          "rect": [88, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='keep' class='item'",
+          "rect": [88, 84, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [348, 84, 4, 17],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [348, 84, 4, 17],
           "reason": "layoutObject removal"
@@ -87,18 +82,19 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [348, 84, 4, 17],
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/details-open-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/details-open-repaint-expected.txt
index fe3be09..2f94eac 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/details-open-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/details-open-repaint-expected.txt
@@ -7,16 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='details-content'",
           "rect": [8, 68, 784, 22],
           "reason": "location change"
         },
         {
+          "object": "LayoutTextControl INPUT",
+          "rect": [8, 68, 173, 22],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [10, 71, 169, 16],
           "reason": "location change"
@@ -27,28 +27,27 @@
           "reason": "full"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='inner-editor'",
+          "reason": "scroll"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTextControl INPUT",
-          "rect": [8, 68, 173, 22],
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/focus-continuations-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/focus-continuations-expected.txt
index 192fa97..1726657d 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/focus-continuations-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/focus-continuations-expected.txt
@@ -12,11 +12,6 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='container'",
           "rect": [7, 87, 86, 22],
           "reason": "bounds change"
@@ -27,8 +22,11 @@
           "reason": "style change"
         },
         {
+          "object": "LayoutBlockFlow (anonymous)",
+          "reason": "forced by layout"
+        },
+        {
           "object": "LayoutInline SPAN id='outer'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/focus-enable-continuations-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/focus-enable-continuations-expected.txt
index 192fa97..9a6224e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/focus-enable-continuations-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/focus-enable-continuations-expected.txt
@@ -12,11 +12,6 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutBlockFlow (positioned) DIV id='container'",
           "rect": [7, 87, 86, 22],
           "reason": "bounds change"
@@ -27,8 +22,15 @@
           "reason": "style change"
         },
         {
+          "object": "LayoutBlockFlow (anonymous)",
+          "reason": "forced by layout"
+        },
+        {
           "object": "LayoutInline SPAN id='outer'",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutInline SPAN id='outer'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/focus-ring-on-child-move-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/focus-ring-on-child-move-expected.txt
index bcf5fbb6..c810dbab 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/focus-ring-on-child-move-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/focus-ring-on-child-move-expected.txt
@@ -13,12 +13,12 @@
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='child'",
-          "rect": [150, 50, 20, 300],
+          "rect": [300, 50, 20, 300],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='child'",
-          "rect": [300, 50, 20, 300],
+          "rect": [150, 50, 20, 300],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/gradients-em-stops-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/gradients-em-stops-repaint-expected.txt
index 864d96a30..1cf5bfa 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/gradients-em-stops-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/gradients-em-stops-repaint-expected.txt
@@ -7,38 +7,34 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV class='em-units'",
           "rect": [8, 8, 784, 145],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV class='indicator'",
-          "rect": [345, 19, 240, 20],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='box4' class='box'",
           "rect": [344, 18, 302, 122],
           "reason": "style change"
         },
         {
+          "object": "LayoutBlockFlow DIV class='indicator'",
+          "rect": [345, 19, 240, 20],
+          "reason": "style change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-color-change-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-color-change-expected.txt
index 60a589a..9e4ee2d4 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-color-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-color-change-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutInline SPAN id='target'",
           "rect": [8, 68, 37, 17],
           "reason": "style change"
@@ -25,6 +15,14 @@
           "object": "LayoutText #text",
           "rect": [8, 68, 37, 17],
           "reason": "style change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-focus-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-focus-expected.txt
index 31ab813..390cf8c0 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-focus-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-focus-expected.txt
@@ -7,33 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutInline A id='link'",
+          "rect": [-1, -1, 802, 234],
           "reason": "style change"
         },
         {
-          "object": "InlineTextBox 'Home'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'crbug.com/424078: ensure inline elements get their outline painted'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [-1, -1, 801, 19],
+          "object": "LayoutBlockFlow HTML",
+          "rect": [-1, -1, 801, 233],
           "reason": "bounds change"
         },
         {
@@ -42,8 +22,8 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [-1, -1, 801, 233],
+          "object": "LayoutBlockFlow (anonymous)",
+          "rect": [-1, -1, 801, 19],
           "reason": "bounds change"
         },
         {
@@ -52,23 +32,35 @@
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutInline A id='link'",
-          "rect": [-1, -1, 802, 234],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
           "reason": "style change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'Home'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'crbug.com/424078: ensure inline elements get their outline painted'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-outline-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-outline-repaint-expected.txt
index a8c253b5..4ed4653 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-outline-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-outline-repaint-expected.txt
@@ -7,543 +7,439 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "outline"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "outline"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor sit amet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor sit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor sit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [5, 163, 103, 41],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [45, 182, 3, 20],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutInline SPAN id='test'",
           "rect": [5, 163, 98, 41],
           "reason": "outline"
         },
         {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [8, 166, 92, 35],
           "reason": "full"
         },
         {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [45, 182, 3, 20],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "outline"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "outline"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor sit amet'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor sit'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor sit'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor\u00A0'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-style-change-in-scrolled-view-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-style-change-in-scrolled-view-expected.txt
index 4f91f9836..6b25a9b4 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-style-change-in-scrolled-view-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/inline-style-change-in-scrolled-view-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Text Text Text Text Text Text Text Text Text Text Text Text Text'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [0, 288, 415, 17],
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [0, 288, 415, 17],
+          "object": "InlineTextBox 'Text Text Text Text Text Text Text Text Text Text Text Text Text'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/invalidation-after-opacity-change-subtree-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/invalidation-after-opacity-change-subtree-expected.txt
index 5f1bb4d..3e7ba4c 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/invalidation-after-opacity-change-subtree-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/invalidation-after-opacity-change-subtree-expected.txt
@@ -7,43 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'This test checks that switching opacity'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "InlineTextBox 'This test checks that switching opacity'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'This text should be visible in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "InlineTextBox 'This text should be visible in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'invalidates the full subtree.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "InlineTextBox 'invalidates the full subtree.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'output.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "InlineTextBox 'output.'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (positioned) DIV id='absolute'",
+          "rect": [8, 2000, 777, 350],
           "reason": "style change"
         },
         {
@@ -52,24 +17,9 @@
           "reason": "layer"
         },
         {
-          "object": "LayoutBlockFlow (positioned) DIV id='absolute'",
-          "rect": [8, 2000, 777, 350],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layer"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='container'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 2047, 777, 106],
-          "reason": "layer"
+          "rect": [8, 2197, 777, 106],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow P",
@@ -83,7 +33,12 @@
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 2197, 777, 106],
+          "rect": [8, 2047, 777, 106],
+          "reason": "layer"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 2047, 774, 106],
           "reason": "style change"
         },
         {
@@ -94,26 +49,59 @@
         {
           "object": "LayoutText #text",
           "rect": [8, 2197, 653, 106],
-          "reason": "layer"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 2047, 774, 106],
           "reason": "style change"
         },
         {
           "object": "LayoutText #text",
           "rect": [8, 2197, 653, 106],
+          "reason": "layer"
+        },
+        {
+          "object": "InlineTextBox 'This test checks that switching opacity'",
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'This test checks that switching opacity'",
+          "reason": "layer"
+        },
+        {
+          "object": "InlineTextBox 'This text should be visible in the'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'This text should be visible in the'",
+          "reason": "layer"
+        },
+        {
+          "object": "InlineTextBox 'invalidates the full subtree.'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'invalidates the full subtree.'",
+          "reason": "layer"
+        },
+        {
+          "object": "InlineTextBox 'output.'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'output.'",
+          "reason": "layer"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='container'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='container'",
+          "reason": "layer"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/japanese-rl-selection-clear-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/japanese-rl-selection-clear-expected.txt
index b02f589..6462e81b 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/japanese-rl-selection-clear-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/japanese-rl-selection-clear-expected.txt
@@ -7,83 +7,68 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [377, 123, 394, 395],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox '\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3059\u304B\u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [377, 123, 394, 395],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/japanese-rl-selection-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/japanese-rl-selection-repaint-expected.txt
index 40e1b9f..74eac8ef 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/japanese-rl-selection-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/japanese-rl-selection-repaint-expected.txt
@@ -7,73 +7,60 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [377, 23, 394, 544],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox '\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B\u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u8A2A\u554F\u3057'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [377, 23, 394, 544],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-relative-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-relative-expected.txt
index ebdb171..3280ed4 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-relative-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-relative-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (relative positioned) DIV id='target'",
           "rect": [8, 150, 784, 17],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-scrolloffset-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-scrolloffset-expected.txt
index 635aa62..8921fdaa 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-scrolloffset-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-scrolloffset-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [100, 118, 50, 17],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-scrolloffset2-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-scrolloffset2-expected.txt
index f8fcf19..24bca95 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-scrolloffset2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-scrolloffset2-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [102, 120, 50, 17],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-scrolloffset3-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-scrolloffset3-expected.txt
index e844c2d..cee4fa1 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-scrolloffset3-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layout-state-scrolloffset3-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [100, 118, 34, 17],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
index 88c375a..8c78396 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
@@ -7,43 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'x'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 40, 784, 103],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 200, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 220, 100, 100],
+          "object": "LayoutInline (relative positioned) SPAN id='target'",
+          "rect": [8, 220, 100, 103],
           "reason": "location change"
         },
         {
@@ -52,18 +22,8 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutInline (relative positioned) SPAN id='target'",
-          "rect": [8, 220, 100, 103],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 200, 100, 100],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 220, 100, 100],
           "reason": "location change"
         },
         {
@@ -72,18 +32,49 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 200, 100, 100],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
+          "rect": [8, 200, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'x'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-1-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-1-expected.txt
index daf7216..83d0232 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-1-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-1-expected.txt
@@ -7,438 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' twist itself'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice soon came to the conclusion that it was a very'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The chief difficulty Alice found at first was in'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'always getting up and walking off to other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'and was in the act of crawling away: besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'body tucked away,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'body tucked away,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'flamingo: she succeeded in getting its'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'generally a ridge or furrow in the way wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'give the hedgehog a blow with its head, it\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had got its head down, and was going to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'managing her\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'out, and was going to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'out, and was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'round and look up in her face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'send the hedgehog to, and, as the doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'such a puzzled expression'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'such a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that she could not help bursting out\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the ground,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'this, there was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'very provoking to find that the hedgehog had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'way wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) DIV id='pinkFloat'",
-          "rect": [378, 138, 70, 30],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 353, 48, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 335, 48, 65],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 116, 418, 450],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutText #text",
-          "rect": [368, 80, 52, 108],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 188, 40, 17],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [305, 170, 40, 17],
+          "rect": [14, 170, 407, 72],
           "reason": "bounds change"
         },
         {
@@ -448,11 +23,6 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 170, 407, 72],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [14, 242, 406, 126],
           "reason": "bounds change"
         },
@@ -463,12 +33,7 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [178, 350, 146, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 350, 145, 18],
+          "rect": [14, 404, 355, 36],
           "reason": "bounds change"
         },
         {
@@ -478,132 +43,462 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 404, 355, 36],
+          "rect": [178, 350, 146, 18],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [65, 350, 145, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) DIV id='pinkFloat'",
+          "rect": [378, 138, 70, 30],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [368, 80, 52, 108],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 353, 48, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 335, 48, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [305, 170, 40, 17],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 188, 40, 17],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' twist itself'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice soon came to the conclusion that it was a very'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The chief difficulty Alice found at first was in'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'always getting up and walking off to other parts of\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'and was in the act of crawling away: besides all\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'besides all\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'body tucked away,\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'body tucked away,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'doubled-up\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'flamingo: she succeeded in getting its'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'generally a ridge or furrow in the way wherever\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'give the hedgehog a blow with its head, it\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had got its head down, and was going to\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'managing her\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'out, and was going to'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'out, and was'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'round and look up in her face, with\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'send the hedgehog to, and, as the doubled-up\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'such a puzzled expression'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'such a'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that she could not help bursting out\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the ground,'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'this, there was'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'to\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself,'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'very provoking to find that the hedgehog had\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'way wherever\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-10-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-10-expected.txt
index 8a3f6f0..e408ae9 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-10-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-10-expected.txt
@@ -7,131 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 332, 418, 234],
+          "reason": "invalidate paint rectangle"
         },
         {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [14, 404, 355, 36],
           "reason": "bounds change"
         },
         {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
           "rect": [14, 353, 48, 65],
           "reason": "location change"
@@ -142,78 +27,155 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 332, 418, 234],
-          "reason": "invalidate paint rectangle"
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [14, 404, 355, 36],
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-2-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-2-expected.txt
index 231814a..dd8916e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-2-expected.txt
@@ -7,239 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'such a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'such a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'way wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 353, 48, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 356, 48, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 371, 48, 81],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 374, 48, 81],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 572, 418, 3],
-          "reason": "incremental"
+          "rect": [8, 170, 418, 399],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow P",
@@ -248,23 +18,8 @@
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 170, 418, 399],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutInline I id='would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 188, 45, 20],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [13, 188, 407, 71],
-          "reason": "bounds change"
+          "rect": [8, 572, 418, 3],
+          "reason": "incremental"
         },
         {
           "object": "LayoutText #text",
@@ -273,7 +28,7 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 242, 406, 126],
+          "rect": [13, 188, 407, 71],
           "reason": "bounds change"
         },
         {
@@ -283,52 +38,12 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [178, 350, 146, 18],
+          "rect": [14, 242, 406, 126],
           "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [178, 353, 146, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 368, 304, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 371, 304, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 386, 303, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 389, 303, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 404, 355, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 407, 355, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 422, 355, 53],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 425, 355, 53],
+          "rect": [14, 479, 406, 90],
           "reason": "bounds change"
         },
         {
@@ -338,22 +53,261 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 479, 406, 90],
+          "rect": [14, 425, 355, 53],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [14, 422, 355, 53],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 407, 355, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 404, 355, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 371, 304, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 368, 304, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 389, 303, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 386, 303, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [178, 353, 146, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [178, 350, 146, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 374, 48, 81],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 371, 48, 81],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 356, 48, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 353, 48, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 188, 45, 20],
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'besides all\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'doubled-up\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'such a'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'such a'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'to\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'way wherever\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutInline I id='would'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-3-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-3-expected.txt
index 7f9b1c2..6097a6ea 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-3-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-3-expected.txt
@@ -7,177 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion, and went'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and shouting \u2018Off with his head!\u2019 or'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 371, 48, 81],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [356, 389, 64, 81],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 368, 418, 198],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutText #text",
-          "rect": [369, 368, 32, 18],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [65, 368, 355, 54],
           "reason": "bounds change"
         },
@@ -187,63 +22,187 @@
           "reason": "bounds change"
         },
         {
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [356, 389, 64, 81],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 371, 48, 81],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [369, 368, 32, 18],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [353, 422, 16, 53],
           "reason": "incremental"
         },
         {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and shouting \u2018Off with his head!\u2019 or'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u2018Off with\n'",
+          "reason": "incremental"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-4-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-4-expected.txt
index f967df5..42ed5be 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-4-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-4-expected.txt
@@ -7,131 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 435, 48, 17],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 368, 418, 198],
           "reason": "invalidate paint rectangle"
@@ -142,58 +17,148 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 435, 48, 17],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'head!\u2019 about once in a minute.\n'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-5-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-5-expected.txt
index 4fb348a..6c49c37c 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-5-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-5-expected.txt
@@ -7,173 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [46, 353, 16, 65],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 332, 418, 234],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutText #text",
-          "rect": [178, 350, 146, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [162, 350, 146, 18],
+          "rect": [49, 368, 320, 54],
           "reason": "bounds change"
         },
         {
@@ -188,72 +28,189 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [49, 368, 320, 54],
+          "rect": [178, 350, 146, 18],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [162, 350, 146, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [46, 353, 16, 65],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-6-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-6-expected.txt
index 5eb1638a..d237fccb 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-6-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-6-expected.txt
@@ -7,59 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 332, 418, 90],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
@@ -67,43 +17,76 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 332, 418, 90],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [27, 353, 22, 18],
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'foo'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-8-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-8-expected.txt
index eaa7ed0..2c4b1b62 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-8-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-8-expected.txt
@@ -7,303 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' was in a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The chief difficulty Alice found at first was in'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'body tucked away,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'flamingo: she succeeded in getting its'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'managing her\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'out, and was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'such a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'way wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
-          "rect": [14, 353, 48, 65],
-          "reason": "layoutObject removal"
-        },
-        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 80, 418, 395],
           "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutText #text",
-          "rect": [178, 350, 146, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [127, 350, 145, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [65, 368, 304, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 368, 336, 18],
+          "rect": [14, 404, 355, 71],
           "reason": "bounds change"
         },
         {
@@ -318,117 +28,331 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [14, 404, 355, 71],
+          "rect": [14, 368, 336, 18],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [65, 368, 304, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [178, 350, 146, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [127, 350, 145, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'",
+          "rect": [14, 353, 48, 65],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' was in a'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The chief difficulty Alice found at first was in'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about once in a minute.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'besides all\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'body tucked away,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'doubled-up\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'flamingo: she succeeded in getting its'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'furious passion, and went\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'managing her\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'out, and was'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting for the'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'such a'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'to\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'way wherever\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'would'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-9-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-9-expected.txt
index e384aa5e..d7c7f69 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-9-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-flow-with-floats-9-expected.txt
@@ -7,384 +7,69 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The chief difficulty Alice found at first was in'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'The players all played at once without waiting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'a very short time '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'become of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'besides all\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'body tucked away,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'but generally, just as'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'comfortably enough, under her'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'difficult game indeed.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'doubled-up\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'flamingo: she succeeded in getting its'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'for turns,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'her head!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'here; the great\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'managing her\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'other parts of\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'out, and was'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'stamping about, and'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'stamping'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'such a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that it was a very\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the Queen'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'to\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'was in a furious passion, and went\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'way wherever\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'would'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'yet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 371, 48, 81],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
-          "rect": [372, 389, 48, 81],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (floating) SPAN id='yellowFloat'",
-          "rect": [372, 245, 48, 49],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 500, 600],
           "reason": "forced by layout"
         },
         {
+          "object": "LayoutView #document",
+          "rect": [0, 0, 485, 600],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 569, 418, 21],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutBlockFlow P",
           "rect": [8, 572, 418, 18],
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow P",
-          "rect": [8, 569, 418, 21],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "rect": [14, 494, 406, 90],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 476, 406, 90],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 440, 355, 53],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 422, 355, 53],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 404, 355, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [14, 404, 354, 36],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 386, 304, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 368, 304, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [65, 386, 303, 36],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
@@ -397,54 +82,19 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [65, 368, 304, 18],
-          "reason": "bounds change"
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 389, 48, 81],
+          "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [65, 386, 304, 18],
-          "reason": "bounds change"
+          "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'",
+          "rect": [372, 371, 48, 81],
+          "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [65, 386, 303, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 404, 354, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 404, 355, 36],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 422, 355, 53],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 440, 355, 53],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 476, 406, 90],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [14, 494, 406, 90],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 485, 600],
-          "reason": "full"
+          "object": "LayoutBlockFlow (floating) SPAN id='yellowFloat'",
+          "rect": [372, 245, 48, 49],
+          "reason": "location change"
         },
         {
           "object": "LayoutView #document",
@@ -457,153 +107,407 @@
           "reason": "scroll"
         },
         {
+          "object": "InlineTextBox ' twist itself round and look up in her face, with\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' was in a furious passion, and went\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'Queen'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The chief difficulty Alice found at first was in'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'The players all played at once without waiting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'a very short time '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about once in a minute.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'arm, with its legs hanging down,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'become of\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'begin again, it was very provoking to find that the hedgehog'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'besides all\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'body tucked away,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'but generally, just as'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'comfortably enough, under her'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'difficult game indeed.\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'doubled-up\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'flamingo: she succeeded in getting its'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for the hedgehogs; and in\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'for turns,\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'going to give the hedgehog a blow with its head, it'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'her head!\u2019'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'here; the great\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'laughing: and when she had got its head down, and was going'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'managing her\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'other parts of\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'out, and was'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'puzzled expression that she could not help bursting out'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quarrelling all the while, and fighting'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'she had got its neck nicely straightened\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'she wanted to send the hedgehog to, and, as the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'soldiers were always getting up and walking off to'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'stamping about, and'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'stamping'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'such a'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that it was a very\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the Queen'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'the ground, Alice soon came to the conclusion'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'this, there was generally a ridge or furrow in the'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'to\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'unrolled itself, and was in the act of crawling away:'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'was in a furious passion, and went\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'way wherever\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'wonder is, that there\u2018s any one left alive!\u2019'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'would'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'yet'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutView #document",
+          "reason": "scroll"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-in-scrolled-clipped-block-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-in-scrolled-clipped-block-expected.txt
index ce60a0b..06626af 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-in-scrolled-clipped-block-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-in-scrolled-clipped-block-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '                         PASS     .'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [8, 8, 100, 17],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox '                         PASS     .'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-overflow-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-overflow-expected.txt
index d3ebfc0..271e4c0 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/line-overflow-expected.txt
@@ -7,81 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox ' eleifend lacus,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' eleifend'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'at sagittis eros leo pulvinar'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'augue'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'convallis,\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'convallis.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'lacus, at sagittis eros leo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'pulvinar velit. Integer'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'purus'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'purus'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'sollicitudin nisi ut urna blandit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'ut urna blandit convallis.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'velit. Integer sollicitudin nisi'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow BODY",
           "rect": [7, 16, 785, 262],
           "reason": "bounds change"
@@ -92,9 +17,9 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutInline SPAN id='t'",
-          "rect": [37, 132, 37, 18],
-          "reason": "style change"
+          "object": "LayoutText #text",
+          "rect": [7, 114, 201, 89],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutInline SPAN id='t'",
@@ -103,47 +28,101 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [37, 132, 37, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [115, 114, 37, 18],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutInline SPAN id='t'",
+          "rect": [37, 132, 37, 18],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutText #text",
-          "rect": [7, 114, 201, 89],
+          "rect": [37, 132, 37, 18],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' eleifend lacus,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' eleifend'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'at sagittis eros leo pulvinar'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'augue'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'convallis,\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'convallis.'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'lacus, at sagittis eros leo'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'pulvinar velit. Integer'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'purus'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'purus'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'sollicitudin nisi ut urna blandit'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'ut urna blandit convallis.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'velit. Integer sollicitudin nisi'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/lines-with-layout-delta-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/lines-with-layout-delta-expected.txt
index 1dfd5f8..fc497938 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/lines-with-layout-delta-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/lines-with-layout-delta-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (floating) DIV id='target'",
           "rect": [8, 58, 200, 17],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/list-marker-2-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/list-marker-2-expected.txt
index 86f70d6..1c2a7c0 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/list-marker-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/list-marker-2-expected.txt
@@ -7,19 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutImage IMG id='target'",
-          "rect": [48, 94, 100, 100],
-          "reason": "forced by layout"
+          "object": "LayoutListItem LI",
+          "rect": [31, 94, 761, 103],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutListItem LI",
@@ -27,14 +17,9 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutListItem LI",
-          "rect": [31, 94, 761, 103],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutListMarker (anonymous)",
-          "rect": [31, 130, 7, 17],
-          "reason": "location change"
+          "object": "LayoutImage IMG id='target'",
+          "rect": [48, 94, 100, 100],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutListMarker (anonymous)",
@@ -42,13 +27,24 @@
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutListMarker (anonymous)",
+          "rect": [31, 130, 7, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/make-children-non-inline-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/make-children-non-inline-expected.txt
index 13cdd4c..5f598cf 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/make-children-non-inline-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/make-children-non-inline-expected.txt
@@ -7,214 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'I could'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'I could'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Word,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Word,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'about all the stuff'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'about all the stuff'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'after'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'more words.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'more words.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'that comes'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'that comes'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'the break.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'the break.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'words,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'words,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'write a book'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'write a book'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 60, 784, 262],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (anonymous)",
@@ -227,23 +22,18 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [8, 60, 784, 262],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='target'",
-          "rect": [8, 150, 10, 100],
+          "object": "LayoutText #text",
+          "rect": [8, 250, 114, 17],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 60, 40, 17],
-          "reason": "layoutObject insertion"
+          "rect": [8, 150, 114, 17],
+          "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 78, 44, 17],
+          "rect": [8, 132, 81, 17],
           "reason": "layoutObject insertion"
         },
         {
@@ -253,22 +43,7 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 114, 45, 17],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 132, 81, 17],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 150, 114, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 250, 114, 17],
+          "rect": [8, 268, 69, 17],
           "reason": "location change"
         },
         {
@@ -278,17 +53,7 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 268, 69, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 186, 30, 17],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [8, 286, 30, 17],
+          "rect": [8, 304, 64, 17],
           "reason": "location change"
         },
         {
@@ -298,62 +63,244 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [8, 304, 64, 17],
+          "rect": [8, 114, 45, 17],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 78, 44, 17],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 60, 40, 17],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [8, 286, 30, 17],
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [8, 186, 30, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='target'",
+          "rect": [8, 150, 10, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'I could'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'I could'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Word,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Word,'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'about all the stuff'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'about all the stuff'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'after'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'more words.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'more words.'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'that comes'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'that comes'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'the break.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'the break.'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'words,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'words,'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'write a book'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'write a book'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/multi-layout-one-frame-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/multi-layout-one-frame-expected.txt
index b1ca9f5e..7430c8f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/multi-layout-one-frame-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/multi-layout-one-frame-expected.txt
@@ -7,24 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASSED'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASSED'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow DIV id='inner-editor'",
+          "rect": [187, 11, 169, 16],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
@@ -32,9 +17,9 @@
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV id='inner-editor'",
-          "rect": [187, 11, 169, 16],
-          "reason": "invalidate paint rectangle"
+          "object": "LayoutText #text",
+          "rect": [187, 11, 53, 16],
+          "reason": "full"
         },
         {
           "object": "LayoutText #text",
@@ -42,18 +27,27 @@
           "reason": "full"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [187, 11, 53, 16],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASSED'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASSED'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/offset-change-wrong-invalidation-with-float-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/offset-change-wrong-invalidation-with-float-expected.txt
index fbebc7c..6b7ff41b 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/offset-change-wrong-invalidation-with-float-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/offset-change-wrong-invalidation-with-float-expected.txt
@@ -38,7 +38,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ],
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/outline-continuations-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/outline-continuations-expected.txt
index 9eaec80d..63a3f0f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/outline-continuations-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/outline-continuations-expected.txt
@@ -7,39 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'CONTENTS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'CONTENTS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [16, 108, 202, 21],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [16, 146, 202, 21],
           "reason": "bounds change"
         },
         {
           "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "forced by layout"
+          "rect": [16, 108, 202, 21],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutInline SPAN id='outer'",
@@ -52,28 +27,43 @@
           "reason": "style change"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'CONTENTS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'CONTENTS'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutBlockFlow (anonymous)",
+          "reason": "forced by layout"
+        },
+        {
           "object": "LayoutInline SPAN id='outer'",
-          "rect": [0, 0, 0, 0],
           "reason": "style change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt
index ee6f6090..de4366f4 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt
@@ -7,13 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'abc'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'abc'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV id='inner-target'",
+          "rect": [8, 184, 784, 18],
           "reason": "location change"
         },
         {
@@ -27,11 +22,6 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutBlockFlow DIV id='inner-target'",
-          "rect": [8, 184, 784, 18],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [18, 18, 23, 17],
           "reason": "layoutObject removal"
@@ -42,13 +32,19 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'abc'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'abc'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/positioned-document-element-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/positioned-document-element-expected.txt
index 93be92e..99365361 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/positioned-document-element-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/positioned-document-element-expected.txt
@@ -8,14 +8,9 @@
       "backgroundColor": "#008000",
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 800, 600],
+          "reason": "style change"
         },
         {
           "object": "LayoutBlockFlow (positioned) HTML class='changed'",
@@ -23,27 +18,32 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [8, 16, 784, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [8, 16, 784, 18],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutBlockFlow (positioned) HTML class='changed'",
           "rect": [100, 100, 452, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [8, 16, 784, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
           "rect": [108, 116, 436, 18],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [8, 16, 784, 18],
+          "rect": [108, 116, 436, 18],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow P",
+          "object": "LayoutText #text",
           "rect": [108, 116, 436, 18],
           "reason": "location change"
         },
@@ -53,23 +53,19 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [108, 116, 436, 18],
+          "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'",
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 800, 600],
-          "reason": "style change"
-        },
-        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/quotes-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/quotes-expected.txt
index f1e816f..23ba808 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/quotes-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/quotes-expected.txt
@@ -7,83 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'quote 2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '{'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '}'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutBlockFlow DIV",
           "rect": [8, 26, 784, 18],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutInline \u003Cpseudo:after\u003E",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutInline \u003Cpseudo:before\u003E",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutInline Q id='q2' class='q-changed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutQuote (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutQuote (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [17, 26, 48, 18],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [15, 26, 49, 18],
           "reason": "style change"
         },
         {
-          "object": "LayoutTextFragment (anonymous)",
-          "rect": [8, 26, 10, 17],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutTextFragment (anonymous)",
-          "rect": [8, 26, 8, 18],
+          "object": "LayoutText #text",
+          "rect": [17, 26, 48, 18],
           "reason": "style change"
         },
         {
@@ -93,12 +28,65 @@
         },
         {
           "object": "LayoutTextFragment (anonymous)",
+          "rect": [8, 26, 10, 17],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutTextFragment (anonymous)",
           "rect": [63, 26, 8, 18],
           "reason": "style change"
         },
         {
+          "object": "LayoutTextFragment (anonymous)",
+          "rect": [8, 26, 8, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'quote 2'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '{'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '}'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutInline \u003Cpseudo:after\u003E",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutInline \u003Cpseudo:before\u003E",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutInline Q id='q2' class='q-changed'",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutQuote (anonymous)",
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutQuote (anonymous)",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/relative-inline-positioned-movement-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/relative-inline-positioned-movement-repaint-expected.txt
index 453bbe3..ea436d0 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/relative-inline-positioned-movement-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/relative-inline-positioned-movement-repaint-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ],
@@ -26,12 +25,10 @@
           "paintInvalidations": [
             {
               "object": "InlineFlowBox",
-              "rect": [0, 0, 0, 0],
               "reason": "full"
             },
             {
               "object": "InlineTextBox 'When this layer moves it shouldn't generate a repaint rect.'",
-              "rect": [0, 0, 0, 0],
               "reason": "full"
             }
           ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/remove-inline-after-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/remove-inline-after-layout-expected.txt
index 78d7a58..2a16d8a 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/remove-inline-after-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/remove-inline-after-layout-expected.txt
@@ -7,56 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This span should disappear.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This span should disappear.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 108, 784, 207],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [112, 194, 182, 18],
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "LayoutBlockFlow DIV",
           "rect": [293, 108, 101, 100],
           "reason": "location change"
@@ -67,28 +27,55 @@
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This span should disappear.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This span should disappear.'",
+          "reason": "full"
+        },
+        {
           "object": "LayoutInline SPAN id='target'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [112, 194, 182, 18],
           "reason": "layoutObject removal"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/remove-inline-layer-after-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/remove-inline-layer-after-layout-expected.txt
index d3f1bcd..150b162 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/remove-inline-layer-after-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/remove-inline-layer-after-layout-expected.txt
@@ -7,71 +7,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This span should disappear.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This span should disappear.\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 108, 784, 103],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [293, 108, 101, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
-          "rect": [112, 108, 100, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutInline SPAN id='target'",
           "rect": [112, 108, 182, 104],
           "reason": "layoutObject removal"
@@ -82,13 +22,61 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV",
+          "rect": [293, 108, 101, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [112, 108, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This span should disappear.\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This span should disappear.\n'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/repaint-across-writing-mode-boundary-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/repaint-across-writing-mode-boundary-expected.txt
index 2c88355b..8d8c26f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/repaint-across-writing-mode-boundary-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/repaint-across-writing-mode-boundary-expected.txt
@@ -7,38 +7,32 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [548, 191, 23, 35],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox '\u7B2C\u4E00\u6BB5\u843D paragraph 1'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV class='basic d1 vert'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV class='lrblock'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow P",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [548, 191, 23, 35],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/repaint-during-scroll-with-zoom-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/repaint-during-scroll-with-zoom-expected.txt
index 2275078..7abb5d2 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/repaint-during-scroll-with-zoom-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/repaint-during-scroll-with-zoom-expected.txt
@@ -8,14 +8,9 @@
       "backgroundColor": "#C0C0C0",
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
-          "object": "InlineTextBox 'scroll me'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
+          "object": "LayoutIFrame (positioned) IFRAME",
+          "rect": [2, 64, 235, 236],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -28,16 +23,6 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutIFrame (positioned) IFRAME",
-          "rect": [2, 64, 235, 236],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [2, 65, 58, 15],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [2, 65, 235, 235],
           "reason": "full"
@@ -53,6 +38,11 @@
           "reason": "scroll"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [2, 65, 58, 15],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutView #document",
           "rect": [237, 64, 15, 236],
           "reason": "scroll"
@@ -73,13 +63,19 @@
           "reason": "scroll"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
+          "object": "InlineTextBox 'scroll me'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/resize-scrollable-iframe-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/resize-scrollable-iframe-expected.txt
index 3a1a45f0..649f4ca 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/resize-scrollable-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/resize-scrollable-iframe-expected.txt
@@ -7,28 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [8, 212, 784, 200],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 108, 784, 303],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutIFrame IFRAME id='iframe'",
-          "rect": [108, 108, 200, 300],
+          "object": "LayoutBlockFlow (anonymous)",
+          "rect": [8, 212, 784, 200],
           "reason": "incremental"
         },
         {
@@ -43,12 +28,22 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [93, 108, 200, 285],
+          "rect": [8, 193, 285, 200],
           "reason": "incremental"
         },
         {
           "object": "LayoutView #document",
-          "rect": [8, 193, 285, 200],
+          "rect": [8, 393, 285, 15],
+          "reason": "scroll"
+        },
+        {
+          "object": "LayoutIFrame IFRAME id='iframe'",
+          "rect": [108, 108, 200, 300],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [93, 108, 200, 285],
           "reason": "incremental"
         },
         {
@@ -58,7 +53,7 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [8, 393, 285, 15],
+          "rect": [293, 108, 15, 285],
           "reason": "scroll"
         },
         {
@@ -68,7 +63,7 @@
         },
         {
           "object": "LayoutView #document",
-          "rect": [293, 108, 15, 285],
+          "rect": [293, 393, 15, 15],
           "reason": "scroll"
         },
         {
@@ -77,23 +72,27 @@
           "reason": "scroll"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "scroll"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "LayoutView #document",
-          "rect": [293, 393, 15, 15],
           "reason": "scroll"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/search-field-cancel-expected.txt
index e5c6d0d..9f94e06 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/search-field-cancel-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/search-field-cancel-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'some text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [12, 45, 155, 16],
           "reason": "forced by layout"
@@ -22,8 +17,11 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox 'some text'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/select-option-background-color-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/select-option-background-color-expected.txt
index 280d115..e4312292 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/select-option-background-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/select-option-background-color-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selected-replaced-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selected-replaced-expected.txt
index 24af8da..735162c 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selected-replaced-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selected-replaced-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow (anonymous)",
           "rect": [8, 68, 784, 235],
           "reason": "invalidate paint rectangle"
@@ -27,8 +22,11 @@
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-after-delete-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-after-delete-expected.txt
index d1b50144..0522f92 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-after-delete-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-after-delete-expected.txt
@@ -7,79 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 94, 152, 90],
-          "reason": "incremental"
+          "rect": [38, 75, 152, 107],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='test'",
@@ -88,13 +18,8 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 75, 152, 107],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 74, 3, 19],
-          "reason": "invalidate paint rectangle"
+          "rect": [38, 94, 152, 90],
+          "reason": "incremental"
         },
         {
           "object": "LayoutText #text",
@@ -102,38 +27,92 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutBlockFlow DIV id='test'",
+          "rect": [38, 74, 3, 19],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-after-remove-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-after-remove-expected.txt
index 4ac7436..bde16521 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-after-remove-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-after-remove-expected.txt
@@ -7,114 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ' world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello '",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hello world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'world'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 94, 152, 90],
-          "reason": "incremental"
+          "rect": [38, 75, 152, 107],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow DIV id='test'",
@@ -123,18 +18,8 @@
         },
         {
           "object": "LayoutBlockFlow DIV id='test'",
-          "rect": [38, 75, 152, 107],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutInline SPAN id='removeme'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
+          "rect": [38, 94, 152, 90],
+          "reason": "incremental"
         },
         {
           "object": "LayoutText #text",
@@ -143,16 +28,6 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [39, 75, 36, 17],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
           "rect": [112, 165, 42, 17],
           "reason": "bounds change"
         },
@@ -162,38 +37,132 @@
           "reason": "bounds change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [39, 75, 36, 17],
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello '",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hello world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello world'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'world'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'world'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='test'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutInline SPAN id='removeme'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "selection"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-clear-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-clear-expected.txt
index 1e23010..0729565d 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-clear-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-clear-expected.txt
@@ -7,49 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'FAIL: Test did'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'not run'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '\u00A0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBR BR",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (anonymous)",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
+          "object": "LayoutBlockFlow DIV id='firstLine'",
+          "rect": [8, 8, 100, 200],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutBlockFlow (anonymous)",
@@ -62,31 +22,6 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='firstLine'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='firstLine'",
-          "rect": [8, 8, 100, 200],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutBlockFlow DIV id='root'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [8, 49, 94, 117],
           "reason": "layoutObject removal"
@@ -97,23 +32,75 @@
           "reason": "location change"
         },
         {
+          "object": "InlineTextBox '\n'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'FAIL: Test did'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'not run'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '\u00A0'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBR BR",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow (anonymous)",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='firstLine'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow DIV id='root'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "selection"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt
index 97a3ff79c..cad986b 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt
@@ -7,38 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'First cell'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'Second cell'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutTableCell TD id='firstCell'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutTableCell TD id='secondCell'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [11, 33, 79, 17],
           "reason": "selection"
         },
         {
@@ -47,8 +17,31 @@
           "reason": "selection"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [11, 33, 79, 17],
+          "object": "InlineTextBox 'First cell'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'Second cell'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutTableCell TD id='firstCell'",
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutTableCell TD id='secondCell'",
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-rl-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-rl-expected.txt
index 00ce691..3763b3f8 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-rl-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/selection-rl-expected.txt
@@ -7,23 +7,20 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [775, 39, 17, 78],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'Testing both hit testing'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [775, 39, 17, 78],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/stacked-diacritics-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/stacked-diacritics-expected.txt
index 824eb7c..f754c798 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/stacked-diacritics-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/stacked-diacritics-expected.txt
@@ -7,18 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '\u1EA6\u1EA4\u1EAA\u1EA8\u1EB0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [19, 159, 130, 41],
           "reason": "layoutObject removal"
         },
         {
+          "object": "InlineTextBox '\u1EA6\u1EA4\u1EAA\u1EA8\u1EB0'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/subtree-root-skipped-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/subtree-root-skipped-expected.txt
index c7c0c528..817d489 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/subtree-root-skipped-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/subtree-root-skipped-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='div'",
-          "rect": [8, 288, 10, 20],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='inner-editor'",
           "rect": [10, 11, 169, 16],
           "reason": "invalidate paint rectangle"
@@ -32,8 +17,20 @@
           "reason": "full"
         },
         {
+          "object": "LayoutBlockFlow (positioned) DIV id='div'",
+          "rect": [8, 288, 10, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/table-collapsed-border-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/table-collapsed-border-expected.txt
index e20b85dd..cb5e411 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/table-collapsed-border-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/table-collapsed-border-expected.txt
@@ -7,44 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Lorem'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutTable TABLE",
+          "rect": [8, 182, 110, 76],
           "reason": "full"
         },
         {
-          "object": "InlineTextBox 'Lorem'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ipsum dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ipsum dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ipsum dolor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'sit amet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'sit amet'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableSection TBODY",
+          "rect": [12, 186, 102, 68],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutTable TABLE",
@@ -52,83 +22,28 @@
           "reason": "full"
         },
         {
-          "object": "LayoutTable TABLE",
-          "rect": [8, 182, 110, 76],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [83, 268, 26, 76],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutTable TABLE",
-          "rect": [79, 268, 30, 76],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutTable TABLE id='t'",
           "rect": [8, 10, 97, 76],
           "reason": "style change"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutTableCell TD id='d2'",
+          "rect": [22, 210, 96, 20],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutTableSection TBODY",
+          "rect": [12, 100, 93, 68],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "rect": [22, 316, 87, 28],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [22, 96, 87, 28],
+          "rect": [22, 268, 87, 28],
           "reason": "forced by layout"
         },
         {
@@ -138,37 +53,12 @@
         },
         {
           "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [22, 268, 87, 28],
+          "rect": [22, 96, 87, 28],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [22, 316, 87, 28],
+          "object": "LayoutTableCell TD id='d3'",
+          "rect": [22, 296, 87, 20],
           "reason": "forced by layout"
         },
         {
@@ -177,24 +67,9 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutTableCell TD id='d2'",
-          "rect": [22, 210, 96, 20],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutTableCell TD id='d3'",
-          "rect": [22, 296, 87, 20],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [12, 100, 93, 68],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutTableSection TBODY",
-          "rect": [12, 186, 102, 68],
-          "reason": "forced by layout"
+          "object": "LayoutText #text",
+          "rect": [23, 297, 77, 18],
+          "reason": "location change"
         },
         {
           "object": "LayoutText #text",
@@ -207,68 +82,157 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [23, 297, 77, 18],
+          "object": "LayoutTable TABLE",
+          "rect": [79, 268, 30, 76],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutTable TABLE",
+          "rect": [83, 268, 26, 76],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Lorem'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ipsum dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ipsum dolor'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ipsum dolor'",
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'sit amet'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'sit amet'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/table-shrink-row-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/table-shrink-row-repaint-expected.txt
index 6d698ede..63dde1b 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/table-shrink-row-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/table-shrink-row-repaint-expected.txt
@@ -7,193 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '10'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '11'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '12'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '13'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '5'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '6'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '7'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '8'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '9'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutBlockFlow HTML",
           "rect": [0, 0, 785, 1048],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 320, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 120, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 380, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 180, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 440, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 240, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 500, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 300, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 560, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 360, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 620, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 420, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 680, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 480, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 740, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 540, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 800, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 600, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 860, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 660, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 920, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 720, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 980, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [8, 780, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD id='resizeMe'",
-          "rect": [8, 120, 769, 200],
+          "object": "LayoutView #document",
+          "rect": [0, 848, 785, 200],
           "reason": "incremental"
         },
         {
@@ -202,113 +22,13 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 320, 769, 60],
-          "reason": "location change"
+          "object": "LayoutTableCell TD id='resizeMe'",
+          "rect": [8, 120, 769, 200],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 120, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 380, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 180, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 440, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 240, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 500, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 300, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 560, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 360, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 620, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 420, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 680, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 480, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 740, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 540, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 800, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 600, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 860, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 660, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 920, 769, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableRow TR",
-          "rect": [8, 720, 769, 60],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 980, 769, 60],
           "reason": "location change"
         },
         {
@@ -317,118 +37,233 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 920, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 920, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 860, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 860, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 800, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 800, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 780, 769, 60],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutTableRow TR",
           "rect": [8, 780, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 341, 8, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 740, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 141, 8, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 740, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 401, 8, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 720, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 201, 8, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 720, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 461, 8, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 680, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 261, 8, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 680, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 521, 8, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 660, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 321, 8, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 660, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 581, 8, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 620, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 381, 8, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 620, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 641, 8, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 600, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 441, 8, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 600, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 701, 8, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 560, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 501, 8, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 560, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 761, 8, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 540, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 561, 8, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 540, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 821, 16, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 500, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 621, 16, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 500, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 881, 16, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 480, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 681, 16, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 480, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 941, 16, 17],
+          "object": "LayoutTableCell TD",
+          "rect": [8, 440, 769, 60],
           "reason": "location change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [13, 741, 16, 17],
+          "object": "LayoutTableRow TR",
+          "rect": [8, 440, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 420, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 420, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 380, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 380, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 360, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 360, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 320, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 320, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 300, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 300, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 240, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 240, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 180, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 180, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [8, 120, 769, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableRow TR",
+          "rect": [8, 120, 769, 60],
           "reason": "location change"
         },
         {
@@ -438,72 +273,213 @@
         },
         {
           "object": "LayoutText #text",
+          "rect": [13, 941, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 881, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 821, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
           "rect": [13, 801, 16, 17],
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 848, 785, 200],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "rect": [13, 741, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 681, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 621, 16, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 761, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 701, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 641, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 581, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 561, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 521, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 501, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 461, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 441, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 401, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 381, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 341, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 321, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 261, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 201, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [13, 141, 8, 17],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '10'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '11'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '12'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '13'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '5'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '6'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '7'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '8'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '9'",
+          "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-append-dirty-lines-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-append-dirty-lines-expected.txt
index b804c9d..fee69c7 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-append-dirty-lines-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-append-dirty-lines-expected.txt
@@ -7,51 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Curabitur a velit'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Curabitur a velit.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse placerat. Morbi tristique. Mauris eu lacus sed felis'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'fermentum ut, tortor. Sed rhoncus. Quisque enim metus, luctus tincidunt, vestibulum eu, vestibulum eu, libero. Mauris'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'feugiat molestie, mi lorem bibendum leo, ac gravida orci nunc nec nulla. Nunc nunc lorem, rhoncus et, rutrum ac,'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'laoreet feugiat. Phasellus mollis pulvinar mi. Etiam ut neque sed eros egestas laoreet. Vestibulum ullamcorper, nulla non'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'pellentesque cursus. Proin vitae nulla. Vivamus in ipsum. Etiam mi. Nam malesuada purus in sem. Sed eget elit vel erat'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'sagittis aliquam nunc. Nullam pharetra molestie eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'sagittis aliquam nunc. Nullam pharetra molestie eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow P id='target'",
           "rect": [7, 132, 785, 35],
           "reason": "invalidate paint rectangle"
@@ -62,13 +17,47 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'Curabitur a velit'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Curabitur a velit.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse placerat. Morbi tristique. Mauris eu lacus sed felis'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'fermentum ut, tortor. Sed rhoncus. Quisque enim metus, luctus tincidunt, vestibulum eu, vestibulum eu, libero. Mauris'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'feugiat molestie, mi lorem bibendum leo, ac gravida orci nunc nec nulla. Nunc nunc lorem, rhoncus et, rutrum ac,'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'laoreet feugiat. Phasellus mollis pulvinar mi. Etiam ut neque sed eros egestas laoreet. Vestibulum ullamcorper, nulla non'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'pellentesque cursus. Proin vitae nulla. Vivamus in ipsum. Etiam mi. Nam malesuada purus in sem. Sed eget elit vel erat'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'sagittis aliquam nunc. Nullam pharetra molestie eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'sagittis aliquam nunc. Nullam pharetra molestie eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris.'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-match-document-change-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-match-document-change-expected.txt
index 0a8d84f..000a4cc0 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-match-document-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-match-document-change-expected.txt
@@ -7,19 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'After change'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Find-in-page 'findme', then click here)'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'To be changed: findme (Manual testing:'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow HTML",
+          "rect": [10, 102, 285, 400],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutBlockFlow DIV",
@@ -32,11 +22,6 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [10, 102, 285, 400],
-          "reason": "forced by layout"
-        },
-        {
           "object": "LayoutText #text",
           "rect": [18, 128, 257, 36],
           "reason": "layoutObject removal"
@@ -52,23 +37,31 @@
           "reason": "scroll"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineTextBox 'After change'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Find-in-page 'findme', then click here)'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'To be changed: findme (Manual testing:'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "scroll"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-selection-rect-in-overflow-2-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-selection-rect-in-overflow-2-expected.txt
index 90a7c51..c2a8336 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-selection-rect-in-overflow-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-selection-rect-in-overflow-2-expected.txt
@@ -7,28 +7,24 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [18, 27, 238, 18],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox 'Should have blue, not gray, highlight'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow DIV id='t'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [18, 27, 238, 18],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-selection-rect-in-overflow-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-selection-rect-in-overflow-expected.txt
index 01d6062..2b726a9f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-selection-rect-in-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/text-selection-rect-in-overflow-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Should have green background'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [8, 17, 199, 18],
           "reason": "selection"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [8, 17, 199, 18],
+          "object": "InlineTextBox 'Should have green background'",
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/transform-layout-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/transform-layout-repaint-expected.txt
index 35a77f8..a7033051 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/transform-layout-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/transform-layout-repaint-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV id='target'",
           "rect": [51, 50, 197, 87],
           "reason": "invalidate paint rectangle"
@@ -27,8 +17,15 @@
           "reason": "full"
         },
         {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/vertical-align-length1-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/vertical-align-length1-expected.txt
index f86bb8c..e2ac425f8 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/vertical-align-length1-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/vertical-align-length1-expected.txt
@@ -7,19 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow BODY",
+          "rect": [0, 0, 800, 153],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -27,18 +17,8 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 800, 153],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [0, 100, 20, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [0, 130, 20, 20],
+          "rect": [120, 130, 20, 20],
           "reason": "location change"
         },
         {
@@ -48,17 +28,32 @@
         },
         {
           "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [120, 130, 20, 20],
+          "rect": [0, 130, 20, 20],
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV class='other'",
+          "rect": [0, 100, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/vertical-align-length2-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/vertical-align-length2-expected.txt
index 9fe8d7f..51f4356c 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/vertical-align-length2-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/vertical-align-length2-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow BODY",
           "rect": [0, 0, 800, 203],
           "reason": "invalidate paint rectangle"
@@ -37,8 +22,19 @@
           "reason": "location change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/vertical-align1-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/vertical-align1-expected.txt
index 0325598..e3a3fcd 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/vertical-align1-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/vertical-align1-expected.txt
@@ -7,39 +7,14 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 100, 800, 4],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutBlockFlow BODY",
           "rect": [0, 0, 800, 103],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [0, 80, 20, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV class='other'",
-          "rect": [0, 34, 20, 20],
-          "reason": "location change"
+          "object": "LayoutBlockFlow BODY",
+          "rect": [0, 100, 800, 4],
+          "reason": "incremental"
         },
         {
           "object": "LayoutBlockFlow DIV class='other'",
@@ -52,13 +27,33 @@
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow DIV class='other'",
+          "rect": [0, 80, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow DIV class='other'",
+          "rect": [0, 34, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/window-resize-vertical-writing-mode-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/window-resize-vertical-writing-mode-expected.txt
index b19b5503..4090860 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/window-resize-vertical-writing-mode-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/window-resize-vertical-writing-mode-expected.txt
@@ -7,51 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [156, 8, 36, 184],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [174, 8, 18, 284],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [148, 0, 52, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [166, 0, 34, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [157, 8, 35, 147],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [175, 8, 17, 248],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 200, 300],
           "reason": "full"
@@ -62,18 +17,57 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutBlockFlow HTML",
+          "rect": [148, 0, 52, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [156, 8, 36, 184],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [157, 8, 35, 147],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [166, 0, 34, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [174, 8, 18, 284],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [175, 8, 17, 248],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
@@ -89,41 +83,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [174, 8, 18, 284],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [274, 8, 18, 284],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [166, 0, 34, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [266, 0, 34, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [175, 8, 17, 248],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [275, 8, 17, 248],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 300, 300],
           "reason": "full"
@@ -134,8 +93,41 @@
           "reason": "incremental"
         },
         {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [266, 0, 34, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [166, 0, 34, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [274, 8, 18, 284],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [174, 8, 18, 284],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [275, 8, 17, 248],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [175, 8, 17, 248],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
@@ -151,51 +143,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [274, 8, 18, 284],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [256, 8, 36, 234],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [266, 0, 34, 300],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [248, 0, 52, 250],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [275, 8, 17, 248],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [257, 8, 35, 197],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [0, 0, 300, 250],
           "reason": "full"
@@ -206,13 +153,53 @@
           "reason": "incremental"
         },
         {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [248, 0, 52, 250],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [256, 8, 36, 234],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [257, 8, 35, 197],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [266, 0, 34, 300],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [274, 8, 18, 284],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [275, 8, 17, 248],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA AAAA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'AAAA'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
@@ -228,24 +215,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'AAAA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [256, 8, 36, 234],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [206, 8, 36, 234],
-          "reason": "location change"
+          "object": "LayoutView #document",
+          "rect": [0, 0, 250, 250],
+          "reason": "full"
         },
         {
           "object": "LayoutBlockFlow HTML",
@@ -258,6 +230,21 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutView #document",
+          "rect": [250, 0, 50, 250],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [256, 8, 36, 234],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [206, 8, 36, 234],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutText #text",
           "rect": [257, 8, 35, 197],
           "reason": "location change"
@@ -268,18 +255,15 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 250, 250],
-          "reason": "full"
+          "object": "InlineTextBox 'AAAA AAAA AAAA AAAA'",
+          "reason": "location change"
         },
         {
-          "object": "LayoutView #document",
-          "rect": [250, 0, 50, 250],
-          "reason": "incremental"
+          "object": "InlineTextBox 'AAAA'",
+          "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt
index 52c453e..d185193 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/table/border-collapsing/cached-change-cell-sl-border-color-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutTableCell TD id='foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutTableCell TD id='foo'",
           "rect": [8, 8, 60, 54],
           "reason": "style change"
@@ -32,8 +17,19 @@
           "reason": "layoutObject removal"
         },
         {
+          "object": "InlineTextBox 'A'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutTableCell TD id='foo'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/table/resize-table-repaint-percent-size-cell-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/table/resize-table-repaint-percent-size-cell-expected.txt
index bdd3137..47f3070 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/table/resize-table-repaint-percent-size-cell-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/table/resize-table-repaint-percent-size-cell-expected.txt
@@ -7,43 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'ROW1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ROW1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'ROW2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'ROW2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutTable (positioned) TABLE id='table'",
           "rect": [0, 150, 106, 380],
           "reason": "incremental"
         },
         {
-          "object": "LayoutTableCell TD",
-          "rect": [2, 52, 102, 238],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [2, 102, 102, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutTableCell TD",
-          "rect": [2, 292, 102, 236],
+          "object": "LayoutTableRow TR",
+          "rect": [0, 292, 106, 236],
           "reason": "location change"
         },
         {
@@ -57,14 +27,24 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [0, 292, 106, 236],
+          "object": "LayoutTableCell TD",
+          "rect": [2, 52, 102, 238],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [2, 292, 102, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutTableCell TD",
+          "rect": [2, 102, 102, 46],
           "reason": "location change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [3, 67, 46, 17],
-          "reason": "bounds change"
+          "rect": [3, 401, 46, 17],
+          "reason": "location change"
         },
         {
           "object": "LayoutText #text",
@@ -78,27 +58,39 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [3, 401, 46, 17],
+          "rect": [3, 67, 46, 17],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'ROW1'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ROW1'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'ROW2'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'ROW2'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/table/resize-table-repaint-vertical-align-cell-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/table/resize-table-repaint-vertical-align-cell-expected.txt
index 95f8ccd..eef8517a3 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/table/resize-table-repaint-vertical-align-cell-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/table/resize-table-repaint-vertical-align-cell-expected.txt
@@ -7,29 +7,24 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'MIDDLE'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'MIDDLE'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutTable (positioned) TABLE id='table'",
           "rect": [0, 150, 106, 380],
           "reason": "incremental"
         },
         {
+          "object": "LayoutTableRow TR",
+          "rect": [0, 148, 106, 380],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutTableCell TD",
           "rect": [2, 52, 102, 476],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableRow TR",
-          "rect": [0, 148, 106, 380],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "rect": [3, 281, 63, 17],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
@@ -37,18 +32,19 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [3, 281, 63, 17],
+          "object": "InlineTextBox 'MIDDLE'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'MIDDLE'",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/table/resize-table-row-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/table/resize-table-row-repaint-expected.txt
index 8c9d7b2..05edd7b 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/table/resize-table-row-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/table/resize-table-row-repaint-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'MIDDLE'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'MIDDLE'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
+          "object": "LayoutTableRow TR id='row'",
+          "rect": [0, 202, 106, 100],
+          "reason": "incremental"
         },
         {
           "object": "LayoutTableCell TD",
@@ -22,9 +17,9 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutTableRow TR id='row'",
-          "rect": [0, 202, 106, 100],
-          "reason": "incremental"
+          "object": "LayoutText #text",
+          "rect": [3, 193, 63, 17],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutText #text",
@@ -32,18 +27,19 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [3, 193, 63, 17],
+          "object": "InlineTextBox 'MIDDLE'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'MIDDLE'",
           "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-paint-invalidation-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-paint-invalidation-expected.txt
index 8bc31de..9acb04b 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-paint-invalidation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-paint-invalidation-expected.txt
@@ -24,19 +24,24 @@
               "drawsContent": true,
               "paintInvalidations": [
                 {
-                  "object": "InlineTextBox ''",
-                  "rect": [0, 0, 0, 0],
+                  "object": "LayoutFlexibleBox DIV",
+                  "rect": [47, 208, 111, 24],
+                  "reason": "forced by layout"
+                },
+                {
+                  "object": "LayoutSlider INPUT",
+                  "rect": [47, 208, 111, 24],
                   "reason": "full"
                 },
                 {
-                  "object": "InlineTextBox '0:00'",
-                  "rect": [0, 0, 0, 0],
+                  "object": "LayoutSlider INPUT",
+                  "rect": [228, 208, 51, 24],
                   "reason": "full"
                 },
                 {
-                  "object": "LayoutBlockFlow (anonymous)",
-                  "rect": [159, 205, 26, 23],
-                  "reason": "invalidate paint rectangle"
+                  "object": "LayoutButton INPUT",
+                  "rect": [193, 205, 36, 30],
+                  "reason": "full"
                 },
                 {
                   "object": "LayoutBlockFlow DIV id='thumb'",
@@ -54,24 +59,9 @@
                   "reason": "full"
                 },
                 {
-                  "object": "LayoutButton INPUT",
-                  "rect": [193, 205, 36, 30],
-                  "reason": "full"
-                },
-                {
-                  "object": "LayoutFlexibleBox DIV",
-                  "rect": [47, 208, 111, 24],
-                  "reason": "forced by layout"
-                },
-                {
-                  "object": "LayoutSlider INPUT",
-                  "rect": [47, 208, 111, 24],
-                  "reason": "full"
-                },
-                {
-                  "object": "LayoutSlider INPUT",
-                  "rect": [228, 208, 51, 24],
-                  "reason": "full"
+                  "object": "LayoutBlockFlow (anonymous)",
+                  "rect": [159, 205, 26, 23],
+                  "reason": "invalidate paint rectangle"
                 },
                 {
                   "object": "LayoutText #text",
@@ -79,8 +69,15 @@
                   "reason": "full"
                 },
                 {
+                  "object": "InlineTextBox ''",
+                  "reason": "full"
+                },
+                {
+                  "object": "InlineTextBox '0:00'",
+                  "reason": "full"
+                },
+                {
                   "object": "RootInlineBox",
-                  "rect": [0, 0, 0, 0],
                   "reason": "full"
                 }
               ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/invalidate-box-shadow-currentColor-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/invalidate-box-shadow-currentColor-expected.txt
index 1a829cc..c2388e0 100644
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/invalidate-box-shadow-currentColor-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/invalidate-box-shadow-currentColor-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'Text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutInline SPAN id='target'",
           "rect": [8, 8, 29, 22],
           "reason": "style change"
@@ -25,6 +15,14 @@
           "object": "LayoutText #text",
           "rect": [8, 8, 29, 17],
           "reason": "style change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'Text'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/non-text-link-invalidation-optimization-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/non-text-link-invalidation-optimization-expected.txt
index 47023da..3191b55 100644
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/non-text-link-invalidation-optimization-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/non-text-link-invalidation-optimization-expected.txt
@@ -7,38 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' images.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox ' no '",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox ' passes if '",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox ' text is invalidated and '",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'This test '",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox 'only'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutText #text",
-          "rect": [8, 8, 59, 17],
+          "rect": [167, 8, 150, 17],
           "reason": "style change"
         },
         {
@@ -48,12 +18,17 @@
         },
         {
           "object": "LayoutText #text",
-          "rect": [139, 8, 29, 18],
+          "rect": [8, 8, 59, 17],
           "reason": "style change"
         },
         {
           "object": "LayoutText #text",
-          "rect": [167, 8, 150, 17],
+          "rect": [360, 8, 54, 18],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [139, 8, 29, 18],
           "reason": "style change"
         },
         {
@@ -62,8 +37,27 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [360, 8, 54, 18],
+          "object": "InlineTextBox ' images.'",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' no '",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' passes if '",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox ' text is invalidated and '",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'This test '",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox 'only'",
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/selection/selection-within-composited-scroller-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/selection/selection-within-composited-scroller-expected.txt
index fed8d56..687e78db 100644
--- a/third_party/WebKit/LayoutTests/platform/win/paint/selection/selection-within-composited-scroller-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/paint/selection/selection-within-composited-scroller-expected.txt
@@ -8,12 +8,10 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         }
       ],
@@ -27,23 +25,20 @@
           "backgroundColor": "#D3D3D3",
           "paintInvalidations": [
             {
+              "object": "LayoutText #text",
+              "rect": [0, 160, 23, 17],
+              "reason": "selection"
+            },
+            {
               "object": "InlineTextBox 'test'",
-              "rect": [0, 0, 0, 0],
               "reason": "selection"
             },
             {
               "object": "LayoutBlockFlow DIV id='scroller'",
-              "rect": [0, 0, 0, 0],
               "reason": "selection"
             },
             {
               "object": "LayoutBlockFlow DIV id='target'",
-              "rect": [0, 0, 0, 0],
-              "reason": "selection"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 160, 23, 17],
               "reason": "selection"
             }
           ],
@@ -57,23 +52,20 @@
                   "drawsContent": true,
                   "paintInvalidations": [
                     {
+                      "object": "LayoutText #text",
+                      "rect": [0, 610, 23, 17],
+                      "reason": "selection"
+                    },
+                    {
                       "object": "InlineTextBox 'test'",
-                      "rect": [0, 0, 0, 0],
                       "reason": "selection"
                     },
                     {
                       "object": "LayoutBlockFlow DIV id='scroller'",
-                      "rect": [0, 0, 0, 0],
                       "reason": "selection"
                     },
                     {
                       "object": "LayoutBlockFlow DIV id='target'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "selection"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 610, 23, 17],
                       "reason": "selection"
                     }
                   ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/as-image/svg-image-change-content-size-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/as-image/svg-image-change-content-size-expected.txt
index af177de7..2602ea1 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/as-image/svg-image-change-content-size-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/as-image/svg-image-change-content-size-expected.txt
@@ -7,23 +7,20 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 50, 602, 424],
           "reason": "forced by layout"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/carto.net/tabgroup-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/carto.net/tabgroup-expected.txt
index 9452d4f..3f9dc2a 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/carto.net/tabgroup-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/carto.net/tabgroup-expected.txt
@@ -7,678 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox '& Info'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '& Info'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Account'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Account'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Biography'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Biography'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Biography'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Biography'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Biography'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Browser'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Browser'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Browser'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Click on the second tab to see oversize content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Download'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Download'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Events'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Events'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Events'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Events'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Events'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Folder'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Folder'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Geodata'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Geodata'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Geodata'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Help'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Help'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Portrait'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Portrait'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Portrait'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Portrait'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Relations'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Relations'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Relations'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Relations'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Relations'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Relations'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This is a tabgroup with triangular tab corners'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This is oversize content that can be'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Your'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Your'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'and a double line tab. (use \"\\n\" as a line separator)'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'hidden on tab-change'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'hidden on tab-change'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRect'",
-          "rect": [38, 7, 158, 236],
+          "object": "LayoutSVGRoot svg",
+          "rect": [7, 7, 736, 573],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRectRound'",
-          "rect": [263, 279, 301, 301],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectRound__0_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectRound__0_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRectRound__1_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRectRound__2_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRectRound__3_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRectTriangle'",
-          "rect": [507, 233, 236, 159],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__0_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__1_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__2_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__2_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__3_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRect__0_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRect__1_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRect__1_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRect__2_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRect__3_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
@@ -687,28 +42,148 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRound__0_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGPath path",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRound__1_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g id='tabgroupRound__1_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGPath path",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRound__2_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGPath path",
+          "rect": [390, 38, 314, 80],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='tabgroupRound__3_content'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGPath path",
+          "rect": [390, 38, 314, 80],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectRound'",
+          "rect": [263, 279, 301, 301],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [263, 279, 301, 301],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectTriangle'",
+          "rect": [507, 233, 236, 159],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [507, 233, 236, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [7, 257, 236, 158],
           "reason": "location change"
         },
         {
@@ -717,151 +192,31 @@
           "reason": "bounds change"
         },
         {
+          "object": "LayoutSVGPath path",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [7, 257, 236, 158],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGContainer g id='tabgroupTriangle__0_content'",
           "rect": [15, 291, 211, 37],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGHiddenContainer g id='oversizeContent'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='oversizeContent'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__0_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__1_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__2_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__3_content'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [7, 33, 150, 25],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [7, 33, 150, 25],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [180, 11, 16, 57],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [180, 136, 16, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [180, 181, 16, 40],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [180, 75, 16, 54],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [66, 257, 57, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [66, 257, 57, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [15, 291, 150, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [15, 291, 150, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [130, 257, 44, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [130, 257, 44, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [181, 257, 32, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [181, 257, 32, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [11, 257, 48, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [11, 257, 48, 29],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [15, 291, 211, 37],
           "reason": "location change"
@@ -877,319 +232,24 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [511, 234, 57, 16],
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [15, 291, 211, 37],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [575, 234, 54, 16],
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [15, 291, 211, 37],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [681, 234, 40, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [636, 234, 38, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [394, 38, 57, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [519, 38, 38, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [564, 38, 40, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [458, 38, 54, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [423, 339, 49, 49],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [475, 390, 37, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [514, 430, 40, 39],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [370, 285, 51, 51],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [38, 7, 158, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [7, 257, 236, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [507, 233, 236, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [390, 38, 314, 80],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [263, 279, 301, 301],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectRound__0'",
-          "rect": [363, 279, 64, 64],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectRound__1'",
-          "rect": [416, 333, 62, 62],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectRound__2'",
-          "rect": [468, 384, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectRound__3'",
-          "rect": [508, 424, 52, 52],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectTriangle__0'",
-          "rect": [507, 233, 66, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectTriangle__1'",
-          "rect": [571, 233, 63, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectTriangle__2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectTriangle__2'",
-          "rect": [632, 233, 46, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRectTriangle__3'",
-          "rect": [676, 233, 49, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRect__0'",
-          "rect": [179, 7, 17, 66],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRect__1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRect__1'",
-          "rect": [179, 71, 17, 63],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRect__2'",
-          "rect": [179, 132, 17, 46],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRect__3'",
-          "rect": [179, 176, 17, 49],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRound__0'",
-          "rect": [390, 38, 66, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRound__1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRound__1'",
-          "rect": [454, 38, 63, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRound__2'",
-          "rect": [515, 38, 46, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupRound__3'",
-          "rect": [559, 38, 49, 18],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupTriangle__0'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupTriangle__0'",
-          "rect": [7, 257, 56, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupTriangle__1'",
-          "rect": [62, 257, 66, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupTriangle__2'",
-          "rect": [126, 257, 52, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='tabgroupTriangle__3'",
-          "rect": [176, 257, 41, 29],
+          "object": "LayoutSVGText text id='contentTabGroupTriangle0'",
+          "rect": [15, 291, 211, 37],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [30, 147, 174, 96],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [31, 146, 172, 96],
-          "reason": "layoutObject removal"
+          "rect": [31, 404, 188, 10],
+          "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect",
@@ -1203,82 +263,77 @@
         },
         {
           "object": "LayoutSVGRect rect",
+          "rect": [30, 147, 174, 96],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect",
           "rect": [39, 404, 172, 96],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [31, 404, 188, 10],
+          "rect": [31, 146, 172, 96],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [38, 7, 158, 236],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [7, 7, 736, 573],
+          "object": "LayoutSVGContainer g",
+          "rect": [38, 7, 158, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [38, 7, 158, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [38, 7, 158, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [38, 7, 158, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRect'",
+          "rect": [38, 7, 158, 236],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [7, 33, 150, 25],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [180, 11, 16, 57],
+          "object": "LayoutSVGPath path",
+          "rect": [38, 7, 158, 236],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [180, 136, 16, 38],
+          "object": "LayoutSVGPath path",
+          "rect": [38, 7, 158, 236],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [180, 181, 16, 40],
+          "object": "LayoutSVGPath path",
+          "rect": [38, 7, 158, 236],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [180, 75, 16, 54],
+          "object": "LayoutSVGPath path",
+          "rect": [38, 7, 158, 236],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [66, 257, 57, 29],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [15, 291, 150, 25],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [66, 257, 57, 29],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [15, 291, 150, 25],
           "reason": "location change"
         },
         {
@@ -1287,43 +342,93 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGText text",
+          "rect": [15, 291, 150, 25],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [7, 33, 150, 25],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [7, 33, 150, 25],
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "LayoutSVGTSpan tspan",
-          "rect": [130, 257, 44, 29],
+          "rect": [7, 33, 150, 25],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [7, 33, 150, 25],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupTriangle__1'",
+          "rect": [62, 257, 66, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRectTriangle__0'",
+          "rect": [507, 233, 66, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRound__0'",
+          "rect": [390, 38, 66, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRectRound__0'",
+          "rect": [363, 279, 64, 64],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRectTriangle__1'",
+          "rect": [571, 233, 63, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRound__1'",
+          "rect": [454, 38, 63, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRectRound__1'",
+          "rect": [416, 333, 62, 62],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [66, 257, 57, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [66, 257, 57, 29],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGTSpan tspan",
-          "rect": [130, 257, 44, 29],
+          "rect": [66, 257, 57, 29],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGTSpan tspan",
-          "rect": [181, 257, 32, 29],
+          "rect": [66, 257, 57, 29],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [181, 257, 32, 29],
+          "object": "LayoutSVGText text",
+          "rect": [66, 257, 57, 29],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [11, 257, 48, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [11, 257, 48, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [15, 291, 211, 37],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [15, 291, 211, 37],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [511, 234, 57, 16],
           "reason": "location change"
         },
         {
@@ -1332,18 +437,13 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [575, 234, 54, 16],
+          "object": "LayoutSVGText text",
+          "rect": [511, 234, 57, 16],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [681, 234, 40, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [636, 234, 38, 16],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [394, 38, 57, 16],
           "reason": "location change"
         },
         {
@@ -1352,13 +452,33 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [519, 38, 38, 16],
+          "object": "LayoutSVGText text",
+          "rect": [394, 38, 57, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupTriangle__0'",
+          "rect": [7, 257, 56, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [575, 234, 54, 16],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGTSpan tspan",
-          "rect": [564, 38, 40, 16],
+          "rect": [575, 234, 54, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [575, 234, 54, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [458, 38, 54, 16],
           "reason": "location change"
         },
         {
@@ -1367,18 +487,23 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [423, 339, 49, 49],
+          "object": "LayoutSVGText text",
+          "rect": [458, 38, 54, 16],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [475, 390, 37, 38],
+          "object": "LayoutSVGPath path id='tabgroupRectRound__3'",
+          "rect": [508, 424, 52, 52],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [514, 430, 40, 39],
+          "object": "LayoutSVGPath path id='tabgroupTriangle__2'",
+          "rect": [126, 257, 52, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [370, 285, 51, 51],
           "reason": "location change"
         },
         {
@@ -1388,117 +513,22 @@
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [7, 33, 150, 25],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [180, 11, 16, 57],
+          "rect": [370, 285, 51, 51],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [180, 136, 16, 38],
+          "object": "LayoutSVGPath path id='tabgroupRectRound__2'",
+          "rect": [468, 384, 50, 50],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [180, 181, 16, 40],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [423, 339, 49, 49],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [180, 75, 16, 54],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [66, 257, 57, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [15, 291, 150, 25],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [130, 257, 44, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [181, 257, 32, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [11, 257, 48, 29],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [511, 234, 57, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [575, 234, 54, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [681, 234, 40, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [636, 234, 38, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [394, 38, 57, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [519, 38, 38, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [564, 38, 40, 16],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [458, 38, 54, 16],
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [423, 339, 49, 49],
           "reason": "location change"
         },
         {
@@ -1507,8 +537,88 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGPath path id='tabgroupRectTriangle__3'",
+          "rect": [676, 233, 49, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRound__3'",
+          "rect": [559, 38, 49, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [11, 257, 48, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [11, 257, 48, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [11, 257, 48, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [11, 257, 48, 29],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGText text",
-          "rect": [475, 390, 37, 38],
+          "rect": [11, 257, 48, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRectTriangle__2'",
+          "rect": [632, 233, 46, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRound__2'",
+          "rect": [515, 38, 46, 18],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [130, 257, 44, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [130, 257, 44, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [130, 257, 44, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [130, 257, 44, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [130, 257, 44, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupTriangle__3'",
+          "rect": [176, 257, 41, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [514, 430, 40, 39],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [514, 430, 40, 39],
           "reason": "location change"
         },
         {
@@ -1517,173 +627,891 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [681, 234, 40, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [681, 234, 40, 16],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGText text",
-          "rect": [370, 285, 51, 51],
+          "rect": [681, 234, 40, 16],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text id='contentTabGroupTriangle0'",
-          "rect": [15, 291, 211, 37],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [564, 38, 40, 16],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [564, 38, 40, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [564, 38, 40, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [636, 234, 38, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [636, 234, 38, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [636, 234, 38, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [519, 38, 38, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [519, 38, 38, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [519, 38, 38, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [475, 390, 37, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [475, 390, 37, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [475, 390, 37, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [181, 257, 32, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [181, 257, 32, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [181, 257, 32, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [181, 257, 32, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [181, 257, 32, 29],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRect__0'",
+          "rect": [179, 7, 17, 66],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRect__1'",
+          "rect": [179, 71, 17, 63],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRect__3'",
+          "rect": [179, 176, 17, 49],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRect__2'",
+          "rect": [179, 132, 17, 46],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [180, 11, 16, 57],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [180, 11, 16, 57],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [180, 11, 16, 57],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [180, 75, 16, 54],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [180, 75, 16, 54],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [180, 75, 16, 54],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [180, 181, 16, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [180, 181, 16, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [180, 181, 16, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [180, 136, 16, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [180, 136, 16, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [180, 136, 16, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox '& Info'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '& Info'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Account'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Account'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Biography'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Biography'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Biography'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Biography'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Biography'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Browser'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Browser'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Browser'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Click on the second tab to see oversize content'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Download'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Download'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Events'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Events'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Events'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Events'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Events'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Folder'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Folder'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Geodata'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Geodata'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Geodata'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Help'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Help'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Portrait'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Portrait'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Portrait'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Portrait'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Relations'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Relations'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Relations'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Relations'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Relations'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Relations'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'This is a tabgroup with triangular tab corners'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'This is oversize content that can be'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Your'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Your'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'and a double line tab. (use \"\\n\" as a line separator)'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'hidden on tab-change'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'hidden on tab-change'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectRound__0_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectRound__0_content'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectRound__1_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectRound__2_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectRound__3_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__0_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__1_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__2_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__2_content'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRectTriangle__3_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRect__0_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRect__1_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRect__1_content'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRect__2_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRect__3_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRound__0_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRound__1_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRound__1_content'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRound__2_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='tabgroupRound__3_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer g id='oversizeContent'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer g id='oversizeContent'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__0_content'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__1_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__2_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer g id='tabgroupTriangle__3_content'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRectRound__0'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRectTriangle__2'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRect__1'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupRound__1'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGPath path id='tabgroupTriangle__0'",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/carto.net/window-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/carto.net/window-expected.txt
index 416d3320..4a3bb4f2 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/carto.net/window-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/carto.net/window-expected.txt
@@ -7,254 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox ''Resize Navigation Window' for a'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Big Window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Callback function is active'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Changing a colour changes background'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Click on button'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Colour Picker'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Navigation Window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Nested middlesize Window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Note that this window also'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Small Window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Status Window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'Statusbar'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This is a big movable window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This is a minimal window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This is a none-moveable'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This window contains other windows'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This window has a callback'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'This window should'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'and alerting window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'contain navigation tools'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'events'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'features a window decoration'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'function indicating mouse'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'it is also not moveable'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'movements in the statusbar'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'none-closeable status'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'random resize of this Window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'window'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'without title and status bar.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [632, 101, 160, 99],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [257, 364, 118, 40],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [320, 398, 136, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [43, 480, 114, 38],
-          "reason": "location change"
+          "object": "LayoutSVGContainer g id='Windows'",
+          "rect": [38, 81, 760, 454],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutSVGContainer g id='Windows'",
@@ -262,88 +17,18 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='Windows'",
-          "rect": [38, 81, 760, 454],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGContainer g id='bigWindow'",
           "rect": [38, 143, 549, 392],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='colourPickerWindow'",
-          "rect": [77, 195, 174, 143],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='decoGroupnavWindow'",
-          "rect": [613, 81, 185, 159],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='minimalWindow'",
-          "rect": [39, 476, 119, 48],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='navWindow'",
-          "rect": [624, 92, 174, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='navWindow'",
-          "rect": [613, 81, 185, 169],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='nestedWindow'",
-          "rect": [77, 182, 315, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='smallWindow'",
-          "rect": [312, 377, 158, 143],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='statusWindow'",
-          "rect": [249, 344, 143, 64],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGContainer g id='windowMainGroupbigWindow'",
           "rect": [38, 143, 549, 392],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='windowMainGroupcolourPickerWindow'",
-          "rect": [77, 195, 174, 143],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='windowMainGroupminimalWindow'",
-          "rect": [39, 476, 119, 48],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='windowMainGroupnavWindow'",
-          "rect": [624, 92, 174, 158],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='windowMainGroupnestedWindow'",
-          "rect": [77, 182, 315, 236],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='windowMainGroupsmallWindow'",
-          "rect": [312, 377, 158, 143],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='windowMainGroupstatusWindow'",
-          "rect": [249, 344, 143, 64],
+          "object": "LayoutSVGRect rect",
+          "rect": [38, 143, 549, 392],
           "reason": "location change"
         },
         {
@@ -352,18 +37,53 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='windowTitlebarGroupcolourPickerWindow'",
-          "rect": [77, 195, 174, 16],
+          "object": "LayoutSVGRect rect id='titleBarbigWindow'",
+          "rect": [38, 143, 549, 15],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='windowTitlebarGroupminimalWindow'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRect rect",
+          "rect": [38, 523, 549, 12],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer g id='windowTitlebarGroupnavWindow'",
-          "rect": [757, 94, 36, 11],
+          "object": "LayoutSVGContainer g id='nestedWindow'",
+          "rect": [77, 182, 315, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowMainGroupnestedWindow'",
+          "rect": [77, 182, 315, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [77, 182, 315, 236],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowTitlebarGroupnestedWindow'",
+          "rect": [77, 182, 315, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='titleBarnestedWindow'",
+          "rect": [77, 182, 315, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [77, 406, 315, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='navWindow'",
+          "rect": [613, 81, 185, 169],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='decoGroupnavWindow'",
+          "rect": [613, 81, 185, 159],
           "reason": "location change"
         },
         {
@@ -372,8 +92,148 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGContainer g id='windowTitlebarGroupnestedWindow'",
-          "rect": [77, 182, 315, 15],
+          "object": "LayoutSVGRect rect id='decoGroupMinimizednavWindow'",
+          "rect": [613, 81, 185, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='navWindow'",
+          "rect": [624, 92, 174, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowMainGroupnavWindow'",
+          "rect": [624, 92, 174, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [624, 92, 174, 158],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='colourPickerWindow'",
+          "rect": [77, 195, 174, 143],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowMainGroupcolourPickerWindow'",
+          "rect": [77, 195, 174, 143],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [77, 195, 174, 143],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowTitlebarGroupcolourPickerWindow'",
+          "rect": [77, 195, 174, 16],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='titleBarcolourPickerWindow'",
+          "rect": [77, 195, 174, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [624, 238, 174, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [77, 326, 174, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='textNavWindow'",
+          "rect": [632, 101, 160, 99],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='smallWindow'",
+          "rect": [312, 377, 158, 143],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowMainGroupsmallWindow'",
+          "rect": [312, 377, 158, 143],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [312, 377, 158, 143],
           "reason": "location change"
         },
         {
@@ -382,43 +242,328 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGRect rect id='titleBarsmallWindow'",
+          "rect": [312, 377, 158, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [312, 508, 158, 12],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='statusWindow'",
+          "rect": [249, 344, 143, 64],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowMainGroupstatusWindow'",
+          "rect": [249, 344, 143, 64],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [249, 344, 143, 64],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGContainer g id='windowTitlebarGroupstatusWindow'",
           "rect": [249, 344, 143, 15],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtonbigWindow'",
-          "rect": [572, 145, 10, 10],
+          "object": "LayoutSVGRect rect id='titleBarstatusWindow'",
+          "rect": [249, 344, 143, 15],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtoncolourPickerWindow'",
-          "rect": [236, 198, 10, 10],
+          "object": "LayoutSVGContainer g",
+          "rect": [320, 398, 136, 65],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtonnavWindow'",
-          "rect": [783, 95, 10, 10],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [320, 398, 136, 65],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtonnavWindow'",
-          "rect": [783, 95, 10, 10],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [320, 398, 136, 65],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtonnavWindow'",
-          "rect": [616, 84, 10, 10],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [320, 398, 136, 65],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtonnestedWindow'",
-          "rect": [377, 184, 10, 11],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [320, 398, 136, 65],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='closeButtonsmallWindow'",
-          "rect": [455, 380, 10, 10],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [320, 398, 136, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [320, 398, 136, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [320, 398, 136, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [320, 398, 136, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [320, 398, 136, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='textSmallWindow'",
+          "rect": [320, 398, 136, 65],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [80, 326, 136, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [80, 326, 136, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [80, 182, 131, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [80, 182, 131, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [80, 406, 121, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [80, 406, 121, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='minimalWindow'",
+          "rect": [39, 476, 119, 48],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowMainGroupminimalWindow'",
+          "rect": [39, 476, 119, 48],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [39, 476, 119, 48],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [257, 364, 118, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [257, 364, 118, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [257, 364, 118, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [257, 364, 118, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [257, 364, 118, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [257, 364, 118, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='textStatusWindow'",
+          "rect": [257, 364, 118, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [43, 480, 114, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [43, 480, 114, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [43, 480, 114, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [43, 480, 114, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [43, 480, 114, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [43, 480, 114, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='textMinimalWindow'",
+          "rect": [43, 480, 114, 38],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [41, 524, 99, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [41, 524, 99, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [314, 508, 87, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [314, 508, 87, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [252, 344, 75, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [252, 344, 75, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [314, 378, 69, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [314, 378, 69, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [80, 196, 64, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [80, 196, 64, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [41, 143, 59, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [41, 143, 59, 15],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='windowTitlebarGroupnavWindow'",
+          "rect": [757, 94, 36, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [627, 238, 33, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [627, 238, 33, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [613, 81, 16, 159],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [616, 152, 13, 82],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [616, 152, 13, 82],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'",
+          "rect": [769, 94, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'",
+          "rect": [769, 94, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [769, 94, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [769, 94, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [769, 94, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [769, 94, 11, 11],
           "reason": "location change"
         },
         {
@@ -427,23 +572,28 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='maximizeButtoncolourPickerWindow'",
-          "rect": [223, 198, 10, 10],
+          "object": "LayoutSVGRect rect",
+          "rect": [558, 145, 11, 11],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'",
-          "rect": [769, 94, 11, 11],
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [558, 145, 11, 11],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'",
-          "rect": [769, 94, 11, 11],
+          "object": "LayoutSVGRect rect",
+          "rect": [441, 379, 11, 11],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'",
-          "rect": [616, 100, 10, 10],
+          "object": "LayoutSVGPath line",
+          "rect": [376, 184, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [376, 184, 11, 11],
           "reason": "location change"
         },
         {
@@ -452,43 +602,178 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGRect rect",
+          "rect": [363, 184, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [363, 184, 11, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [222, 197, 11, 11],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGContainer use id='maximizeButtonsmallWindow'",
           "rect": [441, 380, 11, 10],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [441, 380, 11, 10],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGContainer use id='maximizeButtonstatusWindow'",
           "rect": [376, 346, 11, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtonbigWindow'",
-          "rect": [546, 146, 9, 10],
+          "object": "LayoutSVGRect rect",
+          "rect": [376, 346, 11, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtoncolourPickerWindow'",
-          "rect": [210, 198, 9, 10],
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [376, 346, 11, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'",
-          "rect": [757, 95, 9, 10],
+          "object": "LayoutSVGPath line",
+          "rect": [783, 94, 10, 11],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'",
-          "rect": [757, 95, 9, 10],
+          "object": "LayoutSVGPath line",
+          "rect": [783, 94, 10, 11],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'",
-          "rect": [616, 116, 10, 9],
+          "object": "LayoutSVGPath line",
+          "rect": [783, 94, 10, 11],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtonnestedWindow'",
-          "rect": [350, 185, 10, 10],
+          "object": "LayoutSVGPath line",
+          "rect": [783, 94, 10, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [616, 99, 10, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [572, 145, 10, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [572, 145, 10, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='closeButtonnestedWindow'",
+          "rect": [377, 184, 10, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [377, 184, 10, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='closeButtonnavWindow'",
+          "rect": [783, 95, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='closeButtonnavWindow'",
+          "rect": [783, 95, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [783, 95, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [783, 95, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'",
+          "rect": [616, 100, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [616, 100, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='closeButtonnavWindow'",
+          "rect": [616, 84, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [616, 84, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [616, 84, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [616, 84, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [616, 84, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='closeButtonbigWindow'",
+          "rect": [572, 145, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [572, 145, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='closeButtonsmallWindow'",
+          "rect": [455, 380, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [455, 380, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [455, 380, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [455, 380, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [455, 380, 10, 10],
           "reason": "location change"
         },
         {
@@ -497,193 +782,93 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='minimizeButtonstatusWindow'",
-          "rect": [364, 346, 9, 10],
+          "object": "LayoutSVGRect rect",
+          "rect": [428, 380, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGHiddenContainer symbol id='closeButton'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [428, 380, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGHiddenContainer symbol id='maximizeButton'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer use id='minimizeButtonnestedWindow'",
+          "rect": [350, 185, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGHiddenContainer symbol id='minimizeButton'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [350, 185, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 101, 160, 99],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 101, 160, 99],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 101, 160, 99],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 101, 160, 99],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 101, 160, 99],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 101, 160, 99],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [632, 101, 160, 99],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [627, 238, 33, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [41, 524, 99, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [80, 406, 121, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [80, 326, 136, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [80, 196, 64, 15],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [257, 364, 118, 40],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [257, 364, 118, 40],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [257, 364, 118, 40],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [252, 344, 75, 15],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [80, 182, 131, 15],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [320, 398, 136, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [320, 398, 136, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [320, 398, 136, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [320, 398, 136, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [320, 398, 136, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [314, 508, 87, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [314, 378, 69, 15],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [43, 480, 114, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [43, 480, 114, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [43, 480, 114, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [41, 143, 59, 15],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [616, 152, 13, 82],
+          "object": "LayoutSVGContainer use id='closeButtoncolourPickerWindow'",
+          "rect": [236, 198, 10, 10],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGPath line",
-          "rect": [0, 21, 5, 11],
+          "rect": [236, 198, 10, 10],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGPath line",
-          "rect": [0, 21, 5, 11],
+          "rect": [236, 198, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGPath line",
-          "rect": [0, 30, 5, 2],
+          "object": "LayoutSVGRect rect",
+          "rect": [236, 198, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGPath line",
-          "rect": [783, 94, 10, 11],
+          "object": "LayoutSVGViewportContainer svg id='closeButton'",
+          "rect": [236, 198, 10, 10],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGPath line",
-          "rect": [783, 94, 10, 11],
+          "object": "LayoutSVGContainer use id='maximizeButtoncolourPickerWindow'",
+          "rect": [223, 198, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
+          "rect": [223, 198, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [783, 95, 10, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [783, 95, 10, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'",
+          "rect": [616, 116, 10, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [616, 116, 10, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [616, 116, 10, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [572, 146, 10, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [350, 185, 10, 9],
           "reason": "location change"
         },
         {
@@ -693,91 +878,6 @@
         },
         {
           "object": "LayoutSVGPath line",
-          "rect": [236, 198, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [236, 198, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [210, 206, 9, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [363, 354, 10, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [376, 184, 11, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [376, 184, 11, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [350, 193, 10, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [455, 380, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [455, 380, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [428, 388, 10, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [572, 145, 10, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [572, 145, 10, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [545, 154, 10, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [783, 94, 10, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [616, 84, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [783, 94, 10, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
-          "rect": [616, 84, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath line",
           "rect": [756, 103, 10, 2],
           "reason": "location change"
         },
@@ -787,8 +887,118 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGPath line",
+          "rect": [545, 154, 10, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [428, 388, 10, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [363, 354, 10, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [350, 193, 10, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'",
+          "rect": [757, 95, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'",
+          "rect": [757, 95, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [757, 95, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [757, 95, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='minimizeButtonbigWindow'",
+          "rect": [546, 146, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [546, 146, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='minimizeButtonstatusWindow'",
+          "rect": [364, 346, 9, 10],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRect rect",
-          "rect": [0, 22, 5, 9],
+          "rect": [364, 346, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [364, 346, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='minimizeButtoncolourPickerWindow'",
+          "rect": [210, 198, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [210, 198, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
+          "rect": [210, 198, 9, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [757, 95, 9, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [757, 95, 9, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [546, 146, 9, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [377, 185, 9, 9],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [210, 206, 9, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [0, 21, 5, 11],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath line",
+          "rect": [0, 21, 5, 11],
           "reason": "location change"
         },
         {
@@ -803,547 +1013,272 @@
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [624, 92, 174, 158],
+          "rect": [0, 22, 5, 9],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [624, 238, 174, 12],
+          "object": "LayoutSVGPath line",
+          "rect": [0, 30, 5, 2],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [783, 95, 10, 9],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [769, 94, 11, 11],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [757, 95, 9, 9],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [38, 143, 549, 392],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [38, 523, 549, 12],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [77, 182, 315, 236],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [77, 406, 315, 12],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [77, 195, 174, 143],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [77, 326, 174, 12],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [236, 198, 10, 10],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [222, 197, 11, 11],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [210, 198, 9, 10],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [249, 344, 143, 64],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [376, 346, 11, 10],
+          "object": "InlineFlowBox",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [364, 346, 9, 10],
+          "object": "InlineTextBox ''Resize Navigation Window' for a'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [377, 185, 9, 9],
+          "object": "InlineTextBox 'Big Window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [363, 184, 11, 11],
+          "object": "InlineTextBox 'Callback function is active'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [350, 185, 10, 9],
+          "object": "InlineTextBox 'Changing a colour changes background'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [312, 377, 158, 143],
+          "object": "InlineTextBox 'Click on button'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [312, 508, 158, 12],
+          "object": "InlineTextBox 'Colour Picker'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [455, 380, 10, 10],
+          "object": "InlineTextBox 'Navigation Window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [441, 379, 11, 11],
+          "object": "InlineTextBox 'Nested middlesize Window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [428, 380, 10, 10],
+          "object": "InlineTextBox 'Note that this window also'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [39, 476, 119, 48],
+          "object": "InlineTextBox 'Small Window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [572, 146, 10, 9],
+          "object": "InlineTextBox 'Status Window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [558, 145, 11, 11],
+          "object": "InlineTextBox 'Statusbar'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [546, 146, 9, 9],
+          "object": "InlineTextBox 'This is a big movable window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [613, 81, 16, 159],
+          "object": "InlineTextBox 'This is a minimal window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [783, 95, 10, 9],
+          "object": "InlineTextBox 'This is a none-moveable'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [616, 84, 10, 10],
+          "object": "InlineTextBox 'This window contains other windows'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [769, 94, 11, 11],
+          "object": "InlineTextBox 'This window has a callback'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [616, 99, 10, 11],
+          "object": "InlineTextBox 'This window should'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [757, 95, 9, 9],
+          "object": "InlineTextBox 'and alerting window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [616, 116, 10, 9],
+          "object": "InlineTextBox 'contain navigation tools'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='decoGroupMinimizednavWindow'",
-          "rect": [613, 81, 185, 16],
+          "object": "InlineTextBox 'events'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='titleBarbigWindow'",
-          "rect": [38, 143, 549, 15],
+          "object": "InlineTextBox 'features a window decoration'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='titleBarcolourPickerWindow'",
-          "rect": [77, 195, 174, 15],
+          "object": "InlineTextBox 'function indicating mouse'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='titleBarnestedWindow'",
-          "rect": [77, 182, 315, 15],
+          "object": "InlineTextBox 'it is also not moveable'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='titleBarsmallWindow'",
-          "rect": [312, 377, 158, 15],
+          "object": "InlineTextBox 'movements in the statusbar'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='titleBarstatusWindow'",
-          "rect": [249, 344, 143, 15],
+          "object": "InlineTextBox 'none-closeable status'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [632, 101, 160, 99],
+          "object": "InlineTextBox 'random resize of this Window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [632, 101, 160, 99],
+          "object": "InlineTextBox 'window'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [632, 101, 160, 99],
+          "object": "InlineTextBox 'without title and status bar.'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [632, 101, 160, 99],
+          "object": "LayoutSVGContainer g",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [632, 101, 160, 99],
+          "object": "LayoutSVGContainer g",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [632, 101, 160, 99],
+          "object": "LayoutSVGContainer g",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [257, 364, 118, 40],
+          "object": "LayoutSVGContainer g id='windowTitlebarGroupminimalWindow'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [257, 364, 118, 40],
+          "object": "LayoutSVGHiddenContainer symbol id='closeButton'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [320, 398, 136, 65],
+          "object": "LayoutSVGHiddenContainer symbol id='maximizeButton'",
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [320, 398, 136, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [320, 398, 136, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [320, 398, 136, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [43, 480, 114, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [43, 480, 114, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [627, 238, 33, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [41, 524, 99, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [80, 406, 121, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [80, 326, 136, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [80, 196, 64, 15],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [252, 344, 75, 15],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [80, 182, 131, 15],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [314, 508, 87, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [314, 378, 69, 15],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [41, 143, 59, 15],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [616, 152, 13, 82],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='textMinimalWindow'",
-          "rect": [43, 480, 114, 38],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='textNavWindow'",
-          "rect": [632, 101, 160, 99],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='textSmallWindow'",
-          "rect": [320, 398, 136, 65],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='textStatusWindow'",
-          "rect": [257, 364, 118, 40],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [783, 95, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [236, 198, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [377, 184, 10, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [455, 380, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [572, 145, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [783, 95, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='closeButton'",
-          "rect": [616, 84, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [769, 94, 11, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [223, 198, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [376, 346, 11, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [363, 184, 11, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [441, 380, 11, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [558, 145, 11, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [769, 94, 11, 11],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='maximizeButton'",
-          "rect": [616, 100, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [757, 95, 9, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [210, 198, 9, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [364, 346, 9, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [350, 185, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [428, 380, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [546, 146, 9, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [757, 95, 9, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='minimizeButton'",
-          "rect": [616, 116, 10, 9],
+          "object": "LayoutSVGHiddenContainer symbol id='minimizeButton'",
           "reason": "location change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/absolute-sized-content-with-resources-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/absolute-sized-content-with-resources-expected.txt
index 73c967c7..50c51b901 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/absolute-sized-content-with-resources-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/absolute-sized-content-with-resources-expected.txt
@@ -7,33 +7,30 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 50, 402, 404],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [17, 217, 84, 68],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
           "rect": [42, 117, 334, 268],
           "reason": "bounds change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRoot svg",
+          "rect": [17, 217, 84, 68],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-clipPath-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-clipPath-and-object-creation-expected.txt
index 30e644f..4d106fb 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-clipPath-and-object-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-clipPath-and-object-creation-expected.txt
@@ -7,37 +7,42 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [16, 40, 784, 168],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 40, 784, 168],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRoot svg id='svg-root'",
+          "rect": [16, 40, 784, 168],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [16, 40, 784, 168],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [16, 40, 784, 168],
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [334, 40, 466, 168],
           "reason": "incremental"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [16, 40, 784, 168],
-          "reason": "layoutObject insertion"
+          "rect": [334, 40, 466, 168],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutSVGInlineText #text",
+          "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [334, 40, 466, 168],
           "reason": "incremental"
         },
@@ -47,43 +52,31 @@
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGResourceClipper clipPath id='dynClip'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRoot svg id='svg-root'",
-          "rect": [16, 40, 784, 168],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg id='svg-root'",
-          "rect": [334, 40, 466, 168],
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [16, 40, 784, 168],
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [16, 40, 784, 168],
-          "reason": "style change"
+          "object": "LayoutSVGResourceClipper clipPath id='dynClip'",
+          "reason": "layoutObject insertion"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-clipPath-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-clipPath-creation-expected.txt
index 9d6b95d..85f011bf 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-clipPath-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-clipPath-creation-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
+          "object": "LayoutSVGText text",
+          "rect": [16, 40, 784, 168],
+          "reason": "style change"
         },
         {
           "object": "LayoutSVGContainer g id='content'",
@@ -27,33 +22,33 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGPath path",
-          "rect": [0, 0, 334, 500],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceClipper clipPath id='dynClip'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [334, 40, 466, 168],
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [16, 40, 784, 168],
-          "reason": "style change"
+          "object": "LayoutSVGPath path",
+          "rect": [0, 0, 334, 500],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'Clipped. INVISIBLE.'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGResourceClipper clipPath id='dynClip'",
+          "reason": "layoutObject insertion"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-gradient-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-gradient-and-object-creation-expected.txt
index f39eb586..48a934e7 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-gradient-and-object-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-gradient-and-object-creation-expected.txt
@@ -7,78 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Gradient on fill'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Gradient on fill/stroke'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Gradient on stroke'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [0, 15, 759, 362],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 15, 449, 127],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 130, 596, 130],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 247, 759, 130],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceLinearGradient linearGradient id='fillLinearGradient'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceLinearGradient linearGradient id='strokeLinearGradient'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [0, 15, 759, 362],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [0, 15, 449, 127],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 130, 596, 130],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 247, 759, 130],
           "reason": "layoutObject insertion"
         },
         {
@@ -87,18 +27,67 @@
           "reason": "layoutObject insertion"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 130, 596, 130],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 130, 596, 130],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 15, 449, 127],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 15, 449, 127],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Gradient on fill'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Gradient on fill/stroke'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Gradient on stroke'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourceLinearGradient linearGradient id='fillLinearGradient'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourceLinearGradient linearGradient id='strokeLinearGradient'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-gradient-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-gradient-creation-expected.txt
index 9392fa27..fdeb44e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-gradient-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-gradient-creation-expected.txt
@@ -7,38 +7,32 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Gradient on fill'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceLinearGradient linearGradient id='dynGrad'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGText text",
           "rect": [33, 23, 700, 189],
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'Gradient on fill'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourceLinearGradient linearGradient id='dynGrad'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-pattern-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-pattern-and-object-creation-expected.txt
index 3f9e25b..591a59b 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-pattern-and-object-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-pattern-and-object-creation-expected.txt
@@ -7,83 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Pattern on fill'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Pattern on fill/stroke'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Pattern on stroke'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [0, 15, 684, 362],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 15, 374, 127],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 130, 520, 130],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 247, 684, 130],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [8, 8, 17, 17],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [16, 16, 18, 18],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [8, 8, 17, 17],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [16, 16, 18, 18],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourcePattern pattern id='fillPattern'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourcePattern pattern id='strokePattern'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [0, 15, 684, 362],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [0, 15, 374, 127],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 130, 520, 130],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 247, 684, 130],
           "reason": "layoutObject insertion"
         },
         {
@@ -92,18 +27,75 @@
           "reason": "layoutObject insertion"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 130, 520, 130],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 130, 520, 130],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 15, 374, 127],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 15, 374, 127],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [16, 16, 18, 18],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [16, 16, 18, 18],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [8, 8, 17, 17],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [8, 8, 17, 17],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Pattern on fill'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Pattern on fill/stroke'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Pattern on stroke'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourcePattern pattern id='fillPattern'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourcePattern pattern id='strokePattern'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-pattern-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-pattern-creation-expected.txt
index 8cd9da9..6871365e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-pattern-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/js-late-pattern-creation-expected.txt
@@ -7,14 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Pattern on fill'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [8, 12, 17, 26],
-          "reason": "layoutObject insertion"
+          "object": "LayoutSVGText text",
+          "rect": [33, 23, 624, 189],
+          "reason": "style change"
         },
         {
           "object": "LayoutSVGRect rect",
@@ -22,23 +17,24 @@
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGResourcePattern pattern id='dynPattern'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRect rect",
+          "rect": [8, 12, 17, 26],
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [33, 23, 624, 189],
-          "reason": "style change"
+          "object": "InlineTextBox 'Pattern on fill'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGResourcePattern pattern id='dynPattern'",
+          "reason": "layoutObject insertion"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.txt
index 1606c354..0a5c120 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.txt
@@ -7,31 +7,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 8, 402, 404],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutEmbeddedObject object",
-          "rect": [209, 9, 200, 400],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGEllipse circle",
-          "rect": [89, 189, 40, 40],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGEllipse circle",
-          "rect": [169, 169, 80, 80],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRect rect",
           "rect": [9, 9, 400, 400],
           "reason": "location change"
@@ -47,18 +27,35 @@
           "reason": "full"
         },
         {
+          "object": "LayoutEmbeddedObject object",
+          "rect": [209, 9, 200, 400],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutView #document",
           "rect": [209, 9, 200, 400],
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGEllipse circle",
+          "rect": [169, 169, 80, 80],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGEllipse circle",
+          "rect": [89, 189, 40, 40],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-content-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-content-expected.txt
index ea299f1..ec025004 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-content-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 68, 402, 404],
           "reason": "forced by layout"
@@ -27,13 +22,15 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-content-with-resources-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-content-with-resources-expected.txt
index ed42cf8..6e83b35 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-content-with-resources-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-content-with-resources-expected.txt
@@ -7,23 +7,23 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 68, 402, 404],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGEllipse circle",
-          "rect": [9, 151, 100, 236],
+          "rect": [48, 108, 322, 322],
           "reason": "SVG resource change"
         },
         {
+          "object": "LayoutSVGRoot svg",
+          "rect": [48, 108, 322, 322],
+          "reason": "bounds change"
+        },
+        {
           "object": "LayoutSVGEllipse circle",
-          "rect": [48, 108, 322, 322],
+          "rect": [9, 151, 100, 236],
           "reason": "SVG resource change"
         },
         {
@@ -32,18 +32,15 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [48, 108, 322, 322],
-          "reason": "bounds change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-deep-shadow-tree-content-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-deep-shadow-tree-content-expected.txt
index 25ef814..3faaa11 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-deep-shadow-tree-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-deep-shadow-tree-content-expected.txt
@@ -7,88 +7,85 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 68, 402, 404],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGContainer g id='targetUse'",
-          "rect": [59, 269, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='targetUse'",
           "rect": [209, 269, 200, 200],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [59, 269, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
           "rect": [209, 269, 200, 200],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGContainer use id='targetUse'",
-          "rect": [34, 169, 50, 200],
+          "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [209, 269, 200, 200],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGRoot svg",
+          "rect": [209, 269, 200, 200],
+          "reason": "bounds change"
+        },
+        {
           "object": "LayoutSVGContainer use id='targetUse'",
           "rect": [109, 169, 200, 200],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [109, 169, 200, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='targetRect'",
           "rect": [59, 169, 150, 200],
           "reason": "incremental"
         },
         {
+          "object": "LayoutSVGContainer g id='targetUse'",
+          "rect": [59, 269, 50, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [59, 269, 50, 200],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [59, 269, 50, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [59, 269, 50, 200],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='targetUse'",
           "rect": [34, 169, 50, 200],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [109, 169, 200, 200],
+          "rect": [34, 169, 50, 200],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [59, 269, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [209, 269, 200, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [59, 269, 50, 200],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [209, 269, 200, 200],
-          "reason": "bounds change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-image-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-image-expected.txt
index b628262..2b7a1a69 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-image-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 68, 402, 404],
           "reason": "forced by layout"
@@ -27,13 +22,15 @@
           "reason": "incremental"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-inner-svg-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-inner-svg-expected.txt
index 14b6456..c1a6f48e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-inner-svg-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-inner-svg-expected.txt
@@ -7,23 +7,28 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 50, 402, 404],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGPath path",
-          "rect": [13, 205, 92, 91],
+          "rect": [27, 67, 364, 364],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [27, 67, 364, 364],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg",
+          "rect": [27, 67, 364, 364],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGPath path",
-          "rect": [27, 67, 364, 364],
+          "rect": [13, 205, 92, 91],
           "reason": "location change"
         },
         {
@@ -32,28 +37,20 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [27, 67, 364, 364],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg",
           "rect": [13, 205, 92, 91],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGViewportContainer svg",
-          "rect": [27, 67, 364, 364],
-          "reason": "location change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-shadow-tree-content-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-shadow-tree-content-expected.txt
index e731c58..018ea09 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-shadow-tree-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-shadow-tree-content-expected.txt
@@ -7,31 +7,36 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 68, 402, 404],
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutSVGContainer g id='targetUse'",
-          "rect": [59, 69, 150, 200],
+          "object": "LayoutSVGRoot svg",
+          "rect": [109, 69, 300, 400],
           "reason": "incremental"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [59, 269, 50, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
           "rect": [209, 269, 200, 200],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [209, 269, 200, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='targetRect'",
+          "rect": [59, 269, 150, 200],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGContainer g id='targetUse'",
+          "rect": [59, 69, 150, 200],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutSVGContainer use",
           "rect": [59, 69, 150, 200],
           "reason": "incremental"
@@ -42,48 +47,40 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [59, 269, 150, 200],
+          "object": "LayoutSVGRect rect id='targetRect1'",
+          "rect": [59, 69, 150, 200],
           "reason": "incremental"
         },
         {
+          "object": "LayoutSVGRect rect id='targetRect1'",
+          "rect": [59, 69, 150, 200],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGRect rect id='targetRect1'",
+          "rect": [59, 69, 150, 200],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [59, 269, 50, 200],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRect rect id='targetRect'",
           "rect": [59, 269, 50, 200],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect id='targetRect'",
-          "rect": [209, 269, 200, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='targetRect1'",
-          "rect": [59, 69, 150, 200],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGRect rect id='targetRect1'",
-          "rect": [59, 69, 150, 200],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGRect rect id='targetRect1'",
-          "rect": [59, 69, 150, 200],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [109, 69, 300, 400],
-          "reason": "incremental"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.txt
index d2cccc6..2a273d83 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 68, 402, 404],
           "reason": "forced by layout"
@@ -22,8 +17,13 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [59, 269, 50, 50],
+          "object": "LayoutSVGRoot svg",
+          "rect": [9, 69, 400, 400],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='targetSymbol'",
+          "rect": [9, 69, 400, 400],
           "reason": "location change"
         },
         {
@@ -37,23 +37,20 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [9, 69, 400, 400],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='targetSymbol'",
-          "rect": [9, 69, 400, 400],
+          "object": "LayoutSVGRect rect",
+          "rect": [59, 269, 50, 50],
           "reason": "location change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-use-on-symbol-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-use-on-symbol-expected.txt
index 3d03f5b8..e3884aa2 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-use-on-symbol-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-use-on-symbol-expected.txt
@@ -7,33 +7,38 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 50, 402, 404],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [18, 209, 82, 83],
+          "rect": [45, 85, 328, 328],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path",
+          "rect": [45, 85, 328, 328],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [45, 85, 328, 328],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
+          "rect": [45, 85, 328, 328],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [45, 85, 328, 328],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path",
           "rect": [18, 209, 82, 83],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGPath path",
-          "rect": [45, 85, 328, 328],
+          "rect": [18, 209, 82, 83],
           "reason": "location change"
         },
         {
@@ -42,28 +47,20 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [45, 85, 328, 328],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
           "rect": [18, 209, 82, 83],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
-          "rect": [45, 85, 328, 328],
-          "reason": "location change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt
index 9ebe4e2..b145de4 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt
@@ -7,23 +7,33 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow div id='contentBox'",
           "rect": [8, 50, 402, 404],
           "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [13, 205, 92, 91],
+          "rect": [27, 67, 364, 364],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutSVGPath path",
+          "rect": [27, 67, 364, 364],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [27, 67, 364, 364],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
+          "rect": [27, 67, 364, 364],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGContainer use",
-          "rect": [27, 67, 364, 364],
+          "rect": [13, 205, 92, 91],
           "reason": "bounds change"
         },
         {
@@ -32,38 +42,25 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGPath path",
-          "rect": [27, 67, 364, 364],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [13, 205, 92, 91],
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [27, 67, 364, 364],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
           "rect": [13, 205, 92, 91],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGViewportContainer svg id='gamesBorder'",
-          "rect": [27, 67, 364, 364],
-          "reason": "location change"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
index 8e0b8fdc..76cc60e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
@@ -7,36 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\n'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'index'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'pservers-pattern-01-b \u2190'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox '\u2192 script-handle-01-b'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow DIV class='linkbar'",
           "rect": [24, 1010, 737, 22],
           "reason": "bounds change"
@@ -52,13 +22,35 @@
           "reason": "style change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineFlowBox",
+          "reason": "style change"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\n'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'index'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'pservers-pattern-01-b \u2190'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox '\u2192 script-handle-01-b'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-dom-removal-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-dom-removal-expected.txt
index 50dbebb..0b5bfb2 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-dom-removal-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-dom-removal-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGContainer g id='objectsToRemove'",
           "rect": [0, 0, 216, 128],
           "reason": "became invisible"
@@ -22,18 +17,21 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [0, 0, 20, 20],
-          "reason": "layoutObject removal"
-        },
-        {
           "object": "LayoutSVGText text",
           "rect": [50, 111, 166, 17],
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutSVGRect rect",
+          "rect": [0, 0, 20, 20],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-repaint-including-stroke-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-repaint-including-stroke-expected.txt
index 231b84a..5b5bcabe 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-repaint-including-stroke-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-repaint-including-stroke-expected.txt
@@ -7,53 +7,49 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Repaint me!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Repaint me!'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [30, 0, 404, 58],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [80, 0, 551, 114],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [30, 0, 404, 58],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
           "rect": [80, 0, 551, 114],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGText text id='bounce'",
-          "rect": [30, 0, 404, 58],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='bounce'",
           "rect": [80, 0, 551, 114],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [30, 0, 404, 58],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [30, 0, 404, 58],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text id='bounce'",
+          "rect": [30, 0, 404, 58],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Repaint me!'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Repaint me!'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-xy-updates-SVGList-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-xy-updates-SVGList-expected.txt
index 831b0a0..b9caa38 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-xy-updates-SVGList-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-xy-updates-SVGList-expected.txt
@@ -7,53 +7,49 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Passes, if text is at 200x20'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Passes, if text is at 200x20'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [18, 194, 170, 17],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [208, 14, 170, 17],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGRoot svg:svg",
-          "rect": [18, 194, 170, 17],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg:svg",
           "rect": [208, 14, 170, 17],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGText text id='ttt'",
-          "rect": [18, 194, 170, 17],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGText text id='ttt'",
           "rect": [208, 14, 170, 17],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [18, 194, 170, 17],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGRoot svg:svg",
+          "rect": [18, 194, 170, 17],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text id='ttt'",
+          "rect": [18, 194, 170, 17],
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Passes, if text is at 200x20'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Passes, if text is at 200x20'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-clipped-hit-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-clipped-hit-expected.txt
index 22ab28ff..427bf4e9 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-clipped-hit-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-clipped-hit-expected.txt
@@ -7,21 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Passed'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [90, 116, 64, 17],
           "reason": "layoutObject removal"
         },
         {
+          "object": "LayoutSVGText text id='status'",
+          "rect": [90, 116, 64, 17],
+          "reason": "full"
+        },
+        {
           "object": "LayoutSVGInlineText #text",
           "rect": [90, 116, 44, 17],
           "reason": "layoutObject insertion"
@@ -32,18 +27,19 @@
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutSVGText text id='status'",
-          "rect": [90, 116, 64, 17],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Passed'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-detach-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-detach-expected.txt
index fad7a20..c47f915 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-detach-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-detach-expected.txt
@@ -7,33 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'use'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'use'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'use'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGContainer g id='use'",
+          "rect": [210, 58, 44, 64],
           "reason": "location change"
         },
         {
@@ -47,8 +22,18 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGContainer g id='use'",
-          "rect": [210, 58, 44, 64],
+          "object": "LayoutSVGContainer use",
+          "rect": [210, 58, 44, 37],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [210, 58, 44, 37],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [210, 58, 44, 37],
           "reason": "location change"
         },
         {
@@ -58,12 +43,77 @@
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [218, 94, 28, 28],
+          "rect": [210, 58, 44, 37],
           "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGContainer use",
           "rect": [210, 58, 44, 37],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 37],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 37],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 37],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 37],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 37],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [210, 58, 44, 37],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 37],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 37],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 37],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 37],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 37],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGText text id='use_text'",
+          "rect": [210, 58, 44, 37],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [218, 94, 28, 28],
           "reason": "location change"
         },
         {
@@ -73,7 +123,12 @@
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [210, 58, 44, 37],
+          "rect": [218, 94, 28, 28],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [218, 94, 28, 28],
           "reason": "layoutObject removal"
         },
         {
@@ -83,38 +138,18 @@
         },
         {
           "object": "LayoutSVGContainer use",
-          "rect": [210, 58, 44, 37],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [218, 94, 28, 28],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [210, 58, 44, 37],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer use",
           "rect": [218, 94, 28, 28],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGContainer use",
-          "rect": [210, 58, 44, 37],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
+          "object": "LayoutSVGEllipse circle id='use_circle'",
           "rect": [218, 94, 28, 28],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGEllipse circle id='use_circle'",
           "rect": [218, 94, 28, 28],
-          "reason": "layoutObject removal"
+          "reason": "location change"
         },
         {
           "object": "LayoutSVGEllipse circle id='use_circle'",
@@ -129,7 +164,7 @@
         {
           "object": "LayoutSVGEllipse circle id='use_circle'",
           "rect": [218, 94, 28, 28],
-          "reason": "location change"
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGEllipse circle id='use_circle'",
@@ -137,113 +172,63 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGEllipse circle id='use_circle'",
-          "rect": [218, 94, 28, 28],
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'use'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'use'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'use'",
           "reason": "location change"
         },
         {
           "object": "LayoutSVGHiddenContainer g id='use'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer g id='use'",
-          "rect": [0, 0, 0, 0],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGHiddenContainer g id='use'",
-          "rect": [0, 0, 0, 0],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 37],
+          "object": "LayoutSVGHiddenContainer g id='use'",
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 37],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 37],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 37],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 37],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [210, 58, 44, 37],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 37],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 37],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 37],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 37],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 37],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGText text id='use_text'",
-          "rect": [210, 58, 44, 37],
-          "reason": "location change"
-        },
-        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-setAttribute-crash-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-setAttribute-crash-expected.txt
index c518e67..db2efe1 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-setAttribute-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-setAttribute-crash-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow body",
+          "rect": [8, 8, 784, 203],
+          "reason": "invalidate paint rectangle"
         },
         {
           "object": "LayoutBlockFlow body",
@@ -17,27 +17,12 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutBlockFlow body",
-          "rect": [8, 8, 784, 203],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutSVGContainer svg:use id='use'",
           "rect": [33, 33, 50, 50],
           "reason": "full"
         },
         {
           "object": "LayoutSVGEllipse svg:circle id='circle'",
-          "rect": [53, 53, 10, 10],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGEllipse svg:circle id='circle'",
-          "rect": [8, 8, 25, 25],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGEllipse svg:circle id='circle'",
           "rect": [33, 33, 50, 50],
           "reason": "location change"
         },
@@ -48,22 +33,34 @@
         },
         {
           "object": "LayoutSVGViewportContainer svg id='symbol'",
+          "rect": [33, 33, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGEllipse svg:circle id='circle'",
+          "rect": [8, 8, 25, 25],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGEllipse svg:circle id='circle'",
           "rect": [53, 53, 10, 10],
           "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGViewportContainer svg id='symbol'",
-          "rect": [33, 33, 50, 50],
-          "reason": "location change"
+          "rect": [53, 53, 10, 10],
+          "reason": "layoutObject removal"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/filters/filter-refresh-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/filters/filter-refresh-expected.txt
deleted file mode 100644
index 2c36e844..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/svg/filters/filter-refresh-expected.txt
+++ /dev/null
@@ -1,244 +0,0 @@
-CONSOLE WARNING: SVG's SMIL animations (<animate>, <set>, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead.
-{
-  "bounds": [800, 600],
-  "children": [
-    {
-      "bounds": [800, 600],
-      "contentsOpaque": true,
-      "drawsContent": true,
-      "paintInvalidations": [
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 130, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 170, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [140, 60, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 36, 36],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 10, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate1'",
-          "rect": [140, 60, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate2'",
-          "rect": [140, 140, 36, 36],
-          "reason": "style change"
-        }
-      ]
-    }
-  ]
-}
-
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/repaint/add-background-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/repaint/add-background-property-on-root-expected.txt
index 669d048e..652097f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/repaint/add-background-property-on-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/repaint/add-background-property-on-root-expected.txt
@@ -18,7 +18,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/repaint/outline-offset-text-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/repaint/outline-offset-text-expected.txt
index 6aa1093..0c1467b 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/repaint/outline-offset-text-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/repaint/outline-offset-text-expected.txt
@@ -7,26 +7,26 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Foo'",
-          "rect": [0, 0, 0, 0],
-          "reason": "outline"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [103, 25, 160, 114],
           "reason": "outline"
         },
         {
+          "object": "LayoutSVGText text",
+          "rect": [103, 25, 160, 114],
+          "reason": "full"
+        },
+        {
           "object": "LayoutSVGInlineText #text",
           "rect": [63, 25, 160, 114],
           "reason": "outline"
         },
         {
+          "object": "LayoutSVGText text",
+          "rect": [63, 25, 160, 114],
+          "reason": "full"
+        },
+        {
           "object": "LayoutSVGRoot svg",
           "rect": [118, 40, 130, 84],
           "reason": "bounds change"
@@ -37,23 +37,19 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [103, 25, 160, 114],
+          "object": "InlineTextBox 'Foo'",
           "reason": "full"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [63, 25, 160, 114],
+          "object": "InlineTextBox 'Foo'",
+          "reason": "outline"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/repaint/remove-background-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/repaint/remove-background-property-on-root-expected.txt
index 669d048e..652097f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/repaint/remove-background-property-on-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/repaint/remove-background-property-on-root-expected.txt
@@ -18,7 +18,6 @@
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
index 876339f..b08adaf 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutSVGContainer g",
           "rect": [9, 13, 48, 28],
           "reason": "bounds change"
@@ -37,13 +27,19 @@
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/repaint/repaint-non-scaling-stroke-text-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
index 876339f..b08adaf 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Hello'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutSVGContainer g",
           "rect": [9, 13, 48, 28],
           "reason": "bounds change"
@@ -37,13 +27,19 @@
           "reason": "style change"
         },
         {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Hello'",
+          "reason": "style change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/repaint/text-mask-update-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/repaint/text-mask-update-expected.txt
index fed0dfd7..1cf0fec 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/repaint/text-mask-update-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/repaint/text-mask-update-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [10, 32, 43, 22],
-          "reason": "layoutObject removal"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 2, 46, 22],
           "reason": "layoutObject insertion"
@@ -32,16 +17,6 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [10, 32, 43, 18],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [10, 32, 43, 18],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [10, 2, 46, 22],
           "reason": "bounds change"
@@ -52,18 +27,39 @@
           "reason": "style change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [10, 32, 43, 22],
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "LayoutSVGText text id='text2'",
           "rect": [10, 32, 43, 22],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGRect rect",
+          "rect": [10, 32, 43, 18],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [10, 32, 43, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/append-text-node-to-tspan-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/text/append-text-node-to-tspan-expected.txt
index 3009b96..a6d331d 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/append-text-node-to-tspan-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/append-text-node-to-tspan-expected.txt
@@ -7,51 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'SS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 63, 306, 374],
           "reason": "location change"
@@ -62,13 +17,47 @@
           "reason": "style change"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'SS'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/ems-display-none-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/text/ems-display-none-expected.txt
index a43fb39..c3b0735 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/ems-display-none-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/ems-display-none-expected.txt
@@ -7,31 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Two lines of text should be visible.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Two lines of text should be visible.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGContainer g",
           "rect": [50, 54, 571, 85],
           "reason": "bounds change"
@@ -72,8 +47,27 @@
           "reason": "layoutObject insertion"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Two lines of text should be visible.'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Two lines of text should be visible.'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/exs-display-none-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/text/exs-display-none-expected.txt
index aed38db..4135e42 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/exs-display-none-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/exs-display-none-expected.txt
@@ -7,31 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Two lines of text should be visible.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "InlineTextBox 'Two lines of text should be visible.'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGContainer g",
           "rect": [50, 50, 571, 81],
           "reason": "bounds change"
@@ -72,8 +47,27 @@
           "reason": "layoutObject insertion"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Two lines of text should be visible.'",
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "InlineTextBox 'Two lines of text should be visible.'",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/modify-text-node-in-tspan-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/text/modify-text-node-in-tspan-expected.txt
index dad6f8d..fbf451b 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/modify-text-node-in-tspan-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/modify-text-node-in-tspan-expected.txt
@@ -7,51 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PA'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 63, 306, 374],
           "reason": "full"
@@ -62,13 +17,47 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PA'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/remove-text-node-from-tspan-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/text/remove-text-node-from-tspan-expected.txt
index 3084d4d..4210acc 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/remove-text-node-from-tspan-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/remove-text-node-from-tspan-expected.txt
@@ -7,74 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ' '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'FAIL'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 63, 306, 374],
-          "reason": "layoutObject removal"
+          "reason": "bounds change"
         },
         {
           "object": "LayoutSVGInlineText #text",
@@ -99,7 +34,7 @@
         {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 63, 306, 374],
-          "reason": "bounds change"
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGRoot (positioned) svg",
@@ -127,13 +62,63 @@
           "reason": "full"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ' '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'FAIL'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/remove-tspan-from-text-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/text/remove-tspan-from-text-expected.txt
index 2452873..ffc89f5 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/remove-tspan-from-text-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/remove-tspan-from-text-expected.txt
@@ -7,46 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox ''",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'FAIL'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [10, 63, 306, 254],
           "reason": "layoutObject removal"
@@ -62,13 +22,43 @@
           "reason": "full"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ''",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'FAIL'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/text-rescale-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/text/text-rescale-expected.txt
index be8bf66..75ad5fcd 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/text-rescale-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/text-rescale-expected.txt
@@ -7,138 +7,18 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRoot (positioned) svg",
+          "rect": [0, 13, 402, 187],
           "reason": "bounds change"
         },
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGRoot (positioned) svg",
+          "rect": [0, 0, 402, 163],
           "reason": "bounds change"
         },
         {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [0, 0, 1, 1],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [210, 13, 100, 47],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [6, 3, 4, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow P",
-          "rect": [210, 113, 100, 47],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='text1g'",
-          "rect": [0, 0, 1, 1],
+          "object": "LayoutSVGContainer g id='text2g'",
+          "rect": [0, 63, 402, 100],
           "reason": "full"
         },
         {
@@ -147,24 +27,64 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSVGContainer g id='text2g'",
-          "rect": [0, 63, 402, 100],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGContainer g id='text3g'",
-          "rect": [0, 3, 14, 4],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGContainer g id='text3g'",
           "rect": [0, 113, 402, 87],
           "reason": "full"
         },
         {
-          "object": "LayoutSVGForeignObject foreignObject",
-          "rect": [0, 0, 1, 1],
-          "reason": "location change"
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 114, 194, 45],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 114, 194, 45],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 114, 194, 45],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [0, 114, 194, 45],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 114, 194, 45],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 64, 194, 45],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 14, 194, 45],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 14, 194, 45],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 14, 194, 45],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [0, 14, 194, 45],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 14, 194, 45],
+          "reason": "forced by layout"
         },
         {
           "object": "LayoutSVGForeignObject foreignObject",
@@ -173,67 +93,17 @@
         },
         {
           "object": "LayoutSVGForeignObject foreignObject",
-          "rect": [6, 3, 4, 4],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGForeignObject foreignObject",
           "rect": [210, 113, 100, 87],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 14, 194, 45],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 14, 194, 45],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 14, 194, 45],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [310, 14, 92, 45],
+          "object": "LayoutBlockFlow P",
+          "rect": [210, 113, 100, 47],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 3, 7, 2],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 114, 194, 45],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 3, 7, 2],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 114, 194, 45],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 3, 7, 2],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 114, 194, 45],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [9, 3, 5, 2],
+          "object": "LayoutBlockFlow P",
+          "rect": [210, 13, 100, 47],
           "reason": "location change"
         },
         {
@@ -242,44 +112,14 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg",
-          "rect": [0, 0, 402, 163],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot (positioned) svg",
-          "rect": [0, 13, 402, 187],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 14, 194, 45],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 3, 7, 2],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 114, 194, 45],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGText text",
-          "rect": [0, 14, 194, 45],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [310, 14, 92, 45],
+          "rect": [310, 114, 92, 45],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [0, 64, 194, 45],
-          "reason": "forced by layout"
+          "object": "LayoutSVGViewportContainer svg",
+          "rect": [310, 114, 92, 45],
+          "reason": "location change"
         },
         {
           "object": "LayoutSVGText text",
@@ -287,53 +127,18 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [0, 3, 7, 2],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 114, 194, 45],
-          "reason": "forced by layout"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [9, 3, 5, 2],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [310, 14, 92, 45],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [310, 114, 92, 45],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg",
           "rect": [310, 14, 92, 45],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGViewportContainer svg",
-          "rect": [9, 3, 5, 2],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg",
-          "rect": [310, 114, 92, 45],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 1, 1],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [210, 14, 92, 45],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [6, 3, 4, 2],
+          "rect": [310, 14, 92, 45],
           "reason": "location change"
         },
         {
@@ -342,73 +147,232 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutText #text",
+          "rect": [210, 14, 92, 45],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='text3g'",
+          "rect": [0, 3, 14, 4],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 3, 7, 2],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 3, 7, 2],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 3, 7, 2],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [0, 3, 7, 2],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 3, 7, 2],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [9, 3, 5, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [9, 3, 5, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg",
+          "rect": [9, 3, 5, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGForeignObject foreignObject",
+          "rect": [6, 3, 4, 4],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [6, 3, 4, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [6, 3, 4, 2],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow P",
+          "rect": [0, 0, 1, 1],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='text1g'",
+          "rect": [0, 0, 1, 1],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGForeignObject foreignObject",
+          "rect": [0, 0, 1, 1],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutText #text",
+          "rect": [0, 0, 1, 1],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/text-selection-text-05-t-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/text/text-selection-text-05-t-expected.txt
index 6022027b..b3207b17 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/text-selection-text-05-t-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/text-selection-text-05-t-expected.txt
@@ -7,643 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox '$Revision: 1.8 $'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1.x 1.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1.x 2.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1.x 4.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '1234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2.x 1.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2.x 2.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '2.x 4.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '234'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '3'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4.x 1.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4.x 2.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox '4.x 4.y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'end'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'middle'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'start'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'text-anchor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'text-anchor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "InlineTextBox 'text-anchor'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
-          "rect": [16, 91, 74, 33],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 141, 74, 33],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 191, 74, 33],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 241, 74, 33],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 291, 74, 33],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 341, 74, 33],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 391, 74, 33],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 441, 74, 33],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [16, 491, 74, 33],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [188, 13, 124, 32],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [226, 36, 48, 33],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [250, 101, 34, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 151, 59, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 201, 111, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [250, 235, 34, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 285, 59, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 335, 43, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [250, 385, 34, 45],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 435, 59, 29],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [266, 485, 111, 29],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [355, 13, 124, 32],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [378, 36, 77, 33],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [398, 101, 37, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 151, 61, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 201, 102, 21],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [411, 235, 36, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 285, 61, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 335, 44, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [411, 385, 28, 45],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 435, 61, 29],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [428, 485, 102, 29],
+          "rect": [16, 523, 441, 76],
           "reason": "selection"
         },
         {
@@ -653,47 +18,32 @@
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [563, 36, 41, 33],
+          "rect": [355, 13, 124, 32],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [550, 101, 34, 21],
+          "rect": [188, 13, 124, 32],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [590, 151, 62, 21],
+          "rect": [266, 485, 111, 29],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [590, 201, 94, 21],
+          "rect": [266, 201, 111, 21],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [575, 235, 35, 54],
+          "rect": [428, 485, 102, 29],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [590, 285, 62, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [590, 335, 44, 54],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [565, 385, 27, 45],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [590, 435, 62, 29],
+          "rect": [428, 201, 102, 21],
           "reason": "selection"
         },
         {
@@ -703,222 +53,732 @@
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [16, 523, 441, 76],
+          "rect": [590, 201, 94, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [378, 36, 77, 33],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 491, 74, 33],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 441, 74, 33],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 391, 74, 33],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 341, 74, 33],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 291, 74, 33],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 241, 74, 33],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 191, 74, 33],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 141, 74, 33],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [16, 91, 74, 33],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [590, 285, 62, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [590, 435, 62, 29],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [590, 151, 62, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [428, 285, 61, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [428, 435, 61, 29],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [428, 151, 61, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [266, 285, 59, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [266, 435, 59, 29],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [266, 151, 59, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [226, 36, 48, 33],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [590, 335, 44, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [428, 335, 44, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [266, 335, 43, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [563, 36, 41, 33],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [398, 101, 37, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [411, 235, 36, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [575, 235, 35, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [250, 235, 34, 54],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [250, 385, 34, 45],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [550, 101, 34, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [250, 101, 34, 21],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [411, 385, 28, 45],
+          "reason": "selection"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [565, 385, 27, 45],
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '$Revision: 1.8 $'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1.x 1.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1.x 2.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1.x 4.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '1234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2.x 1.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2.x 2.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '2.x 4.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '234'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '3'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4.x 1.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4.x 2.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox '4.x 4.y'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'end'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'middle'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'start'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'text-anchor'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'text-anchor'",
+          "reason": "selection"
+        },
+        {
+          "object": "InlineTextBox 'text-anchor'",
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutSVGText text id='revision'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/text-viewbox-rescale-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/text/text-viewbox-rescale-expected.txt
index 9a01f0f..8d0d0e9 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/text-viewbox-rescale-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/text-viewbox-rescale-expected.txt
@@ -7,123 +7,109 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS '",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'PASS'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [59, 43, 95, 23],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [59, 43, 95, 23],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [59, 43, 95, 23],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGRoot (positioned) svg",
           "rect": [59, 43, 95, 123],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGTSpan tspan",
-          "rect": [59, 43, 95, 23],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
           "rect": [59, 143, 95, 23],
           "reason": "full"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [59, 43, 95, 23],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGText text",
           "rect": [59, 143, 95, 23],
           "reason": "full"
         },
         {
-          "object": "LayoutSVGViewportContainer svg id='inner1'",
-          "rect": [59, 43, 95, 23],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg id='inner2'",
           "rect": [59, 143, 95, 23],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [59, 43, 95, 23],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [59, 43, 95, 23],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [59, 43, 95, 23],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [59, 43, 95, 23],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [59, 43, 95, 23],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='inner1'",
+          "rect": [59, 43, 95, 23],
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS '",
+          "reason": "bounds change"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'PASS'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/tspan-dynamic-positioning-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/text/tspan-dynamic-positioning-expected.txt
index dd43f0c..8dd943c 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/tspan-dynamic-positioning-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/tspan-dynamic-positioning-expected.txt
@@ -7,53 +7,38 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This text should be at visible at 200,200'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'This text should be at visible at 200,200'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [20, 6, 256, 17],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [200, 186, 256, 17],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [20, 6, 256, 17],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
           "rect": [200, 186, 256, 17],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGTSpan tspan id='ts'",
-          "rect": [20, 6, 256, 17],
+          "rect": [200, 186, 256, 17],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGText text",
+          "rect": [200, 186, 256, 17],
+          "reason": "forced by layout"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [20, 6, 256, 17],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [20, 6, 256, 17],
+          "reason": "bounds change"
+        },
+        {
           "object": "LayoutSVGTSpan tspan id='ts'",
-          "rect": [200, 186, 256, 17],
+          "rect": [20, 6, 256, 17],
           "reason": "full"
         },
         {
@@ -62,18 +47,27 @@
           "reason": "forced by layout"
         },
         {
-          "object": "LayoutSVGText text",
-          "rect": [200, 186, 256, 17],
-          "reason": "forced by layout"
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineFlowBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This text should be at visible at 200,200'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This text should be at visible at 200,200'",
+          "reason": "bounds change"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/transforms/animated-path-inside-transformed-html-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/transforms/animated-path-inside-transformed-html-expected.txt
index 332951b..a34c9ba 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/transforms/animated-path-inside-transformed-html-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/transforms/animated-path-inside-transformed-html-expected.txt
@@ -6,28 +6,73 @@
       "contentsOpaque": true,
       "drawsContent": true,
       "backgroundColor": "#FFFFFF",
-      "repaintRects": [
-        [355, 126, 103, 101],
-        [352, 395, 98, 99],
-        [246, 104, 119, 28],
-        [246, 104, 119, 28],
-        [203, 334, 121, 44],
-        [203, 334, 121, 44],
-        [187, 104, 310, 390],
-        [111, 83, 101, 100],
-        [90, 206, 98, 98],
-        [90, 83, 275, 248]
-      ],
-      "paintInvalidationClients": [
-        "RootInlineBox",
-        "InlineTextBox 'This is some text'",
-        "LayoutSVGRoot svg",
-        "LayoutSVGRect rect id='rect'",
-        "LayoutSVGText text id='text'",
-        "RootInlineBox",
-        "LayoutSVGInlineText #text",
-        "InlineTextBox 'This is some text'",
-        "LayoutSVGImage image id='image'"
+      "paintInvalidations": [
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [187, 104, 310, 390],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [90, 83, 275, 248],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [203, 334, 121, 44],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text id='text'",
+          "rect": [203, 334, 121, 44],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [246, 104, 119, 28],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text id='text'",
+          "rect": [246, 104, 119, 28],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [355, 126, 103, 101],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [111, 83, 101, 100],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGImage image id='image'",
+          "rect": [352, 395, 98, 99],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGImage image id='image'",
+          "rect": [90, 206, 98, 98],
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This is some text'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'This is some text'",
+          "reason": "bounds change"
+        },
+        {
+          "object": "RootInlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
+          "reason": "full"
+        }
       ]
     }
   ]
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/transform-focus-ring-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/transforms/transform-focus-ring-repaint-expected.txt
index 1fda962..37b44c4 100644
--- a/third_party/WebKit/LayoutTests/platform/win/transforms/transform-focus-ring-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/transforms/transform-focus-ring-repaint-expected.txt
@@ -15,13 +15,13 @@
           "paintInvalidations": [
             {
               "object": "LayoutBlockFlow (positioned) DIV id='target'",
-              "rect": [0, 0, 200, 200],
-              "reason": "full"
+              "rect": [0, 0, 402, 542],
+              "reason": "style change"
             },
             {
               "object": "LayoutBlockFlow (positioned) DIV id='target'",
-              "rect": [0, 0, 402, 542],
-              "reason": "style change"
+              "rect": [0, 0, 200, 200],
+              "reason": "full"
             }
           ]
         },
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt
index 03cafad..f290e5c9f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt
@@ -13,419 +13,337 @@
           "drawsContent": true,
           "paintInvalidations": [
             {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '\n'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox '  Text'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
               "object": "LayoutText #text",
               "rect": [0, 0, 48, 656],
               "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '\n'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox '  Text'",
+              "reason": "style change"
             }
           ],
           "children": [
@@ -438,419 +356,337 @@
                   "drawsContent": true,
                   "paintInvalidations": [
                     {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '\n'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox '  Text'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
                       "object": "LayoutText #text",
                       "rect": [0, 0, 48, 656],
                       "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '\n'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox '  Text'",
+                      "reason": "style change"
                     }
                   ]
                 }
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt
index 2cce508f..c3f0b2c 100644
--- a/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'findme'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutText #text",
+          "rect": [282, 36, 46, 17],
           "reason": "full"
         },
         {
-          "object": "LayoutText #text",
-          "rect": [282, 36, 46, 17],
+          "object": "InlineTextBox 'findme'",
           "reason": "full"
         }
       ],
@@ -25,63 +24,18 @@
           "drawsContent": true,
           "paintInvalidations": [
             {
-              "object": "InlineTextBox 'Can you findme in this boring text?'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'Findme in a typewriter!'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'Findme on a path! Did you findme?'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'findme'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'findme'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'findme'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
-              "object": "InlineTextBox 'findme'",
-              "rect": [0, 0, 0, 0],
-              "reason": "full"
-            },
-            {
               "object": "LayoutSVGInlineText #text",
               "rect": [10, 72, 228, 18],
               "reason": "full"
             },
             {
               "object": "LayoutSVGInlineText #text",
-              "rect": [10, 127, 138, 12],
-              "reason": "full"
-            },
-            {
-              "object": "LayoutSVGInlineText #text",
               "rect": [20, 160, 202, 72],
               "reason": "full"
             },
             {
-              "object": "LayoutText #text",
-              "rect": [90, 0, 46, 17],
-              "reason": "full"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [225, 0, 46, 17],
+              "object": "LayoutSVGInlineText #text",
+              "rect": [10, 127, 138, 12],
               "reason": "full"
             },
             {
@@ -91,8 +45,46 @@
             },
             {
               "object": "LayoutText #text",
+              "rect": [225, 0, 46, 17],
+              "reason": "full"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [90, 0, 46, 17],
+              "reason": "full"
+            },
+            {
+              "object": "LayoutText #text",
               "rect": [52, 18, 46, 17],
               "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'Can you findme in this boring text?'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'Findme in a typewriter!'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'Findme on a path! Did you findme?'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'findme'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'findme'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'findme'",
+              "reason": "full"
+            },
+            {
+              "object": "InlineTextBox 'findme'",
+              "reason": "full"
             }
           ],
           "children": [
@@ -105,63 +97,18 @@
                   "drawsContent": true,
                   "paintInvalidations": [
                     {
-                      "object": "InlineTextBox 'Can you findme in this boring text?'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'Findme in a typewriter!'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'Findme on a path! Did you findme?'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'findme'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'findme'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'findme'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "InlineTextBox 'findme'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "full"
-                    },
-                    {
                       "object": "LayoutSVGInlineText #text",
                       "rect": [10, 72, 228, 18],
                       "reason": "full"
                     },
                     {
                       "object": "LayoutSVGInlineText #text",
-                      "rect": [10, 127, 138, 12],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "LayoutSVGInlineText #text",
                       "rect": [20, 160, 202, 72],
                       "reason": "full"
                     },
                     {
-                      "object": "LayoutText #text",
-                      "rect": [90, 0, 46, 17],
-                      "reason": "full"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [225, 0, 46, 17],
+                      "object": "LayoutSVGInlineText #text",
+                      "rect": [10, 127, 138, 12],
                       "reason": "full"
                     },
                     {
@@ -171,8 +118,46 @@
                     },
                     {
                       "object": "LayoutText #text",
+                      "rect": [225, 0, 46, 17],
+                      "reason": "full"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [90, 0, 46, 17],
+                      "reason": "full"
+                    },
+                    {
+                      "object": "LayoutText #text",
                       "rect": [52, 18, 46, 17],
                       "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'Can you findme in this boring text?'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'Findme in a typewriter!'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'Findme on a path! Did you findme?'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'findme'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'findme'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'findme'",
+                      "reason": "full"
+                    },
+                    {
+                      "object": "InlineTextBox 'findme'",
+                      "reason": "full"
                     }
                   ]
                 }
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt
index 16e4000..442d19b0 100644
--- a/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt
@@ -13,123 +13,8 @@
           "drawsContent": true,
           "paintInvalidations": [
             {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
-              "object": "InlineTextBox 'CONTENT'",
-              "rect": [0, 0, 0, 0],
-              "reason": "style change"
-            },
-            {
               "object": "LayoutText #text",
-              "rect": [0, -49, 75, 17],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, -31, 75, 17],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, -13, 75, 17],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 5, 75, 17],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 23, 75, 17],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 41, 75, 17],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 59, 75, 17],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 77, 75, 17],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 95, 75, 17],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 113, 75, 17],
-              "reason": "style change"
-            },
-            {
-              "object": "LayoutText #text",
-              "rect": [0, 131, 75, 17],
+              "rect": [0, 167, 75, 17],
               "reason": "style change"
             },
             {
@@ -139,7 +24,109 @@
             },
             {
               "object": "LayoutText #text",
-              "rect": [0, 167, 75, 17],
+              "rect": [0, 131, 75, 17],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 113, 75, 17],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 95, 75, 17],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 77, 75, 17],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 59, 75, 17],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 41, 75, 17],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 23, 75, 17],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, 5, 75, 17],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, -13, 75, 17],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, -31, 75, 17],
+              "reason": "style change"
+            },
+            {
+              "object": "LayoutText #text",
+              "rect": [0, -49, 75, 17],
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
+              "reason": "style change"
+            },
+            {
+              "object": "InlineTextBox 'CONTENT'",
               "reason": "style change"
             }
           ],
@@ -153,123 +140,8 @@
                   "drawsContent": true,
                   "paintInvalidations": [
                     {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "InlineTextBox 'CONTENT'",
-                      "rect": [0, 0, 0, 0],
-                      "reason": "style change"
-                    },
-                    {
                       "object": "LayoutText #text",
-                      "rect": [0, 0, 75, 17],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 18, 75, 17],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 36, 75, 17],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 54, 75, 17],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 72, 75, 17],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 90, 75, 17],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 108, 75, 17],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 126, 75, 17],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 144, 75, 17],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 162, 75, 17],
-                      "reason": "style change"
-                    },
-                    {
-                      "object": "LayoutText #text",
-                      "rect": [0, 180, 75, 17],
+                      "rect": [0, 216, 75, 17],
                       "reason": "style change"
                     },
                     {
@@ -279,7 +151,109 @@
                     },
                     {
                       "object": "LayoutText #text",
-                      "rect": [0, 216, 75, 17],
+                      "rect": [0, 180, 75, 17],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 162, 75, 17],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 144, 75, 17],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 126, 75, 17],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 108, 75, 17],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 90, 75, 17],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 72, 75, 17],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 54, 75, 17],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 36, 75, 17],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 18, 75, 17],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "LayoutText #text",
+                      "rect": [0, 0, 75, 17],
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
+                      "reason": "style change"
+                    },
+                    {
+                      "object": "InlineTextBox 'CONTENT'",
                       "reason": "style change"
                     }
                   ]
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/repaint/japanese-rl-selection-clear-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/fast/repaint/japanese-rl-selection-clear-expected.txt
index fe64c67..1a5cf6b 100644
--- a/third_party/WebKit/LayoutTests/platform/win7/fast/repaint/japanese-rl-selection-clear-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win7/fast/repaint/japanese-rl-selection-clear-expected.txt
@@ -7,83 +7,68 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [397, 123, 376, 395],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox '\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3059\u304B\u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC'",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [397, 123, 376, 395],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/repaint/japanese-rl-selection-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/fast/repaint/japanese-rl-selection-repaint-expected.txt
index 831a6de0..08db35d 100644
--- a/third_party/WebKit/LayoutTests/platform/win7/fast/repaint/japanese-rl-selection-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win7/fast/repaint/japanese-rl-selection-repaint-expected.txt
@@ -7,73 +7,60 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutText #text",
+          "rect": [429, 23, 344, 544],
+          "reason": "selection"
+        },
+        {
           "object": "InlineTextBox '\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B\u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u8A2A\u554F\u3057'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "InlineTextBox '\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18'",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 0, 0],
           "reason": "selection"
         },
         {
           "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 0, 0],
-          "reason": "selection"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [429, 23, 344, 544],
           "reason": "selection"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/win7/svg/custom/use-disappears-after-style-update-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/svg/custom/use-disappears-after-style-update-expected.txt
deleted file mode 100644
index 8536af81..0000000
--- a/third_party/WebKit/LayoutTests/platform/win7/svg/custom/use-disappears-after-style-update-expected.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-{
-  "bounds": [800, 600],
-  "children": [
-    {
-      "bounds": [800, 600],
-      "contentsOpaque": true,
-      "drawsContent": true,
-      "paintInvalidations": [
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [50, 10, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 10, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 10, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 10, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 10, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 10, 30, 30],
-          "reason": "location change"
-        }
-      ]
-    }
-  ]
-}
-
diff --git a/third_party/WebKit/LayoutTests/platform/win7/svg/filters/filter-refresh-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/svg/filters/filter-refresh-expected.txt
deleted file mode 100644
index 3b418f8..0000000
--- a/third_party/WebKit/LayoutTests/platform/win7/svg/filters/filter-refresh-expected.txt
+++ /dev/null
@@ -1,244 +0,0 @@
-CONSOLE WARNING: SVG's SMIL animations (<animate>, <set>, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead.
-{
-  "bounds": [800, 600],
-  "children": [
-    {
-      "bounds": [800, 600],
-      "contentsOpaque": true,
-      "drawsContent": true,
-      "paintInvalidations": [
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 130, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 170, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 170, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [140, 60, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 36, 36],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 10, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate1'",
-          "rect": [140, 60, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='separate2'",
-          "rect": [140, 140, 36, 36],
-          "reason": "style change"
-        }
-      ]
-    }
-  ]
-}
-
diff --git a/third_party/WebKit/LayoutTests/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.txt b/third_party/WebKit/LayoutTests/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.txt
index bfe5e39b..b91dc1ad 100644
--- a/third_party/WebKit/LayoutTests/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow BODY",
           "rect": [0, 0, 800, 202],
           "reason": "invalidate paint rectangle"
@@ -22,8 +17,11 @@
           "reason": "style change"
         },
         {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt b/third_party/WebKit/LayoutTests/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt
index a830b226..96d18897 100644
--- a/third_party/WebKit/LayoutTests/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt
@@ -7,58 +7,23 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow BODY",
           "rect": [0, 0, 800, 202],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 285, 135],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [1, 1, 400, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 285, 135],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [1, 1, 400, 200],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutEmbeddedObject OBJECT",
           "rect": [0, 0, 402, 202],
           "reason": "style change"
         },
         {
-          "object": "LayoutEmbeddedObject OBJECT",
-          "rect": [0, 0, 285, 135],
+          "object": "LayoutBlockFlow BODY",
+          "rect": [1, 1, 400, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [1, 1, 400, 200],
           "reason": "location change"
         },
         {
@@ -67,8 +32,63 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutView #document",
+          "rect": [1, 1, 400, 200],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [1, 1, 400, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [1, 1, 400, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [11, 11, 380, 180],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [0, 0, 285, 135],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 285, 135],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutEmbeddedObject OBJECT",
+          "rect": [0, 0, 285, 135],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [0, 0, 285, 135],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [0, 0, 285, 135],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [0, 135, 285, 15],
+          "reason": "scroll"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [10, 10, 275, 125],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRect rect",
-          "rect": [10, 10, 180, 125],
+          "rect": [211, 11, 180, 180],
           "reason": "location change"
         },
         {
@@ -78,65 +98,15 @@
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [210, 10, 75, 125],
+          "rect": [10, 10, 180, 125],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [211, 11, 180, 180],
+          "rect": [210, 10, 75, 125],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [10, 10, 275, 125],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [11, 11, 380, 180],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [1, 1, 400, 200],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 285, 135],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [1, 1, 400, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 285, 135],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [1, 1, 400, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 135, 285, 15],
-          "reason": "scroll"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [285, 0, 15, 135],
           "reason": "scroll"
@@ -147,28 +117,47 @@
           "reason": "scroll"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutView #document",
+          "reason": "scroll"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt b/third_party/WebKit/LayoutTests/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt
index a830b226..96d18897 100644
--- a/third_party/WebKit/LayoutTests/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt
@@ -7,58 +7,23 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "HorizontalScrollbar",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutBlockFlow BODY",
           "rect": [0, 0, 800, 202],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [0, 0, 285, 135],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow BODY",
-          "rect": [1, 1, 400, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [0, 0, 285, 135],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [1, 1, 400, 200],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutEmbeddedObject OBJECT",
           "rect": [0, 0, 402, 202],
           "reason": "style change"
         },
         {
-          "object": "LayoutEmbeddedObject OBJECT",
-          "rect": [0, 0, 285, 135],
+          "object": "LayoutBlockFlow BODY",
+          "rect": [1, 1, 400, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [1, 1, 400, 200],
           "reason": "location change"
         },
         {
@@ -67,8 +32,63 @@
           "reason": "location change"
         },
         {
+          "object": "LayoutView #document",
+          "rect": [1, 1, 400, 200],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [1, 1, 400, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [1, 1, 400, 200],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [11, 11, 380, 180],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow BODY",
+          "rect": [0, 0, 285, 135],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow HTML",
+          "rect": [0, 0, 285, 135],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutEmbeddedObject OBJECT",
+          "rect": [0, 0, 285, 135],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [0, 0, 285, 135],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [0, 0, 285, 135],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutView #document",
+          "rect": [0, 135, 285, 15],
+          "reason": "scroll"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [10, 10, 275, 125],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRect rect",
-          "rect": [10, 10, 180, 125],
+          "rect": [211, 11, 180, 180],
           "reason": "location change"
         },
         {
@@ -78,65 +98,15 @@
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [210, 10, 75, 125],
+          "rect": [10, 10, 180, 125],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [211, 11, 180, 180],
+          "rect": [210, 10, 75, 125],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [10, 10, 275, 125],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [11, 11, 380, 180],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [1, 1, 400, 200],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 285, 135],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [1, 1, 400, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 285, 135],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [1, 1, 400, 200],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 0, 0, 0],
-          "reason": "scroll"
-        },
-        {
-          "object": "LayoutView #document",
-          "rect": [0, 135, 285, 15],
-          "reason": "scroll"
-        },
-        {
           "object": "LayoutView #document",
           "rect": [285, 0, 15, 135],
           "reason": "scroll"
@@ -147,28 +117,47 @@
           "reason": "scroll"
         },
         {
+          "object": "HorizontalScrollbar",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "InlineBox",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutText #text",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutView #document",
+          "reason": "scroll"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "VerticalScrollbar",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/circle-move-invalidation-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/circle-move-invalidation-expected.txt
index 7ec879b..3def519 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/circle-move-invalidation-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/circle-move-invalidation-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutSVGEllipse circle id='c1'",
-          "rect": [46, 46, 76, 76],
+          "rect": [196, 196, 76, 76],
           "reason": "full"
         },
         {
           "object": "LayoutSVGEllipse circle id='c1'",
-          "rect": [196, 196, 76, 76],
+          "rect": [46, 46, 76, 76],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/clip-path-child-changes-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/clip-path-child-changes-expected.txt
index 8d34a137..fe19989 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/clip-path-child-changes-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/clip-path-child-changes-expected.txt
@@ -18,12 +18,12 @@
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [100, 0, 100, 200],
+          "rect": [0, 100, 200, 100],
           "reason": "incremental"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [0, 100, 200, 100],
+          "rect": [100, 0, 100, 200],
           "reason": "incremental"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/clip-path-href-changes-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/clip-path-href-changes-expected.txt
index 0107db1c..33327f3 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/clip-path-href-changes-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/clip-path-href-changes-expected.txt
@@ -13,12 +13,12 @@
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [100, 0, 100, 200],
+          "rect": [0, 100, 200, 100],
           "reason": "incremental"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [0, 100, 200, 100],
+          "rect": [100, 0, 100, 200],
           "reason": "incremental"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/clip-path-id-changes-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/clip-path-id-changes-expected.txt
index deecff1..9e50511 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/clip-path-id-changes-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/clip-path-id-changes-expected.txt
@@ -13,12 +13,12 @@
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [100, 0, 100, 200],
+          "rect": [0, 100, 200, 100],
           "reason": "incremental"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [0, 100, 200, 100],
+          "rect": [100, 0, 100, 200],
           "reason": "incremental"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/clip-path-units-changes-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/clip-path-units-changes-expected.txt
index b151e04..d490b3e 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/clip-path-units-changes-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/clip-path-units-changes-expected.txt
@@ -12,9 +12,9 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSVGResourceClipper clipPath id='myclip'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutSVGRoot svg",
+          "rect": [0, 100, 200, 100],
+          "reason": "incremental"
         },
         {
           "object": "LayoutSVGRoot svg",
@@ -22,9 +22,8 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [0, 100, 200, 100],
-          "reason": "incremental"
+          "object": "LayoutSVGResourceClipper clipPath id='myclip'",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/custom/deep-dynamic-updates-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/deep-dynamic-updates-expected.txt
index cc7881e..5072678 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/deep-dynamic-updates-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/deep-dynamic-updates-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGGradientStop stop id='stop1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutSVGRect rect",
+          "rect": [24, 24, 402, 402],
+          "reason": "SVG resource change"
         },
         {
           "object": "LayoutSVGRect rect",
@@ -22,9 +22,8 @@
           "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [24, 24, 402, 402],
-          "reason": "SVG resource change"
+          "object": "LayoutSVGGradientStop stop id='stop1'",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/custom/gradient-add-stops-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/gradient-add-stops-expected.txt
index 077fb2a..8ea37f51 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/gradient-add-stops-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/gradient-add-stops-expected.txt
@@ -7,18 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGGradientStop stop",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGRect rect",
           "rect": [0, 0, 100, 100],
           "reason": "SVG resource change"
         },
         {
+          "object": "LayoutSVGGradientStop stop",
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "LayoutSVGResourceLinearGradient linearGradient id='test'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/gradient-stop-style-change-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/gradient-stop-style-change-expected.txt
index b7d4007..ecccd78 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/gradient-stop-style-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/gradient-stop-style-change-expected.txt
@@ -7,14 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGGradientStop stop id='stop'",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutSVGRect rect",
           "rect": [0, 0, 100, 100],
           "reason": "SVG resource change"
+        },
+        {
+          "object": "LayoutSVGGradientStop stop id='stop'",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-late-marker-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-late-marker-and-object-creation-expected.txt
index 176dd5f..410b7ca 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-late-marker-and-object-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-late-marker-and-object-creation-expected.txt
@@ -12,29 +12,28 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutSVGEllipse circle",
-          "rect": [0, 0, 4, 4],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGPath path",
-          "rect": [203, 211, 111, 111],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGPath path",
           "rect": [203, 211, 111, 111],
           "reason": "style change"
         },
         {
-          "object": "LayoutSVGResourceMarker marker id='markerMiddle'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGPath path",
+          "rect": [203, 211, 111, 111],
           "reason": "layoutObject insertion"
         },
         {
           "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [203, 211, 111, 111],
           "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGEllipse circle",
+          "rect": [0, 0, 4, 4],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGResourceMarker marker id='markerMiddle'",
+          "reason": "layoutObject insertion"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-late-marker-creation-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-late-marker-creation-expected.txt
index 6fbb3b6..7133096 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-late-marker-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-late-marker-creation-expected.txt
@@ -7,18 +7,17 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGEllipse circle",
-          "rect": [0, 0, 4, 4],
-          "reason": "layoutObject insertion"
-        },
-        {
           "object": "LayoutSVGPath path",
           "rect": [203, 211, 111, 111],
           "reason": "style change"
         },
         {
+          "object": "LayoutSVGEllipse circle",
+          "rect": [0, 0, 4, 4],
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "LayoutSVGResourceMarker marker id='markerMiddle'",
-          "rect": [0, 0, 0, 0],
           "reason": "layoutObject insertion"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-late-mask-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-late-mask-and-object-creation-expected.txt
index 654eca4..9d3c906 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-late-mask-and-object-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-late-mask-and-object-creation-expected.txt
@@ -7,6 +7,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutSVGRect rect",
+          "rect": [0, 0, 800, 300],
+          "reason": "layoutObject insertion"
+        },
+        {
           "object": "LayoutSVGContainer g id='content'",
           "rect": [0, 100, 800, 100],
           "reason": "bounds change"
@@ -14,27 +19,21 @@
         {
           "object": "LayoutSVGRect rect",
           "rect": [0, 100, 800, 100],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [0, 100, 800, 100],
           "reason": "style change"
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [0, 0, 800, 300],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGResourceMasker mask id='dynMask'",
-          "rect": [0, 0, 0, 0],
+          "rect": [0, 100, 800, 100],
           "reason": "layoutObject insertion"
         },
         {
           "object": "LayoutSVGRoot svg id='svg-root'",
           "rect": [0, 100, 800, 100],
           "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGResourceMasker mask id='dynMask'",
+          "reason": "layoutObject insertion"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-late-mask-creation-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-late-mask-creation-expected.txt
index 731c7db..ec286445 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-late-mask-creation-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-late-mask-creation-expected.txt
@@ -8,17 +8,16 @@
       "paintInvalidations": [
         {
           "object": "LayoutSVGRect rect",
-          "rect": [0, 100, 800, 100],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect",
           "rect": [0, 0, 800, 300],
           "reason": "layoutObject insertion"
         },
         {
+          "object": "LayoutSVGRect rect",
+          "rect": [0, 100, 800, 100],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutSVGResourceMasker mask id='dynMask'",
-          "rect": [0, 0, 0, 0],
           "reason": "layoutObject insertion"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-repaint-rect-on-path-with-stroke-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-repaint-rect-on-path-with-stroke-expected.txt
index a531603..ee856c2 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-repaint-rect-on-path-with-stroke-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-repaint-rect-on-path-with-stroke-expected.txt
@@ -7,16 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGPath path id='path'",
-          "rect": [200, 50, 100, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath path id='path'",
-          "rect": [50, 50, 100, 50],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [174, 30, 126, 90],
           "reason": "bounds change"
@@ -25,6 +15,16 @@
           "object": "LayoutSVGRoot svg",
           "rect": [50, 30, 126, 90],
           "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGPath path id='path'",
+          "rect": [200, 50, 100, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath path id='path'",
+          "rect": [50, 50, 100, 50],
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-update-bounce-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-update-bounce-expected.txt
index d0d3949..528dbfe 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-update-bounce-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-update-bounce-expected.txt
@@ -8,22 +8,22 @@
       "paintInvalidations": [
         {
           "object": "LayoutSVGEllipse circle id='bounce'",
-          "rect": [2, 2, 66, 66],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGEllipse circle id='bounce'",
           "rect": [102, 102, 66, 66],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [2, 2, 66, 66],
+          "rect": [102, 102, 66, 66],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutSVGEllipse circle id='bounce'",
+          "rect": [2, 2, 66, 66],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRoot svg",
-          "rect": [102, 102, 66, 66],
+          "rect": [2, 2, 66, 66],
           "reason": "bounds change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-update-container-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-update-container-expected.txt
index 108778a..641b9560 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-update-container-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-update-container-expected.txt
@@ -18,12 +18,12 @@
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [40, 0, 36, 76],
+          "rect": [0, 40, 76, 36],
           "reason": "incremental"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [0, 40, 76, 36],
+          "rect": [40, 0, 36, 76],
           "reason": "incremental"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-update-gradient-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-update-gradient-expected.txt
index 51b6ca8..0494ad7 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-update-gradient-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-update-gradient-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGGradientStop stop id='stop1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutSVGRect rect",
+          "rect": [10, 100, 430, 80],
+          "reason": "SVG resource change"
         },
         {
           "object": "LayoutSVGRect rect",
@@ -17,13 +17,11 @@
           "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [10, 100, 430, 80],
-          "reason": "SVG resource change"
+          "object": "LayoutSVGGradientStop stop id='stop1'",
+          "reason": "full"
         },
         {
           "object": "LayoutSVGResourceLinearGradient linearGradient id='Gradient'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-update-pattern-child-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-update-pattern-child-expected.txt
index b2a036362..e6830478 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-update-pattern-child-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-update-pattern-child-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutSVGRect rect",
-          "rect": [10, 10, 430, 80],
+          "rect": [10, 100, 430, 80],
           "reason": "SVG resource change"
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [10, 100, 430, 80],
+          "rect": [10, 10, 430, 80],
           "reason": "SVG resource change"
         },
         {
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-update-pattern-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-update-pattern-expected.txt
index 826f6232..8696b37 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-update-pattern-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-update-pattern-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutSVGRect rect",
-          "rect": [10, 10, 430, 80],
+          "rect": [10, 100, 430, 80],
           "reason": "SVG resource change"
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [10, 100, 430, 80],
+          "rect": [10, 10, 430, 80],
           "reason": "SVG resource change"
         },
         {
@@ -28,7 +28,6 @@
         },
         {
           "object": "LayoutSVGResourcePattern pattern id='Pattern'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-update-polygon-changes-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-update-polygon-changes-expected.txt
index 240a6f81..aed4a39 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-update-polygon-changes-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-update-polygon-changes-expected.txt
@@ -12,16 +12,16 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSVGPath polygon id='polygon'",
-          "rect": [265, 209, 162, 105],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [265, 219, 162, 105],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutSVGPath polygon id='polygon'",
+          "rect": [265, 209, 162, 105],
+          "reason": "full"
+        },
+        {
           "object": "LayoutSVGRoot svg",
           "rect": [265, 209, 162, 105],
           "reason": "bounds change"
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-update-polygon-removal-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-update-polygon-removal-expected.txt
index b36dc4d9..502bd9e9 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-update-polygon-removal-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-update-polygon-removal-expected.txt
@@ -8,22 +8,22 @@
       "paintInvalidations": [
         {
           "object": "LayoutSVGPath polygon id='polygon'",
-          "rect": [265, 219, 162, 105],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGPath polygon id='polygon'",
           "rect": [265, 259, 163, 65],
           "reason": "full"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [265, 219, 162, 105],
+          "rect": [265, 259, 163, 65],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutSVGPath polygon id='polygon'",
+          "rect": [265, 219, 162, 105],
+          "reason": "full"
+        },
+        {
           "object": "LayoutSVGRoot svg",
-          "rect": [265, 259, 163, 65],
+          "rect": [265, 219, 162, 105],
           "reason": "bounds change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-update-stop-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-update-stop-expected.txt
index f10a446..8498b83 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-update-stop-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-update-stop-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGGradientStop stop id='stop1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutSVGRect rect",
+          "rect": [10, 100, 430, 80],
+          "reason": "SVG resource change"
         },
         {
           "object": "LayoutSVGRect rect",
@@ -17,9 +17,8 @@
           "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [10, 100, 430, 80],
-          "reason": "SVG resource change"
+          "object": "LayoutSVGGradientStop stop id='stop1'",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-update-stop-linked-gradient-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-update-stop-linked-gradient-expected.txt
index fc090cf..7ef9a59 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-update-stop-linked-gradient-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-update-stop-linked-gradient-expected.txt
@@ -7,13 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGGradientStop stop id='stop1'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
-        },
-        {
           "object": "LayoutSVGRect rect",
-          "rect": [10, 10, 430, 80],
+          "rect": [10, 210, 430, 80],
           "reason": "SVG resource change"
         },
         {
@@ -23,12 +18,15 @@
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [10, 210, 430, 80],
+          "rect": [10, 10, 430, 80],
           "reason": "SVG resource change"
         },
         {
+          "object": "LayoutSVGGradientStop stop id='stop1'",
+          "reason": "layoutObject removal"
+        },
+        {
           "object": "LayoutSVGResourceLinearGradient linearGradient id='gradient'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/js-update-style-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/js-update-style-expected.txt
index 79eb485..48f91c1 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/js-update-style-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/js-update-style-expected.txt
@@ -12,13 +12,13 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [6, 6, 158, 58],
-          "reason": "style change"
+          "object": "LayoutSVGRoot svg",
+          "rect": [6, 6, 158, 238],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [6, 66, 158, 58],
+          "rect": [6, 186, 158, 58],
           "reason": "style change"
         },
         {
@@ -28,13 +28,13 @@
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [6, 186, 158, 58],
+          "rect": [6, 66, 158, 58],
           "reason": "style change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [6, 6, 158, 238],
-          "reason": "bounds change"
+          "object": "LayoutSVGRect rect",
+          "rect": [6, 6, 158, 58],
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/custom/marker-viewBox-changes-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/marker-viewBox-changes-expected.txt
index 27edce47..d0098f9 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/marker-viewBox-changes-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/marker-viewBox-changes-expected.txt
@@ -17,9 +17,9 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [2, 0, 8, 10],
-          "reason": "incremental"
+          "object": "LayoutSVGRoot svg",
+          "rect": [90, 95, 98, 98],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutSVGRect rect",
@@ -27,14 +27,13 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGResourceMarker marker id='markerStart'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutSVGRect rect",
+          "rect": [2, 0, 8, 10],
+          "reason": "incremental"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [90, 95, 98, 98],
-          "reason": "bounds change"
+          "object": "LayoutSVGResourceMarker marker id='markerStart'",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/custom/mask-invalidation-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/mask-invalidation-expected.txt
index a1bd21c..f8706993 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/mask-invalidation-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/mask-invalidation-expected.txt
@@ -7,6 +7,16 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutSVGRect rect id='maskRect'",
+          "rect": [100, 100, 460, 316],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='maskRect'",
+          "rect": [50, 50, 460, 316],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGContainer g id='root'",
           "rect": [50, 50, 453, 299],
           "reason": "bounds change"
@@ -17,24 +27,14 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [100, 100, 403, 249],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGRect rect id='maskRect'",
-          "rect": [50, 50, 460, 316],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='maskRect'",
-          "rect": [100, 100, 460, 316],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [50, 50, 453, 299],
           "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [100, 100, 403, 249],
+          "reason": "layoutObject insertion"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/custom/pending-resource-after-removal-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/pending-resource-after-removal-expected.txt
index 778eb0e..d7db6fdb 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/pending-resource-after-removal-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/pending-resource-after-removal-expected.txt
@@ -14,12 +14,12 @@
         {
           "object": "LayoutSVGRect rect",
           "rect": [0, 0, 200, 200],
-          "reason": "layoutObject removal"
+          "reason": "layoutObject insertion"
         },
         {
           "object": "LayoutSVGRect rect",
           "rect": [0, 0, 200, 200],
-          "reason": "layoutObject insertion"
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGRect rect id='shape'",
@@ -33,18 +33,11 @@
         },
         {
           "object": "LayoutSVGResourcePattern pattern id='pat'",
-          "rect": [0, 0, 0, 0],
           "reason": "layoutObject insertion"
         },
         {
           "object": "LayoutSVGResourcePattern pattern id='pat'",
-          "rect": [0, 0, 0, 0],
           "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGResourcePattern pattern id='pat'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/custom/repaint-moving-svg-and-div-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/repaint-moving-svg-and-div-expected.txt
index e38e667..2367a726 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/repaint-moving-svg-and-div-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/repaint-moving-svg-and-div-expected.txt
@@ -8,272 +8,177 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [400, 100, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [430, 150, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [430, 150, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [445, 175, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [445, 175, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [460, 200, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [460, 200, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [475, 225, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [475, 225, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [490, 250, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [490, 250, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [505, 275, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [505, 275, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [520, 300, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [520, 300, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [535, 325, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
-          "rect": [535, 325, 150, 150],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
           "rect": [550, 350, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [425, 125, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [535, 325, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [455, 175, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [535, 325, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [455, 175, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [520, 300, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [470, 200, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [520, 300, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [470, 200, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [505, 275, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [485, 225, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [505, 275, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [485, 225, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [490, 250, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [500, 250, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [490, 250, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [500, 250, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [475, 225, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [515, 275, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [475, 225, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [515, 275, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [460, 200, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [530, 300, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [460, 200, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [530, 300, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [445, 175, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [545, 325, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [445, 175, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [545, 325, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [430, 150, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [560, 350, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [430, 150, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [560, 350, 100, 100],
+          "object": "LayoutBlockFlow (positioned) div id='html' class='outerBox'",
+          "rect": [400, 100, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutBlockFlow div class='innerBox'",
-          "rect": [575, 375, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [250, 350, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [125, 125, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [235, 325, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [155, 175, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [235, 325, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [155, 175, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [220, 300, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [170, 200, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [220, 300, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [170, 200, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [205, 275, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [185, 225, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [205, 275, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [185, 225, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [190, 250, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [200, 250, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [190, 250, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [200, 250, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [175, 225, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [215, 275, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [175, 225, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [215, 275, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [160, 200, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [230, 300, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [160, 200, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [230, 300, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [145, 175, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [245, 325, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [145, 175, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [245, 325, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [130, 150, 150, 150],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [260, 350, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [260, 350, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [275, 375, 100, 100],
+          "object": "LayoutSVGRoot (positioned) svg id='svg'",
+          "rect": [130, 150, 150, 150],
           "reason": "location change"
         },
         {
@@ -282,88 +187,183 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [130, 150, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [575, 375, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [130, 150, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [560, 350, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [145, 175, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [560, 350, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [145, 175, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [545, 325, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [160, 200, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [545, 325, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [160, 200, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [530, 300, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [175, 225, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [530, 300, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [175, 225, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [515, 275, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [190, 250, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [515, 275, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [190, 250, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [500, 250, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [205, 275, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [500, 250, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [205, 275, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [485, 225, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [220, 300, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [485, 225, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [220, 300, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [470, 200, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [235, 325, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [470, 200, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [235, 325, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [455, 175, 100, 100],
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot (positioned) svg id='svg'",
-          "rect": [250, 350, 150, 150],
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [455, 175, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow div class='innerBox'",
+          "rect": [425, 125, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [275, 375, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [260, 350, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [260, 350, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [245, 325, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [245, 325, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [230, 300, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [230, 300, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [215, 275, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [215, 275, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [200, 250, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [200, 250, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [185, 225, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [185, 225, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [170, 200, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [170, 200, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [155, 175, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [155, 175, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [125, 125, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/custom/resource-client-removal-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/resource-client-removal-expected.txt
index 9b919d05..b0ae1da5 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/resource-client-removal-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/resource-client-removal-expected.txt
@@ -9,7 +9,22 @@
         {
           "object": "LayoutSVGContainer g",
           "rect": [0, 0, 100, 100],
-          "reason": "layoutObject removal"
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject insertion"
         },
         {
           "object": "LayoutSVGContainer g",
@@ -24,7 +39,12 @@
         {
           "object": "LayoutSVGContainer g",
           "rect": [0, 0, 100, 100],
-          "reason": "layoutObject insertion"
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGContainer g",
@@ -34,31 +54,6 @@
         {
           "object": "LayoutSVGContainer g",
           "rect": [0, 0, 100, 100],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGContainer g id='inneruse'",
-          "rect": [0, 0, 100, 100],
           "reason": "layoutObject removal"
         },
         {
@@ -69,6 +64,46 @@
         {
           "object": "LayoutSVGContainer g id='inneruse'",
           "rect": [0, 0, 100, 100],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGContainer g id='inneruse'",
+          "rect": [0, 0, 100, 100],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGContainer g id='inneruse'",
+          "rect": [0, 0, 100, 100],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGContainer g id='inneruse'",
+          "rect": [0, 0, 100, 100],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGContainer g id='inneruse'",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGContainer g id='inneruse'",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGContainer g id='inneruse'",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGContainer g id='inneruse'",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGContainer g id='inneruse'",
+          "rect": [0, 0, 100, 100],
           "reason": "layoutObject insertion"
         },
         {
@@ -79,12 +114,7 @@
         {
           "object": "LayoutSVGContainer g id='inneruse'",
           "rect": [0, 0, 100, 100],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGContainer g id='inneruse'",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject insertion"
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGContainer g id='inneruse'",
@@ -94,12 +124,7 @@
         {
           "object": "LayoutSVGContainer g id='inneruse'",
           "rect": [0, 0, 100, 100],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGContainer g id='inneruse'",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject insertion"
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGContainer g id='inneruse'",
@@ -107,54 +132,49 @@
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGContainer g id='inneruse'",
-          "rect": [0, 0, 100, 100],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGContainer g id='inneruse'",
+          "object": "LayoutSVGPath path id='hp'",
           "rect": [0, 0, 100, 100],
           "reason": "layoutObject insertion"
         },
         {
-          "object": "LayoutSVGContainer g id='inneruse'",
+          "object": "LayoutSVGPath path id='hp'",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGPath path id='hp'",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGPath path id='hp'",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGPath path id='hp'",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGPath path id='hp'",
           "rect": [0, 0, 100, 100],
           "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGContainer g id='inneruse'",
+          "object": "LayoutSVGPath path id='hp'",
           "rect": [0, 0, 100, 100],
-          "reason": "full"
+          "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGContainer g id='inneruse'",
+          "object": "LayoutSVGPath path id='hp'",
           "rect": [0, 0, 100, 100],
-          "reason": "layoutObject insertion"
+          "reason": "layoutObject removal"
         },
         {
-          "object": "LayoutSVGGradientStop stop id='offset'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop id='offset'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop id='offset'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop id='offset'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGGradientStop stop id='offset'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutSVGPath path id='hp'",
+          "rect": [0, 0, 100, 100],
+          "reason": "layoutObject removal"
         },
         {
           "object": "LayoutSVGPath path id='hp'",
@@ -169,12 +189,7 @@
         {
           "object": "LayoutSVGPath path id='hp'",
           "rect": [0, 0, 100, 100],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGPath path id='hp'",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject removal"
+          "reason": "SVG resource change"
         },
         {
           "object": "LayoutSVGPath path id='hp'",
@@ -184,12 +199,7 @@
         {
           "object": "LayoutSVGPath path id='hp'",
           "rect": [0, 0, 100, 100],
-          "reason": "layoutObject insertion"
-        },
-        {
-          "object": "LayoutSVGPath path id='hp'",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject removal"
+          "reason": "SVG resource change"
         },
         {
           "object": "LayoutSVGPath path id='hp'",
@@ -197,39 +207,24 @@
           "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGPath path id='hp'",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject insertion"
+          "object": "LayoutSVGGradientStop stop id='offset'",
+          "reason": "full"
         },
         {
-          "object": "LayoutSVGPath path id='hp'",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject removal"
+          "object": "LayoutSVGGradientStop stop id='offset'",
+          "reason": "full"
         },
         {
-          "object": "LayoutSVGPath path id='hp'",
-          "rect": [0, 0, 100, 100],
-          "reason": "SVG resource change"
+          "object": "LayoutSVGGradientStop stop id='offset'",
+          "reason": "full"
         },
         {
-          "object": "LayoutSVGPath path id='hp'",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject insertion"
+          "object": "LayoutSVGGradientStop stop id='offset'",
+          "reason": "full"
         },
         {
-          "object": "LayoutSVGPath path id='hp'",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGPath path id='hp'",
-          "rect": [0, 0, 100, 100],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGPath path id='hp'",
-          "rect": [0, 0, 100, 100],
-          "reason": "layoutObject insertion"
+          "object": "LayoutSVGGradientStop stop id='offset'",
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/custom/resource-invalidate-on-target-update-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/resource-invalidate-on-target-update-expected.txt
index 5117e802..1b01a24 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/resource-invalidate-on-target-update-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/resource-invalidate-on-target-update-expected.txt
@@ -7,13 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGContainer g id='box'",
-          "rect": [120, 10, 110, 350],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect1'",
-          "rect": [10, 10, 200, 100],
+          "object": "LayoutSVGRect rect id='rect3'",
+          "rect": [0, 240, 230, 120],
           "reason": "full"
         },
         {
@@ -22,11 +17,16 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSVGRect rect id='rect3'",
-          "rect": [0, 240, 230, 120],
+          "object": "LayoutSVGRect rect id='rect1'",
+          "rect": [10, 10, 200, 100],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGContainer g id='box'",
+          "rect": [120, 10, 110, 350],
+          "reason": "incremental"
+        },
+        {
           "object": "LayoutSVGRoot svg",
           "rect": [120, 10, 110, 350],
           "reason": "incremental"
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-disappears-after-style-update-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/use-disappears-after-style-update-expected.txt
similarity index 99%
rename from third_party/WebKit/LayoutTests/platform/win/svg/custom/use-disappears-after-style-update-expected.txt
rename to third_party/WebKit/LayoutTests/svg/custom/use-disappears-after-style-update-expected.txt
index 5cba091..6440d31 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/use-disappears-after-style-update-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/use-disappears-after-style-update-expected.txt
@@ -13,8 +13,8 @@
         },
         {
           "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 10, 30, 30],
-          "reason": "layoutObject removal"
+          "rect": [50, 10, 30, 30],
+          "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect id='rect'",
@@ -23,18 +23,18 @@
         },
         {
           "object": "LayoutSVGRect rect id='rect'",
+          "rect": [10, 10, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [10, 10, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
           "rect": [0, 10, 30, 30],
           "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 10, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 10, 30, 30],
-          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-change-target-id-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-change-target-id-expected.txt
index 6964375..138eda48 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-change-target-id-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-change-target-id-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-multiple-targets-id-change-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-multiple-targets-id-change-expected.txt
index 0ed3498..a26cad9 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-multiple-targets-id-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-multiple-targets-id-change-expected.txt
@@ -7,8 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [0, 0, 55, 110],
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [0, 0, 100, 100],
           "reason": "full"
         },
         {
@@ -17,18 +17,16 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 0, 100, 100],
+          "object": "LayoutSVGRect rect",
+          "rect": [0, 0, 55, 110],
           "reason": "full"
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage1'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage2'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-reference-invalidation-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-reference-invalidation-expected.txt
index 6964375..138eda48 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-reference-invalidation-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-reference-invalidation-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-remove-target-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-remove-target-expected.txt
index ee45113..49945f3 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-remove-target-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-remove-target-expected.txt
@@ -18,7 +18,6 @@
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-add-to-document-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-add-to-document-expected.txt
index d0e6022..02de95ee 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-add-to-document-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-add-to-document-expected.txt
@@ -13,12 +13,10 @@
         },
         {
           "object": "LayoutSVGResourceFilter filter id='filter'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage",
-          "rect": [0, 0, 0, 0],
           "reason": "layoutObject insertion"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-attribute-change-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-attribute-change-expected.txt
index 4c97ea3..d96e22c 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-attribute-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-attribute-change-expected.txt
@@ -18,7 +18,6 @@
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-attribute-change-with-use-indirection-2-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-attribute-change-with-use-indirection-2-expected.txt
index 845c346..b127e4f8 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-attribute-change-with-use-indirection-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-attribute-change-with-use-indirection-2-expected.txt
@@ -7,23 +7,22 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGContainer use id='use'",
-          "rect": [0, 0, 100, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRect rect",
           "rect": [0, 0, 110, 110],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGContainer use id='use'",
+          "rect": [0, 0, 100, 100],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRect rect id='rect'",
           "rect": [0, 0, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-attribute-change-with-use-indirection-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-attribute-change-with-use-indirection-expected.txt
index 86c2f71..05466730 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-attribute-change-with-use-indirection-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-attribute-change-with-use-indirection-expected.txt
@@ -7,22 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGContainer use id='use'",
-          "rect": [1, 0, 99, 100],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutSVGRect rect",
           "rect": [0, 0, 110, 110],
           "reason": "full"
         },
         {
           "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 0, 1, 100],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
           "rect": [0, 0, 100, 100],
           "reason": "full"
         },
@@ -30,6 +20,16 @@
           "object": "LayoutSVGRect rect id='rect'",
           "rect": [0, 0, 100, 100],
           "reason": "layoutObject insertion"
+        },
+        {
+          "object": "LayoutSVGContainer use id='use'",
+          "rect": [1, 0, 99, 100],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [0, 0, 1, 100],
+          "reason": "layoutObject removal"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-changes-id-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-changes-id-expected.txt
index 6964375..138eda48 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-changes-id-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-changes-id-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-id-change-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-id-change-expected.txt
index 6964375..138eda48 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-id-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-id-change-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-property-change-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-property-change-expected.txt
index 4c97ea3..d96e22c 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-property-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-property-change-expected.txt
@@ -18,7 +18,6 @@
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-reappend-to-document-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-reappend-to-document-expected.txt
index d8bc79d..1fbc9b5 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-reappend-to-document-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-reappend-to-document-expected.txt
@@ -18,23 +18,19 @@
         },
         {
           "object": "LayoutSVGResourceFilter filter id='filter'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "LayoutSVGResourceFilter filter id='filter'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage-green'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject removal"
+          "reason": "layoutObject insertion"
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage-green'",
-          "rect": [0, 0, 0, 0],
-          "reason": "layoutObject insertion"
+          "reason": "layoutObject removal"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-remove-from-document-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-remove-from-document-expected.txt
index 6ec6918..055a402b 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/feImage-target-remove-from-document-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/feImage-target-remove-from-document-expected.txt
@@ -13,12 +13,10 @@
         },
         {
           "object": "LayoutSVGResourceFilter filter id='filter'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feImage id='feimage-red'",
-          "rect": [0, 0, 0, 0],
           "reason": "layoutObject removal"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/svg/filters/filter-refresh-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/filter-refresh-expected.txt
similarity index 97%
rename from third_party/WebKit/LayoutTests/platform/mac-retina/svg/filters/filter-refresh-expected.txt
rename to third_party/WebKit/LayoutTests/svg/filters/filter-refresh-expected.txt
index fe050b8..365be05 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-retina/svg/filters/filter-refresh-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/filter-refresh-expected.txt
@@ -9,52 +9,7 @@
       "paintInvalidations": [
         {
           "object": "LayoutSVGContainer g",
-          "rect": [10, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 50, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [90, 90, 36, 36],
+          "rect": [10, 170, 132, 36],
           "reason": "SVG resource change"
         },
         {
@@ -63,23 +18,18 @@
           "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 130, 36, 36],
-          "reason": "SVG resource change"
+          "object": "LayoutSVGRect rect id='separate2'",
+          "rect": [140, 140, 36, 36],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='filtered'",
+          "rect": [140, 100, 36, 36],
+          "reason": "style change"
         },
         {
           "object": "LayoutSVGContainer g",
-          "rect": [90, 130, 36, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [10, 170, 132, 36],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 170, 36, 36],
+          "rect": [140, 60, 36, 36],
           "reason": "SVG resource change"
         },
         {
@@ -89,143 +39,68 @@
         },
         {
           "object": "LayoutSVGContainer g",
-          "rect": [140, 60, 36, 36],
+          "rect": [90, 130, 36, 36],
           "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 30, 30],
-          "reason": "style change"
+          "object": "LayoutSVGContainer g",
+          "rect": [90, 90, 36, 36],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect id='filtered'",
-          "rect": [140, 100, 36, 36],
-          "reason": "style change"
+          "object": "LayoutSVGContainer g",
+          "rect": [90, 90, 36, 36],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "layoutObject removal"
+          "object": "LayoutSVGContainer g",
+          "rect": [90, 50, 36, 36],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "layoutObject removal"
+          "object": "LayoutSVGContainer g",
+          "rect": [90, 50, 36, 36],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "layoutObject removal"
+          "object": "LayoutSVGContainer g",
+          "rect": [50, 170, 36, 36],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "layoutObject removal"
+          "object": "LayoutSVGContainer g",
+          "rect": [50, 130, 36, 36],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "layoutObject removal"
+          "object": "LayoutSVGContainer g",
+          "rect": [50, 90, 36, 36],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "layoutObject removal"
+          "object": "LayoutSVGContainer g",
+          "rect": [50, 90, 36, 36],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "layoutObject removal"
+          "object": "LayoutSVGContainer g",
+          "rect": [50, 50, 36, 36],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "layoutObject removal"
+          "object": "LayoutSVGContainer g",
+          "rect": [50, 50, 36, 36],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "layoutObject removal"
+          "object": "LayoutSVGContainer g",
+          "rect": [10, 90, 36, 36],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "layoutObject removal"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [0, 10, 30, 30],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 50, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 90, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 130, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [10, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [50, 170, 30, 30],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='rect'",
-          "rect": [90, 170, 30, 30],
-          "reason": "location change"
+          "object": "LayoutSVGContainer g",
+          "rect": [10, 50, 36, 36],
+          "reason": "SVG resource change"
         },
         {
           "object": "LayoutSVGRect rect id='separate1'",
@@ -233,8 +108,128 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutSVGRect rect id='separate2'",
-          "rect": [140, 140, 36, 36],
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [90, 170, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [90, 170, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [90, 130, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [90, 130, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [90, 90, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [90, 90, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [90, 50, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [90, 50, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [50, 170, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [50, 170, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [50, 130, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [50, 130, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [50, 90, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [50, 90, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [50, 50, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [50, 50, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [10, 170, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [10, 170, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [10, 130, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [10, 130, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [10, 90, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [10, 90, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [10, 50, 30, 30],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [10, 50, 30, 30],
+          "reason": "layoutObject removal"
+        },
+        {
+          "object": "LayoutSVGRect rect id='rect'",
+          "rect": [0, 10, 30, 30],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/filters/filter-width-update-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/filter-width-update-expected.txt
index 08ff07b3c..8be7b5d 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/filter-width-update-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/filter-width-update-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "LayoutSVGResourceFilter filter id='blur'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/filters/invalidate-on-child-layout-expected.txt b/third_party/WebKit/LayoutTests/svg/filters/invalidate-on-child-layout-expected.txt
index 2ad47d4..d9c0915c 100644
--- a/third_party/WebKit/LayoutTests/svg/filters/invalidate-on-child-layout-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/filters/invalidate-on-child-layout-expected.txt
@@ -8,18 +8,23 @@
       "paintInvalidations": [
         {
           "object": "LayoutSVGContainer g",
-          "rect": [0, 0, 110, 110],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer g",
           "rect": [40, 40, 120, 120],
           "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGEllipse circle id='circle'",
-          "rect": [0, 0, 100, 100],
-          "reason": "full"
+          "object": "LayoutSVGRoot svg",
+          "rect": [40, 40, 120, 120],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [0, 0, 110, 110],
+          "reason": "SVG resource change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [0, 0, 110, 110],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutSVGEllipse circle id='circle'",
@@ -27,14 +32,9 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [0, 0, 110, 110],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [40, 40, 120, 120],
-          "reason": "bounds change"
+          "object": "LayoutSVGEllipse circle id='circle'",
+          "rect": [0, 0, 100, 100],
+          "reason": "full"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/add-outline-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/add-outline-property-on-root-expected.txt
index 7ef6e23..e2758ca 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/add-outline-property-on-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/add-outline-property-on-root-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow HTML",
+          "rect": [-2, -2, 802, 122],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -17,23 +17,20 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [-2, -2, 802, 122],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [-2, -2, 120, 120],
           "reason": "style change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/container-repaint-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/container-repaint-expected.txt
index 0ea33fc..122f4a3 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/container-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/container-repaint-expected.txt
@@ -8,22 +8,22 @@
       "paintInvalidations": [
         {
           "object": "LayoutSVGRect rect",
-          "rect": [0, 50, 100, 50],
+          "rect": [0, 100, 100, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='mover'",
+          "rect": [0, 100, 100, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRect rect",
-          "rect": [0, 100, 100, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGViewportContainer svg id='mover'",
           "rect": [0, 50, 100, 50],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGViewportContainer svg id='mover'",
-          "rect": [0, 100, 100, 50],
+          "rect": [0, 50, 100, 50],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/fecomponenttransfer-in1-change-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/fecomponenttransfer-in1-change-expected.txt
index 38a74fb..891d9f1 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/fecomponenttransfer-in1-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/fecomponenttransfer-in1-change-expected.txt
@@ -13,7 +13,6 @@
         },
         {
           "object": "LayoutSVGResourceFilterPrimitive feComponentTransfer id='fe'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/foreign-object-repaint-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/foreign-object-repaint-expected.txt
index a3fc970..9017afd 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/foreign-object-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/foreign-object-repaint-expected.txt
@@ -7,13 +7,13 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutBlockFlow div id='div1'",
-          "rect": [50, 50, 100, 100],
+          "object": "LayoutBlockFlow div id='div2'",
+          "rect": [129, 200, 142, 142],
           "reason": "style change"
         },
         {
-          "object": "LayoutBlockFlow div id='div2'",
-          "rect": [129, 200, 142, 142],
+          "object": "LayoutBlockFlow div id='div1'",
+          "rect": [50, 50, 100, 100],
           "reason": "style change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/image-with-clip-path-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/image-with-clip-path-expected.txt
index 0e87055..63d67d8a 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/image-with-clip-path-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/image-with-clip-path-expected.txt
@@ -7,81 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGContainer g id='g'",
-          "rect": [0, 0, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='g'",
-          "rect": [20, 20, 60, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='g'",
-          "rect": [20, 20, 60, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer g id='g'",
-          "rect": [175, 25, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer defs",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGHiddenContainer defs",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGImage image",
-          "rect": [0, 0, 10, 10],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGImage image",
-          "rect": [20, 20, 60, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGImage image",
-          "rect": [20, 20, 60, 60],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGImage image",
-          "rect": [175, 25, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='r'",
-          "rect": [0, 0, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='r'",
-          "rect": [0, 0, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='r'",
-          "rect": [175, 25, 50, 50],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGResourceClipper clipPath id='p'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGResourceClipper clipPath id='p'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [0, 10, 237, 70],
           "reason": "incremental"
@@ -90,6 +15,77 @@
           "object": "LayoutSVGRoot svg",
           "rect": [0, 75, 237, 5],
           "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGRect rect id='r'",
+          "rect": [0, 0, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='r'",
+          "rect": [0, 0, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='g'",
+          "rect": [20, 20, 60, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='g'",
+          "rect": [20, 20, 60, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGImage image",
+          "rect": [20, 20, 60, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGImage image",
+          "rect": [20, 20, 60, 60],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='g'",
+          "rect": [175, 25, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGImage image",
+          "rect": [175, 25, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect id='r'",
+          "rect": [175, 25, 50, 50],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGContainer g id='g'",
+          "rect": [0, 0, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGImage image",
+          "rect": [0, 0, 10, 10],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer defs",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer defs",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGResourceClipper clipPath id='p'",
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGResourceClipper clipPath id='p'",
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/inner-svg-change-viewBox-contract-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/inner-svg-change-viewBox-contract-expected.txt
index 158ceda5..0aac01c 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/inner-svg-change-viewBox-contract-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/inner-svg-change-viewBox-contract-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [100, 0, 100, 200],
-          "reason": "incremental"
+          "object": "LayoutSVGViewportContainer svg id='inner'",
+          "rect": [0, 0, 200, 200],
+          "reason": "full"
         },
         {
           "object": "LayoutSVGRect rect",
@@ -17,9 +17,9 @@
           "reason": "incremental"
         },
         {
-          "object": "LayoutSVGViewportContainer svg id='inner'",
-          "rect": [0, 0, 200, 200],
-          "reason": "full"
+          "object": "LayoutSVGRect rect",
+          "rect": [100, 0, 100, 200],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/inner-svg-change-viewPort-relative-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/inner-svg-change-viewPort-relative-expected.txt
index 245c9dd..59eded6 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/inner-svg-change-viewPort-relative-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/inner-svg-change-viewPort-relative-expected.txt
@@ -7,88 +7,84 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'right-aligned text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'right-aligned text'",
-          "rect": [0, 0, 0, 0],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [80, 120, 20, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGContainer use",
-          "rect": [180, 120, 20, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 86, 101, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [89, 86, 111, 18],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGPath polygon id='triangle'",
-          "rect": [80, 120, 20, 20],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGPath polygon id='triangle'",
-          "rect": [180, 120, 20, 20],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGRect rect",
           "rect": [0, 0, 200, 200],
           "reason": "full"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [80, 60, 20, 20],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGRect rect",
-          "rect": [180, 60, 20, 20],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [101, 0, 99, 200],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [0, 86, 101, 18],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGText text",
-          "rect": [89, 86, 111, 18],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGViewportContainer svg id='inner'",
           "rect": [0, 0, 200, 200],
           "reason": "full"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [89, 86, 111, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [89, 86, 111, 18],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [0, 86, 101, 18],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [0, 86, 101, 18],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [101, 0, 99, 200],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [180, 120, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath polygon id='triangle'",
+          "rect": [180, 120, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [180, 60, 20, 20],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGContainer use",
+          "rect": [80, 120, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGPath polygon id='triangle'",
+          "rect": [80, 120, 20, 20],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [80, 60, 20, 20],
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'right-aligned text'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'right-aligned text'",
+          "reason": "bounds change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/mask-clip-target-transform-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/mask-clip-target-transform-expected.txt
index fe31762..0c3868df 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/mask-clip-target-transform-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/mask-clip-target-transform-expected.txt
@@ -7,21 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGContainer g",
-          "rect": [150, 100, 100, 50],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGContainer g",
-          "rect": [50, 150, 100, 100],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRect rect id='clipper'",
-          "rect": [100, 0, 200, 300],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGRect rect id='clipper'",
           "rect": [0, 100, 300, 200],
           "reason": "full"
@@ -32,9 +17,24 @@
           "reason": "full"
         },
         {
+          "object": "LayoutSVGRect rect id='clipper'",
+          "rect": [100, 0, 200, 300],
+          "reason": "full"
+        },
+        {
           "object": "LayoutSVGRect rect id='masker'",
           "rect": [100, 0, 200, 300],
           "reason": "full"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [50, 150, 100, 100],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGContainer g",
+          "rect": [150, 100, 100, 50],
+          "reason": "incremental"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/modify-inserted-listitem-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/modify-inserted-listitem-expected.txt
index e141c96b..11cb808 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/modify-inserted-listitem-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/modify-inserted-listitem-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGRect rect id='move'",
-          "rect": [18, 18, 10, 10],
-          "reason": "location change"
+          "object": "LayoutSVGRoot svg",
+          "rect": [18, 18, 20, 30],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutSVGRect rect id='move'",
@@ -17,9 +17,9 @@
           "reason": "location change"
         },
         {
-          "object": "LayoutSVGRoot svg",
-          "rect": [18, 18, 20, 30],
-          "reason": "bounds change"
+          "object": "LayoutSVGRect rect id='move'",
+          "rect": [18, 18, 10, 10],
+          "reason": "location change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/modify-transferred-listitem-different-attr-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/modify-transferred-listitem-different-attr-expected.txt
index 20eb0670..7b67902 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/modify-transferred-listitem-different-attr-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/modify-transferred-listitem-different-attr-expected.txt
@@ -7,51 +7,11 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox ' B C'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGText text id='target'",
+          "rect": [23, 8, 85, 24],
           "reason": "full"
         },
         {
-          "object": "InlineTextBox ' B C'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox ' Y Z'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'A'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'X Y Z'",
-          "rect": [0, 0, 0, 0],
-          "reason": "incremental"
-        },
-        {
-          "object": "InlineTextBox 'X'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [103, 8, 5, 24],
-          "reason": "incremental"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [58, 62, 50, 10],
-          "reason": "incremental"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [23, 62, 85, 10],
           "reason": "incremental"
@@ -62,28 +22,57 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSVGText text id='target'",
-          "rect": [23, 8, 85, 24],
+          "object": "LayoutSVGInlineText #text",
+          "rect": [58, 62, 50, 10],
+          "reason": "incremental"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [103, 8, 5, 24],
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' B C'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox ' B C'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox ' Y Z'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'A'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'A'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'X Y Z'",
+          "reason": "incremental"
+        },
+        {
+          "object": "InlineTextBox 'X'",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/modify-transferred-listitem-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/modify-transferred-listitem-expected.txt
index d8db76d8..1681152 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/modify-transferred-listitem-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/modify-transferred-listitem-expected.txt
@@ -7,13 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGPath polygon id='source'",
-          "rect": [0, 0, 0, 0],
+          "object": "LayoutSVGPath polygon id='target'",
+          "rect": [18, 18, 30, 20],
           "reason": "full"
         },
         {
-          "object": "LayoutSVGPath polygon id='target'",
-          "rect": [18, 18, 30, 20],
+          "object": "LayoutSVGPath polygon id='source'",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/paintorder-filtered-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/paintorder-filtered-expected.txt
index 5ada144e..4dcf9e1c4 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/paintorder-filtered-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/paintorder-filtered-expected.txt
@@ -7,13 +7,8 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGContainer use",
-          "rect": [454, 163, 137, 137],
-          "reason": "SVG resource change"
-        },
-        {
-          "object": "LayoutSVGContainer use id='t1'",
-          "rect": [45, 163, 137, 137],
+          "object": "LayoutSVGPath polygon",
+          "rect": [137, 37, 580, 563],
           "reason": "style change"
         },
         {
@@ -22,23 +17,18 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutSVGEllipse circle id='t4'",
-          "rect": [46, 28, 7, 7],
-          "reason": "style change"
+          "object": "LayoutSVGContainer use",
+          "rect": [454, 163, 137, 137],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGPath polygon",
-          "rect": [137, 37, 580, 563],
-          "reason": "style change"
+          "object": "LayoutSVGViewportContainer svg",
+          "rect": [318, 163, 137, 137],
+          "reason": "SVG resource change"
         },
         {
-          "object": "LayoutSVGPath polygon",
-          "rect": [47, 166, 133, 132],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGPath polygon",
-          "rect": [184, 166, 132, 132],
+          "object": "LayoutSVGContainer use id='t1'",
+          "rect": [45, 163, 137, 137],
           "reason": "style change"
         },
         {
@@ -52,9 +42,9 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutSVGViewportContainer svg",
-          "rect": [318, 163, 137, 137],
-          "reason": "SVG resource change"
+          "object": "LayoutSVGPath polygon",
+          "rect": [47, 166, 133, 132],
+          "reason": "style change"
         },
         {
           "object": "LayoutSVGViewportContainer svg id='poly'",
@@ -62,9 +52,19 @@
           "reason": "style change"
         },
         {
+          "object": "LayoutSVGPath polygon",
+          "rect": [184, 166, 132, 132],
+          "reason": "style change"
+        },
+        {
           "object": "LayoutSVGViewportContainer svg id='poly'",
           "rect": [184, 166, 132, 132],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutSVGEllipse circle id='t4'",
+          "rect": [46, 28, 7, 7],
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/remove-outline-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/remove-outline-property-on-root-expected.txt
index 7ef6e23..e2758ca 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/remove-outline-property-on-root-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/remove-outline-property-on-root-expected.txt
@@ -7,9 +7,9 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
+          "object": "LayoutBlockFlow HTML",
+          "rect": [-2, -2, 802, 122],
+          "reason": "bounds change"
         },
         {
           "object": "LayoutBlockFlow BODY",
@@ -17,23 +17,20 @@
           "reason": "bounds change"
         },
         {
-          "object": "LayoutBlockFlow HTML",
-          "rect": [-2, -2, 802, 122],
-          "reason": "bounds change"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [-2, -2, 120, 120],
           "reason": "style change"
         },
         {
-          "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "object": "InlineBox",
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
+          "reason": "full"
+        },
+        {
+          "object": "RootInlineBox",
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/repaint-paintorder-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/repaint-paintorder-expected.txt
index 2e336ca..dd284939 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/repaint-paintorder-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/repaint-paintorder-expected.txt
@@ -7,37 +7,12 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGContainer use id='t1'",
-          "rect": [47, 166, 133, 132],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGContainer use id='t2'",
-          "rect": [184, 166, 132, 132],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGEllipse circle id='t4'",
-          "rect": [46, 28, 7, 7],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutSVGPath polygon",
           "rect": [137, 37, 580, 563],
           "reason": "style change"
         },
         {
           "object": "LayoutSVGPath polygon",
-          "rect": [47, 166, 133, 132],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGPath polygon",
-          "rect": [184, 166, 132, 132],
-          "reason": "style change"
-        },
-        {
-          "object": "LayoutSVGPath polygon",
           "rect": [456, 166, 133, 132],
           "reason": "style change"
         },
@@ -47,14 +22,39 @@
           "reason": "style change"
         },
         {
-          "object": "LayoutSVGViewportContainer svg id='poly'",
+          "object": "LayoutSVGContainer use id='t1'",
+          "rect": [47, 166, 133, 132],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutSVGPath polygon",
           "rect": [47, 166, 133, 132],
           "reason": "style change"
         },
         {
           "object": "LayoutSVGViewportContainer svg id='poly'",
+          "rect": [47, 166, 133, 132],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutSVGContainer use id='t2'",
           "rect": [184, 166, 132, 132],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutSVGPath polygon",
+          "rect": [184, 166, 132, 132],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutSVGViewportContainer svg id='poly'",
+          "rect": [184, 166, 132, 132],
+          "reason": "style change"
+        },
+        {
+          "object": "LayoutSVGEllipse circle id='t4'",
+          "rect": [46, 28, 7, 7],
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/text-pattern-update-2-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/text-pattern-update-2-expected.txt
index ca2d504..2b1a242 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/text-pattern-update-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/text-pattern-update-2-expected.txt
@@ -7,58 +7,48 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
-          "reason": "none"
-        },
-        {
-          "object": "InlineTextBox 'X'",
-          "rect": [0, 0, 0, 0],
-          "reason": "none"
-        },
-        {
-          "object": "InlineTextBox 'Y'",
-          "rect": [0, 0, 0, 0],
-          "reason": "none"
-        },
-        {
-          "object": "InlineTextBox 'Z'",
-          "rect": [0, 0, 0, 0],
-          "reason": "none"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "none"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "none"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "none"
-        },
-        {
-          "object": "LayoutSVGResourcePattern pattern id='pat'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [0, 0, 0, 0],
-          "reason": "none"
-        },
-        {
           "object": "LayoutSVGText text",
           "rect": [8, 8, 300, 100],
           "reason": "SVG resource change"
         },
         {
+          "object": "InlineFlowBox",
+          "reason": "none"
+        },
+        {
+          "object": "InlineTextBox 'X'",
+          "reason": "none"
+        },
+        {
+          "object": "InlineTextBox 'Y'",
+          "reason": "none"
+        },
+        {
+          "object": "InlineTextBox 'Z'",
+          "reason": "none"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "none"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "none"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "none"
+        },
+        {
+          "object": "LayoutSVGResourcePattern pattern id='pat'",
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGTSpan tspan",
+          "reason": "none"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/text-pattern-update-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/text-pattern-update-expected.txt
index 7203efea..9e890ed 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/text-pattern-update-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/text-pattern-update-expected.txt
@@ -7,28 +7,24 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'X'",
-          "rect": [0, 0, 0, 0],
-          "reason": "none"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
-          "reason": "none"
-        },
-        {
-          "object": "LayoutSVGResourcePattern pattern id='pat'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGText text",
           "rect": [8, 8, 100, 100],
           "reason": "SVG resource change"
         },
         {
+          "object": "InlineTextBox 'X'",
+          "reason": "none"
+        },
+        {
+          "object": "LayoutSVGInlineText #text",
+          "reason": "none"
+        },
+        {
+          "object": "LayoutSVGResourcePattern pattern id='pat'",
+          "reason": "full"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/transform-changed-state-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/transform-changed-state-expected.txt
index 37277604..0391ec1 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/transform-changed-state-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/transform-changed-state-expected.txt
@@ -8,12 +8,22 @@
       "paintInvalidations": [
         {
           "object": "LayoutSVGContainer g",
-          "rect": [108, 8, 100, 100],
+          "rect": [108, 108, 100, 100],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGRect rect",
+          "rect": [108, 108, 100, 100],
+          "reason": "full"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [108, 108, 100, 100],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGContainer g",
-          "rect": [108, 108, 100, 100],
+          "rect": [108, 8, 100, 100],
           "reason": "bounds change"
         },
         {
@@ -22,19 +32,9 @@
           "reason": "full"
         },
         {
-          "object": "LayoutSVGRect rect",
-          "rect": [108, 108, 100, 100],
-          "reason": "full"
-        },
-        {
           "object": "LayoutSVGRoot svg",
           "rect": [108, 8, 100, 100],
           "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
-          "rect": [108, 108, 100, 100],
-          "reason": "bounds change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/transform-foreign-object-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/transform-foreign-object-expected.txt
index 1576511..d96e8cd 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/transform-foreign-object-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/transform-foreign-object-expected.txt
@@ -8,32 +8,32 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow DIV",
-          "rect": [8, 8, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow DIV",
           "rect": [108, 8, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGForeignObject foreignObject",
-          "rect": [8, 8, 100, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGForeignObject foreignObject",
           "rect": [108, 8, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [8, 8, 100, 100],
+          "rect": [108, 8, 100, 100],
           "reason": "bounds change"
         },
         {
+          "object": "LayoutBlockFlow DIV",
+          "rect": [8, 8, 100, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGForeignObject foreignObject",
+          "rect": [8, 8, 100, 100],
+          "reason": "location change"
+        },
+        {
           "object": "LayoutSVGRoot svg",
-          "rect": [108, 8, 100, 100],
+          "rect": [8, 8, 100, 100],
           "reason": "bounds change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/transform-text-element-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/transform-text-element-expected.txt
index 9f80381..05b4fe8d 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/transform-text-element-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/transform-text-element-expected.txt
@@ -7,53 +7,49 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "InlineTextBox 'Test'",
-          "rect": [0, 0, 0, 0],
-          "reason": "full"
-        },
-        {
-          "object": "InlineTextBox 'Test'",
-          "rect": [0, 0, 0, 0],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGInlineText #text",
-          "rect": [8, 8, 400, 100],
-          "reason": "location change"
-        },
-        {
           "object": "LayoutSVGInlineText #text",
           "rect": [8, 58, 400, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutSVGRoot svg",
-          "rect": [8, 8, 400, 100],
-          "reason": "bounds change"
-        },
-        {
-          "object": "LayoutSVGRoot svg",
           "rect": [8, 58, 400, 100],
           "reason": "bounds change"
         },
         {
           "object": "LayoutSVGText text",
-          "rect": [8, 8, 400, 100],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutSVGText text",
           "rect": [8, 58, 400, 100],
           "reason": "location change"
         },
         {
+          "object": "LayoutSVGInlineText #text",
+          "rect": [8, 8, 400, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutSVGRoot svg",
+          "rect": [8, 8, 400, 100],
+          "reason": "bounds change"
+        },
+        {
+          "object": "LayoutSVGText text",
+          "rect": [8, 8, 400, 100],
+          "reason": "location change"
+        },
+        {
+          "object": "InlineTextBox 'Test'",
+          "reason": "full"
+        },
+        {
+          "object": "InlineTextBox 'Test'",
+          "reason": "location change"
+        },
+        {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         },
         {
           "object": "RootInlineBox",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/tspan-pattern-update-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/tspan-pattern-update-expected.txt
index cb42c59..902cdd39 100644
--- a/third_party/WebKit/LayoutTests/svg/repaint/tspan-pattern-update-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/repaint/tspan-pattern-update-expected.txt
@@ -7,29 +7,25 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
+          "object": "LayoutSVGTSpan tspan",
+          "rect": [8, 8, 300, 100],
+          "reason": "SVG resource change"
+        },
+        {
           "object": "InlineFlowBox",
-          "rect": [0, 0, 0, 0],
           "reason": "SVG resource change"
         },
         {
           "object": "InlineTextBox 'Y'",
-          "rect": [0, 0, 0, 0],
           "reason": "none"
         },
         {
           "object": "LayoutSVGInlineText #text",
-          "rect": [0, 0, 0, 0],
           "reason": "none"
         },
         {
           "object": "LayoutSVGResourcePattern pattern id='pat'",
-          "rect": [0, 0, 0, 0],
           "reason": "full"
-        },
-        {
-          "object": "LayoutSVGTSpan tspan",
-          "rect": [8, 8, 300, 100],
-          "reason": "SVG resource change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/zoom/page/absolute-sized-document-no-scrollbars-expected.txt b/third_party/WebKit/LayoutTests/svg/zoom/page/absolute-sized-document-no-scrollbars-expected.txt
index c987a3b6..2b8c5c1 100644
--- a/third_party/WebKit/LayoutTests/svg/zoom/page/absolute-sized-document-no-scrollbars-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/zoom/page/absolute-sized-document-no-scrollbars-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGHiddenContainer defs",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutSVGRect rect",
           "rect": [0, 0, 576, 432],
           "reason": "style change"
@@ -20,6 +15,10 @@
           "object": "LayoutSVGRoot svg",
           "rect": [0, 0, 576, 432],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer defs",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/svg/zoom/page/relative-sized-document-scrollbars-expected.txt b/third_party/WebKit/LayoutTests/svg/zoom/page/relative-sized-document-scrollbars-expected.txt
index 9a6312c1..818a9a0 100644
--- a/third_party/WebKit/LayoutTests/svg/zoom/page/relative-sized-document-scrollbars-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/zoom/page/relative-sized-document-scrollbars-expected.txt
@@ -7,11 +7,6 @@
       "drawsContent": true,
       "paintInvalidations": [
         {
-          "object": "LayoutSVGHiddenContainer defs",
-          "rect": [0, 0, 0, 0],
-          "reason": "style change"
-        },
-        {
           "object": "LayoutSVGRect rect",
           "rect": [7, 5, 786, 590],
           "reason": "style change"
@@ -20,6 +15,10 @@
           "object": "LayoutSVGRoot svg",
           "rect": [7, 5, 786, 590],
           "reason": "style change"
+        },
+        {
+          "object": "LayoutSVGHiddenContainer defs",
+          "reason": "style change"
         }
       ]
     }
diff --git a/third_party/WebKit/LayoutTests/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt b/third_party/WebKit/LayoutTests/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt
index e20c02e..73f61f4 100644
--- a/third_party/WebKit/LayoutTests/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt
+++ b/third_party/WebKit/LayoutTests/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt
@@ -8,198 +8,128 @@
       "backgroundColor": "#FFFFFF",
       "paintInvalidations": [
         {
-          "object": "LayoutHTMLCanvas CANVAS id='copycanvas'",
-          "rect": [429, 513, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='copyimage'",
-          "rect": [287, 513, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='copysolid color'",
-          "rect": [145, 513, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='copyvideo'",
           "rect": [571, 513, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-atopcanvas'",
-          "rect": [429, 413, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-atopimage'",
-          "rect": [287, 413, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-atopsolid color'",
-          "rect": [145, 413, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='destination-atopvideo'",
           "rect": [571, 413, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-incanvas'",
-          "rect": [429, 313, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-inimage'",
-          "rect": [287, 313, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-insolid color'",
-          "rect": [145, 313, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='destination-invideo'",
           "rect": [571, 313, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outcanvas'",
-          "rect": [459, 363, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outimage'",
-          "rect": [317, 363, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outsolid color'",
-          "rect": [175, 363, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-outvideo'",
-          "rect": [601, 363, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-overcanvas'",
-          "rect": [459, 263, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-overimage'",
-          "rect": [317, 263, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-oversolid color'",
-          "rect": [175, 263, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='destination-overvideo'",
-          "rect": [601, 263, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lightercanvas'",
-          "rect": [459, 463, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lighterimage'",
-          "rect": [317, 463, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lightersolid color'",
-          "rect": [175, 463, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='lightervideo'",
-          "rect": [601, 463, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopcanvas'",
-          "rect": [459, 213, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopimage'",
-          "rect": [317, 213, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopsolid color'",
-          "rect": [175, 213, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-atopvideo'",
-          "rect": [601, 213, 50, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-incanvas'",
-          "rect": [429, 113, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-inimage'",
-          "rect": [287, 113, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-insolid color'",
-          "rect": [145, 113, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-invideo'",
-          "rect": [571, 113, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-outcanvas'",
-          "rect": [429, 163, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-outimage'",
-          "rect": [287, 163, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
-          "object": "LayoutHTMLCanvas CANVAS id='source-outsolid color'",
-          "rect": [145, 163, 80, 40],
-          "reason": "invalidate paint rectangle"
-        },
-        {
           "object": "LayoutHTMLCanvas CANVAS id='source-outvideo'",
           "rect": [571, 163, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='source-overcanvas'",
-          "rect": [459, 63, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='source-invideo'",
+          "rect": [571, 113, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='source-overimage'",
-          "rect": [317, 63, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='copycanvas'",
+          "rect": [429, 513, 80, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='source-oversolid color'",
-          "rect": [175, 63, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='destination-atopcanvas'",
+          "rect": [429, 413, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-incanvas'",
+          "rect": [429, 313, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-outcanvas'",
+          "rect": [429, 163, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-incanvas'",
+          "rect": [429, 113, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='copyimage'",
+          "rect": [287, 513, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-atopimage'",
+          "rect": [287, 413, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-inimage'",
+          "rect": [287, 313, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-outimage'",
+          "rect": [287, 163, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-inimage'",
+          "rect": [287, 113, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='copysolid color'",
+          "rect": [145, 513, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-atopsolid color'",
+          "rect": [145, 413, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-insolid color'",
+          "rect": [145, 313, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-outsolid color'",
+          "rect": [145, 163, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-insolid color'",
+          "rect": [145, 113, 80, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='xorvideo'",
+          "rect": [601, 563, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='lightervideo'",
+          "rect": [601, 463, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outvideo'",
+          "rect": [601, 363, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-overvideo'",
+          "rect": [601, 263, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopvideo'",
+          "rect": [601, 213, 50, 40],
           "reason": "invalidate paint rectangle"
         },
         {
@@ -213,18 +143,88 @@
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutHTMLCanvas CANVAS id='lightercanvas'",
+          "rect": [459, 463, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outcanvas'",
+          "rect": [459, 363, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-overcanvas'",
+          "rect": [459, 263, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopcanvas'",
+          "rect": [459, 213, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-overcanvas'",
+          "rect": [459, 63, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
           "object": "LayoutHTMLCanvas CANVAS id='xorimage'",
           "rect": [317, 563, 50, 40],
           "reason": "invalidate paint rectangle"
         },
         {
+          "object": "LayoutHTMLCanvas CANVAS id='lighterimage'",
+          "rect": [317, 463, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outimage'",
+          "rect": [317, 363, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-overimage'",
+          "rect": [317, 263, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopimage'",
+          "rect": [317, 213, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-overimage'",
+          "rect": [317, 63, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
           "object": "LayoutHTMLCanvas CANVAS id='xorsolid color'",
           "rect": [175, 563, 50, 40],
           "reason": "invalidate paint rectangle"
         },
         {
-          "object": "LayoutHTMLCanvas CANVAS id='xorvideo'",
-          "rect": [601, 563, 50, 40],
+          "object": "LayoutHTMLCanvas CANVAS id='lightersolid color'",
+          "rect": [175, 463, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-outsolid color'",
+          "rect": [175, 363, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='destination-oversolid color'",
+          "rect": [175, 263, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-atopsolid color'",
+          "rect": [175, 213, 50, 40],
+          "reason": "invalidate paint rectangle"
+        },
+        {
+          "object": "LayoutHTMLCanvas CANVAS id='source-oversolid color'",
+          "rect": [175, 63, 50, 40],
           "reason": "invalidate paint rectangle"
         }
       ],
diff --git a/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/fast/images/fixed-img-src-change-after-scroll-expected.txt b/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/fast/images/fixed-img-src-change-after-scroll-expected.txt
index 945d5f3..702fd505 100644
--- a/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/fast/images/fixed-img-src-change-after-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/fast/images/fixed-img-src-change-after-scroll-expected.txt
@@ -8,12 +8,12 @@
       "paintInvalidations": [
         {
           "object": "LayoutImage (positioned) IMG id='img'",
-          "rect": [0, 50, 100, 100],
+          "rect": [0, 1050, 100, 100],
           "reason": "location change"
         },
         {
           "object": "LayoutImage (positioned) IMG id='img'",
-          "rect": [0, 1050, 100, 100],
+          "rect": [0, 50, 100, 100],
           "reason": "location change"
         }
       ]
diff --git a/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/fast/images/repaint-subrect-grid-expected.txt b/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/fast/images/repaint-subrect-grid-expected.txt
index 682a0f2..0918f7d 100644
--- a/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/fast/images/repaint-subrect-grid-expected.txt
+++ b/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/fast/images/repaint-subrect-grid-expected.txt
@@ -8,111 +8,111 @@
       "paintInvalidations": [
         {
           "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [45, 18, 20, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [45, 18, 20, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [-10, 18, 20, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [-10, 18, 20, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [36, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [36, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [36, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [36, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [27, 18, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [27, 18, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [18, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [18, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [18, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [18, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [9, 18, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [9, 18, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [0, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [0, 36, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [0, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
+          "rect": [0, 0, 19, 19],
+          "reason": "location change"
+        },
+        {
+          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
           "rect": [-100, -100, 19, 19],
           "reason": "location change"
         },
         {
           "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [0, 0, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [0, 0, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [18, 0, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [18, 0, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [36, 0, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [36, 0, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [-10, 18, 20, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [-10, 18, 20, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [9, 18, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [9, 18, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [27, 18, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [27, 18, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [45, 18, 20, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [45, 18, 20, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [0, 36, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [0, 36, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [18, 36, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [18, 36, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [36, 36, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
-          "rect": [36, 36, 19, 19],
-          "reason": "location change"
-        },
-        {
-          "object": "LayoutBlockFlow (positioned) DIV id='mask'",
           "rect": [-100, -100, 19, 19],
           "reason": "location change"
         }
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
index 94f9b6d..c8edc68 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
@@ -140,26 +140,32 @@
 
 bool IntersectionObservation::computeGeometry(IntersectionGeometry& geometry) const
 {
-    // Pre-oilpan, there will be a delay between the time when the target Element gets deleted
-    // (because its ref count dropped to zero) and when this IntersectionObservation gets
-    // deleted (during the next gc run, because the target Element is the only thing keeping
-    // the IntersectionObservation alive).  During that interval, we need to check that m_target
-    // hasn't been cleared.
+    // In the first few lines here, before initializeGeometry is called, "return true"
+    // effectively means "if the previous observed state was that root and target were
+    // intersecting, then generate a notification indicating that they are no longer
+    // intersecting."  This happens, for example, when root or target is removed from the
+    // DOM tree and not reinserted before the next frame is generated.
     Element* targetElement = target();
-    if (!targetElement || !targetElement->inShadowIncludingDocument())
+    if (!targetElement)
         return false;
-    LayoutObject* targetLayoutObject = targetElement->layoutObject();
+    if (!targetElement->inShadowIncludingDocument())
+        return true;
     DCHECK(m_observer);
+    Element* rootElement = m_observer->root();
+    if (rootElement && !rootElement->inShadowIncludingDocument())
+        return true;
+
     LayoutObject* rootLayoutObject = m_observer->rootLayoutObject();
+    if (!rootLayoutObject || !rootLayoutObject->isBoxModelObject())
+        return false;
     // TODO(szager): Support SVG
+    LayoutObject* targetLayoutObject = targetElement->layoutObject();
     if (!targetLayoutObject)
         return false;
     if (!targetLayoutObject->isBoxModelObject() && !targetLayoutObject->isText())
         return false;
-    if (!rootLayoutObject || !rootLayoutObject->isBoxModelObject())
-        return false;
     if (!isContainingBlockChainDescendant(targetLayoutObject, rootLayoutObject))
-        return false;
+        return true;
 
     initializeGeometry(geometry);
 
@@ -220,8 +226,8 @@
             pixelSnappedIntRect(geometry.intersectionRect),
             target());
         observer().enqueueIntersectionObserverEntry(*newEntry);
+        setLastThresholdIndex(newThresholdIndex);
     }
-    setLastThresholdIndex(newThresholdIndex);
 }
 
 void IntersectionObservation::disconnect()
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObservation.h b/third_party/WebKit/Source/core/dom/IntersectionObservation.h
index 0f66723..259dfe6 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObservation.h
+++ b/third_party/WebKit/Source/core/dom/IntersectionObservation.h
@@ -23,6 +23,8 @@
         LayoutRect intersectionRect;
         LayoutRect rootRect;
         bool doesIntersect;
+
+        IntersectionGeometry() : doesIntersect(false) {}
     };
 
     IntersectionObserver& observer() const { return *m_observer; }
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
index 805d4d35..89fe98b 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
@@ -192,8 +192,6 @@
 
 void IntersectionObserver::computeIntersectionObservations()
 {
-    if (!m_root || !m_root->inShadowIncludingDocument())
-        return;
     Document* callbackDocument = toDocument(m_callback->getExecutionContext());
     if (!callbackDocument)
         return;
diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp
index 75dd0477..b9950837 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
@@ -439,7 +439,7 @@
 
         event->setHandlingPassive(registeredListener.passive);
 
-        InspectorInstrumentation::willHandleEvent(this, event, registeredListener.listener.get(), registeredListener.useCapture);
+        InspectorInstrumentationCookie cookie = InspectorInstrumentation::willHandleEvent(this, event, registeredListener.listener.get(), registeredListener.useCapture);
 
         // To match Mozilla, the AT_TARGET phase fires both capturing and bubbling
         // event listeners, even though that violates some versions of the DOM spec.
@@ -447,6 +447,8 @@
         event->setHandlingPassive(false);
 
         RELEASE_ASSERT(i <= size);
+
+        InspectorInstrumentation::cancelPauseOnNextStatement(cookie);
     }
     d->firingEventIterators->removeLast();
 }
diff --git a/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp b/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
index e7765ce..3d39d873 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
@@ -80,9 +80,43 @@
     return jpeg;
 }
 
+namespace {
+
+class MockTaskRunner : public blink::WebTaskRunner {
+    void postTask(const WebTraceLocation&, Task*) override { }
+    void postDelayedTask(const WebTraceLocation&, Task*, double) override { }
+    WebTaskRunner* clone() override { return nullptr; }
+    double virtualTimeSeconds() const override { return 0.0; }
+    double monotonicallyIncreasingVirtualTimeSeconds() const override { return 0.0; }
+};
+
+}
+
+class ImageResourceTestMockFetchContext : public FetchContext {
+public:
+    static ImageResourceTestMockFetchContext* create()
+    {
+        return new ImageResourceTestMockFetchContext;
+    }
+
+    virtual ~ImageResourceTestMockFetchContext() { }
+
+    bool allowImage(bool imagesEnabled, const KURL&) const override { return true; }
+    bool canRequest(Resource::Type, const ResourceRequest&, const KURL&, const ResourceLoaderOptions&, bool forPreload, FetchRequest::OriginRestriction) const override { return true; }
+    bool shouldLoadNewResource(Resource::Type) const override { return true; }
+    WebTaskRunner* loadingTaskRunner() const override { return m_runner.get(); }
+
+private:
+    ImageResourceTestMockFetchContext()
+        :  m_runner(adoptPtr(new MockTaskRunner))
+    { }
+
+    OwnPtr<MockTaskRunner> m_runner;
+};
+
 TEST(ImageResourceTest, MultipartImage)
 {
-    ResourceFetcher* fetcher = ResourceFetcher::create(nullptr);
+    ResourceFetcher* fetcher = ResourceFetcher::create(ImageResourceTestMockFetchContext::create());
     KURL testURL(ParsedURLString, "http://www.test.com/cancelTest.html");
     URLTestHelpers::registerMockedURLLoad(testURL, "cancelTest.html", "text/html");
 
@@ -148,7 +182,7 @@
     KURL testURL(ParsedURLString, "http://www.test.com/cancelTest.html");
     URLTestHelpers::registerMockedURLLoad(testURL, "cancelTest.html", "text/html");
 
-    ResourceFetcher* fetcher = ResourceFetcher::create(nullptr);
+    ResourceFetcher* fetcher = ResourceFetcher::create(ImageResourceTestMockFetchContext::create());
 
     // Emulate starting a real load.
     ImageResource* cachedImage = ImageResource::create(ResourceRequest(testURL));
@@ -234,7 +268,7 @@
     cachedImage->setStatus(Resource::Pending);
 
     MockImageResourceClient client(cachedImage);
-    ResourceFetcher* fetcher = ResourceFetcher::create(nullptr);
+    ResourceFetcher* fetcher = ResourceFetcher::create(ImageResourceTestMockFetchContext::create());
 
     // Send the image response.
     Vector<unsigned char> jpeg = jpegImage();
diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp
index b770108..50c6fed 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.cpp
+++ b/third_party/WebKit/Source/core/fetch/Resource.cpp
@@ -253,6 +253,11 @@
 
 void Resource::load(ResourceFetcher* fetcher)
 {
+    // TOOD(japhet): Temporary, out of place hack to stop a top crasher.
+    // Make this more organic.
+    if (!fetcher->loadingTaskRunner())
+        return;
+
     RELEASE_ASSERT(!m_loader);
     ASSERT(stillNeedsLoad());
     m_status = Pending;
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp
index 6d565e3..57cf310 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp
@@ -42,12 +42,25 @@
 #include "platform/testing/URLTestHelpers.h"
 #include "platform/weborigin/KURL.h"
 #include "public/platform/Platform.h"
+#include "public/platform/WebTaskRunner.h"
 #include "public/platform/WebURLLoaderMockFactory.h"
 #include "public/platform/WebURLResponse.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace blink {
 
+namespace {
+
+class MockTaskRunner : public blink::WebTaskRunner {
+    void postTask(const WebTraceLocation&, Task*) override { }
+    void postDelayedTask(const WebTraceLocation&, Task*, double) override { }
+    WebTaskRunner* clone() override { return nullptr; }
+    double virtualTimeSeconds() const override { return 0.0; }
+    double monotonicallyIncreasingVirtualTimeSeconds() const override { return 0.0; }
+};
+
+}
+
 class ResourceFetcherTestMockFetchContext : public FetchContext {
 public:
     static ResourceFetcherTestMockFetchContext* create()
@@ -60,6 +73,7 @@
     bool allowImage(bool imagesEnabled, const KURL&) const override { return true; }
     bool canRequest(Resource::Type, const ResourceRequest&, const KURL&, const ResourceLoaderOptions&, bool forPreload, FetchRequest::OriginRestriction) const override { return true; }
     bool shouldLoadNewResource(Resource::Type) const override { return true; }
+    WebTaskRunner* loadingTaskRunner() const override { return m_runner.get(); }
 
     void setCachePolicy(CachePolicy policy) { m_policy = policy; }
     CachePolicy getCachePolicy() const override { return m_policy; }
@@ -67,9 +81,11 @@
 private:
     ResourceFetcherTestMockFetchContext()
         : m_policy(CachePolicyVerify)
+        , m_runner(adoptPtr(new MockTaskRunner))
     { }
 
     CachePolicy m_policy;
+    OwnPtr<MockTaskRunner> m_runner;
 };
 
 class ResourceFetcherTest : public ::testing::Test {
@@ -96,6 +112,10 @@
     Resource* resource = fetcher->requestResource(fetchRequest, TestResourceFactory());
     EXPECT_EQ(resource, static_cast<Resource*>(nullptr));
     EXPECT_EQ(memoryCache()->resourceForURL(secureURL), static_cast<Resource*>(nullptr));
+
+    // Try calling Resource::load directly. This shouldn't crash.
+    Resource* resource2 = Resource::create(secureURL, Resource::Raw);
+    resource2->load(fetcher);
 }
 
 TEST_F(ResourceFetcherTest, UseExistingResource)
diff --git a/third_party/WebKit/Source/core/frame/DOMTimer.cpp b/third_party/WebKit/Source/core/frame/DOMTimer.cpp
index 6966ace..8944f9aa 100644
--- a/third_party/WebKit/Source/core/frame/DOMTimer.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMTimer.cpp
@@ -108,7 +108,7 @@
     UserGestureIndicator gestureIndicator(m_userGestureToken.release());
 
     TRACE_EVENT1("devtools.timeline", "TimerFire", "data", InspectorTimerFireEvent::data(context, m_timeoutID));
-    InspectorInstrumentation::allowNativeBreakpoint(context, "timerFired", false);
+    InspectorInstrumentationCookie cookie = InspectorInstrumentation::allowNativeBreakpoint(context, "timerFired", false);
     InspectorInstrumentation::AsyncTask asyncTask(context, this);
 
     // Simple case for non-one-shot timers.
@@ -121,6 +121,7 @@
 
         // No access to member variables after this point, it can delete the timer.
         m_action->execute(context);
+        InspectorInstrumentation::cancelPauseOnNextStatement(cookie);
         return;
     }
 
@@ -130,6 +131,7 @@
     context->timers()->removeTimeoutByID(m_timeoutID);
 
     action->execute(context);
+    InspectorInstrumentation::cancelPauseOnNextStatement(cookie);
 
     TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data());
 
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index c079c45a..e92b336 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -4080,6 +4080,9 @@
 
     bool becameUnthrottled = wasThrottled && !canThrottleRendering();
     if (becameUnthrottled) {
+        // ScrollingCoordinator needs to update according to the new throttling status.
+        if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+            scrollingCoordinator->notifyGeometryChanged();
         // Start ticking animation frames again if necessary.
         page()->animator().scheduleVisualUpdate(m_frame.get());
         // Force a full repaint of this frame to ensure we are not left with a
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp
index 3f23590..aee5d04 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp
@@ -565,6 +565,11 @@
         didFireWebGLWarning();
 }
 
+void InspectorDOMDebuggerAgent::cancelPauseOnNextStatement()
+{
+    m_debuggerAgent->cancelPauseOnNextStatement();
+}
+
 void InspectorDOMDebuggerAgent::setXHRBreakpoint(ErrorString* errorString, const String& url)
 {
     if (url.isEmpty())
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.h b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.h
index 9d88619..c31965a 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.h
@@ -90,6 +90,7 @@
     void didFireWebGLError(const String& errorName);
     void didFireWebGLWarning();
     void didFireWebGLErrorOrWarning(const String& message);
+    void cancelPauseOnNextStatement();
 
     void disable(ErrorString*) override;
     void restore() override;
diff --git a/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl b/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl
index e2031a6..0171d65 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl
+++ b/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl
@@ -132,7 +132,10 @@
     void didExecuteScript(const InspectorInstrumentationCookie&);
 
     [DOMDebugger, Inline=FastReturn]
-    void willHandleEvent([Keep] EventTarget*, Event*, EventListener* listener, bool useCapture);
+    InspectorInstrumentationCookie willHandleEvent([Keep] EventTarget*, Event*, EventListener* listener, bool useCapture);
+
+    [DOMDebugger, Inline=FastReturn]
+    void cancelPauseOnNextStatement(const InspectorInstrumentationCookie&);
 
     [Page, Inline=FastReturn]
     void didUpdateLayout(LocalFrame*);
@@ -267,7 +270,7 @@
     void removedResourceFromMemoryCache(Resource* cachedResource);
 
     [DOMDebugger]
-    void allowNativeBreakpoint(ExecutionContext*, const String& name, bool sync);
+    InspectorInstrumentationCookie allowNativeBreakpoint(ExecutionContext*, const String& name, bool sync);
 
     [Worker]
     void didStartWorker(ExecutionContext*, WorkerInspectorProxy* proxy, bool waitingForDebugger);
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
index bbff8d05..0f22482 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
@@ -38,15 +38,12 @@
     , m_layoutAttributesPosition(0)
     , m_logicalCharacterOffset(0)
     , m_logicalMetricsListOffset(0)
-    , m_x(0)
-    , m_y(0)
-    , m_dx(0)
-    , m_dy(0)
     , m_isVerticalText(false)
     , m_inPathLayout(false)
     , m_textLengthSpacingInEffect(false)
     , m_textPath(nullptr)
     , m_textPathCurrentOffset(0)
+    , m_textPathDisplacement(0)
     , m_textPathSpacing(0)
     , m_textPathScaling(1)
 {
@@ -55,60 +52,66 @@
 
 SVGTextLayoutEngine::~SVGTextLayoutEngine() = default;
 
-void SVGTextLayoutEngine::updateCharacterPositionIfNeeded(float& x, float& y)
+bool SVGTextLayoutEngine::setCurrentTextPosition(const SVGCharacterData& data)
 {
-    if (m_inPathLayout)
-        return;
+    bool hasX = !SVGTextLayoutAttributes::isEmptyValue(data.x);
+    if (hasX)
+        m_textPosition.setX(data.x);
 
-    // Replace characters x/y position, with the current text position plus any
-    // relative adjustments, if it doesn't specify an absolute position itself.
-    if (SVGTextLayoutAttributes::isEmptyValue(x))
-        x = m_x + m_dx;
+    bool hasY = !SVGTextLayoutAttributes::isEmptyValue(data.y);
+    if (hasY)
+        m_textPosition.setY(data.y);
 
-    if (SVGTextLayoutAttributes::isEmptyValue(y))
-        y = m_y + m_dy;
-
-    m_dx = 0;
-    m_dy = 0;
-}
-
-void SVGTextLayoutEngine::updateCurrentTextPosition(float x, float y, float glyphAdvance)
-{
-    // Update current text position after processing the character.
-    if (m_isVerticalText) {
-        m_x = x;
-        m_y = y + glyphAdvance;
-    } else {
-        m_x = x + glyphAdvance;
-        m_y = y;
+    // If there's an absolute x/y position available, it marks the beginning of
+    // a new position along the path.
+    if (m_inPathLayout) {
+        // TODO(fs): If a new chunk (== absolute position) is defined while in
+        // path layout mode, alignment should be based on that chunk and not
+        // the path as a whole. (Re: the addition of m_textPathStartOffset
+        // below.)
+        if (m_isVerticalText) {
+            if (hasY)
+                m_textPathCurrentOffset = data.y + m_textPathStartOffset;
+        } else {
+            if (hasX)
+                m_textPathCurrentOffset = data.x + m_textPathStartOffset;
+        }
     }
+    return hasX || hasY;
 }
 
-void SVGTextLayoutEngine::updateRelativePositionAdjustmentsIfNeeded(float dx, float dy)
+void SVGTextLayoutEngine::advanceCurrentTextPosition(float glyphAdvance)
 {
-    // Update relative positioning information.
-    if (SVGTextLayoutAttributes::isEmptyValue(dx) && SVGTextLayoutAttributes::isEmptyValue(dy))
-        return;
+    // TODO(fs): m_textPathCurrentOffset should preferably also be updated
+    // here, but that requires a bit more untangling yet.
+    if (m_isVerticalText)
+        m_textPosition.setY(m_textPosition.y() + glyphAdvance);
+    else
+        m_textPosition.setX(m_textPosition.x() + glyphAdvance);
+}
 
-    if (SVGTextLayoutAttributes::isEmptyValue(dx))
-        dx = 0;
-    if (SVGTextLayoutAttributes::isEmptyValue(dy))
-        dy = 0;
+bool SVGTextLayoutEngine::applyRelativePositionAdjustmentsIfNeeded(const SVGCharacterData& data)
+{
+    FloatPoint delta;
+    bool hasDx = !SVGTextLayoutAttributes::isEmptyValue(data.dx);
+    if (hasDx)
+        delta.setX(data.dx);
+
+    bool hasDy = !SVGTextLayoutAttributes::isEmptyValue(data.dy);
+    if (hasDy)
+        delta.setY(data.dy);
+
+    // Apply dx/dy value adjustments to current text position, if needed.
+    m_textPosition.moveBy(delta);
 
     if (m_inPathLayout) {
-        if (m_isVerticalText) {
-            m_dx += dx;
-            m_dy = dy;
-        } else {
-            m_dx = dx;
-            m_dy += dy;
-        }
+        if (m_isVerticalText)
+            delta = delta.transposedPoint();
 
-        return;
+        m_textPathCurrentOffset += delta.x();
+        m_textPathDisplacement += delta.y();
     }
-
-    m_dx = dx;
-    m_dy = dy;
+    return hasDx || hasDy;
 }
 
 void SVGTextLayoutEngine::computeCurrentFragmentMetrics(SVGInlineTextBox* textBox)
@@ -345,10 +348,16 @@
 
     bool didStartTextFragment = false;
     bool applySpacingToNextCharacter = false;
+    bool needsFragmentPerGlyph = m_isVerticalText || m_inPathLayout || m_textLengthSpacingInEffect;
 
     float lastAngle = 0;
-    float baselineShift = baselineLayout.calculateBaselineShift(style);
-    baselineShift -= baselineLayout.calculateAlignmentBaselineShift(m_isVerticalText, textLineLayout);
+    float baselineShiftValue = baselineLayout.calculateBaselineShift(style);
+    baselineShiftValue -= baselineLayout.calculateAlignmentBaselineShift(m_isVerticalText, textLineLayout);
+    FloatPoint baselineShift;
+    if (m_isVerticalText)
+        baselineShift.setX(baselineShiftValue);
+    else
+        baselineShift.setY(-baselineShiftValue);
 
     // Main layout algorithm.
     const unsigned boxEndOffset = textBox->start() + textBox->len();
@@ -374,63 +383,42 @@
         if (it != characterDataMap.end())
             data = it->value;
 
-        float x = data.x;
-        float y = data.y;
+        // TODO(fs): Use the return value to eliminate the additional
+        // hash-lookup below when determining if this text box should be tagged
+        // as starting a new text chunk.
+        setCurrentTextPosition(data);
 
         // When we've advanced to the box start offset, determine using the original x/y values,
         // whether this character starts a new text chunk, before doing any further processing.
         if (m_visualMetricsIterator.characterOffset() == textBox->start())
             textBox->setStartsNewTextChunk(logicalAttributes->context()->characterStartsNewTextChunk(m_logicalCharacterOffset));
 
-        float angle = SVGTextLayoutAttributes::isEmptyValue(data.rotate) ? 0 : data.rotate;
+        bool hasRelativePosition = applyRelativePositionAdjustmentsIfNeeded(data);
 
-        // Calculate glyph orientation angle.
+        // Determine the orientation of the current glyph.
         // Font::width() calculates the resolved FontOrientation for each character,
-        // but is not exposed today to avoid the API complexity.
+        // but that value is not exposed today to avoid the API complexity.
         UChar32 currentCharacter = textLineLayout.codepointAt(m_visualMetricsIterator.characterOffset());
         FontOrientation fontOrientation = font.getFontDescription().orientation();
         fontOrientation = adjustOrientationForCharacterInMixedVertical(fontOrientation, currentCharacter);
 
         // Calculate glyph advance.
-        // Shaping engine takes care of x/y orientation shifts for different fontOrientation values.
+        // The shaping engine takes care of x/y orientation shifts for different fontOrientation values.
         float glyphAdvance = visualMetrics.advance(fontOrientation);
 
-        // Assign current text position to x/y values, if needed.
-        updateCharacterPositionIfNeeded(x, y);
-
-        // Apply dx/dy value adjustments to current text position, if needed.
-        updateRelativePositionAdjustmentsIfNeeded(data.dx, data.dy);
-
-        // Calculate CSS 'letter-spacing' and 'word-spacing' for next character, if needed.
+        // Calculate CSS 'letter-spacing' and 'word-spacing' for the character, if needed.
         float spacing = spacingLayout.calculateCSSSpacing(currentCharacter);
 
-        float textPathShiftX = 0;
-        float textPathShiftY = 0;
+        FloatPoint textPathShift;
+        float angle = 0;
+        FloatPoint position;
         if (m_inPathLayout) {
             float scaledGlyphAdvance = glyphAdvance * m_textPathScaling;
-            if (m_isVerticalText) {
-                // If there's an absolute y position available, it marks the beginning of a new position along the path.
-                if (!SVGTextLayoutAttributes::isEmptyValue(y))
-                    m_textPathCurrentOffset = y + m_textPathStartOffset;
-
-                m_textPathCurrentOffset += m_dy;
-                m_dy = 0;
-
-                // Apply dx/dy correction and setup translations that move to the glyph midpoint.
-                textPathShiftX += m_dx + baselineShift;
-                textPathShiftY -= scaledGlyphAdvance / 2;
-            } else {
-                // If there's an absolute x position available, it marks the beginning of a new position along the path.
-                if (!SVGTextLayoutAttributes::isEmptyValue(x))
-                    m_textPathCurrentOffset = x + m_textPathStartOffset;
-
-                m_textPathCurrentOffset += m_dx;
-                m_dx = 0;
-
-                // Apply dx/dy correction and setup translations that move to the glyph midpoint.
-                textPathShiftX -= scaledGlyphAdvance / 2;
-                textPathShiftY += m_dy - baselineShift;
-            }
+            // Setup translations that move to the glyph midpoint.
+            textPathShift.set(-scaledGlyphAdvance / 2, m_textPathDisplacement);
+            if (m_isVerticalText)
+                textPathShift = textPathShift.transposedPoint();
+            textPathShift += baselineShift;
 
             // Calculate current offset along path.
             float textPathOffset = m_textPathCurrentOffset + scaledGlyphAdvance / 2;
@@ -438,8 +426,7 @@
             // Move to next character.
             m_textPathCurrentOffset += scaledGlyphAdvance + m_textPathSpacing + spacing * m_textPathScaling;
 
-            FloatPoint point;
-            PathPositionMapper::PositionType positionType = m_textPath->pointAndNormalAtLength(textPathOffset, point, angle);
+            PathPositionMapper::PositionType positionType = m_textPath->pointAndNormalAtLength(textPathOffset, position, angle);
 
             // Skip character, if we're before the path.
             if (positionType == PathPositionMapper::BeforePath) {
@@ -452,26 +439,22 @@
             if (positionType == PathPositionMapper::AfterPath)
                 break;
 
-            x = point.x();
-            y = point.y();
+            m_textPosition = position;
 
             // For vertical text on path, the actual angle has to be rotated 90 degrees anti-clockwise, not the orientation angle!
             if (m_isVerticalText)
                 angle -= 90;
         } else {
-            // Apply all previously calculated shift values.
-            if (m_isVerticalText)
-                x += baselineShift;
-            else
-                y -= baselineShift;
-
-            x += m_dx;
-            y += m_dy;
+            position = m_textPosition;
+            position += baselineShift;
         }
 
+        if (!SVGTextLayoutAttributes::isEmptyValue(data.rotate))
+            angle += data.rotate;
+
         // Determine whether we have to start a new fragment.
-        bool shouldStartNewFragment = m_dx || m_dy || m_isVerticalText || m_inPathLayout || angle || angle != lastAngle
-            || applySpacingToNextCharacter || m_textLengthSpacingInEffect;
+        bool shouldStartNewFragment = needsFragmentPerGlyph || hasRelativePosition
+            || angle || angle != lastAngle || applySpacingToNextCharacter;
 
         // If we already started a fragment, close it now.
         if (didStartTextFragment && shouldStartNewFragment) {
@@ -487,18 +470,18 @@
             didStartTextFragment = true;
             m_currentTextFragment.characterOffset = m_visualMetricsIterator.characterOffset();
             m_currentTextFragment.metricsListOffset = m_visualMetricsIterator.metricsListOffset();
-            m_currentTextFragment.x = x;
-            m_currentTextFragment.y = y;
+            m_currentTextFragment.x = position.x();
+            m_currentTextFragment.y = position.y();
 
             // Build fragment transformation.
             if (angle)
                 m_currentTextFragment.transform.rotate(angle);
 
-            if (textPathShiftX || textPathShiftY)
-                m_currentTextFragment.transform.translate(textPathShiftX, textPathShiftY);
+            if (textPathShift.x() || textPathShift.y())
+                m_currentTextFragment.transform.translate(textPathShift.x(), textPathShift.y());
 
-            // In vertical text, always rotate by 90 degrees regardless of fontOrientation.
-            // Shaping engine takes care of the necessary orientation.
+            // For vertical text, always rotate by 90 degrees regardless of fontOrientation.
+            // The shaping engine takes care of the necessary orientation.
             if (m_isVerticalText)
                 m_currentTextFragment.transform.rotate(90);
 
@@ -508,24 +491,12 @@
                 m_currentTextFragment.lengthAdjustScale = m_textPathScaling;
         }
 
-        // Update current text position, after processing of the current character finished.
-        if (m_inPathLayout) {
-            updateCurrentTextPosition(x, y, glyphAdvance);
-        } else {
-            // Apply CSS 'kerning', 'letter-spacing' and 'word-spacing' to next character, if needed.
-            if (spacing)
-                applySpacingToNextCharacter = true;
+        // Advance current text position after processing of the current character finished.
+        advanceCurrentTextPosition(glyphAdvance + spacing);
 
-            float xNew = x - m_dx;
-            float yNew = y - m_dy;
-
-            if (m_isVerticalText)
-                xNew -= baselineShift;
-            else
-                yNew += baselineShift;
-
-            updateCurrentTextPosition(xNew, yNew, glyphAdvance + spacing);
-        }
+        // Apply CSS 'letter-spacing' and 'word-spacing' to the next character, if needed.
+        if (!m_inPathLayout && spacing)
+            applySpacingToNextCharacter = true;
 
         advanceToNextLogicalCharacter(logicalMetrics);
         m_visualMetricsIterator.next();
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h
index fc510dfe..cdac575 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h
@@ -58,9 +58,9 @@
     void finishLayout();
 
 private:
-    void updateCharacterPositionIfNeeded(float& x, float& y);
-    void updateCurrentTextPosition(float x, float y, float glyphAdvance);
-    void updateRelativePositionAdjustmentsIfNeeded(float dx, float dy);
+    bool setCurrentTextPosition(const SVGCharacterData&);
+    void advanceCurrentTextPosition(float glyphAdvance);
+    bool applyRelativePositionAdjustmentsIfNeeded(const SVGCharacterData&);
 
     void computeCurrentFragmentMetrics(SVGInlineTextBox*);
     void recordTextFragment(SVGInlineTextBox*);
@@ -85,10 +85,7 @@
     unsigned m_logicalCharacterOffset;
     unsigned m_logicalMetricsListOffset;
     SVGInlineTextMetricsIterator m_visualMetricsIterator;
-    float m_x;
-    float m_y;
-    float m_dx;
-    float m_dy;
+    FloatPoint m_textPosition;
     bool m_isVerticalText;
     bool m_inPathLayout;
     bool m_textLengthSpacingInEffect;
@@ -97,6 +94,7 @@
     OwnPtr<PathPositionMapper> m_textPath;
     float m_textPathStartOffset;
     float m_textPathCurrentOffset;
+    float m_textPathDisplacement;
     float m_textPathSpacing;
     float m_textPathScaling;
 };
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
index c56f674c..9686188 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -724,6 +724,8 @@
 
     if (const FrameView::ScrollableAreaSet* scrollableAreas = frameView->scrollableAreas()) {
         for (const ScrollableArea* scrollableArea : *scrollableAreas) {
+            if (scrollableArea->isFrameView() && toFrameView(scrollableArea)->shouldThrottleRendering())
+                continue;
             // Composited scrollable areas can be scrolled off the main thread.
             if (scrollableArea->usesCompositedScrolling())
                 continue;
diff --git a/third_party/WebKit/Source/devtools/devtools.gypi b/third_party/WebKit/Source/devtools/devtools.gypi
index 6dc78d6..cd6a22c 100644
--- a/third_party/WebKit/Source/devtools/devtools.gypi
+++ b/third_party/WebKit/Source/devtools/devtools.gypi
@@ -156,7 +156,6 @@
             'front_end/sdk/NetworkManager.js',
             'front_end/sdk/NetworkRequest.js',
             'front_end/sdk/PaintProfiler.js',
-            'front_end/sdk/ProfileTreeModel.js',
             'front_end/sdk/RemoteObject.js',
             'front_end/sdk/Resource.js',
             'front_end/sdk/ResourceTreeModel.js',
diff --git a/third_party/WebKit/Source/devtools/front_end/devtools.js b/third_party/WebKit/Source/devtools/front_end/devtools.js
index 8733c4a..dcbcd75 100644
--- a/third_party/WebKit/Source/devtools/front_end/devtools.js
+++ b/third_party/WebKit/Source/devtools/front_end/devtools.js
@@ -525,6 +525,9 @@
      */
     recordEnumeratedHistogram: function(actionName, actionCode, bucketSize)
     {
+        // Support for M49 frontend.
+        if (actionName === "DevTools.DrawerShown")
+            return;
         DevToolsAPI.sendMessageToEmbedder("recordEnumeratedHistogram", [actionName, actionCode, bucketSize], null);
     },
 
diff --git a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
index 6025a36..23b353d 100644
--- a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
+++ b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
@@ -1281,6 +1281,19 @@
 }
 
 /**
+ * @return {!Multimap<!KEY, !VALUE>}
+ */
+Map.prototype.inverse = function()
+{
+    var result = new Multimap();
+    for (var key of this.keys()) {
+        var value = this.get(key);
+        result.set(value, key);
+    }
+    return result;
+}
+
+/**
  * @constructor
  * @template K, V
  */
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfileDataModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfileDataModel.js
index 878b2e59..d51f72d5 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfileDataModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfileDataModel.js
@@ -2,82 +2,72 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-/**
- * @constructor
- * @extends {WebInspector.ProfileNode}
- * @param {!ProfilerAgent.CPUProfileNode} sourceNode
- * @param {number} sampleTime
- */
-WebInspector.CPUProfileNode = function(sourceNode, sampleTime)
-{
-    WebInspector.ProfileNode.call(this, sourceNode.functionName, sourceNode.scriptId, sourceNode.url, sourceNode.lineNumber, sourceNode.columnNumber);
-    this.id = sourceNode.id;
-    this.self = sourceNode.hitCount * sampleTime;
-    this.callUID = sourceNode.callUID;
-    this.positionTicks = sourceNode.positionTicks;
-    this.deoptReason = sourceNode.deoptReason;
-    // TODO: Remove the following field in favor of this.self
-    this.selfTime = this.self;
-}
-
-WebInspector.CPUProfileNode.prototype = {
-    __proto__: WebInspector.ProfileNode.prototype
-}
 
 /**
  * @constructor
- * @extends {WebInspector.ProfileTreeModel}
  * @param {!ProfilerAgent.CPUProfile} profile
  */
 WebInspector.CPUProfileDataModel = function(profile)
 {
+    this.profileHead = profile.head;
     this.samples = profile.samples;
     this.timestamps = profile.timestamps;
-    // Convert times from sec to msec.
     this.profileStartTime = profile.startTime * 1000;
     this.profileEndTime = profile.endTime * 1000;
-    this.totalHitCount = 0;
-    if (!WebInspector.moduleSetting("showNativeFunctionsInJSProfile").get())
-        this._filterNativeFrames(profile.head);
-    this.profileHead = this._translateProfileTree(profile.head);
-    WebInspector.ProfileTreeModel.call(this, this.profileHead, this.profileStartTime, this.profileEndTime);
-    this._extractMetaNodes();
+    this._assignParentsInProfile();
     if (this.samples) {
-        this._buildIdToNodeMap();
         this._sortSamples();
         this._normalizeTimestamps();
+        this._buildIdToNodeMap();
         this._fixMissingSamples();
     }
-    this._assignTotalTimes(this.profileHead);
+    if (!WebInspector.moduleSetting("showNativeFunctionsInJSProfile").get())
+        this._filterNativeFrames();
+    this._assignDepthsInProfile();
+    this._calculateTimes(profile);
 }
 
 WebInspector.CPUProfileDataModel.prototype = {
     /**
-     * @param {!ProfilerAgent.CPUProfileNode} root
+     * @param {!ProfilerAgent.CPUProfile} profile
      */
-    _filterNativeFrames: function(root)
+    _calculateTimes: function(profile)
     {
-        // TODO: get rid of this function and do the filtering while _translateProfileTree
+        function totalHitCount(node) {
+            var result = node.hitCount;
+            for (var i = 0; i < node.children.length; i++)
+                result += totalHitCount(node.children[i]);
+            return result;
+        }
+        profile.totalHitCount = totalHitCount(profile.head);
+        this.totalHitCount = profile.totalHitCount;
+
+        var duration = this.profileEndTime - this.profileStartTime;
+        var samplingInterval = duration / profile.totalHitCount;
+        this.samplingInterval = samplingInterval;
+
+        function calculateTimesForNode(node) {
+            node.selfTime = node.hitCount * samplingInterval;
+            var totalHitCount = node.hitCount;
+            for (var i = 0; i < node.children.length; i++)
+                totalHitCount += calculateTimesForNode(node.children[i]);
+            node.totalTime = totalHitCount * samplingInterval;
+            return totalHitCount;
+        }
+        calculateTimesForNode(profile.head);
+    },
+
+    _filterNativeFrames: function()
+    {
         if (this.samples) {
-            /** @type {!Map<number, !ProfilerAgent.CPUProfileNode>} */
-            var idToNode = new Map();
-            var stack = [root];
-            while (stack.length) {
-                var node = stack.pop();
-                idToNode.set(node.id, node);
-                for (var i = 0; i < node.children.length; i++) {
-                    node.children[i].parent = node;
-                    stack.push(node.children[i]);
-                }
-            }
             for (var i = 0; i < this.samples.length; ++i) {
-                var node = idToNode.get(this.samples[i]);
+                var node = this.nodeByIndex(i);
                 while (isNativeNode(node))
                     node = node.parent;
                 this.samples[i] = node.id;
             }
         }
-        processSubtree(root);
+        processSubtree(this.profileHead);
 
         /**
          * @param {!ProfilerAgent.CPUProfileNode} node
@@ -128,43 +118,44 @@
         }
     },
 
-    /**
-     * @param {!ProfilerAgent.CPUProfileNode} root
-     * @return {!WebInspector.CPUProfileNode}
-     */
-    _translateProfileTree: function(root)
+    _assignParentsInProfile: function()
     {
-        /**
-         * @param  {!ProfilerAgent.CPUProfileNode} node
-         * @return {number}
-         */
-        function computeHitCountForSubtree(node)
-        {
-            return node.children.reduce((acc, node) => acc + computeHitCountForSubtree(node), node.hitCount);
+        var head = this.profileHead;
+        head.parent = null;
+        var nodesToTraverse = [ head ];
+        while (nodesToTraverse.length) {
+            var parent = nodesToTraverse.pop();
+            var children = parent.children;
+            var length = children.length;
+            for (var i = 0; i < length; ++i) {
+                var child = children[i];
+                child.parent = parent;
+                if (child.children.length)
+                    nodesToTraverse.push(child);
+            }
         }
-        this.totalHitCount = computeHitCountForSubtree(root);
-        var sampleTime = (this.profileEndTime - this.profileStartTime) / this.totalHitCount;
-        var resultRoot = new WebInspector.CPUProfileNode(root, sampleTime);
-        var targetNodeStack = [resultRoot];
-        var sourceNodeStack = [root];
-        while (sourceNodeStack.length) {
-            var sourceNode = sourceNodeStack.pop();
-            var parentNode = targetNodeStack.pop();
-            parentNode.children = sourceNode.children.map(child => new WebInspector.CPUProfileNode(child, sampleTime));
-            sourceNodeStack.push.apply(sourceNodeStack, sourceNode.children);
-            targetNodeStack.push.apply(targetNodeStack, parentNode.children);
-        }
-        return resultRoot;
     },
 
-    /**
-     * @param {!WebInspector.ProfileNode} node
-     */
-    _assignTotalTimes: function(node)
+    _assignDepthsInProfile: function()
     {
-        // TODO: get rid of this field in favor of this.total
-        node.totalTime = node.total;
-        node.children.forEach(this._assignTotalTimes, this);
+        var head = this.profileHead;
+        head.depth = -1;
+        this.maxDepth = 0;
+        var nodesToTraverse = [ head ];
+        while (nodesToTraverse.length) {
+            var parent = nodesToTraverse.pop();
+            var depth = parent.depth + 1;
+            if (depth > this.maxDepth)
+                this.maxDepth = depth;
+            var children = parent.children;
+            var length = children.length;
+            for (var i = 0; i < length; ++i) {
+                var child = children[i];
+                child.depth = depth;
+                if (child.children.length)
+                    nodesToTraverse.push(child);
+            }
+        }
     },
 
     _sortSamples: function()
@@ -222,7 +213,7 @@
 
     _buildIdToNodeMap: function()
     {
-        /** @type {!Object<number, !WebInspector.CPUProfileNode>} */
+        /** @type {!Object.<number, !ProfilerAgent.CPUProfileNode>} */
         this._idToNode = {};
         var idToNode = this._idToNode;
         var stack = [this.profileHead];
@@ -232,10 +223,7 @@
             for (var i = 0; i < node.children.length; i++)
                 stack.push(node.children[i]);
         }
-    },
 
-    _extractMetaNodes: function()
-    {
         var topLevelNodes = this.profileHead.children;
         for (var i = 0; i < topLevelNodes.length && !(this.gcNode && this.programNode && this.idleNode); i++) {
             var node = topLevelNodes[i];
@@ -277,8 +265,8 @@
         }
 
         /**
-         * @param {!WebInspector.ProfileNode} node
-         * @return {!WebInspector.ProfileNode}
+         * @param {!ProfilerAgent.CPUProfileNode} node
+         * @return {!ProfilerAgent.CPUProfileNode}
          */
         function bottomNode(node)
         {
@@ -298,8 +286,8 @@
     },
 
     /**
-     * @param {function(number, !WebInspector.CPUProfileNode, number)} openFrameCallback
-     * @param {function(number, !WebInspector.CPUProfileNode, number, number, number)} closeFrameCallback
+     * @param {function(number, !ProfilerAgent.CPUProfileNode, number)} openFrameCallback
+     * @param {function(number, !ProfilerAgent.CPUProfileNode, number, number, number)} closeFrameCallback
      * @param {number=} startTime
      * @param {number=} stopTime
      */
@@ -370,7 +358,7 @@
                 var start = stackStartTimes[stackTop];
                 var duration = sampleTime - start;
                 stackChildrenDuration[stackTop - 1] += duration;
-                closeFrameCallback(prevNode.depth, /** @type {!WebInspector.CPUProfileNode} */(prevNode), start, duration, duration - stackChildrenDuration[stackTop]);
+                closeFrameCallback(prevNode.depth, prevNode, start, duration, duration - stackChildrenDuration[stackTop]);
                 --stackTop;
                 if (node.depth === prevNode.depth) {
                     stackNodes.push(node);
@@ -402,19 +390,18 @@
             var start = stackStartTimes[stackTop];
             var duration = sampleTime - start;
             stackChildrenDuration[stackTop - 1] += duration;
-            closeFrameCallback(node.depth, /** @type {!WebInspector.CPUProfileNode} */(node), start, duration, duration - stackChildrenDuration[stackTop]);
+            closeFrameCallback(node.depth, node, start, duration, duration - stackChildrenDuration[stackTop]);
             --stackTop;
         }
     },
 
     /**
      * @param {number} index
-     * @return {!WebInspector.CPUProfileNode}
+     * @return {!ProfilerAgent.CPUProfileNode}
      */
     nodeByIndex: function(index)
     {
         return this._idToNode[this.samples[index]];
-    },
+    }
 
-    __proto__: WebInspector.ProfileTreeModel.prototype
 }
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/ProfileTreeModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/ProfileTreeModel.js
deleted file mode 100644
index 49b4fac..0000000
--- a/third_party/WebKit/Source/devtools/front_end/sdk/ProfileTreeModel.js
+++ /dev/null
@@ -1,123 +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.
-
-/**
- * @constructor
- */
-WebInspector.ProfileNode = function(functionName, scriptId, url, lineNumber, columnNumber)
-{
-    /** @type {!RuntimeAgent.CallFrame} */
-    this.frame = {
-        functionName: functionName,
-        scriptId: scriptId,
-        url: url,
-        lineNumber: lineNumber,
-        columnNumber: columnNumber
-    };
-    /** @type {number} */
-    this.callUID;
-    /** @type {number} */
-    this.self = 0;
-    /** @type {number} */
-    this.total = 0;
-    /** @type {number} */
-    this.id = 0;
-    /** @type {?WebInspector.ProfileNode} */
-    this.parent = null;
-    /** @type {!Array<!WebInspector.ProfileNode>} */
-    this.children = [];
-}
-
-WebInspector.ProfileNode.prototype = {
-    /**
-     * @return {string}
-     */
-    get functionName()
-    {
-        return this.frame.functionName;
-    },
-
-    /**
-     * @return {string}
-     */
-    get scriptId()
-    {
-        return this.frame.scriptId;
-    },
-
-    /**
-     * @return {string}
-     */
-    get url()
-    {
-        return this.frame.url;
-    },
-
-    /**
-     * @return {number}
-     */
-    get lineNumber()
-    {
-        return this.frame.lineNumber;
-    },
-
-    /**
-     * @return {number}
-     */
-    get columnNumber()
-    {
-        return this.frame.columnNumber;
-    }
-}
-
-/**
- * @constructor
- * @param {!WebInspector.ProfileNode} root
- * @param {number} begin
- * @param {number} end
- */
-WebInspector.ProfileTreeModel = function(root, begin, end)
-{
-    this.root = root;
-    this.begin = begin;
-    this.end = end;
-    this._assignDepthsAndParents();
-    this._calculateTotals(this.root);
-}
-
-WebInspector.ProfileTreeModel.prototype = {
-    _assignDepthsAndParents: function()
-    {
-        var root = this.root;
-        root.depth = -1;
-        root.parent = null;
-        this.maxDepth = 0;
-        var nodesToTraverse = [root];
-        while (nodesToTraverse.length) {
-            var parent = nodesToTraverse.pop();
-            var depth = parent.depth + 1;
-            if (depth > this.maxDepth)
-                this.maxDepth = depth;
-            var children = parent.children;
-            var length = children.length;
-            for (var i = 0; i < length; ++i) {
-                var child = children[i];
-                child.depth = depth;
-                child.parent = parent;
-                if (child.children.length)
-                    nodesToTraverse.push(child);
-            }
-        }
-    },
-
-    /**
-     * @param {!WebInspector.ProfileNode} node
-     * @return {number}
-     */
-    _calculateTotals: function(node)
-    {
-        node.total = node.children.reduce((acc, child) => acc + this._calculateTotals(child), node.self);
-        return node.total;
-    }
-}
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/module.json b/third_party/WebKit/Source/devtools/front_end/sdk/module.json
index cb90918b..dd2f07e 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/module.json
@@ -68,7 +68,6 @@
         "ConsoleModel.js",
         "ContentProviders.js",
         "CookieParser.js",
-        "ProfileTreeModel.js",
         "CPUProfileDataModel.js",
         "CPUProfilerModel.js",
         "CSSMatchedStyles.js",
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/ScopeChainSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/ScopeChainSidebarPane.js
index ac4a2ef80..53a773a 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScopeChainSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScopeChainSidebarPane.js
@@ -42,6 +42,16 @@
      */
     update: function(callFrame)
     {
+        WebInspector.SourceMapNamesResolver.resolveThisObject(callFrame)
+            .then(this._innerUpdate.bind(this, callFrame));
+    },
+
+    /**
+     * @param {?WebInspector.DebuggerModel.CallFrame} callFrame
+     * @param {?WebInspector.RemoteObject} thisObject
+     */
+    _innerUpdate: function(callFrame, thisObject)
+    {
         this.element.removeChildren();
 
         if (!callFrame) {
@@ -65,7 +75,6 @@
                 foundLocalScope = true;
                 title = WebInspector.UIString("Local");
                 emptyPlaceholder = WebInspector.UIString("No Variables");
-                var thisObject = callFrame.thisObject();
                 if (thisObject)
                     extraProperties.push(new WebInspector.RemoteObjectProperty("this", thisObject));
                 if (i == 0) {
@@ -122,7 +131,10 @@
             section.element.classList.add("scope-chain-sidebar-pane-section");
             this.element.appendChild(section.element);
         }
+        this._sidebarPaneUpdatedForTest();
     },
 
+    _sidebarPaneUpdatedForTest: function() { },
+
     __proto__: WebInspector.SidebarPane.prototype
 }
\ No newline at end of file
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourceMapNamesResolver.js b/third_party/WebKit/Source/devtools/front_end/sources/SourceMapNamesResolver.js
index 3eca7c8a..a3a1c9aa 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourceMapNamesResolver.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourceMapNamesResolver.js
@@ -288,6 +288,48 @@
 }
 
 /**
+ * @param {?WebInspector.DebuggerModel.CallFrame} callFrame
+ * @return {!Promise<?WebInspector.RemoteObject>}
+ */
+WebInspector.SourceMapNamesResolver.resolveThisObject = function(callFrame)
+{
+    if (!callFrame)
+        return Promise.resolve(/** @type {?WebInspector.RemoteObject} */(null));
+    if (!Runtime.experiments.isEnabled("resolveVariableNames"))
+        return Promise.resolve(callFrame.thisObject());
+
+    return WebInspector.SourceMapNamesResolver._resolveScope(callFrame.scopeChain()[0])
+        .then(onScopeResolved);
+
+    /**
+     * @param {!Map<string, string>} namesMapping
+     * @return {!Promise<?WebInspector.RemoteObject>}
+     */
+    function onScopeResolved(namesMapping)
+    {
+        var thisMappings = namesMapping.inverse().get("this");
+        if (!thisMappings || thisMappings.size !== 1)
+            return Promise.resolve(callFrame.thisObject());
+
+        var thisMapping = thisMappings.valuesArray()[0];
+        var callback;
+        var promise = new Promise(fulfill => callback = fulfill);
+        callFrame.evaluate(thisMapping, "backtrace", false, true, false, true, onEvaluated.bind(null, callback));
+        return promise;
+    }
+
+    /**
+     * @param {function(!WebInspector.RemoteObject)} callback
+     * @param {?RuntimeAgent.RemoteObject} evaluateResult
+     */
+    function onEvaluated(callback, evaluateResult)
+    {
+        var remoteObject = evaluateResult ? callFrame.target().runtimeModel.createRemoteObject(evaluateResult) : callFrame.thisObject();
+        callback(remoteObject);
+    }
+}
+
+/**
  * @param {!WebInspector.DebuggerModel.Scope} scope
  * @return {!WebInspector.RemoteObject}
  */
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
index a4542fd..85d2040e 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
@@ -143,8 +143,6 @@
 {
     WebInspector.NavigatorView.call(this);
     WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.InspectedURLChanged, this._inspectedURLChanged, this);
-
-    this._scriptsTree.setInteractiveFilterable(true);
 }
 
 WebInspector.SourcesNavigatorView.prototype = {
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.css b/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.css
index cb48ea7..e0a044cb 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.css
+++ b/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.css
@@ -125,7 +125,3 @@
 .tree-outline ol.children.expanded {
     display: block;
 }
-
-.tree-text-interactive-highlight {
-    text-decoration: underline;
-}
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js b/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
index 14baa13..47c9b79f 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
@@ -43,18 +43,9 @@
     this._contentElement = this._rootElement._childrenListNode;
     this._contentElement.addEventListener("keydown", this._treeKeyDown.bind(this), true);
 
-    this.element = this._contentElement;
-
     this.setFocusable(!nonFocusable);
 
-    this.element.addEventListener("keypress", this._handleKeyPressForHighlighting.bind(this), true);
-    this.element.addEventListener("blur", this._clearFilter.bind(this), true);
-    this.element.addEventListener("click", this._clearFilter.bind(this), true);
-
-    this._currentSelectionFilterString = "";
-    this._interactiveFilterEnabled = false;
-    /** @type {!Array.<!TreeElement>} */
-    this._highlightedNodes = []
+    this.element = this._contentElement;
 }
 
 TreeOutline.Events = {
@@ -84,89 +75,6 @@
     },
 
     /**
-     * @param {boolean} enable
-     */
-    setInteractiveFilterable: function(enable)
-    {
-        if (enable === this._interactiveFilterEnabled)
-            return;
-        if (!enable)
-            this._setCurrentSelectionFilterString("");
-        this._interactiveFilterEnabled = enable;
-    },
-
-    /**
-     * @param {string} filterString
-     */
-    _setCurrentSelectionFilterString: function(filterString)
-    {
-        this._currentSelectionFilterString = filterString;
-        this._refreshHighlighting();
-    },
-
-    /**
-     * @param {string} filterString
-     * @return {!RegExp}
-     */
-    _makeFilterRegexFromString: function(filterString)
-    {
-        return new RegExp(filterString.escapeForRegExp(), "gi")
-    },
-
-    _refreshHighlighting: function()
-    {
-        if (!this._rootElement)
-            return;
-
-        for (var changedNode of this._highlightedNodes)
-            changedNode._revertHighlightChanges();
-
-        this._highlightedNodes = [];
-
-        if (!this._currentSelectionFilterString)
-            return;
-
-        if (this.selectedTreeElement && !this.selectedTreeElement.selectable) {
-            if (!this.selectNext())
-                this.selectPrevious();
-        }
-
-        var filterRegex = this._makeFilterRegexFromString(this._currentSelectionFilterString);
-        var node = this._rootElement.firstChild();
-        while (node) {
-            if (node._applyHighlightFilter(filterRegex))
-                this._highlightedNodes.push(node);
-            node = node.traverseNextTreeElement(true, null, true);
-        }
-    },
-
-    _clearFilter: function()
-    {
-        if (this._interactiveFilterEnabled)
-            this._setCurrentSelectionFilterString("");
-    },
-
-    /**
-     * @param {!Event} event
-     */
-    _handleKeyPressForHighlighting: function(event)
-    {
-        if (!this._interactiveFilterEnabled)
-            return;
-
-        if (event.target !== this._contentElement)
-            return;
-
-        if (!this.selectedTreeElement || event.shiftKey || event.metaKey || event.ctrlKey)
-            return;
-
-        var currentFilterString = this._currentSelectionFilterString;
-        var key = event.data;
-        if (key !== "\r" && key !== "\n" && (key !== " " || currentFilterString))
-            this._setCurrentSelectionFilterString(currentFilterString + event.data);
-    },
-
-    /**
      * @return {?TreeElement}
      */
     firstChild: function()
@@ -244,9 +152,9 @@
     setFocusable: function(focusable)
     {
         if (focusable)
-            this.element.setAttribute("tabIndex", 0);
+            this._contentElement.setAttribute("tabIndex", 0);
         else
-            this.element.removeAttribute("tabIndex");
+            this._contentElement.removeAttribute("tabIndex");
     },
 
     focus: function()
@@ -321,24 +229,13 @@
         if (!this.selectedTreeElement || event.shiftKey || event.metaKey || event.ctrlKey)
             return;
 
-        var currentFilterString = this._currentSelectionFilterString;
         var handled = false;
-        var key = event.keyCode;
         var nextSelectedElement;
-
-        switch (key) {
-        case WebInspector.KeyboardShortcut.Keys.Up.code:
-            if (!event.altKey)
-                handled = this.selectPrevious();
-            break;
-        case WebInspector.KeyboardShortcut.Keys.Down.code:
-            if (!event.altKey)
-                handled = this.selectNext();
-            break;
-        case WebInspector.KeyboardShortcut.Keys.Left.code:
-            if (this._interactiveFilterEnabled)
-                this._clearFilter();
-
+        if (event.keyIdentifier === "Up" && !event.altKey) {
+            handled = this.selectPrevious();
+        } else if (event.keyIdentifier === "Down" && !event.altKey) {
+            handled = this.selectNext();
+        } else if (event.keyIdentifier === "Left") {
             if (this.selectedTreeElement.expanded) {
                 if (event.altKey)
                     this.selectedTreeElement.collapseRecursively();
@@ -352,15 +249,10 @@
                     while (nextSelectedElement && !nextSelectedElement.selectable)
                         nextSelectedElement = nextSelectedElement.parent;
                     handled = nextSelectedElement ? true : false;
-                } else if (this.selectedTreeElement.parent) {
+                } else if (this.selectedTreeElement.parent)
                     this.selectedTreeElement.parent.collapse();
-                }
             }
-            break;
-        case WebInspector.KeyboardShortcut.Keys.Right.code:
-            if (this._interactiveFilterEnabled)
-                this._clearFilter();
-
+        } else if (event.keyIdentifier === "Right") {
             if (!this.selectedTreeElement.revealed()) {
                 this.selectedTreeElement.reveal();
                 handled = true;
@@ -378,41 +270,12 @@
                         this.selectedTreeElement.expand();
                 }
             }
-            break;
-        case WebInspector.KeyboardShortcut.Keys.Backspace.code:
-            if (this._interactiveFilterEnabled && currentFilterString) {
-                handled = true;
-                this._setCurrentSelectionFilterString(currentFilterString.substr(0, currentFilterString.length - 1));
-            } else {
-                handled = this.selectedTreeElement.ondelete();
-            }
-            break;
-        case WebInspector.KeyboardShortcut.Keys.Delete.code:
-            if (this._interactiveFilterEnabled && currentFilterString) {
-                handled = true;
-                this._clearFilter();
-            } else
-                handled = this.selectedTreeElement.ondelete();
-            break;
-        case WebInspector.KeyboardShortcut.Keys.Esc.code:
-            if (this._interactiveFilterEnabled) {
-                if (currentFilterString)
-                    handled = true;
-                this._clearFilter();
-            }
-            break;
-        case WebInspector.KeyboardShortcut.Keys.Space.code:
-            if (!currentFilterString)
-                handled = this.selectedTreeElement.onspace();
-            break;
-        default:
-            if (isEnterKey(event)) {
-                if (this._interactiveFilterEnabled)
-                    this._clearFilter();
-
-                handled = this.selectedTreeElement.onenter();
-            }
-        }
+        } else if (event.keyCode === 8 /* Backspace */ || event.keyCode === 46 /* Delete */)
+            handled = this.selectedTreeElement.ondelete();
+        else if (isEnterKey(event))
+            handled = this.selectedTreeElement.onenter();
+        else if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Space.code)
+            handled = this.selectedTreeElement.onspace();
 
         if (nextSelectedElement) {
             nextSelectedElement.reveal();
@@ -514,9 +377,6 @@
     this.selected = false;
     this.setExpandable(expandable || false);
     this._collapsible = true;
-
-    /** @type {!Array.<!Object>} */
-    this._highlightChanges = [];
 }
 
 /** @const */
@@ -524,41 +384,6 @@
 
 TreeElement.prototype = {
     /**
-     * @return {boolean}
-     */
-    _checkFilter: function()
-    {
-        return this.treeOutline._currentSelectionFilterString ? this.treeOutline._makeFilterRegexFromString(this.treeOutline._currentSelectionFilterString).test(this._titleElement.textContent) : true;
-    },
-
-    /**
-     * @param {!RegExp} regex
-     * @return {boolean}
-     */
-    _applyHighlightFilter: function(regex) {
-        var textContent = this._listItemNode.textContent;
-        var ranges = [];
-
-        this._revertHighlightChanges();
-
-        var match = regex.exec(textContent);
-        while (match) {
-            ranges.push(new WebInspector.SourceRange(match.index, match[0].length));
-            match = regex.exec(textContent);
-        }
-        if (ranges.length)
-            WebInspector.highlightRangesWithStyleClass(this._listItemNode, ranges, "tree-text-interactive-highlight", this._highlightChanges);
-
-        return !!this._highlightChanges.length
-    },
-
-    _revertHighlightChanges: function()
-    {
-        WebInspector.revertDomChanges(this._highlightChanges);
-        this._highlightChanges = [];
-    },
-
-    /**
      * @param {?TreeElement} ancestor
      * @return {boolean}
      */
@@ -778,7 +603,7 @@
 
     get selectable()
     {
-        if (this._hidden || !this._checkFilter())
+        if (this._hidden)
             return false;
         return this._selectable;
     },
diff --git a/third_party/WebKit/Source/modules/BUILD.gn b/third_party/WebKit/Source/modules/BUILD.gn
index d027e15..d434475 100644
--- a/third_party/WebKit/Source/modules/BUILD.gn
+++ b/third_party/WebKit/Source/modules/BUILD.gn
@@ -49,7 +49,6 @@
     "//device/battery:mojo_bindings",
     "//mojo/public/c/system:for_component",
     "//third_party/WebKit/Source/core",
-    "//third_party/WebKit/public:mojo_bindings",
     "//third_party/WebKit/public:mojo_bindings_blink",
     "//third_party/icu",
     "//third_party/sqlite",
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
index c622a7d7..f609ed47 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
@@ -196,7 +196,7 @@
     WebBluetooth* webbluetooth = BluetoothSupplement::fromScriptState(scriptState);
     ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
     ScriptPromise promise = resolver->promise();
-    webbluetooth->startNotifications(m_webCharacteristic->characteristicInstanceID, this, new CallbackPromiseAdapter<void, BluetoothError>(resolver));
+    webbluetooth->startNotifications(m_webCharacteristic->characteristicInstanceID, new CallbackPromiseAdapter<void, BluetoothError>(resolver));
     return promise;
 }
 
@@ -205,7 +205,7 @@
     WebBluetooth* webbluetooth = BluetoothSupplement::fromScriptState(scriptState);
     ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
     ScriptPromise promise = resolver->promise();
-    webbluetooth->stopNotifications(m_webCharacteristic->characteristicInstanceID, this, new CallbackPromiseAdapter<void, BluetoothError>(resolver));
+    webbluetooth->stopNotifications(m_webCharacteristic->characteristicInstanceID, new CallbackPromiseAdapter<void, BluetoothError>(resolver));
     return promise;
 }
 
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp b/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp
index f038d4c..85bc34f 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp
@@ -54,7 +54,10 @@
 RTCDataChannel* RTCDataChannel::create(ExecutionContext* context, PassOwnPtr<WebRTCDataChannelHandler> handler)
 {
     DCHECK(handler);
-    return new RTCDataChannel(context, handler);
+    RTCDataChannel* channel = new RTCDataChannel(context, handler);
+    channel->suspendIfNeeded();
+
+    return channel;
 }
 
 RTCDataChannel* RTCDataChannel::create(ExecutionContext* context, WebRTCPeerConnectionHandler* peerConnectionHandler, const String& label, const WebRTCDataChannelInit& init, ExceptionState& exceptionState)
@@ -64,16 +67,21 @@
         exceptionState.throwDOMException(NotSupportedError, "RTCDataChannel is not supported");
         return nullptr;
     }
-    return new RTCDataChannel(context, handler.release());
+    RTCDataChannel* channel = new RTCDataChannel(context, handler.release());
+    channel->suspendIfNeeded();
+
+    return channel;
 }
 
 RTCDataChannel::RTCDataChannel(ExecutionContext* context, PassOwnPtr<WebRTCDataChannelHandler> handler)
-    : m_executionContext(context)
+    : ActiveScriptWrappable(this)
+    , ActiveDOMObject(context)
     , m_handler(handler)
     , m_readyState(ReadyStateConnecting)
     , m_binaryType(BinaryTypeArrayBuffer)
     , m_scheduledEventTimer(this, &RTCDataChannel::scheduledEventTimerFired)
     , m_bufferedAmountLowThreshold(0U)
+    , m_stopped(false)
 {
     ThreadState::current()->registerPreFinalizer(this);
     m_handler->setClient(this);
@@ -85,6 +93,9 @@
 
 void RTCDataChannel::dispose()
 {
+    if (m_stopped)
+        return;
+
     // Promptly clears a raw reference from content/ to an on-heap object
     // so that content/ doesn't access it in a lazy sweeping phase.
     m_handler->setClient(nullptr);
@@ -296,7 +307,65 @@
 
 ExecutionContext* RTCDataChannel::getExecutionContext() const
 {
-    return m_executionContext;
+    return ActiveDOMObject::getExecutionContext();
+}
+
+// ActiveDOMObject
+void RTCDataChannel::suspend()
+{
+    m_scheduledEventTimer.stop();
+}
+
+void RTCDataChannel::resume()
+{
+    if (!m_scheduledEvents.isEmpty() && !m_scheduledEventTimer.isActive())
+        m_scheduledEventTimer.startOneShot(0, BLINK_FROM_HERE);
+}
+
+void RTCDataChannel::stop()
+{
+    if (m_stopped)
+        return;
+
+    m_stopped = true;
+    m_handler->setClient(nullptr);
+    m_handler.clear();
+}
+
+// ActiveScriptWrappable
+bool RTCDataChannel::hasPendingActivity() const
+{
+    if (m_stopped)
+        return false;
+
+    // A RTCDataChannel object must not be garbage collected if its
+    // * readyState is connecting and at least one event listener is registered
+    //   for open events, message events, error events, or close events.
+    // * readyState is open and at least one event listener is registered for
+    //   message events, error events, or close events.
+    // * readyState is closing and at least one event listener is registered for
+    //   error events, or close events.
+    // * underlying data transport is established and data is queued to be
+    //   transmitted.
+    bool hasValidListeners = false;
+    switch (m_readyState) {
+    case ReadyStateConnecting:
+        hasValidListeners |= hasEventListeners(EventTypeNames::open);
+        // fallthrough intended
+    case ReadyStateOpen:
+        hasValidListeners |= hasEventListeners(EventTypeNames::message);
+        // fallthrough intended
+    case ReadyStateClosing:
+        hasValidListeners |= hasEventListeners(EventTypeNames::error) || hasEventListeners(EventTypeNames::close);
+        break;
+    default:
+        break;
+    }
+
+    if (hasValidListeners)
+        return true;
+
+    return m_readyState != ReadyStateClosed && bufferedAmount() > 0;
 }
 
 void RTCDataChannel::scheduleDispatchEvent(Event* event)
@@ -321,9 +390,9 @@
 
 DEFINE_TRACE(RTCDataChannel)
 {
-    visitor->trace(m_executionContext);
     visitor->trace(m_scheduledEvents);
     EventTargetWithInlineData::trace(visitor);
+    ActiveDOMObject::trace(visitor);
 }
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.h b/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.h
index f82ac1c..ed92c02 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.h
+++ b/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.h
@@ -26,6 +26,8 @@
 #define RTCDataChannel_h
 
 #include "base/gtest_prod_util.h"
+#include "bindings/core/v8/ActiveScriptWrappable.h"
+#include "core/dom/ActiveDOMObject.h"
 #include "modules/EventTargetModules.h"
 #include "platform/Timer.h"
 #include "platform/heap/Handle.h"
@@ -46,7 +48,10 @@
 
 class MODULES_EXPORT RTCDataChannel final
     : public EventTargetWithInlineData
-    , WTF_NON_EXPORTED_BASE(public WebRTCDataChannelHandlerClient) {
+    , WTF_NON_EXPORTED_BASE(public WebRTCDataChannelHandlerClient)
+    , public ActiveScriptWrappable
+    , public ActiveDOMObject {
+    USING_GARBAGE_COLLECTED_MIXIN(RTCDataChannel);
     DEFINE_WRAPPERTYPEINFO();
     USING_PRE_FINALIZER(RTCDataChannel, dispose);
 public:
@@ -93,6 +98,14 @@
     const AtomicString& interfaceName() const override;
     ExecutionContext* getExecutionContext() const override;
 
+    // ActiveDOMObject
+    void suspend() override;
+    void resume() override;
+    void stop() override;
+
+    // ActiveScriptWrappable
+    bool hasPendingActivity() const override;
+
     DECLARE_VIRTUAL_TRACE();
 
     // WebRTCDataChannelHandlerClient
@@ -109,8 +122,6 @@
     void scheduleDispatchEvent(Event*);
     void scheduledEventTimerFired(Timer<RTCDataChannel>*);
 
-    Member<ExecutionContext> m_executionContext;
-
     OwnPtr<WebRTCDataChannelHandler> m_handler;
 
     WebRTCDataChannelHandlerClient::ReadyState m_readyState;
@@ -126,6 +137,8 @@
 
     unsigned m_bufferedAmountLowThreshold;
 
+    bool m_stopped;
+
     FRIEND_TEST_ALL_PREFIXES(RTCDataChannelTest, BufferedAmountLow);
 };
 
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.idl b/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.idl
index 8a9d421..2e2bda5 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.idl
+++ b/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.idl
@@ -25,6 +25,8 @@
 // http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCDataChannel
 
 [
+    ActiveScriptWrappable,
+    DependentLifetime,
     NoInterfaceObject,
 ] interface RTCDataChannel : EventTarget {
     readonly attribute DOMString label;
diff --git a/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp b/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp
index 331e672..2c42f90 100644
--- a/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp
+++ b/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp
@@ -8,7 +8,7 @@
 #include "core/frame/Screen.h"
 #include "core/page/PageVisibilityState.h"
 #include "platform/RuntimeEnabledFeatures.h"
-#include "public/platform/modules/wake_lock/WebWakeLockClient.h"
+#include "public/platform/ServiceRegistry.h"
 
 namespace blink {
 
@@ -26,16 +26,8 @@
 void ScreenWakeLock::setKeepAwake(Screen& screen, bool keepAwake)
 {
     ScreenWakeLock* screenWakeLock = fromScreen(screen);
-    if (!screenWakeLock)
-        return;
-
-    screenWakeLock->setKeepAwake(keepAwake);
-}
-
-void ScreenWakeLock::setKeepAwake(bool keepAwake)
-{
-    m_keepAwake = keepAwake;
-    notifyClient();
+    if (screenWakeLock)
+        screenWakeLock->setKeepAwake(keepAwake);
 }
 
 // static
@@ -51,31 +43,30 @@
 }
 
 // static
-void ScreenWakeLock::provideTo(LocalFrame& frame, WebWakeLockClient* client)
+void ScreenWakeLock::provideTo(LocalFrame& frame, ServiceRegistry* registry)
 {
-    ASSERT(RuntimeEnabledFeatures::wakeLockEnabled());
+    DCHECK(RuntimeEnabledFeatures::wakeLockEnabled());
     Supplement<LocalFrame>::provideTo(
         frame,
         ScreenWakeLock::supplementName(),
-        new ScreenWakeLock(frame, client));
+        registry ? new ScreenWakeLock(frame, registry) : nullptr);
 }
 
 void ScreenWakeLock::pageVisibilityChanged()
 {
-    notifyClient();
+    notifyService();
 }
 
 void ScreenWakeLock::didCommitLoad(LocalFrame* committedFrame)
 {
     // Reset wake lock flag for this frame if it is the one being navigated.
-    if (committedFrame == frame()) {
+    if (committedFrame == frame())
         setKeepAwake(false);
-    }
 }
 
 void ScreenWakeLock::willDetachFrameHost()
 {
-    m_client = nullptr;
+    setKeepAwake(false);
 }
 
 DEFINE_TRACE(ScreenWakeLock)
@@ -85,12 +76,25 @@
     LocalFrameLifecycleObserver::trace(visitor);
 }
 
-ScreenWakeLock::ScreenWakeLock(LocalFrame& frame, WebWakeLockClient* client)
+ScreenWakeLock::ScreenWakeLock(LocalFrame& frame, ServiceRegistry* registry)
     : PageLifecycleObserver(frame.page())
     , LocalFrameLifecycleObserver(&frame)
-    , m_client(client)
     , m_keepAwake(false)
 {
+    DCHECK(!m_service.is_bound());
+    DCHECK(registry);
+    registry->connectToRemoteService(mojo::GetProxy(&m_service));
+}
+
+bool ScreenWakeLock::keepAwake() const
+{
+    return m_keepAwake;
+}
+
+void ScreenWakeLock::setKeepAwake(bool keepAwake)
+{
+    m_keepAwake = keepAwake;
+    notifyService();
 }
 
 // static
@@ -99,12 +103,15 @@
     return screen.frame() ? ScreenWakeLock::from(screen.frame()) : nullptr;
 }
 
-void ScreenWakeLock::notifyClient()
+void ScreenWakeLock::notifyService()
 {
-    if (!m_client)
+    if (!m_service)
         return;
 
-    m_client->requestKeepScreenAwake(m_keepAwake && page() && page()->isPageVisible());
+    if (m_keepAwake && frame()->page() && frame()->page()->isPageVisible())
+        m_service->RequestWakeLock();
+    else
+        m_service->CancelWakeLock();
 }
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h b/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h
index ea9ee36..ac121f1 100644
--- a/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h
+++ b/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h
@@ -8,27 +8,32 @@
 #include "core/frame/LocalFrameLifecycleObserver.h"
 #include "core/page/PageLifecycleObserver.h"
 #include "modules/ModulesExport.h"
+#include "public/platform/modules/wake_lock/wake_lock_service.mojom-wtf.h"
 #include "wtf/Noncopyable.h"
 
 namespace blink {
 
 class LocalFrame;
 class Screen;
-class WebWakeLockClient;
+class ServiceRegistry;
 
-class MODULES_EXPORT ScreenWakeLock final : public GarbageCollected<ScreenWakeLock>, public Supplement<LocalFrame>, public PageLifecycleObserver, public LocalFrameLifecycleObserver {
+class MODULES_EXPORT ScreenWakeLock final : public GarbageCollectedFinalized<ScreenWakeLock>, public Supplement<LocalFrame>, public PageLifecycleObserver, public LocalFrameLifecycleObserver {
     USING_GARBAGE_COLLECTED_MIXIN(ScreenWakeLock);
     WTF_MAKE_NONCOPYABLE(ScreenWakeLock);
 public:
     static bool keepAwake(Screen&);
     static void setKeepAwake(Screen&, bool);
 
-    bool keepAwake() const { return m_keepAwake; }
-    void setKeepAwake(bool);
-
     static const char* supplementName();
     static ScreenWakeLock* from(LocalFrame*);
-    static void provideTo(LocalFrame&, WebWakeLockClient*);
+    static void provideTo(LocalFrame&, ServiceRegistry*);
+
+    ~ScreenWakeLock() = default;
+
+    DECLARE_VIRTUAL_TRACE();
+
+private:
+    ScreenWakeLock(LocalFrame&, ServiceRegistry*);
 
     // Inherited from PageLifecycleObserver.
     void pageVisibilityChanged() override;
@@ -37,15 +42,13 @@
     // Inherited from LocalFrameLifecycleObserver.
     void willDetachFrameHost() override;
 
-    DECLARE_VIRTUAL_TRACE();
-
-private:
-    ScreenWakeLock(LocalFrame&, WebWakeLockClient*);
+    bool keepAwake() const;
+    void setKeepAwake(bool);
 
     static ScreenWakeLock* fromScreen(Screen&);
-    void notifyClient();
+    void notifyService();
 
-    WebWakeLockClient* m_client;
+    mojom::wtf::WakeLockServicePtr m_service;
     bool m_keepAwake;
 };
 
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.cpp b/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.cpp
index 4142408..fed31b9 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.cpp
@@ -140,6 +140,7 @@
     GLint maxAllowedBuffers = std::min(maxDrawBuffers, maxColorAttachments);
     for (GLint i = 0; i < maxAllowedBuffers; ++i) {
         GLuint color;
+
         gl->GenTextures(1, &color);
         colors.append(color);
         gl->BindTexture(GL_TEXTURE_2D, color);
@@ -158,14 +159,14 @@
             gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, 0, 0);
         }
         if (supportsDepthStencil) {
-            gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depthStencil, 0);
-            gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_TEXTURE_2D, depthStencil, 0);
+            // For ES 2.0 contexts DEPTH_STENCIL is not available natively, so we emulate it
+            // at the command buffer level for WebGL contexts.
+            gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, depthStencil, 0);
             if (gl->CheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
                 ok = false;
                 break;
             }
-            gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, 0, 0);
-            gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_TEXTURE_2D, 0, 0);
+            gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, 0, 0);
         }
     }
 
@@ -177,6 +178,7 @@
     if (supportsDepthStencil)
         gl->DeleteTextures(1, &depthStencil);
     gl->DeleteTextures(colors.size(), colors.data());
+
     return ok;
 }
 
diff --git a/third_party/WebKit/Source/platform/BUILD.gn b/third_party/WebKit/Source/platform/BUILD.gn
index 707be3e6..ee871dd 100644
--- a/third_party/WebKit/Source/platform/BUILD.gn
+++ b/third_party/WebKit/Source/platform/BUILD.gn
@@ -487,12 +487,12 @@
 
   deps = [
     ":platform",
+    ":test_support",
     "//base",
     "//base/test:test_support",
     "//content/test:test_support",
     "//testing/gmock",
     "//testing/gtest",
-    "//third_party/WebKit/Source/platform:test_support",
     "//third_party/WebKit/Source/wtf",
   ]
   if (is_android) {
diff --git a/third_party/WebKit/Source/platform/blob/BlobURL.cpp b/third_party/WebKit/Source/platform/blob/BlobURL.cpp
index 21456d7..ebc99a6f1 100644
--- a/third_party/WebKit/Source/platform/blob/BlobURL.cpp
+++ b/third_party/WebKit/Source/platform/blob/BlobURL.cpp
@@ -62,7 +62,8 @@
 KURL BlobURL::createBlobURL(const String& originString)
 {
     ASSERT(!originString.isEmpty());
-    String urlString = "blob:" + encodeWithURLEscapeSequences(originString) + '/' + createCanonicalUUIDString();
+    String urlString =
+        "blob:" + originString + '/' + createCanonicalUUIDString();
     return KURL::createIsolated(ParsedURLString, urlString);
 }
 
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
index 3b9c8518..2a57212 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
@@ -26,6 +26,7 @@
 
 #include "SkSurface.h"
 #include "gpu/command_buffer/client/gles2_interface.h"
+#include "gpu/command_buffer/common/capabilities.h"
 #include "platform/Task.h"
 #include "platform/ThreadSafeFunctional.h"
 #include "platform/WaitableEvent.h"
@@ -81,6 +82,11 @@
         return m_grContext.get();
     }
 
+    gpu::Capabilities getCapabilities()
+    {
+        return gpu::Capabilities();
+    }
+
     gpu::gles2::GLES2Interface* contextGL() override
     {
         return m_gl;
diff --git a/third_party/WebKit/Source/platform/graphics/DEPS b/third_party/WebKit/Source/platform/graphics/DEPS
index 81f0eafb..92dd400 100644
--- a/third_party/WebKit/Source/platform/graphics/DEPS
+++ b/third_party/WebKit/Source/platform/graphics/DEPS
@@ -6,5 +6,7 @@
     "+base/message_loop",
     "+cc",
     "-cc/blink",
+    # For tests only!
     "+gpu/command_buffer/client/gles2_interface.h",
+    "+gpu/command_buffer/common/capabilities.h"
 ]
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DEPS b/third_party/WebKit/Source/platform/graphics/gpu/DEPS
index e264555..cc1557c 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DEPS
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DEPS
@@ -1,4 +1,5 @@
 include_rules = [
     # For tests only!
     "+gpu/command_buffer/client/gles2_interface_stub.h",
+    "+gpu/command_buffer/common/capabilities.h"
 ]
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
index cc48903..82f55a9 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -672,6 +672,8 @@
         m_gl->RenderbufferStorageMultisampleCHROMIUM(GL_RENDERBUFFER, m_sampleCount, GL_DEPTH24_STENCIL8_OES, size.width(), size.height());
     else
         m_gl->RenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8_OES, size.width(), size.height());
+    // For ES 2.0 contexts DEPTH_STENCIL is not available natively, so we emulate it
+    // at the command buffer level for WebGL contexts.
     m_gl->FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, m_depthStencilBuffer);
     m_gl->BindRenderbuffer(GL_RENDERBUFFER, 0);
 }
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
index aac78b5..c3986d9 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
@@ -31,6 +31,7 @@
 #include "platform/graphics/gpu/DrawingBuffer.h"
 
 #include "gpu/command_buffer/client/gles2_interface_stub.h"
+#include "gpu/command_buffer/common/capabilities.h"
 #include "platform/RuntimeEnabledFeatures.h"
 #include "platform/graphics/ImageBuffer.h"
 #include "platform/graphics/UnacceleratedImageBufferSurface.h"
@@ -244,6 +245,10 @@
     gpu::gles2::GLES2Interface* contextGL() override { return m_gl.get(); }
     // Not used by WebGL code.
     GrContext* grContext() override { return nullptr; }
+    gpu::Capabilities getCapabilities()
+    {
+        return gpu::Capabilities();
+    }
     void setLostContextCallback(WebClosure) {}
     void setErrorMessageCallback(WebFunction<void(const char*, int32_t id)>) {}
 
diff --git a/third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc b/third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc
index bf961a0..0da20c15 100644
--- a/third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc
+++ b/third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc
@@ -154,9 +154,10 @@
   NOTIMPLEMENTED();
 }
 
-void WebURLLoaderMock::setLoadingTaskRunner(WebTaskRunner*) {
+void WebURLLoaderMock::setLoadingTaskRunner(WebTaskRunner* runner) {
   // In principle this is NOTIMPLEMENTED(), but if we put that here it floods
   // the console during webkit unit tests, so we leave the function empty.
+  DCHECK(runner);
 }
 
 WeakPtr<WebURLLoaderMock> WebURLLoaderMock::GetWeakPtr() {
diff --git a/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp b/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp
index 8d5b1a4f..ff85b344 100644
--- a/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp
@@ -75,7 +75,7 @@
         return *url.innerURL();
     // FIXME: Update this callsite to use the innerURL member function when
     // we finish implementing it.
-    return KURL(ParsedURLString, decodeURLEscapeSequences(url.path()));
+    return KURL(ParsedURLString, url.path());
 }
 
 void SecurityOrigin::setCache(SecurityOriginCache* originCache)
diff --git a/third_party/WebKit/Source/platform/weborigin/SecurityPolicyTest.cpp b/third_party/WebKit/Source/platform/weborigin/SecurityPolicyTest.cpp
index db0501c..19b9a53 100644
--- a/third_party/WebKit/Source/platform/weborigin/SecurityPolicyTest.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/SecurityPolicyTest.cpp
@@ -84,8 +84,9 @@
     const char secureURLB[] = "https://b.test/path/to/file.html";
     const char secureOriginA[] = "https://a.test/";
 
-    const char blobURL[] = "blob:http%3A//a.test/b3aae9c8-7f90-440d-8d7c-43aa20d72fde";
-    const char filesystemURL[] = "filesystem:http%3A//a.test/path/t/file.html";
+    const char blobURL[] =
+        "blob:http://a.test/b3aae9c8-7f90-440d-8d7c-43aa20d72fde";
+    const char filesystemURL[] = "filesystem:http://a.test/path/t/file.html";
 
     TestCase inputs[] = {
         // HTTP -> HTTP: Same Origin
diff --git a/third_party/WebKit/Source/web/FullscreenController.cpp b/third_party/WebKit/Source/web/FullscreenController.cpp
index 3cb27de..952896b 100644
--- a/third_party/WebKit/Source/web/FullscreenController.cpp
+++ b/third_party/WebKit/Source/web/FullscreenController.cpp
@@ -32,6 +32,7 @@
 
 #include "core/dom/Document.h"
 #include "core/dom/Fullscreen.h"
+#include "core/frame/FrameView.h"
 #include "core/frame/LocalFrame.h"
 #include "core/frame/PageScaleConstraintsSet.h"
 #include "core/html/HTMLMediaElement.h"
@@ -189,6 +190,16 @@
     }
     m_webViewImpl->pageScaleConstraintsSet().setFullscreenConstraints(fullscreenConstraints);
     m_webViewImpl->pageScaleConstraintsSet().computeFinalConstraints();
+
+    // Although we called computedFinalConstraints() above, the "final" constraints are not
+    // actually final. They are still subject to scale factor clamping by contents size.
+    // Normally they should be dirtied due to contents size mutation after layout, however the
+    // contents size is not guaranteed to mutate, and the scale factor may remain unclamped.
+    // Just fire the event again to ensure the final constraints pick up the latest contents size.
+    m_webViewImpl->didChangeContentsSize();
+    if (m_webViewImpl->mainFrameImpl() && m_webViewImpl->mainFrameImpl()->frameView())
+        m_webViewImpl->mainFrameImpl()->frameView()->setNeedsLayout();
+
     m_webViewImpl->updateMainFrameLayoutSize();
 }
 
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 765da87..83e913c 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -1417,7 +1417,6 @@
     return webFrame;
 }
 
-
 WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* client)
     : WebLocalFrame(scope)
     , m_frameLoaderClientImpl(FrameLoaderClientImpl::create(this))
@@ -1500,7 +1499,7 @@
     if (RuntimeEnabledFeatures::webVREnabled())
         VRController::provideTo(*m_frame, m_client ? m_client->webVRClient() : nullptr);
     if (RuntimeEnabledFeatures::wakeLockEnabled())
-        ScreenWakeLock::provideTo(*m_frame, m_client ? m_client->wakeLockClient() : nullptr);
+        ScreenWakeLock::provideTo(*m_frame, m_client ? m_client->serviceRegistry(): nullptr);
     if (RuntimeEnabledFeatures::audioOutputDevicesEnabled())
         provideAudioOutputDeviceClientTo(*m_frame, AudioOutputDeviceClientImpl::create());
     if (RuntimeEnabledFeatures::installedAppEnabled())
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 0074713a..358c0455 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -3464,7 +3464,6 @@
 
 void WebViewImpl::resetScaleStateImmediately()
 {
-    page()->frameHost().visualViewport().setScale(1);
     pageScaleConstraintsSet().setNeedsReset(true);
 }
 
diff --git a/third_party/WebKit/Source/web/tests/DEPS b/third_party/WebKit/Source/web/tests/DEPS
index 304aca3..5c7bc7f 100644
--- a/third_party/WebKit/Source/web/tests/DEPS
+++ b/third_party/WebKit/Source/web/tests/DEPS
@@ -8,4 +8,5 @@
     "+base/test/test_suite.h",
     "+content/test/blink_test_environment.h",
     "+mojo/edk/embedder/embedder.h",
+    "+mojo/public/cpp/bindings",
 ]
diff --git a/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp b/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp
index 31482ba..3353b15 100644
--- a/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp
+++ b/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp
@@ -469,14 +469,57 @@
     // The fixed background in the throttled sub frame should not cause main thread scrolling.
     EXPECT_FALSE(document().view()->shouldScrollOnMainThread());
 
-    // Scroll down to unthrottle the frame.
-    webView().mainFrameImpl()->frameView()->setScrollPosition(DoublePoint(0, 480), ProgrammaticScroll);
-    document().view()->updateAllLifecyclePhases();
-    testing::runPendingTasks();
+    // Make the frame visible by changing its transform. This doesn't cause a
+    // layout, but should still unthrottle the frame.
+    frameElement->setAttribute(styleAttr, "transform: translateY(0px)");
+    compositeFrame();
+    EXPECT_FALSE(frameElement->contentDocument()->view()->canThrottleRendering());
     // The fixed background in the throttled sub frame should be considered.
     EXPECT_TRUE(document().view()->shouldScrollOnMainThread());
 }
 
+TEST_F(FrameThrottlingTest, ScrollingCoordinatorShouldSkipCompositedThrottledFrame)
+{
+    webView().settings()->setAcceleratedCompositingEnabled(true);
+    webView().settings()->setPreferCompositingToLCDTextEnabled(true);
+
+    // Create a hidden frame which is throttled.
+    SimRequest mainResource("https://example.com/", "text/html");
+    SimRequest frameResource("https://example.com/iframe.html", "text/html");
+
+    loadURL("https://example.com/");
+    mainResource.complete("<iframe id=frame sandbox src=iframe.html></iframe>");
+    frameResource.complete("<div style='height: 2000px'></div>");
+
+    // Move the frame offscreen to throttle it.
+    auto* frameElement = toHTMLIFrameElement(document().getElementById("frame"));
+    frameElement->setAttribute(styleAttr, "transform: translateY(480px)");
+    EXPECT_FALSE(frameElement->contentDocument()->view()->canThrottleRendering());
+    compositeFrame();
+    EXPECT_TRUE(frameElement->contentDocument()->view()->canThrottleRendering());
+
+    // Change style of the frame's content to make it in VisualUpdatePending state.
+    frameElement->contentDocument()->body()->setAttribute(styleAttr, "background: green");
+    // Change root frame's layout so that the next lifecycle update will call
+    // ScrollingCoordinator::updateAfterCompositingChangeIfNeeded().
+    document().body()->setAttribute(styleAttr, "margin: 20px");
+    EXPECT_EQ(DocumentLifecycle::VisualUpdatePending, frameElement->contentDocument()->lifecycle().state());
+
+    DocumentLifecycle::AllowThrottlingScope throttlingScope(document().lifecycle());
+    // This will call ScrollingCoordinator::updateAfterCompositingChangeIfNeeded() and should not
+    // cause assert failure about isAllowedToQueryCompositingState() in the throttled frame.
+    compositeFrame();
+    EXPECT_EQ(DocumentLifecycle::VisualUpdatePending, frameElement->contentDocument()->lifecycle().state());
+
+    // Make the frame visible by changing its transform. This doesn't cause a
+    // layout, but should still unthrottle the frame.
+    frameElement->setAttribute(styleAttr, "transform: translateY(0px)");
+    compositeFrame(); // Unthrottle the frame.
+    compositeFrame(); // Handle the pending visual update of the unthrottled frame.
+    EXPECT_EQ(DocumentLifecycle::PaintClean, frameElement->contentDocument()->lifecycle().state());
+    EXPECT_TRUE(frameElement->contentDocument()->view()->usesCompositedScrolling());
+}
+
 TEST_F(FrameThrottlingTest, UnthrottleByTransformingWithoutLayout)
 {
     webView().settings()->setAcceleratedCompositingEnabled(true);
diff --git a/third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp b/third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp
index 6d770ec..c6feb6d 100644
--- a/third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp
+++ b/third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp
@@ -7,13 +7,14 @@
 #include "core/dom/DOMImplementation.h"
 #include "core/dom/Document.h"
 #include "core/dom/DocumentInit.h"
-#include "core/frame/LocalDOMWindow.h"
-#include "platform/heap/Handle.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
 #include "platform/testing/URLTestHelpers.h"
+#include "platform/testing/UnitTestHelpers.h"
 #include "public/platform/Platform.h"
+#include "public/platform/ServiceRegistry.h"
 #include "public/platform/WebPageVisibilityState.h"
 #include "public/platform/WebURLLoaderMockFactory.h"
-#include "public/platform/modules/wake_lock/WebWakeLockClient.h"
 #include "public/web/WebCache.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "web/WebLocalFrameImpl.h"
@@ -22,37 +23,56 @@
 namespace {
 
 using blink::ScreenWakeLock;
-using blink::WebWakeLockClient;
+using blink::mojom::wtf::WakeLockService;
+using blink::mojom::wtf::WakeLockServiceRequest;
 
-class TestWebWakeLockClient: public WebWakeLockClient {
+// This class allows connecting service requests to a MockWakeLockService.
+class MockServiceRegistry : public blink::ServiceRegistry {
 public:
-    TestWebWakeLockClient(): m_keepScreenAwake(false) { }
+    MockServiceRegistry() : m_wakeLockStatus(false) {}
+    ~MockServiceRegistry() {}
 
-    void requestKeepScreenAwake(bool keepScreenAwake) override
-    {
-        m_keepScreenAwake = keepScreenAwake;
-    }
+    void connectToRemoteService(const char* name, mojo::ScopedMessagePipeHandle) override;
 
-    bool keepScreenAwake() const { return m_keepScreenAwake; }
+    bool wakeLockStatus() const { return m_wakeLockStatus; }
+    void setWakeLockStatus(bool status) { m_wakeLockStatus = status; }
 
 private:
-    bool m_keepScreenAwake;
+    // A mock WakeLockService used to intercept calls to the mojo methods.
+    class MockWakeLockService : public WakeLockService {
+    public:
+        MockWakeLockService(MockServiceRegistry* registry, WakeLockServiceRequest request)
+            : m_binding(this, std::move(request))
+            , m_registry(registry) {}
+        ~MockWakeLockService() {}
+
+    private:
+        // mojom::WakeLockService
+        void RequestWakeLock() override { m_registry->setWakeLockStatus(true); }
+        void CancelWakeLock() override { m_registry->setWakeLockStatus(false); }
+
+        mojo::Binding<WakeLockService> m_binding;
+        MockServiceRegistry* const m_registry;
+    };
+    scoped_ptr<MockWakeLockService> m_mockWakeLockService;
+
+    bool m_wakeLockStatus;
 };
 
-class TestWebFrameClient: public blink::FrameTestHelpers::TestWebFrameClient {
-public:
-    WebWakeLockClient* wakeLockClient() override
-    {
-        return &m_testWebWakeLockClient;
-    }
+void MockServiceRegistry::connectToRemoteService(const char* name, mojo::ScopedMessagePipeHandle handle)
+{
+    m_mockWakeLockService.reset(
+        new MockWakeLockService(this, mojo::MakeRequest<WakeLockService>(std::move(handle))));
+}
 
-    const TestWebWakeLockClient& testWebWakeLockClient() const
-    {
-        return m_testWebWakeLockClient;
-    }
+// A TestWebFrameClient to allow overriding the serviceRegistry() with a mock.
+class TestWebFrameClient : public blink::FrameTestHelpers::TestWebFrameClient {
+public:
+    ~TestWebFrameClient() override = default;
+    blink::ServiceRegistry* serviceRegistry() override { return &m_serviceRegistry; }
 
 private:
-    TestWebWakeLockClient m_testWebWakeLockClient;
+    MockServiceRegistry m_serviceRegistry;
 };
 
 class ScreenWakeLockTest: public testing::Test {
@@ -70,6 +90,7 @@
     {
         blink::Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs();
         blink::WebCache::clear();
+        blink::testing::runPendingTasks();
     }
 
     void loadFrame()
@@ -102,13 +123,15 @@
 
     bool clientKeepScreenAwake()
     {
-        return m_testWebFrameClient.testWebWakeLockClient().keepScreenAwake();
+        return static_cast<MockServiceRegistry*>(m_testWebFrameClient.serviceRegistry())->wakeLockStatus();
     }
 
     void setKeepAwake(bool keepAwake)
     {
         DCHECK(screen());
         ScreenWakeLock::setKeepAwake(*screen(), keepAwake);
+        // Let the notification sink through the mojo pipes.
+        blink::testing::runPendingTasks();
     }
 
     void show()
@@ -116,6 +139,8 @@
         DCHECK(m_webViewHelper.webView());
         m_webViewHelper.webView()->setVisibilityState(
             blink::WebPageVisibilityStateVisible, false);
+        // Let the notification sink through the mojo pipes.
+        blink::testing::runPendingTasks();
     }
 
     void hide()
@@ -123,6 +148,8 @@
         DCHECK(m_webViewHelper.webView());
         m_webViewHelper.webView()->setVisibilityState(
             blink::WebPageVisibilityStateHidden, false);
+        // Let the notification sink through the mojo pipes.
+        blink::testing::runPendingTasks();
     }
 
     // Order of these members is important as we need to make sure that
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index 36347d4..3a6e5fc3 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -6717,6 +6717,65 @@
     EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor());
 }
 
+TEST_P(ParameterizedWebFrameTest, FullscreenRestoreScaleFactorUponExiting)
+{
+    // The purpose of this test is to more precisely simulate the sequence of
+    // resize and switching fullscreen state operations on WebView, with the
+    // interference from Android status bars like a real device does.
+    // This verifies we handle the transition and restore states correctly.
+    WebSize screenSizeMinusStatusBarsMinusUrlBar(598, 303);
+    WebSize screenSizeMinusStatusBars(598, 359);
+    WebSize screenSize(640, 384);
+
+    FakeCompositingWebViewClient client;
+    registerMockedHttpURLLoad("fullscreen_restore_scale_factor.html");
+    FrameTestHelpers::WebViewHelper webViewHelper(this);
+    WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "fullscreen_restore_scale_factor.html", true, nullptr, &client, &configureAndroid);
+    client.m_screenInfo.rect.width = screenSizeMinusStatusBarsMinusUrlBar.width;
+    client.m_screenInfo.rect.height = screenSizeMinusStatusBarsMinusUrlBar.height;
+    webViewHelper.resize(screenSizeMinusStatusBarsMinusUrlBar);
+    LayoutView* layoutView = webViewHelper.webViewImpl()->mainFrameImpl()->frameView()->layoutView();
+    EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.width, layoutView->logicalWidth().floor());
+    EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.height, layoutView->logicalHeight().floor());
+    EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor());
+    EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor());
+    EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor());
+
+    {
+        Document* document = toWebLocalFrameImpl(webViewImpl->mainFrame())->frame()->document();
+        UserGestureIndicator gesture(DefinitelyProcessingUserGesture);
+        Fullscreen::from(*document).requestFullscreen(*document->body(), Fullscreen::PrefixedRequest);
+    }
+
+    webViewImpl->didEnterFullScreen();
+    webViewImpl->updateAllLifecyclePhases();
+    client.m_screenInfo.rect.width = screenSizeMinusStatusBars.width;
+    client.m_screenInfo.rect.height = screenSizeMinusStatusBars.height;
+    webViewHelper.resize(screenSizeMinusStatusBars);
+    client.m_screenInfo.rect.width = screenSize.width;
+    client.m_screenInfo.rect.height = screenSize.height;
+    webViewHelper.resize(screenSize);
+    EXPECT_EQ(screenSize.width, layoutView->logicalWidth().floor());
+    EXPECT_EQ(screenSize.height, layoutView->logicalHeight().floor());
+    EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor());
+    EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor());
+    EXPECT_FLOAT_EQ(1.0, webViewImpl->maximumPageScaleFactor());
+
+    webViewImpl->didExitFullScreen();
+    webViewImpl->updateAllLifecyclePhases();
+    client.m_screenInfo.rect.width = screenSizeMinusStatusBars.width;
+    client.m_screenInfo.rect.height = screenSizeMinusStatusBars.height;
+    webViewHelper.resize(screenSizeMinusStatusBars);
+    client.m_screenInfo.rect.width = screenSizeMinusStatusBarsMinusUrlBar.width;
+    client.m_screenInfo.rect.height = screenSizeMinusStatusBarsMinusUrlBar.height;
+    webViewHelper.resize(screenSizeMinusStatusBarsMinusUrlBar);
+    EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.width, layoutView->logicalWidth().floor());
+    EXPECT_EQ(screenSizeMinusStatusBarsMinusUrlBar.height, layoutView->logicalHeight().floor());
+    EXPECT_FLOAT_EQ(1.0, webViewImpl->pageScaleFactor());
+    EXPECT_FLOAT_EQ(1.0, webViewImpl->minimumPageScaleFactor());
+    EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor());
+}
+
 TEST_P(ParameterizedWebFrameTest, LayoutBlockPercentHeightDescendants)
 {
     registerMockedHttpURLLoad("percent-height-descendants.html");
diff --git a/third_party/WebKit/Source/web/tests/data/fullscreen_restore_scale_factor.html b/third_party/WebKit/Source/web/tests/data/fullscreen_restore_scale_factor.html
new file mode 100644
index 0000000..abb1b97
--- /dev/null
+++ b/third_party/WebKit/Source/web/tests/data/fullscreen_restore_scale_factor.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<head>
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
diff --git a/third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h b/third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h
index 3018b84f..c2e18ad 100644
--- a/third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h
+++ b/third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h
@@ -36,6 +36,8 @@
 class GrContext;
 
 namespace gpu {
+struct Capabilities;
+
 namespace gles2 {
 class GLES2Interface;
 }
@@ -51,6 +53,7 @@
     virtual WebGraphicsContext3D* context3d() = 0;
     virtual gpu::gles2::GLES2Interface* contextGL() = 0;
     virtual GrContext* grContext() = 0;
+    virtual gpu::Capabilities getCapabilities() = 0;
 
     virtual void setLostContextCallback(WebClosure) = 0;
     virtual void setErrorMessageCallback(WebFunction<void(const char* msg, int32_t id)>) = 0;
diff --git a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h
index c022ff1d..38f0f9d 100644
--- a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h
+++ b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h
@@ -84,10 +84,8 @@
         const WebVector<uint8_t>& value,
         WebBluetoothWriteValueCallbacks*) {}
     virtual void startNotifications(const WebString& characteristicInstanceID,
-        WebBluetoothRemoteGATTCharacteristic*,
         WebBluetoothNotificationsCallbacks*) {}
     virtual void stopNotifications(const WebString& characteristicInstanceID,
-        WebBluetoothRemoteGATTCharacteristic*,
         WebBluetoothNotificationsCallbacks*) {}
 
     // Called when addEventListener is called on a characteristic.
diff --git a/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom b/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
index f70113e..bdd829d 100644
--- a/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
+++ b/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
@@ -74,6 +74,20 @@
 // Web Bluetooth Interface that Blink can use to perform
 // Bluetooth GATT Operations on Bluetooth Devices.
 interface WebBluetoothService {
+  // Sets the client for this WebBluetoothService. The service will notify the
+  // client of device events e.g. when a Characteristic's value changes or when
+  // a device disconnects.
+  SetClient(associated WebBluetoothServiceClient client);
+
+  // Reads the value for characteristic with
+  // |characteristic_instance_id|. If the value is successfully read the
+  // callback will be run with WebBluetoothError::SUCCESS and the
+  // characteristic's value. If the value is not successfully read the
+  // callback with be run with the corresponding error and nullptr for value.
+  RemoteCharacteristicReadValue(
+    string characteristic_instance_id) => (
+    WebBluetoothError error,
+    array<uint8>? value);
 
   // Writes a value to the characteristic with
   // |characteristic_instance_id|. The callback is run with
@@ -83,4 +97,21 @@
     string characteristic_instance_id,
     array<uint8> value) => (WebBluetoothError error);
 
+  // Starts notifications for the characteristic with
+  // |characteristic_instance_id|.
+  RemoteCharacteristicStartNotifications(
+    string characteristic_instance_id) => (WebBluetoothError error);
+
+  // Stops notifications for the characteristic with
+  // |characteristic_instance_id|.
+  RemoteCharacteristicStopNotifications(
+    string characteristic_instance_id) => ();
+};
+
+// Classes should implement this interface and pass an associated pointer
+// bound to them to the WebBluetoothService by using SetClient. Classes
+// that do this will be notified of device events e.g. device disconnection.
+interface WebBluetoothServiceClient {
+  RemoteCharacteristicValueChanged(string characteristic_instance_id,
+                                   array<uint8> value);
 };
diff --git a/third_party/WebKit/public/platform/modules/wake_lock/WebWakeLockClient.h b/third_party/WebKit/public/platform/modules/wake_lock/WebWakeLockClient.h
deleted file mode 100644
index 4b1ef017..0000000
--- a/third_party/WebKit/public/platform/modules/wake_lock/WebWakeLockClient.h
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WebWakeLockClient_h
-#define WebWakeLockClient_h
-
-namespace blink {
-
-class WebWakeLockClient {
-public:
-    virtual ~WebWakeLockClient() = default;
-
-    virtual void requestKeepScreenAwake(bool) = 0;
-};
-
-} // namespace blink
-
-#endif
diff --git a/third_party/WebKit/public/web/WebFrameClient.h b/third_party/WebKit/public/web/WebFrameClient.h
index fc47729..44b98051 100644
--- a/third_party/WebKit/public/web/WebFrameClient.h
+++ b/third_party/WebKit/public/web/WebFrameClient.h
@@ -100,7 +100,6 @@
 class WebUSBClient;
 class WebUserMediaClient;
 class WebVRClient;
-class WebWakeLockClient;
 class WebWorkerContentSettingsClientProxy;
 struct WebColorSuggestion;
 struct WebConsoleMessage;
@@ -569,10 +568,6 @@
     // A WebSocket object is going to open a new WebSocket connection.
     virtual void willOpenWebSocket(WebSocketHandle*) { }
 
-    // Wake Lock -----------------------------------------------------
-
-    virtual WebWakeLockClient* wakeLockClient() { return 0; }
-
     // Geolocation ---------------------------------------------------------
 
     // Access the embedder API for (client-based) geolocation client .
diff --git a/third_party/libaddressinput/chromium/chrome_metadata_source.h b/third_party/libaddressinput/chromium/chrome_metadata_source.h
index 624e6e4..d451f7d 100644
--- a/third_party/libaddressinput/chromium/chrome_metadata_source.h
+++ b/third_party/libaddressinput/chromium/chrome_metadata_source.h
@@ -9,6 +9,7 @@
 #include <string>
 
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "net/url_request/url_fetcher_delegate.h"
 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/source.h"
 
diff --git a/tools/android/eclipse/.classpath b/tools/android/eclipse/.classpath
index 04959840..125f04e 100644
--- a/tools/android/eclipse/.classpath
+++ b/tools/android/eclipse/.classpath
@@ -216,6 +216,7 @@
     <classpathentry kind="lib" path="out/Debug/lib.java/components/dom_distiller/android/dom_distiller_core_java.jar"/>
     <classpathentry kind="lib" path="out/Debug/lib.java/components/external_video_surface/java.jar"/>
     <classpathentry kind="lib" path="out/Debug/lib.java/components/gcm_driver/android/gcm_driver_java.jar"/>
+    <classpathentry kind="lib" path="out/Debug/lib.java/components/gcm_driver/instance_id/android/instance_id_driver_java.jar"/>
     <classpathentry kind="lib" path="out/Debug/lib.java/components/invalidation/impl/java.jar"/>
     <classpathentry kind="lib" path="out/Debug/lib.java/components/invalidation/impl/proto_java.jar"/>
     <classpathentry kind="lib" path="out/Debug/lib.java/components/navigation_interception/android/navigation_interception_java.jar"/>
diff --git a/tools/checklicenses/checklicenses.py b/tools/checklicenses/checklicenses.py
index cfd418b..944c577f 100755
--- a/tools/checklicenses/checklicenses.py
+++ b/tools/checklicenses/checklicenses.py
@@ -184,18 +184,46 @@
         'UNKNOWN',
     ],
 
+    # http://crbug.com/603946
+    # https://github.com/google/oauth2client/issues/331
+    # Just imports googleapiclient. Chromite is not shipped.
+    'third_party/chromite/third_party/apiclient': [
+        'UNKNOWN',
+    ],
+
+    # http://crbug.com/603946
+    # https://github.com/google/google-api-python-client/issues/216
+    # Apache (v2.0) license. Chromite is not shipped.
+    'third_party/chromite/third_party/googleapiclient/channel.py': [
+        'UNKNOWN',
+    ],
+
     # http://crbug.com/222828
     # http://bugs.python.org/issue17514
     'third_party/chromite/third_party/argparse.py': [
         'UNKNOWN',
     ],
 
+    # http://crbug.com/603939
+    # https://github.com/jcgregorio/httplib2/issues/307
+    # MIT license. Chromite is not shipped.
+    'third_party/chromite/third_party/httplib2': [
+        'UNKNOWN',
+    ],
+
     # http://crbug.com/326117
     # https://bitbucket.org/chrisatlee/poster/issue/21
     'third_party/chromite/third_party/poster': [
         'UNKNOWN',
     ],
 
+    # http://crbug.com/603944
+    # https://github.com/kennethreitz/requests/issues/1610
+    # Apache (v2.0) license. Chromite is not shipped
+    'third_party/chromite/third_party/requests': [
+        'UNKNOWN',
+    ],
+
     # http://crbug.com/333508
     'buildtools/clang_format/script': [
         'UNKNOWN',
@@ -492,12 +520,14 @@
         'UNKNOWN',
     ],
 
+    # https://github.com/google/google-api-python-client/issues/216
     # Apache v2.0.
     'tools/swarming_client/third_party/googleapiclient': [
         'UNKNOWN',
     ],
 
     # http://crbug.com/334668
+    # https://github.com/jcgregorio/httplib2/issues/307
     # MIT license.
     'tools/swarming_client/third_party/httplib2': [
         'UNKNOWN',
diff --git a/tools/chrome_proxy/common/chrome_proxy_measurements.py b/tools/chrome_proxy/common/chrome_proxy_measurements.py
index b48e51f..21a3f558 100644
--- a/tools/chrome_proxy/common/chrome_proxy_measurements.py
+++ b/tools/chrome_proxy/common/chrome_proxy_measurements.py
@@ -67,23 +67,33 @@
   # Value of the extra via header. |None| if no extra via header is expected.
   extra_via_header = None
 
-  def __init__(self, restart_after_each_page=False, metrics=None):
+  def __init__(self, restart_after_each_page=False, metrics=None,
+               clear_cache_before_each_run=True):
     super(ChromeProxyValidation, self).__init__(
-        needs_browser_restart_after_each_page=restart_after_each_page)
+        needs_browser_restart_after_each_page=restart_after_each_page,
+        clear_cache_before_each_run=clear_cache_before_each_run)
     self._metrics = metrics
     self._page = None
 
   def CustomizeBrowserOptions(self, options):
     # Enable the chrome proxy (data reduction proxy).
     options.AppendExtraBrowserArgs('--enable-spdy-proxy-auth')
+    self._is_chrome_proxy_enabled = True
 
     # Disable quic option, otherwise request headers won't be visible.
     options.AppendExtraBrowserArgs('--disable-quic')
 
-  def WillNavigateToPage(self, page, tab):
-    WaitForViaHeader(tab)
+  def DisableChromeProxy(self):
+    self.options.browser_options.extra_browser_args.discard(
+                '--enable-spdy-proxy-auth')
+    self._is_chrome_proxy_enabled = False
 
-    tab.ClearCache(force=True)
+  def WillNavigateToPage(self, page, tab):
+    if self._is_chrome_proxy_enabled:
+      WaitForViaHeader(tab)
+
+    if self.clear_cache_before_each_run:
+      tab.ClearCache(force=True)
     assert self._metrics
     self._metrics.Start(page, tab)
 
diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_benchmark.py b/tools/chrome_proxy/integration_tests/chrome_proxy_benchmark.py
index 8129f4d..875e114 100644
--- a/tools/chrome_proxy/integration_tests/chrome_proxy_benchmark.py
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_benchmark.py
@@ -32,6 +32,28 @@
 
 
 @benchmark.Disabled(*WEBVIEW_PLATFORMS)
+class ChromeProxyCacheLoFiDisabled(ChromeProxyBenchmark):
+  tag = 'cache_lo_fi_disabled'
+  test = measurements.ChromeProxyCacheLoFiDisabled
+  page_set = pagesets.LoFiCacheStorySet
+
+  @classmethod
+  def Name(cls):
+    return 'chrome_proxy_benchmark.lo_fi.cache_lo_fi_disabled'
+
+
+@benchmark.Disabled(*WEBVIEW_PLATFORMS)
+class ChromeProxyCacheProxyDisabled(ChromeProxyBenchmark):
+  tag = 'cache_proxy_disabled'
+  test = measurements.ChromeProxyCacheProxyDisabled
+  page_set = pagesets.LoFiCacheStorySet
+
+  @classmethod
+  def Name(cls):
+    return 'chrome_proxy_benchmark.lo_fi.cache_proxy_disabled'
+
+
+@benchmark.Disabled(*WEBVIEW_PLATFORMS)
 class ChromeProxyPreviewLoFi(ChromeProxyBenchmark):
   tag = 'lo_fi_preview'
   test = measurements.ChromeProxyLoFiPreview
@@ -285,4 +307,3 @@
   @classmethod
   def Name(cls):
     return 'chrome_proxy_benchmark.video.audio'
-
diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py b/tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py
index 2af7ec7..c9ce789 100644
--- a/tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py
@@ -10,7 +10,7 @@
 from common.chrome_proxy_measurements import ChromeProxyValidation
 from integration_tests import chrome_proxy_metrics as metrics
 from metrics import loading
-from telemetry.core import exceptions
+from telemetry.core import exceptions, util
 from telemetry.page import page_test
 
 
@@ -279,6 +279,94 @@
   def AddResults(self, tab, results):
     self._metrics.AddResultsForLoFi(tab, results)
 
+class ChromeProxyCacheLoFiDisabled(ChromeProxyValidation):
+  """
+  Correctness measurement for Lo-Fi placeholder is not loaded from cache when a
+  page is reloaded with LoFi disabled. First a test page is opened with LoFi and
+  chrome proxy enabled. This allows Chrome to cache the LoFi placeholder image.
+  The browser is restarted with LoFi disabled and the same test page is loaded.
+  This second page load should not pick the LoFi placeholder from cache and
+  original image should be loaded. This test should be run with
+  --profile-type=default command line for the same user profile and cache to be
+  used across the two page loads.
+  """
+
+  def __init__(self):
+    super(ChromeProxyCacheLoFiDisabled, self).__init__(
+            restart_after_each_page=True,
+            metrics=metrics.ChromeProxyMetric(),
+            clear_cache_before_each_run=False)
+
+  def AddResults(self, tab, results):
+    self._metrics.AddResultsForLoFiCache(tab, results, self._is_lo_fi_enabled)
+
+  def WillStartBrowser(self, platform):
+    super(ChromeProxyCacheLoFiDisabled, self).WillStartBrowser(platform)
+    if not self._page:
+      # First page load, enable LoFi and chrome proxy.
+      self.options.AppendExtraBrowserArgs(
+            '--data-reduction-proxy-lo-fi=always-on')
+      self._is_lo_fi_enabled = True
+    else:
+      # Second page load, disable LoFi. Chrome proxy is still enabled.
+      self.options.browser_options.extra_browser_args.discard(
+            '--data-reduction-proxy-lo-fi=always-on')
+      self._is_lo_fi_enabled = False
+
+  def WillNavigateToPage(self, page, tab):
+    super(ChromeProxyCacheLoFiDisabled, self).WillNavigateToPage(page, tab)
+    if self._is_lo_fi_enabled:
+      # Clear cache for the first page to pick LoFi image from server.
+      tab.ClearCache(force=True)
+
+  def DidNavigateToPage(self, page, tab):
+    if not self._is_lo_fi_enabled:
+      tab.ExecuteJavaScript('window.location.reload()')
+      util.WaitFor(tab.HasReachedQuiescence, 3)
+
+class ChromeProxyCacheProxyDisabled(ChromeProxyValidation):
+  """
+  Correctness measurement for Lo-Fi placeholder is not loaded from cache when a
+  page is reloaded with data reduction proxy disabled. First a test page is
+  opened with LoFi and chrome proxy enabled. This allows Chrome to cache the
+  LoFi placeholder image. The browser is restarted with chrome proxy disabled
+  and the same test page is loaded. This second page load should not pick the
+  LoFi placeholder from cache and original image should be loaded. This test
+  should be run with --profile-type=default command line for the same user
+  profile and cache to be used across the two page loads.
+  """
+
+  def __init__(self):
+    super(ChromeProxyCacheProxyDisabled, self).__init__(
+            restart_after_each_page=True,
+            metrics=metrics.ChromeProxyMetric(),
+            clear_cache_before_each_run=False)
+
+  def AddResults(self, tab, results):
+    self._metrics.AddResultsForLoFiCache(tab, results,
+                                         self._is_chrome_proxy_enabled)
+
+  def WillStartBrowser(self, platform):
+    super(ChromeProxyCacheProxyDisabled, self).WillStartBrowser(platform)
+    if not self._page:
+      # First page load, enable LoFi and chrome proxy.
+      self.options.AppendExtraBrowserArgs(
+            '--data-reduction-proxy-lo-fi=always-on')
+    else:
+      # Second page load, disable chrome proxy. LoFi is still enabled.
+      self.DisableChromeProxy()
+
+  def WillNavigateToPage(self, page, tab):
+    super(ChromeProxyCacheProxyDisabled, self).WillNavigateToPage(page, tab)
+    if self._is_chrome_proxy_enabled:
+      # Clear cache for the first page to pick LoFi image from server.
+      tab.ClearCache(force=True)
+
+  def DidNavigateToPage(self, page, tab):
+    if not self._is_chrome_proxy_enabled:
+      tab.ExecuteJavaScript('window.location.reload()')
+      util.WaitFor(tab.HasReachedQuiescence, 3)
+
 class ChromeProxyLoFiPreview(ChromeProxyValidation):
   """Correctness measurement for Lo-Fi preview in Chrome-Proxy header."""
 
diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
index 4dd4846f..ed543e6 100644
--- a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
@@ -256,6 +256,48 @@
         results.current_page, 'lo_fi_response', 'count', lo_fi_response_count))
     super(ChromeProxyMetric, self).AddResults(tab, results)
 
+
+  def AddResultsForLoFiCache(self, tab, results, is_lo_fi):
+    request_count = 0
+    response_count = 0
+
+    for resp in self.IterResponses(tab):
+      if not resp.response.url.endswith('png'):
+        continue
+      if not resp.response.request_headers:
+        continue
+
+      if is_lo_fi != resp.HasChromeProxyLoFiRequest():
+        raise ChromeProxyMetricException, (
+            '%s: LoFi %s expected in request header.' % (resp.response.url,
+                    '' if is_lo_fi else 'not'))
+      else:
+        request_count += 1
+
+      if is_lo_fi != resp.HasChromeProxyLoFiResponse():
+        raise ChromeProxyMetricException, (
+            '%s: LoFi %s expected in response header.' % (resp.response.url,
+                    '' if is_lo_fi else 'not'))
+      else:
+        response_count += 1
+
+      if is_lo_fi != (resp.content_length < 100):
+        raise ChromeProxyMetricException, (
+            'Image %s is %d bytes. Expecting %s than 100 bytes.' %
+            (resp.response.url, resp.content_length,
+             'less' if is_lo_fi else 'more'))
+
+    if request_count == 0:
+      raise ChromeProxyMetricException, (
+          'Expected at least one %s LoFi request, but zero such requests were '
+          'sent.' % ('' if is_lo_fi else 'non'))
+    if response_count == 0:
+      raise ChromeProxyMetricException, (
+          'Expected at least one %s LoFi response, but zero such responses '
+          'were received.' % ('' if is_lo_fi else 'non'))
+
+    super(ChromeProxyMetric, self).AddResults(tab, results)
+
   def AddResultsForLoFiPreview(self, tab, results):
     lo_fi_preview_request_count = 0
     lo_fi_preview_exp_request_count = 0
diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/lo_fi_cache.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/lo_fi_cache.py
new file mode 100644
index 0000000..2cfa341d
--- /dev/null
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/lo_fi_cache.py
@@ -0,0 +1,32 @@
+# 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.
+
+from telemetry.page import page as page_module
+from telemetry import story
+
+
+class LoFiPageCache(page_module.Page):
+  """
+  A test page for the chrome proxy Lo-Fi cache tests.
+  Checks that LoFi placeholder images are not loaded from cache on page reloads
+  when LoFi mode is disabled or data reduction proxy is disabled.
+  """
+
+  def __init__(self, url, page_set):
+    super(LoFiPageCache, self).__init__(url=url, page_set=page_set)
+
+
+class LoFiCacheStorySet(story.StorySet):
+  """ Chrome proxy test sites """
+
+  def __init__(self):
+    super(LoFiCacheStorySet, self).__init__()
+
+    urls_list = [
+      'http://check.googlezip.net/cacheable/test.html',
+      'http://check.googlezip.net/cacheable/test.html',
+    ]
+
+    for url in urls_list:
+      self.AddStory(LoFiPageCache(url, self))
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index e1a62f20..4b2d8c3b 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -26,7 +26,7 @@
 # Do NOT CHANGE this if you don't know what you're doing -- see
 # https://chromium.googlesource.com/chromium/src/+/master/docs/updating_clang.md
 # Reverting problematic clang rolls is safe, though.
-CLANG_REVISION = '264915'
+CLANG_REVISION = '266460'
 
 use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ
 if use_head_revision:
@@ -601,7 +601,6 @@
   if cxx is not None: cc_args.append('-DCMAKE_CXX_COMPILER=' + cxx)
   cmake_args += base_cmake_args + [
       '-DLLVM_BINUTILS_INCDIR=' + binutils_incdir,
-      '-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly',
       '-DCMAKE_C_FLAGS=' + ' '.join(cflags),
       '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags),
       '-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(ldflags),
diff --git a/tools/gn/bin/gn-format.py b/tools/gn/bin/gn-format.py
index c835753..4769640 100644
--- a/tools/gn/bin/gn-format.py
+++ b/tools/gn/bin/gn-format.py
@@ -38,7 +38,7 @@
   p = subprocess.Popen([binary, 'format', '--stdin'],
                        stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                        stdin=subprocess.PIPE, startupinfo=startupinfo,
-                       universal_newlines=True)
+                       shell=True, universal_newlines=True)
   stdout, stderr = p.communicate(input=text)
   if p.returncode != 0:
     print 'Formatting failed, please report to gn-dev@chromium.org.'
diff --git a/tools/gn/misc/emacs/gn-mode.el b/tools/gn/misc/emacs/gn-mode.el
index 6682290..435e872 100644
--- a/tools/gn/misc/emacs/gn-mode.el
+++ b/tools/gn/misc/emacs/gn-mode.el
@@ -36,6 +36,11 @@
   :group 'gn
   :type 'integer)
 
+(defcustom gn-format-command "gn format --stdin"
+  "The command to run to format gn files in place."
+  :group 'gn
+  :type 'string)
+
 (defgroup gn-faces nil
   "Faces used in Generate Ninja mode."
   :group 'gn
@@ -123,6 +128,20 @@
       ;; if we do.
       t))
 
+(defun gn-run-format ()
+  "Run 'gn format' on the buffer in place."
+  (interactive)
+  ;; We can't `save-excursion' here; that will put us at the beginning of the
+  ;; shell output, aka the beginning of the document.
+  (let ((my-start-line (line-number-at-pos)))
+    (shell-command-on-region (point-min) (point-max) gn-format-command nil t)
+    (goto-line my-start-line)))
+
+(defvar gn-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\C-c\C-f" 'gn-run-format)
+    map))
+
 ;;;###autoload
 (define-derived-mode gn-mode prog-mode "GN"
   "Major mode for editing gn (Generate Ninja)."
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl
index ecc8a56..58d75a7 100644
--- a/tools/mb/mb_config.pyl
+++ b/tools/mb/mb_config.pyl
@@ -490,6 +490,8 @@
       'Linux Builder': 'swarming_gn_release_bot',
       'Linux Builder-Trybot': 'swarming_gn_release_bot',
       'Linux Tests': 'swarming_gn_release_bot',
+      'Mac Builder': 'swarming_gpu_tests_gyp_release_bot',
+      'Mac Builder-Trybot': 'swarming_gpu_tests_gyp_release_bot',
       'Win Builder':
         'swarming_gpu_tests_gyp_release_bot_minimal_symbols_x86',
       'Win Builder-Trybot':
@@ -567,6 +569,7 @@
       'Win7 Tests (dbg)(1)': 'none',
       'Win8 Aura': 'gn_release_bot_minimal_symbols_x86',
       'Win8 GN (dbg)': 'gn_debug_bot_minimal_symbols_x86',
+      'WinClang64 (dbg)': 'win_clang_debug_bot',
     },
 
     'official.desktop': {
@@ -672,12 +675,8 @@
       'chromeos_amd64-generic_chromium_compile_only_ng': 'tbd',
       'chromeos_daisy_chromium_compile_only_ng': 'tbd',
       'chromeos_x86-generic_chromium_compile_only_ng': 'tbd',
-      'linux_chromium_browser_side_navigation_rel': 'tbd',
       'linux_chromium_chromeos_asan_rel_ng': 'tbd',
-      'linux_chromium_chromeos_compile_dbg_ng': 'tbd',
-      'linux_chromium_chromeos_dbg_ng': 'tbd',
       'linux_chromium_chromeos_msan_rel_ng': 'tbd',
-      'linux_chromium_chromeos_ozone_rel_ng': 'tbd',
 
       'cast_shell_linux': 'cast_gn_release_trybot',
       'chromeos_amd64-generic_variable': 'findit',
@@ -688,11 +687,18 @@
       'linux_chromium_archive_rel_ng': 'noswarming_gn_release_bot',
       'linux_chromium_asan_rel_ng': 'swarming_asan_lsan_gyp_release_trybot',
       'linux_chromium_asan_variable': 'findit',
+      'linux_chromium_browser_side_navigation_rel': 'gyp_release_trybot',
       'linux_chromium_cast_variable': 'findit',
       'linux_chromium_cfi_rel_ng': 'gn_cfi_release_trybot',
       'linux_chromium_chromeos_asan_variable': 'findit',
+      'linux_chromium_chromeos_compile_dbg_ng':
+        'swarming_chromeos_gyp_debug_trybot',
       'linux_chromium_chromeos_compile_rel_ng':
         'swarming_chromeos_gn_release_trybot',
+      'linux_chromium_chromeos_dbg_ng':
+        'swarming_chromeos_gyp_debug_trybot',
+      'linux_chromium_chromeos_ozone_rel_ng':
+        'swarming_chromeos_gyp_ozone_release_trybot',
       'linux_chromium_chromeos_rel_ng': 'swarming_chromeos_gyp_release_trybot',
       'linux_chromium_chromeos_variable': 'findit',
       'linux_chromium_chromeos_variable_chrome': 'findit',
@@ -732,13 +738,8 @@
     },
 
     'tryserver.chromium.mac': {
-      'mac_chromium_10.10_rel_ng': 'tbd',
       'mac_chromium_archive_rel_ng': 'tbd',
       'mac_chromium_asan_rel_ng': 'tbd',
-      'mac_chromium_compile_dbg_ng': 'tbd',
-      'mac_chromium_compile_rel_ng': 'tbd',
-      'mac_chromium_dbg_ng': 'tbd',
-      'mac_chromium_rel_ng': 'tbd',
       'mac_optional_gpu_tests_rel': 'tbd',
 
       'ios_dbg_simulator': 'ios_gyp',
@@ -747,10 +748,15 @@
       'ios_rel_device': 'ios_gyp',
       'ios_rel_device_gn': 'ios_gn',
       'ios_rel_device_ninja': 'ios_gyp',
+      'mac_chromium_10.10_rel_ng': 'swarming_gpu_tests_gyp_release_trybot',
       'mac_chromium_asan_variable': 'findit',
+      'mac_chromium_compile_dbg_ng': 'swarming_gyp_debug_trybot',
+      'mac_chromium_compile_rel_ng': 'swarming_gpu_tests_gyp_release_trybot',
+      'mac_chromium_dbg_ng': 'swarming_gyp_debug_trybot',
       'mac_chromium_gn_dbg': 'gn_debug_static_bot',
       'mac_chromium_gn_rel': 'gn_release_trybot',
       'mac_chromium_gn_upload': 'gn_release_bot',
+      'mac_chromium_rel_ng': 'swarming_gpu_tests_gyp_release_trybot',
       'mac_chromium_variable': 'findit',
       'mac_chromium_variable_10.10': 'findit',
       'mac_chromium_variable_10.10_layout': 'findit',
@@ -1260,6 +1266,14 @@
       'swarming', 'chromeos_with_codecs', 'gyp', 'debug_bot',
     ],
 
+    'swarming_chromeos_gyp_debug_trybot': [
+      'swarming', 'chromeos_with_codecs', 'gyp', 'debug_trybot',
+    ],
+
+    'swarming_chromeos_gyp_ozone_release_trybot': [
+      'swarming', 'chromeos_with_codecs', 'gyp', 'ozone', 'release_trybot',
+    ],
+
     'swarming_chromeos_gyp_release_bot': [
       'swarming', 'chromeos_with_codecs', 'gyp', 'release_bot',
     ],
@@ -1272,6 +1286,14 @@
       'chromeos_with_codecs', 'goma', 'gyp', 'ozone', 'static', 'swarming',
     ],
 
+    'swarming_gyp_debug_trybot': [
+      'swarming', 'gyp', 'debug_trybot',
+    ],
+
+    'swarming_gpu_tests_gyp_release_trybot': [
+      'swarming', 'gpu_tests', 'gyp', 'release_trybot',
+    ],
+
     'swarming_msan_gyp_release_trybot': [
       'swarming', 'chromeos', 'msan', 'gyp', 'release_trybot',
     ],
@@ -1362,11 +1384,11 @@
     ],
 
     'swarming_gpu_tests_gyp_release_bot': [
-      'swarming', 'gpu_tests', 'gyp', 'static',
+      'swarming', 'gpu_tests', 'gyp', 'release_bot',
     ],
 
     'swarming_gpu_tests_gyp_debug_bot': [
-      'swarming', 'gpu_tests', 'gyp', 'shared',
+      'swarming', 'gpu_tests', 'gyp', 'debug_bot',
     ],
 
     'swarming_gpu_tests_gyp_release_bot_minimal_symbols_x86': [
@@ -1573,6 +1595,16 @@
       'gyp_defines': 'asan=1',
     },
 
+    'ffmpeg_branding_chrome': {
+      'gn_args': 'ffmpeg_branding="Chrome"',
+      'gyp_defines': 'ffmpeg_branding=Chrome',
+    },
+
+    'ffmpeg_branding_chromeos': {
+      'gn_args': 'ffmpeg_branding="ChromeOS"',
+      'gyp_defines': 'ffmpeg_branding=ChromeOS',
+    },
+
     'cast': {
       'gn_args': 'is_chromecast=true',
       'gyp_defines': 'chromecast=1',
@@ -1589,9 +1621,7 @@
     },
 
     'chrome_with_codecs': {
-      'gn_args': 'ffmpeg_branding="Chrome"',
-      'gyp_defines': 'ffmpeg_branding=Chrome',
-      'mixins': ['proprietary_codecs'],
+      'mixins': ['ffmpeg_branding_chrome', 'proprietary_codecs'],
     },
 
     'chromeos': {
@@ -1600,9 +1630,7 @@
     },
 
     'chromeos_with_codecs': {
-      'gn_args': 'ffmpeg_branding="ChromeOS"',
-      'gyp_defines': 'ffmpeg_branding=ChromeOS',
-      'mixins': ['chromeos', 'proprietary_codecs'],
+      'mixins': ['ffmpeg_branding_chromeos', 'chromeos', 'proprietary_codecs'],
     },
 
     'clang_no_chrome_plugins': {
diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml
index 3cb1d1a..eb09f63 100644
--- a/tools/metrics/actions/actions.xml
+++ b/tools/metrics/actions/actions.xml
@@ -705,6 +705,14 @@
   <description>Please enter the description of this user action.</description>
 </action>
 
+<action name="Accel_Take_Window_Screenshot">
+  <owner>warx@chromium.org</owner>
+  <description>
+    Metric recorded when shortcut key to initiate an active window screenshot
+    per kuscher@'s request.
+  </description>
+</action>
+
 <action name="Accel_Toggle_Caps_Lock">
   <owner>Please list the metric's owners. Add more owner tags as needed.</owner>
   <description>Please enter the description of this user action.</description>
@@ -12349,6 +12357,14 @@
   <description>Please enter the description of this user action.</description>
 </action>
 
+<action name="Screenshot_TakeWindow">
+  <owner>warx@chromium.org</owner>
+  <description>
+    User initiates an active window screenshot, a window selection per
+    kuscher@'s request.
+  </description>
+</action>
+
 <action name="SearchWithRLZ">
   <owner>Please list the metric's owners. Add more owner tags as needed.</owner>
   <description>Please enter the description of this user action.</description>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 2b3e0a4..78174653 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -13162,6 +13162,10 @@
 </histogram>
 
 <histogram name="Extensions.EnhancedBookmarksManagerNumEventListeners">
+  <obsolete>
+    Obsolete since the enhanced bookmarks manager is no longer using an event
+    page.
+  </obsolete>
   <owner>wittman@chromium.org</owner>
   <summary>
     The number of event listeners the Enhanced Bookmarks Manager has, measured
@@ -63633,6 +63637,7 @@
   <int value="-402" label="CACHE_WRITE_FAILURE"/>
   <int value="-401" label="CACHE_READ_FAILURE"/>
   <int value="-400" label="CACHE_MISS"/>
+  <int value="-369" label="TEMPORARY_BACKOFF"/>
   <int value="-368" label="ALTERNATIVE_CERT_NOT_VALID_FOR_ORIGIN"/>
   <int value="-367" label="PAC_SCRIPT_TERMINATED"/>
   <int value="-366" label="PROXY_HTTP_1_1_REQUIRED"/>
@@ -63701,6 +63706,11 @@
   <int value="-202" label="CERT_AUTHORITY_INVALID"/>
   <int value="-201" label="CERT_DATE_INVALID"/>
   <int value="-200" label="CERT_COMMON_NAME_INVALID"/>
+  <int value="-171" label="CT_CONSISTENCY_PROOF_PARSING_FAILED"/>
+  <int value="-170" label="UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH"/>
+  <int value="-169" label="CT_STH_INCOMPLETE"/>
+  <int value="-168" label="CT_STH_PARSING_FAILED"/>
+  <int value="-167" label="SSL_SERVER_CERT_BAD_FORMAT"/>
   <int value="-166" label="ICANN_NAME_COLLISION"/>
   <int value="-165" label="SSL_FALLBACK_BEYOND_MINIMUM_VERSION"/>
   <int value="-164" label="SSL_CLIENT_AUTH_CERT_BAD_FORMAT"/>
@@ -76953,6 +76963,7 @@
   <int value="13" label="RegisterMediaRouteProvider"/>
   <int value="14" label="ConnectRouteByRouteId"/>
   <int value="15" label="EnableMdnsDiscovery"/>
+  <int value="16" label="UpdateMediaSinks"/>
 </enum>
 
 <enum name="MediaRouteProviderWakeup" type="int">
@@ -77676,6 +77687,11 @@
   <int value="164" label="SSL_CLIENT_AUTH_CERT_BAD_FORMAT"/>
   <int value="165" label="SSL_FALLBACK_BEYOND_MINIMUM_VERSION"/>
   <int value="166" label="ICANN_NAME_COLLISION"/>
+  <int value="167" label="SSL_SERVER_CERT_BAD_FORMAT"/>
+  <int value="168" label="CT_STH_PARSING_FAILED"/>
+  <int value="169" label="CT_STH_INCOMPLETE"/>
+  <int value="170" label="UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH"/>
+  <int value="171" label="CT_CONSISTENCY_PROOF_PARSING_FAILED"/>
   <int value="200" label="CERT_COMMON_NAME_INVALID"/>
   <int value="201" label="CERT_DATE_INVALID"/>
   <int value="202" label="CERT_AUTHORITY_INVALID"/>
@@ -77746,6 +77762,7 @@
   <int value="366" label="PROXY_HTTP_1_1_REQUIRED"/>
   <int value="367" label="PAC_SCRIPT_TERMINATED"/>
   <int value="368" label="ALTERNATIVE_CERT_NOT_VALID_FOR_ORIGIN"/>
+  <int value="369" label="TEMPORARY_BACKOFF"/>
   <int value="400" label="CACHE_MISS"/>
   <int value="401" label="CACHE_READ_FAILURE"/>
   <int value="402" label="CACHE_WRITE_FAILURE"/>
diff --git a/tools/perf/benchmarks/webrtc.py b/tools/perf/benchmarks/webrtc.py
index d20c237..c77850a 100644
--- a/tools/perf/benchmarks/webrtc.py
+++ b/tools/perf/benchmarks/webrtc.py
@@ -17,6 +17,7 @@
 # is fixed, or revert https://codereview.chromium.org/1544573002/ when
 # http://crbug.com/568333 is fixed.
 
+
 # Disabled because the reference set becomes flaky with the new
 # https:// page set introduced in http://crbug.com/523517.
 # Try removing once the Chrome used for ref builds advances
@@ -28,7 +29,7 @@
 
 
 class WebrtcGetusermedia(_Webrtc):
-  """Measures WebRtc GetUserMedia for video capture and local playback"""
+  """Measures WebRtc GetUserMedia for video capture and local playback."""
   page_set = page_sets.WebrtcGetusermediaPageSet
 
   @classmethod
@@ -37,7 +38,7 @@
 
 
 class WebrtcPeerConnection(_Webrtc):
-  """Measures WebRtc Peerconnection for remote video and audio communication """
+  """Measures WebRtc Peerconnection for remote video and audio communication."""
   page_set = page_sets.WebrtcPeerconnectionPageSet
 
   @classmethod
@@ -46,7 +47,7 @@
 
 
 class WebrtcDataChannel(_Webrtc):
-  """Measures WebRtc DataChannel loopback """
+  """Measures WebRtc DataChannel loopback."""
   page_set = page_sets.WebrtcDatachannelPageSet
 
   @classmethod
@@ -56,10 +57,13 @@
 
 # WebrtcRendering must be a PerfBenchmark, and not a _Webrtc, because it is a
 # timeline-based.
+# Disabled on reference builds because they crash and don't support tab
+# capture. See http://crbug.com/603232.
+@benchmark.Disabled('reference')
 class WebrtcRendering(perf_benchmark.PerfBenchmark):
   """Specific time measurements (e.g. fps, smoothness) for WebRtc rendering."""
 
-  page_set = page_sets.WebrtcPeerconnectionPageSet
+  page_set = page_sets.WebrtcRenderingPageSet
 
   def CreateTimelineBasedMeasurementOptions(self):
     category_filter = tracing_category_filter.TracingCategoryFilter(
diff --git a/tools/perf/chrome_telemetry_build/BUILD.gn b/tools/perf/chrome_telemetry_build/BUILD.gn
index 3597e54b..6883c55 100644
--- a/tools/perf/chrome_telemetry_build/BUILD.gn
+++ b/tools/perf/chrome_telemetry_build/BUILD.gn
@@ -4,6 +4,25 @@
 
 import("//build/config/compiler/compiler.gni")
 
+if (is_win) {
+  action("copy_cdb_to_output") {
+    script = "//build/win/copy_cdb_to_output.py"
+    inputs = [
+      script,
+    ]
+    outputs = [
+      "$root_out_dir/cdb/cdb.exe",
+      "$root_out_dir/cdb/dbgeng.dll",
+      "$root_out_dir/cdb/dbghelp.dll",
+      "$root_out_dir/cdb/dbgmodel.dll",
+    ]
+    args = [
+      rebase_path("$root_out_dir/cdb", root_out_dir),
+      target_cpu,
+    ]
+  }
+}
+
 group("telemetry_chrome_test") {
   data_deps = [
     # TODO(kbr): this used to be "//chrome". Had to change this to
@@ -31,6 +50,11 @@
   }
 
   if (is_win && (symbol_level == 1 || symbol_level == 2)) {
+    data_deps += [
+      ":copy_cdb_to_output",
+      "//third_party/crashpad/crashpad/tools:crashpad_database_util",
+    ]
+
     # TODO(GYP): These should be provided automatically through data_deps.
     data += [ "$root_out_dir/chrome.exe.pdb" ]
     if (is_component_build) {
diff --git a/tools/perf/page_sets/data/webrtc_smoothness_cases.json b/tools/perf/page_sets/data/webrtc_smoothness_cases.json
new file mode 100644
index 0000000..ed7c614
--- /dev/null
+++ b/tools/perf/page_sets/data/webrtc_smoothness_cases.json
@@ -0,0 +1,9 @@
+{
+    "description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.", 
+    "archives": {
+        "webrtc_smoothness_cases_001.wpr": [
+            "720p_call_45s", 
+            "canvas_capture_peer_connection"
+        ]
+    }
+}
\ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_smoothness_cases_001.wpr.sha1 b/tools/perf/page_sets/data/webrtc_smoothness_cases_001.wpr.sha1
new file mode 100644
index 0000000..6ec76ac
--- /dev/null
+++ b/tools/perf/page_sets/data/webrtc_smoothness_cases_001.wpr.sha1
@@ -0,0 +1 @@
+c57b0b7001336cf5e62851757096bbbc46866b9f
\ No newline at end of file
diff --git a/tools/perf/page_sets/pregenerated_large_profile_shared_state.py b/tools/perf/page_sets/pregenerated_large_profile_shared_state.py
index 6edd1ee..3f81b3a 100644
--- a/tools/perf/page_sets/pregenerated_large_profile_shared_state.py
+++ b/tools/perf/page_sets/pregenerated_large_profile_shared_state.py
@@ -3,17 +3,16 @@
 # found in the LICENSE file.
 import os
 
-from telemetry.page import shared_page_state
+from page_sets import pregenerated_profile_shared_state
 
 
-class PregeneratedLargeProfileSharedState(shared_page_state.SharedPageState):
+class PregeneratedLargeProfileSharedState(
+    pregenerated_profile_shared_state.PregeneratedProfileSharedState):
   def __init__(self, test, finder_options, story_set):
     super(PregeneratedLargeProfileSharedState, self).__init__(
         test, finder_options, story_set)
     perf_dir = os.path.normpath(
         os.path.join(os.path.dirname(__file__), os.path.pardir))
-    profile_archive_dir = os.path.join(
+    self._pregenerated_profile_archive_dir = os.path.join(
         perf_dir, 'generated_profiles', self._possible_browser.target_os,
         'large_profile.zip')
-
-    self.SetPregeneratedProfileArchiveDir(profile_archive_dir)
diff --git a/tools/perf/page_sets/pregenerated_profile_shared_state.py b/tools/perf/page_sets/pregenerated_profile_shared_state.py
new file mode 100644
index 0000000..72e64f1
--- /dev/null
+++ b/tools/perf/page_sets/pregenerated_profile_shared_state.py
@@ -0,0 +1,157 @@
+# 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 logging
+import os
+import shutil
+import sys
+import tempfile
+import zipfile
+
+from catapult_base import cloud_storage
+
+from telemetry.page import shared_page_state
+
+
+class PregeneratedProfileSharedState(shared_page_state.SharedPageState):
+  def __init__(self, test, finder_options, story_set):
+    super(PregeneratedProfileSharedState, self).__init__(
+        test, finder_options, story_set)
+    self._unzipped_profile = None
+    self._migrated_profile = None
+    self._pregenerated_profile_archive_dir = None
+
+  def WillRunStory(self, page):
+    if self._ShouldDownloadPregeneratedProfileArchive():
+      self._DownloadPregeneratedProfileArchive()
+
+      if self._ShouldMigrateProfile():
+        self._MigratePregeneratedProfile()
+    super(PregeneratedProfileSharedState, self).WillRunStory(page)
+
+  def TearDownState(self):
+    if self._unzipped_profile:
+      shutil.rmtree(self._unzipped_profile)
+      self._unzipped_profile = None
+    if self._migrated_profile:
+      shutil.rmtree(self._migrated_profile)
+      self._migrated_profile = None
+    super(PregeneratedProfileSharedState, self).TearDownState()
+
+  def _ShouldDownloadPregeneratedProfileArchive(self):
+    """Whether to download a pre-generated profile archive."""
+    if not self._pregenerated_profile_archive_dir:
+      return False
+
+    if self._finder_options.browser_options.profile_dir:
+      logging.warning("Profile directory specified on command line: %s, this"
+                      "overrides the benchmark's default profile directory.",
+                      self._finder_options.browser_options.profile_dir)
+      return False
+
+    if self._possible_browser.IsRemote():
+      return False
+
+    return True
+
+  def _DownloadPregeneratedProfileArchive(self):
+    """Download and extract the profile directory archive if one exists.
+
+    On success, updates self._finder_options.browser_options.profile_dir with
+    the directory of the extracted profile.
+    """
+    try:
+      cloud_storage.GetIfChanged(self._pregenerated_profile_archive_dir,
+                                 cloud_storage.PUBLIC_BUCKET)
+    except (cloud_storage.CredentialsError,
+            cloud_storage.PermissionError) as e:
+      if os.path.exists(self._pregenerated_profile_archive_dir):
+        # If the profile directory archive exists, assume the user has their
+        # own local copy simply warn.
+        logging.warning('Could not download Profile archive: %s',
+                        self._pregenerated_profile_archive_dir)
+      else:
+        # If the archive profile directory doesn't exist, this is fatal.
+        logging.error('Can not run without required profile archive: %s. '
+                      'If you believe you have credentials, follow the '
+                      'instructions below.',
+                      self._pregenerated_profile_archive_dir)
+        logging.error(str(e))
+        sys.exit(-1)
+
+    # Check to make sure the zip file exists.
+    if not os.path.isfile(self._pregenerated_profile_archive_dir):
+      raise Exception("Profile directory archive not downloaded: ",
+                      self._pregenerated_profile_archive_dir)
+
+    # The location to extract the profile into.
+    self._unzipped_profile = tempfile.mkdtemp()
+    profile_archive_path_basename = os.path.basename(
+        self._pregenerated_profile_archive_dir)
+    extracted_profile_dir_path = os.path.join(
+        self._unzipped_profile,
+        os.path.splitext(profile_archive_path_basename)[0])
+
+    # Unzip profile directory.
+    with zipfile.ZipFile(self._pregenerated_profile_archive_dir) as f:
+      try:
+        f.extractall(self._unzipped_profile)
+      except Exception as e:
+        # Cleanup any leftovers from unzipping.
+        shutil.rmtree(self._unzipped_profile)
+        logging.error("Error extracting profile directory zip file: %s", e)
+        sys.exit(-1)
+
+    if not os.path.exists(extracted_profile_dir_path):
+      raise Exception("Failed to extract profile: ",
+                      extracted_profile_dir_path)
+
+    # Run with freshly extracted profile directory.
+    logging.info("Using profile archive directory: %s",
+                 extracted_profile_dir_path)
+    self._finder_options.browser_options.profile_dir = (
+        extracted_profile_dir_path)
+
+  def _ShouldMigrateProfile(self):
+    return not self._migrated_profile
+
+  def _MigrateProfile(self, finder_options, found_browser,
+                      initial_profile, final_profile):
+    """Migrates a profile to be compatible with a newer version of Chrome.
+
+    Launching Chrome with the old profile will perform the migration.
+    """
+    # Save the current input and output profiles.
+    saved_input_profile = finder_options.browser_options.profile_dir
+    saved_output_profile = finder_options.browser_options.output_profile_path
+
+    # Set the input and output profiles.
+    finder_options.browser_options.profile_dir = initial_profile
+    finder_options.browser_options.output_profile_path = final_profile
+
+    # Launch the browser, then close it.
+    browser = found_browser.Create(finder_options)
+    browser.Close()
+
+    # Load the saved input and output profiles.
+    finder_options.browser_options.profile_dir = saved_input_profile
+    finder_options.browser_options.output_profile_path = saved_output_profile
+
+  def _MigratePregeneratedProfile(self):
+    """Migrates the pre-generated profile by launching Chrome with it.
+
+    On success, updates self._migrated_profile and
+    self._finder_options.browser_options.profile_dir with the directory of the
+    migrated profile.
+    """
+    self._migrated_profile = tempfile.mkdtemp()
+    logging.info("Starting migration of pre-generated profile to %s",
+                 self._migrated_profile)
+    pregenerated_profile = self._finder_options.browser_options.profile_dir
+
+    possible_browser = self._FindBrowser(self._finder_options)
+    self._MigrateProfile(self._finder_options, possible_browser,
+                         pregenerated_profile, self._migrated_profile)
+    self._finder_options.browser_options.profile_dir = self._migrated_profile
+    logging.info("Finished migration of pre-generated profile to %s",
+                 self._migrated_profile)
diff --git a/tools/perf/page_sets/webrtc_cases.py b/tools/perf/page_sets/webrtc_cases.py
index 99f5ead..f157d57 100644
--- a/tools/perf/page_sets/webrtc_cases.py
+++ b/tools/perf/page_sets/webrtc_cases.py
@@ -3,11 +3,12 @@
 # found in the LICENSE file.
 import os
 
-from telemetry.page import page as page_module
 from telemetry import story
+from telemetry.page import page as page_module
 
 
 WEBRTC_GITHUB_SAMPLES_URL = 'https://webrtc.github.io/samples/src/content/'
+MEDIARECORDER_GITHUB_URL = 'https://rawgit.com/cricdecyan/mediarecorder/master/'
 
 
 class WebrtcPage(page_module.Page):
@@ -22,13 +23,13 @@
 
 
 class Page1(WebrtcPage):
-  """ Why: Acquires a high definition (720p) local stream. """
+  """Why: Acquires a high definition (720p) local stream."""
 
   def __init__(self, page_set):
     super(Page1, self).__init__(
-      url=WEBRTC_GITHUB_SAMPLES_URL + 'getusermedia/resolution/',
-      name='hd_local_stream_10s',
-      page_set=page_set)
+        url=WEBRTC_GITHUB_SAMPLES_URL + 'getusermedia/resolution/',
+        name='hd_local_stream_10s',
+        page_set=page_set)
 
   def RunPageInteractions(self, action_runner):
     action_runner.ClickElement('button[id="hd"]')
@@ -36,7 +37,7 @@
 
 
 class Page2(WebrtcPage):
-  """ Why: Sets up a local video-only WebRTC 720p call for 45 seconds. """
+  """Why: Sets up a local video-only WebRTC 720p call for 45 seconds."""
 
   def __init__(self, page_set):
     super(Page2, self).__init__(
@@ -58,12 +59,12 @@
 
 
 class Page3(WebrtcPage):
-  """ Why: Transfer as much data as possible through a data channel in 20s. """
+  """Why: Transfer as much data as possible through a data channel in 20s."""
 
   def __init__(self, page_set):
     super(Page3, self).__init__(
         url=WEBRTC_GITHUB_SAMPLES_URL + 'datachannel/datatransfer',
-        name="30s_datachannel_transfer",
+        name='30s_datachannel_transfer',
         page_set=page_set)
 
   def RunPageInteractions(self, action_runner):
@@ -74,15 +75,14 @@
     action_runner.Wait(30)
 
 
-
 class Page4(WebrtcPage):
-  """ Why: Sets up a WebRTC audio call with Opus. """
+  """Why: Sets up a WebRTC audio call with Opus."""
 
   def __init__(self, page_set):
     super(Page4, self).__init__(
-      url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=OPUS',
-      name='audio_call_opus_10s',
-      page_set=page_set)
+        url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=OPUS',
+        name='audio_call_opus_10s',
+        page_set=page_set)
 
   def RunPageInteractions(self, action_runner):
     action_runner.ExecuteJavaScript('codecSelector.value="OPUS";')
@@ -91,13 +91,13 @@
 
 
 class Page5(WebrtcPage):
-  """ Why: Sets up a WebRTC audio call with G722. """
+  """Why: Sets up a WebRTC audio call with G722."""
 
   def __init__(self, page_set):
     super(Page5, self).__init__(
-      url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=G722',
-      name='audio_call_g722_10s',
-      page_set=page_set)
+        url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=G722',
+        name='audio_call_g722_10s',
+        page_set=page_set)
 
   def RunPageInteractions(self, action_runner):
     action_runner.ExecuteJavaScript('codecSelector.value="G722";')
@@ -106,13 +106,13 @@
 
 
 class Page6(WebrtcPage):
-  """ Why: Sets up a WebRTC audio call with PCMU. """
+  """Why: Sets up a WebRTC audio call with PCMU."""
 
   def __init__(self, page_set):
     super(Page6, self).__init__(
-      url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=PCMU',
-      name='audio_call_pcmu_10s',
-      page_set=page_set)
+        url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=PCMU',
+        name='audio_call_pcmu_10s',
+        page_set=page_set)
 
   def RunPageInteractions(self, action_runner):
     action_runner.ExecuteJavaScript('codecSelector.value="PCMU";')
@@ -121,13 +121,13 @@
 
 
 class Page7(WebrtcPage):
-  """ Why: Sets up a WebRTC audio call with iSAC 16K. """
+  """Why: Sets up a WebRTC audio call with iSAC 16K."""
 
   def __init__(self, page_set):
     super(Page7, self).__init__(
-      url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=ISAC_16K',
-      name='audio_call_isac16k_10s',
-      page_set=page_set)
+        url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=ISAC_16K',
+        name='audio_call_isac16k_10s',
+        page_set=page_set)
 
   def RunPageInteractions(self, action_runner):
     action_runner.ExecuteJavaScript('codecSelector.value="ISAC/16000";')
@@ -135,47 +135,78 @@
     action_runner.Wait(10)
 
 
+class Page8(WebrtcPage):
+  """Why: Sets up a canvas capture stream connection to a peer connection."""
+
+  def __init__(self, page_set):
+    canvas_capure_html = 'canvascapture/canvas_capture_peerconnection.html'
+    super(Page8, self).__init__(
+        url=MEDIARECORDER_GITHUB_URL + canvas_capure_html,
+        name='canvas_capture_peer_connection',
+        page_set=page_set)
+
+  def RunPageInteractions(self, action_runner):
+    with action_runner.CreateInteraction('Action_Canvas_PeerConnection',
+                                         repeatable=False):
+      action_runner.ExecuteJavaScript('draw();')
+      action_runner.ExecuteJavaScript('doCanvasCaptureAndPeerConnection();')
+      action_runner.Wait(10)
+
+
 class WebrtcGetusermediaPageSet(story.StorySet):
-  """ WebRTC tests for local getUserMedia: video capture and playback. """
+  """WebRTC tests for local getUserMedia: video capture and playback."""
 
   def __init__(self):
     super(WebrtcGetusermediaPageSet, self).__init__(
-      archive_data_file='data/webrtc_getusermedia_cases.json',
-      cloud_storage_bucket=story.PUBLIC_BUCKET)
+        archive_data_file='data/webrtc_getusermedia_cases.json',
+        cloud_storage_bucket=story.PUBLIC_BUCKET)
 
     self.AddStory(Page1(self))
 
 
 class WebrtcPeerconnectionPageSet(story.StorySet):
-  """ WebRTC tests for Real-time video and audio communication. """
+  """WebRTC tests for Real-time video and audio communication."""
 
   def __init__(self):
     super(WebrtcPeerconnectionPageSet, self).__init__(
-      archive_data_file='data/webrtc_peerconnection_cases.json',
-      cloud_storage_bucket=story.PUBLIC_BUCKET)
+        archive_data_file='data/webrtc_peerconnection_cases.json',
+        cloud_storage_bucket=story.PUBLIC_BUCKET)
 
     self.AddStory(Page2(self))
 
 
 class WebrtcDatachannelPageSet(story.StorySet):
-  """ WebRTC tests for Real-time communication via the data channel. """
+  """WebRTC tests for Real-time communication via the data channel."""
 
   def __init__(self):
     super(WebrtcDatachannelPageSet, self).__init__(
-      archive_data_file='data/webrtc_datachannel_cases.json',
-      cloud_storage_bucket=story.PUBLIC_BUCKET)
+        archive_data_file='data/webrtc_datachannel_cases.json',
+        cloud_storage_bucket=story.PUBLIC_BUCKET)
 
     self.AddStory(Page3(self))
 
+
 class WebrtcAudioPageSet(story.StorySet):
-  """ WebRTC tests for Real-time audio communication. """
+  """WebRTC tests for Real-time audio communication."""
 
   def __init__(self):
     super(WebrtcAudioPageSet, self).__init__(
-      archive_data_file='data/webrtc_audio_cases.json',
-      cloud_storage_bucket=story.PUBLIC_BUCKET)
+        archive_data_file='data/webrtc_audio_cases.json',
+        cloud_storage_bucket=story.PUBLIC_BUCKET)
 
     self.AddStory(Page4(self))
     self.AddStory(Page5(self))
     self.AddStory(Page6(self))
     self.AddStory(Page7(self))
+
+
+class WebrtcRenderingPageSet(story.StorySet):
+  """WebRTC tests for video rendering."""
+
+  def __init__(self):
+    super(WebrtcRenderingPageSet, self).__init__(
+        archive_data_file='data/webrtc_smoothness_cases.json',
+        cloud_storage_bucket=story.PARTNER_BUCKET)
+
+    self.AddStory(Page2(self))
+    self.AddStory(Page8(self))
diff --git a/tools/roll_webgl_conformance.py b/tools/roll_webgl_conformance.py
index 7ea056f..4c9eb73 100755
--- a/tools/roll_webgl_conformance.py
+++ b/tools/roll_webgl_conformance.py
@@ -20,7 +20,11 @@
   {
     "mastername": "tryserver.chromium.mac",
     "buildernames": ["mac_optional_gpu_tests_rel"]
-  }
+  },
+  {
+    "mastername": "tryserver.chromium.linux",
+    "buildernames": ["linux_optional_gpu_tests_rel"]
+  },
 ]
 
 SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
@@ -229,7 +233,7 @@
     readme.write(m)
     readme.truncate()
 
-  def PrepareRoll(self, ignore_checks, skip_tryjobs):
+  def PrepareRoll(self, ignore_checks, run_tryjobs):
     # TODO(kjellander): use os.path.normcase, os.path.join etc for all paths for
     # cross platform compatibility.
 
@@ -280,7 +284,7 @@
       self._RunCommand(['git', 'cl', 'upload'],
                        extra_env={'EDITOR': 'true'})
 
-      if not skip_tryjobs:
+      if run_tryjobs:
         # Kick off tryjobs.
         base_try_cmd = ['git', 'cl', 'try']
         self._RunCommand(base_try_cmd)
@@ -365,11 +369,10 @@
       help=('Skips checks for being on the master branch, dirty workspaces and '
             'the updating of the checkout. Will still delete and create local '
             'Git branches.'))
-  parser.add_argument('--skip-tryjobs', action='store_true', default=False,
-      help=('Skip the dry-run tryjobs for the newly generated CL. Use this '
-            'when you expect to have to make many changes to the WebGL '
-            'conformance test expectations in the same CL and want to avoid '
-            'wasted tryjobs.'))
+  parser.add_argument('--run-tryjobs', action='store_true', default=False,
+      help=('Start the dry-run tryjobs for the newly generated CL. Use this '
+            'when you have no need to make changes to the WebGL conformance '
+            'test expectations in the same CL and want to avoid.'))
   parser.add_argument('-v', '--verbose', action='store_true', default=False,
       help='Be extra verbose in printing of log messages.')
   args = parser.parse_args()
@@ -383,7 +386,7 @@
   if args.abort:
     return autoroller.Abort()
   else:
-    return autoroller.PrepareRoll(args.ignore_checks, args.skip_tryjobs)
+    return autoroller.PrepareRoll(args.ignore_checks, args.run_tryjobs)
 
 if __name__ == '__main__':
   sys.exit(main())
diff --git a/tools/valgrind/drmemory/suppressions.txt b/tools/valgrind/drmemory/suppressions.txt
index 36f6991..ee81fb0 100644
--- a/tools/valgrind/drmemory/suppressions.txt
+++ b/tools/valgrind/drmemory/suppressions.txt
@@ -810,3 +810,9 @@
 ipc.dll!IPC::internal::ChannelReader::TranslateInputData
 ipc.dll!IPC::internal::ChannelReader::AsyncReadComplete
 ipc.dll!IPC::ChannelWin::OnIOCompleted
+
+UNADDRESSABLE ACCESS
+name=bug_604078
+content.dll!content::BluetoothBlacklist::PopulateWithServerProvidedValues
+content.dll!content::BluetoothBlacklist::BluetoothBlacklist
+content.dll!content::BluetoothBlacklist::Get
diff --git a/tools/valgrind/drmemory/suppressions_full.txt b/tools/valgrind/drmemory/suppressions_full.txt
index a03efb6..be04412 100644
--- a/tools/valgrind/drmemory/suppressions_full.txt
+++ b/tools/valgrind/drmemory/suppressions_full.txt
@@ -1831,8 +1831,8 @@
 KERNEL32.dll!DuplicateHandle
 base.dll!base::SharedMemory::ShareToProcessCommon
 gl_wrapper.dll!gl::GLImageSharedMemory::Initialize
-content.dll!content::GpuChannel::CreateImageForGpuMemoryBuffer
-content.dll!content::GpuCommandBufferStub::OnCreateImage
+*!*::GpuChannel::CreateImageForGpuMemoryBuffer
+*!*::GpuCommandBufferStub::OnCreateImage
 
 HANDLE LEAK
 name=https://crbug.com/481305
@@ -2234,3 +2234,9 @@
 ...
 webcore_shared.dll!blink::ScriptController::createPluginWrapper
 webcore_shared.dll!blink::HTMLPlugInElement::pluginWrapper
+
+UNINITIALIZED READ
+name=bug_604066
+...
+*!base::win::`anonymous namespace'::DeadlockThread::Terminate
+*!base::win::WaitChainTest_Deadlock_Test::TestBody
diff --git a/tools/valgrind/gtest_exclude/browser_tests.gtest-drmemory.txt b/tools/valgrind/gtest_exclude/browser_tests.gtest-drmemory.txt
index 22b4fce..7531724 100644
--- a/tools/valgrind/gtest_exclude/browser_tests.gtest-drmemory.txt
+++ b/tools/valgrind/gtest_exclude/browser_tests.gtest-drmemory.txt
@@ -153,6 +153,7 @@
 SubframeTaskBrowserTest.TaskManagerShowsSubframeTasks
 SyncSetupWebUITestAsync.RestoreSyncDataTypes
 WebUIWebView*
+WebrtcEventLogApiTest*
 ZoomControllerBrowserTest.NavigationResetsManualMode
 
 # https://crbug.com/603334
diff --git a/tools/valgrind/gtest_exclude/content_unittests.gtest-drmemory_win32.txt b/tools/valgrind/gtest_exclude/content_unittests.gtest-drmemory_win32.txt
index 4cc5686..01d1997 100644
--- a/tools/valgrind/gtest_exclude/content_unittests.gtest-drmemory_win32.txt
+++ b/tools/valgrind/gtest_exclude/content_unittests.gtest-drmemory_win32.txt
@@ -11,3 +11,6 @@
 # http://crbug.com/554665
 WebContentsVideoCaptureDeviceTest.VariableResolution_AnyWithinLimits
 WebContentsVideoCaptureDeviceTest.VariableResolution_FixedAspectRatio
+
+# https://crbug.com/604056
+CodecProfiles/RTCVideoDecoderTest.GetVDAErrorCounterForTesting/0
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt
index 1fefb61..2996ceb9 100644
--- a/tools/valgrind/memcheck/suppressions.txt
+++ b/tools/valgrind/memcheck/suppressions.txt
@@ -2015,10 +2015,10 @@
    bug_340752
    Memcheck:Uninitialized
    ...
-   fun:_ZN5blink4Heap19checkAndMarkPointerEPNS_7VisitorEPh
+   fun:_ZN5blink10ThreadHeap19checkAndMarkPointerEPNS_7VisitorEPh
    fun:_ZN5blink11ThreadState10visitStackEPNS_7VisitorE
    ...
-   fun:_ZN5blink4Heap14collectGarbageENS_7BlinkGC10StackState*
+   fun:_ZN5blink10ThreadHeap14collectGarbageENS_7BlinkGC10StackState*
 }
 {
    bug_342591
diff --git a/ui/app_list/BUILD.gn b/ui/app_list/BUILD.gn
index ef310d1..83ec096 100644
--- a/ui/app_list/BUILD.gn
+++ b/ui/app_list/BUILD.gn
@@ -82,6 +82,7 @@
     "//ui/base",
     "//ui/base/ime",
     "//ui/compositor",
+    "//ui/display",
     "//ui/events",
     "//ui/gfx",
     "//ui/gfx/geometry",
diff --git a/ui/app_list/DEPS b/ui/app_list/DEPS
index ec495840..516c8fd7 100644
--- a/ui/app_list/DEPS
+++ b/ui/app_list/DEPS
@@ -7,6 +7,7 @@
   "+ui/accessibility",
   "+ui/aura",
   "+ui/base",
+  "+ui/display",
   "+ui/compositor",
   "+ui/events",
   "+ui/gfx",
diff --git a/ui/app_list/app_list.gyp b/ui/app_list/app_list.gyp
index e8d421122..f768cec 100644
--- a/ui/app_list/app_list.gyp
+++ b/ui/app_list/app_list.gyp
@@ -20,6 +20,7 @@
         '../base/ui_base.gyp:ui_base',
         '../base/ime/ui_base_ime.gyp:ui_base_ime',
         '../compositor/compositor.gyp:compositor',
+        '../display/display.gyp:display',
         '../events/events.gyp:events_base',
         '../gfx/gfx.gyp:gfx',
         '../gfx/gfx.gyp:gfx_geometry',
diff --git a/ui/app_list/shower/BUILD.gn b/ui/app_list/presenter/BUILD.gn
similarity index 65%
rename from ui/app_list/shower/BUILD.gn
rename to ui/app_list/presenter/BUILD.gn
index d573fd2..2639652 100644
--- a/ui/app_list/shower/BUILD.gn
+++ b/ui/app_list/presenter/BUILD.gn
@@ -7,17 +7,17 @@
 
 assert(use_aura)
 
-component("shower") {
+component("presenter") {
   sources = [
-    "app_list_shower.h",
-    "app_list_shower_delegate.h",
-    "app_list_shower_delegate_factory.h",
-    "app_list_shower_export.h",
-    "app_list_shower_impl.cc",
-    "app_list_shower_impl.h",
+    "app_list_presenter.h",
+    "app_list_presenter_delegate.h",
+    "app_list_presenter_delegate_factory.h",
+    "app_list_presenter_export.h",
+    "app_list_presenter_impl.cc",
+    "app_list_presenter_impl.h",
   ]
 
-  defines = [ "APP_LIST_SHOWER_IMPLEMENTATION" ]
+  defines = [ "APP_LIST_PRESENTER_IMPLEMENTATION" ]
 
   public_deps = [
     "//base",
@@ -31,28 +31,28 @@
 
 source_set("test_support") {
   sources = [
-    "test/app_list_shower_impl_test_api.cc",
-    "test/app_list_shower_impl_test_api.h",
+    "test/app_list_presenter_impl_test_api.cc",
+    "test/app_list_presenter_impl_test_api.h",
   ]
 
   public_deps = [
-    ":shower",
+    ":presenter",
   ]
   deps = [
     "//base",
   ]
 }
 
-test("app_list_shower_unittests") {
+test("app_list_presenter_unittests") {
   sources = [
-    "app_list_shower_impl_unittest.cc",
+    "app_list_presenter_impl_unittest.cc",
     "test/run_all_unittests.cc",
   ]
 
   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
 
   deps = [
-    ":shower",
+    ":presenter",
     ":test_support",
     "//base",
     "//base/test:test_support",
diff --git a/ui/app_list/shower/app_list_shower.gyp b/ui/app_list/presenter/app_list_presenter.gyp
similarity index 69%
rename from ui/app_list/shower/app_list_shower.gyp
rename to ui/app_list/presenter/app_list_presenter.gyp
index 1d342622..57b8e53 100644
--- a/ui/app_list/shower/app_list_shower.gyp
+++ b/ui/app_list/presenter/app_list_presenter.gyp
@@ -8,8 +8,8 @@
   },
   'targets': [
     {
-      # GN version: //ui/app_list/shower
-      'target_name': 'app_list_shower',
+      # GN version: //ui/app_list/presenter
+      'target_name': 'app_list_presenter',
       'type': '<(component)',
       'dependencies': [
         '../../../base/base.gyp:base',
@@ -23,38 +23,38 @@
         '../app_list.gyp:app_list',
       ],
       'defines': [
-        'APP_LIST_SHOWER_IMPLEMENTATION',
+        'APP_LIST_PRESENTER_IMPLEMENTATION',
       ],
       'sources': [
         # Note: sources list duplicated in GN build.
-        'app_list_shower.h',
-        'app_list_shower_delegate.h',
-        'app_list_shower_delegate_factory.h',
-        'app_list_shower_export.h',
-        'app_list_shower_impl.cc',
-        'app_list_shower_impl.h',
+        'app_list_presenter.h',
+        'app_list_presenter_delegate.h',
+        'app_list_presenter_delegate_factory.h',
+        'app_list_presenter_export.h',
+        'app_list_presenter_impl.cc',
+        'app_list_presenter_impl.h',
       ],
       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
       'msvs_disabled_warnings': [ 4267, ],
     },
     {
-      # GN version: //ui/app_list/shower:test_support
-      'target_name': 'app_list_shower_test_support',
+      # GN version: //ui/app_list/presenter:test_support
+      'target_name': 'app_list_presenter_test_support',
       'type': 'static_library',
       'dependencies': [
         '../../../base/base.gyp:base',
         '../../../skia/skia.gyp:skia',
-        'app_list_shower',
+        'app_list_presenter',
       ],
       'sources': [
         # Note: sources list duplicated in GN build.
-        'test/app_list_shower_impl_test_api.cc',
-        'test/app_list_shower_impl_test_api.h',
+        'test/app_list_presenter_impl_test_api.cc',
+        'test/app_list_presenter_impl_test_api.h',
       ],
     },
     {
-      # GN version: //ui/app_list/shower:app_list_shower_unittests
-      'target_name': 'app_list_shower_unittests',
+      # GN version: //ui/app_list/presenter:app_list_presenter_unittests
+      'target_name': 'app_list_presenter_unittests',
       'type': 'executable',
       'dependencies': [
         '../../../base/base.gyp:base',
@@ -66,12 +66,12 @@
         '../../views/views.gyp:views',
         '../../wm/wm.gyp:wm',
         '../app_list.gyp:app_list_test_support',
-        'app_list_shower',
-        'app_list_shower_test_support',
+        'app_list_presenter',
+        'app_list_presenter_test_support',
       ],
       'sources': [
         # Note: sources list duplicated in GN build.
-        'app_list_shower_impl_unittest.cc',
+        'app_list_presenter_impl_unittest.cc',
         'test/run_all_unittests.cc',
       ],
       # Disable c4267 warnings until we fix size_t to int truncations.
@@ -82,16 +82,16 @@
     ['test_isolation_mode != "noop"', {
       'targets': [
         {
-          'target_name': 'app_list_shower_unittests_run',
+          'target_name': 'app_list_presenter_unittests_run',
           'type': 'none',
           'dependencies': [
-            'app_list_shower_unittests',
+            'app_list_presenter_unittests',
           ],
           'includes': [
             '../../../build/isolate.gypi',
           ],
           'sources': [
-            'app_list_shower_unittests.isolate',
+            'app_list_presenter_unittests.isolate',
           ],
           'conditions': [
             ['use_x11 == 1', {
diff --git a/ui/app_list/shower/app_list_shower.h b/ui/app_list/presenter/app_list_presenter.h
similarity index 74%
rename from ui/app_list/shower/app_list_shower.h
rename to ui/app_list/presenter/app_list_presenter.h
index ac94a4a..bbd4d41 100644
--- a/ui/app_list/shower/app_list_shower.h
+++ b/ui/app_list/presenter/app_list_presenter.h
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef UI_APP_LIST_SHOWER_APP_LIST_SHOWER_H_
-#define UI_APP_LIST_SHOWER_APP_LIST_SHOWER_H_
+#ifndef UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_H_
+#define UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_H_
 
-#include "ui/app_list/shower/app_list_shower_export.h"
+#include "ui/app_list/presenter/app_list_presenter_export.h"
 
 namespace aura {
 class Window;
@@ -14,9 +14,9 @@
 namespace app_list {
 
 // Interface for showing and hiding the app list.
-class APP_LIST_SHOWER_EXPORT AppListShower {
+class APP_LIST_PRESENTER_EXPORT AppListPresenter {
  public:
-  virtual ~AppListShower() {}
+  virtual ~AppListPresenter() {}
 
   // Show/hide app list window. The |window| is used to deterime in
   // which display (in which the |window| exists) the app list should
@@ -37,4 +37,4 @@
 
 }  // namespace app_list
 
-#endif  // UI_APP_LIST_SHOWER_APP_LIST_SHOWER_H_
+#endif  // UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_H_
diff --git a/ui/app_list/shower/app_list_shower_delegate.h b/ui/app_list/presenter/app_list_presenter_delegate.h
similarity index 69%
rename from ui/app_list/shower/app_list_shower_delegate.h
rename to ui/app_list/presenter/app_list_presenter_delegate.h
index 76b35731..93e71e7 100644
--- a/ui/app_list/shower/app_list_shower_delegate.h
+++ b/ui/app_list/presenter/app_list_presenter_delegate.h
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef UI_APP_LIST_SHOWER_APP_LIST_SHOWER_DELEGATE_H_
-#define UI_APP_LIST_SHOWER_APP_LIST_SHOWER_DELEGATE_H_
+#ifndef UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_H_
+#define UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_H_
 
-#include "ui/app_list/shower/app_list_shower_export.h"
+#include "ui/app_list/presenter/app_list_presenter_export.h"
 
 namespace aura {
 class Window;
@@ -20,12 +20,13 @@
 class AppListView;
 class AppListViewDelegate;
 
-// Delegate of AppListShower which allows to customize AppListShower's behavior.
+// Delegate of AppListPresenter which allows to customize AppListPresenter's
+// behavior.
 // The design of this interface was heavily influenced by the needs of Ash's
-// app list implementation (see ash::AppListShowerDelegate).
-class APP_LIST_SHOWER_EXPORT AppListShowerDelegate {
+// app list implementation (see ash::AppListPresenterDelegate).
+class APP_LIST_PRESENTER_EXPORT AppListPresenterDelegate {
  public:
-  virtual ~AppListShowerDelegate() {}
+  virtual ~AppListPresenterDelegate() {}
 
   // Returns the delegate for the app list view, possibly creating one.
   virtual AppListViewDelegate* GetViewDelegate() = 0;
@@ -52,4 +53,4 @@
 
 }  // namespace app_list
 
-#endif  // UI_APP_LIST_SHOWER_APP_LIST_SHOWER_DELEGATE_H_
+#endif  // UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_H_
diff --git a/ui/app_list/presenter/app_list_presenter_delegate_factory.h b/ui/app_list/presenter/app_list_presenter_delegate_factory.h
new file mode 100644
index 0000000..6e2e8fc
--- /dev/null
+++ b/ui/app_list/presenter/app_list_presenter_delegate_factory.h
@@ -0,0 +1,27 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_FACTORY_H_
+#define UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_FACTORY_H_
+
+#include <memory>
+
+#include "ui/app_list/presenter/app_list_presenter_export.h"
+
+namespace app_list {
+
+class AppListPresenter;
+class AppListPresenterDelegate;
+
+class APP_LIST_PRESENTER_EXPORT AppListPresenterDelegateFactory {
+ public:
+  virtual ~AppListPresenterDelegateFactory() {}
+
+  virtual std::unique_ptr<AppListPresenterDelegate> GetDelegate(
+      AppListPresenter* presenter) = 0;
+};
+
+}  // namespace app_list
+
+#endif  // UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_FACTORY_H_
diff --git a/ui/app_list/presenter/app_list_presenter_export.h b/ui/app_list/presenter/app_list_presenter_export.h
new file mode 100644
index 0000000..40d7d9e
--- /dev/null
+++ b/ui/app_list/presenter/app_list_presenter_export.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_EXPORT_H_
+#define UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_EXPORT_H_
+
+// Defines APP_LIST_PRESENTER_EXPORT so that functionality implemented by the
+// app_list presenter module can be exported to consumers.
+
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+
+#if defined(APP_LIST_PRESENTER_IMPLEMENTATION)
+#define APP_LIST_PRESENTER_EXPORT __declspec(dllexport)
+#else
+#define APP_LIST_PRESENTER_EXPORT __declspec(dllimport)
+#endif  // defined(APP_LIST_PRESENTER_IMPLEMENTATION)
+
+#else  // defined(WIN32)
+#if defined(APP_LIST_PRESENTER_IMPLEMENTATION)
+#define APP_LIST_PRESENTER_EXPORT __attribute__((visibility("default")))
+#else
+#define APP_LIST_PRESENTER_EXPORT
+#endif
+#endif
+
+#else  // defined(COMPONENT_BUILD)
+#define APP_LIST_PRESENTER_EXPORT
+#endif
+
+#endif  // UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_EXPORT_H_
diff --git a/ui/app_list/shower/app_list_shower_impl.cc b/ui/app_list/presenter/app_list_presenter_impl.cc
similarity index 73%
rename from ui/app_list/shower/app_list_shower_impl.cc
rename to ui/app_list/presenter/app_list_presenter_impl.cc
index 3fa39d1..f76f3f5 100644
--- a/ui/app_list/shower/app_list_shower_impl.cc
+++ b/ui/app_list/presenter/app_list_presenter_impl.cc
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "ui/app_list/shower/app_list_shower_impl.h"
+#include "ui/app_list/presenter/app_list_presenter_impl.h"
 
 #include "ui/app_list/app_list_constants.h"
 #include "ui/app_list/app_list_switches.h"
 #include "ui/app_list/pagination_model.h"
-#include "ui/app_list/shower/app_list_shower_delegate_factory.h"
+#include "ui/app_list/presenter/app_list_presenter_delegate_factory.h"
 #include "ui/app_list/views/app_list_view.h"
 #include "ui/aura/client/focus_client.h"
 #include "ui/aura/window.h"
@@ -30,13 +30,14 @@
 
 }  // namespace
 
-AppListShowerImpl::AppListShowerImpl(AppListShowerDelegateFactory* factory)
+AppListPresenterImpl::AppListPresenterImpl(
+    AppListPresenterDelegateFactory* factory)
     : factory_(factory) {
   DCHECK(factory);
 }
 
-AppListShowerImpl::~AppListShowerImpl() {
-  shower_delegate_.reset();
+AppListPresenterImpl::~AppListPresenterImpl() {
+  presenter_delegate_.reset();
   // Ensures app list view goes before the controller since pagination model
   // lives in the controller and app list view would access it on destruction.
   if (view_) {
@@ -46,11 +47,11 @@
   }
 }
 
-aura::Window* AppListShowerImpl::GetWindow() {
+aura::Window* AppListPresenterImpl::GetWindow() {
   return is_visible_ && view_ ? view_->GetWidget()->GetNativeWindow() : nullptr;
 }
 
-void AppListShowerImpl::Show(aura::Window* window) {
+void AppListPresenterImpl::Show(aura::Window* window) {
   if (is_visible_)
     return;
 
@@ -60,19 +61,19 @@
   if (view_) {
     ScheduleAnimation();
   } else {
-    shower_delegate_ = factory_->GetDelegate(this);
-    AppListViewDelegate* view_delegate = shower_delegate_->GetViewDelegate();
+    presenter_delegate_ = factory_->GetDelegate(this);
+    AppListViewDelegate* view_delegate = presenter_delegate_->GetViewDelegate();
     DCHECK(view_delegate);
     // Note the AppListViewDelegate outlives the AppListView. For Ash, the view
     // is destroyed when dismissed.
     AppListView* view = new AppListView(view_delegate);
-    shower_delegate_->Init(view, root_window, current_apps_page_);
+    presenter_delegate_->Init(view, root_window, current_apps_page_);
     SetView(view);
   }
-  shower_delegate_->OnShown(root_window);
+  presenter_delegate_->OnShown(root_window);
 }
 
-void AppListShowerImpl::Dismiss() {
+void AppListPresenterImpl::Dismiss() {
   if (!is_visible_)
     return;
 
@@ -88,22 +89,22 @@
   // animation completes and any menus stay open.
   view_->GetWidget()->Deactivate();
 
-  shower_delegate_->OnDismissed();
+  presenter_delegate_->OnDismissed();
   ScheduleAnimation();
 }
 
-bool AppListShowerImpl::IsVisible() const {
+bool AppListPresenterImpl::IsVisible() const {
   return view_ && view_->GetWidget()->IsVisible();
 }
 
-bool AppListShowerImpl::GetTargetVisibility() const {
+bool AppListPresenterImpl::GetTargetVisibility() const {
   return is_visible_;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// AppListShowerImpl, private:
+// AppListPresenterImpl, private:
 
-void AppListShowerImpl::SetView(AppListView* view) {
+void AppListPresenterImpl::SetView(AppListView* view) {
   DCHECK(view_ == nullptr);
   DCHECK(is_visible_);
 
@@ -116,14 +117,14 @@
   view_->ShowWhenReady();
 }
 
-void AppListShowerImpl::ResetView() {
+void AppListPresenterImpl::ResetView() {
   if (!view_)
     return;
 
   views::Widget* widget = view_->GetWidget();
   widget->RemoveObserver(this);
   GetLayer(widget)->GetAnimator()->RemoveObserver(this);
-  shower_delegate_.reset();
+  presenter_delegate_.reset();
   widget->GetNativeView()->GetRootWindow()->RemoveObserver(this);
   aura::client::GetFocusClient(widget->GetNativeView())->RemoveObserver(this);
 
@@ -132,7 +133,7 @@
   view_ = nullptr;
 }
 
-void AppListShowerImpl::ScheduleAnimation() {
+void AppListPresenterImpl::ScheduleAnimation() {
   // Stop observing previous animation.
   StopObservingImplicitAnimations();
 
@@ -141,7 +142,7 @@
   layer->GetAnimator()->StopAnimating();
 
   gfx::Rect target_bounds;
-  gfx::Vector2d offset = shower_delegate_->GetVisibilityAnimationOffset(
+  gfx::Vector2d offset = presenter_delegate_->GetVisibilityAnimationOffset(
       widget->GetNativeView()->GetRootWindow());
   if (is_visible_) {
     target_bounds = widget->GetWindowBoundsInScreen();
@@ -163,10 +164,10 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// AppListShowerImpl,  aura::client::FocusChangeObserver implementation:
+// AppListPresenterImpl,  aura::client::FocusChangeObserver implementation:
 
-void AppListShowerImpl::OnWindowFocused(aura::Window* gained_focus,
-                                        aura::Window* lost_focus) {
+void AppListPresenterImpl::OnWindowFocused(aura::Window* gained_focus,
+                                           aura::Window* lost_focus) {
   if (view_ && is_visible_) {
     aura::Window* applist_window = view_->GetWidget()->GetNativeView();
     aura::Window* applist_container = applist_window->parent();
@@ -179,18 +180,18 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// AppListShowerImpl,  aura::WindowObserver implementation:
-void AppListShowerImpl::OnWindowBoundsChanged(aura::Window* root,
-                                              const gfx::Rect& old_bounds,
-                                              const gfx::Rect& new_bounds) {
-  if (shower_delegate_)
-    shower_delegate_->UpdateBounds();
+// AppListPresenterImpl,  aura::WindowObserver implementation:
+void AppListPresenterImpl::OnWindowBoundsChanged(aura::Window* root,
+                                                 const gfx::Rect& old_bounds,
+                                                 const gfx::Rect& new_bounds) {
+  if (presenter_delegate_)
+    presenter_delegate_->UpdateBounds();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// AppListShowerImpl, ui::ImplicitAnimationObserver implementation:
+// AppListPresenterImpl, ui::ImplicitAnimationObserver implementation:
 
-void AppListShowerImpl::OnImplicitAnimationsCompleted() {
+void AppListPresenterImpl::OnImplicitAnimationsCompleted() {
   if (is_visible_)
     view_->GetWidget()->Activate();
   else
@@ -198,9 +199,9 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// AppListShowerImpl, views::WidgetObserver implementation:
+// AppListPresenterImpl, views::WidgetObserver implementation:
 
-void AppListShowerImpl::OnWidgetDestroying(views::Widget* widget) {
+void AppListPresenterImpl::OnWidgetDestroying(views::Widget* widget) {
   DCHECK(view_->GetWidget() == widget);
   if (is_visible_)
     Dismiss();
@@ -208,18 +209,18 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// AppListShowerImpl, PaginationModelObserver implementation:
+// AppListPresenterImpl, PaginationModelObserver implementation:
 
-void AppListShowerImpl::TotalPagesChanged() {}
+void AppListPresenterImpl::TotalPagesChanged() {}
 
-void AppListShowerImpl::SelectedPageChanged(int old_selected,
-                                            int new_selected) {
+void AppListPresenterImpl::SelectedPageChanged(int old_selected,
+                                               int new_selected) {
   current_apps_page_ = new_selected;
 }
 
-void AppListShowerImpl::TransitionStarted() {}
+void AppListPresenterImpl::TransitionStarted() {}
 
-void AppListShowerImpl::TransitionChanged() {
+void AppListPresenterImpl::TransitionChanged() {
   // |view_| could be NULL when app list is closed with a running transition.
   if (!view_)
     return;
diff --git a/ui/app_list/shower/app_list_shower_impl.h b/ui/app_list/presenter/app_list_presenter_impl.h
similarity index 78%
rename from ui/app_list/shower/app_list_shower_impl.h
rename to ui/app_list/presenter/app_list_presenter_impl.h
index 95a4ae6a..5bc7b50 100644
--- a/ui/app_list/shower/app_list_shower_impl.h
+++ b/ui/app_list/presenter/app_list_presenter_impl.h
@@ -2,16 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef UI_APP_LIST_SHOWER_APP_LIST_SHOWER_IMPL_H_
-#define UI_APP_LIST_SHOWER_APP_LIST_SHOWER_IMPL_H_
+#ifndef UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_IMPL_H_
+#define UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_IMPL_H_
 
 #include <memory>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "ui/app_list/pagination_model_observer.h"
-#include "ui/app_list/shower/app_list_shower.h"
-#include "ui/app_list/shower/app_list_shower_delegate.h"
+#include "ui/app_list/presenter/app_list_presenter.h"
+#include "ui/app_list/presenter/app_list_presenter_delegate.h"
 #include "ui/aura/client/focus_change_observer.h"
 #include "ui/aura/window_observer.h"
 #include "ui/compositor/layer_animation_observer.h"
@@ -21,29 +21,29 @@
 namespace app_list {
 class AppListView;
 class AppListViewDelegate;
-class AppListShowerDelegateFactory;
+class AppListPresenterDelegateFactory;
 
 namespace test {
-class AppListShowerImplTestApi;
+class AppListPresenterImplTestApi;
 }
 
-class AppListShowerImplTest;
+class AppListPresenterImplTest;
 class AppListViewDelegate;
 
 // Manages app list UI. Creates AppListView and schedules showing/hiding
 // animation. While the UI is visible, it monitors things such as app list
 // activation state to auto dismiss the UI. Delegates the responsibility
 // for laying out the app list UI to ash::AppListLayoutDelegate.
-class APP_LIST_SHOWER_EXPORT AppListShowerImpl
-    : public AppListShower,
+class APP_LIST_PRESENTER_EXPORT AppListPresenterImpl
+    : public AppListPresenter,
       public aura::client::FocusChangeObserver,
       public aura::WindowObserver,
       public ui::ImplicitAnimationObserver,
       public views::WidgetObserver,
       public PaginationModelObserver {
  public:
-  explicit AppListShowerImpl(AppListShowerDelegateFactory* factory);
-  ~AppListShowerImpl() override;
+  explicit AppListPresenterImpl(AppListPresenterDelegateFactory* factory);
+  ~AppListPresenterImpl() override;
 
   // Returns app list window or NULL if it is not visible.
   aura::Window* GetWindow();
@@ -51,14 +51,14 @@
   // Returns app list view if one exists, or NULL otherwise.
   AppListView* GetView() { return view_; }
 
-  // AppListShower:
+  // AppListPresenter:
   void Show(aura::Window* window) override;
   void Dismiss() override;
   bool IsVisible() const override;
   bool GetTargetVisibility() const override;
 
  private:
-  friend class test::AppListShowerImplTestApi;
+  friend class test::AppListPresenterImplTestApi;
 
   // Sets the app list view and attempts to show it.
   void SetView(AppListView* view);
@@ -91,10 +91,10 @@
   void TransitionChanged() override;
 
   // Not owned
-  AppListShowerDelegateFactory* const factory_;
+  AppListPresenterDelegateFactory* const factory_;
 
   // Responsible for laying out the app list UI.
-  std::unique_ptr<AppListShowerDelegate> shower_delegate_;
+  std::unique_ptr<AppListPresenterDelegate> presenter_delegate_;
 
   // Whether we should show or hide app list widget.
   bool is_visible_ = false;
@@ -112,9 +112,9 @@
   // Whether should schedule snap back animation.
   bool should_snap_back_ = false;
 
-  DISALLOW_COPY_AND_ASSIGN(AppListShowerImpl);
+  DISALLOW_COPY_AND_ASSIGN(AppListPresenterImpl);
 };
 
 }  // namespace app_list
 
-#endif  // UI_APP_LIST_SHOWER_APP_LIST_SHOWER_IMPL_H_
+#endif  // UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_IMPL_H_
diff --git a/ui/app_list/presenter/app_list_presenter_impl_unittest.cc b/ui/app_list/presenter/app_list_presenter_impl_unittest.cc
new file mode 100644
index 0000000..75f8c90
--- /dev/null
+++ b/ui/app_list/presenter/app_list_presenter_impl_unittest.cc
@@ -0,0 +1,209 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/app_list/presenter/app_list_presenter_impl.h"
+
+#include <memory>
+
+#include "base/memory/ptr_util.h"
+#include "ui/app_list/presenter/app_list_presenter_delegate_factory.h"
+#include "ui/app_list/presenter/test/app_list_presenter_impl_test_api.h"
+#include "ui/app_list/test/app_list_test_view_delegate.h"
+#include "ui/app_list/views/app_list_view.h"
+#include "ui/aura/client/focus_client.h"
+#include "ui/aura/test/aura_test_base.h"
+#include "ui/aura/window.h"
+#include "ui/wm/core/default_activation_client.h"
+#include "ui/wm/core/window_util.h"
+
+namespace app_list {
+
+namespace {
+
+// Test stub for AppListPresenterDelegate
+class AppListPresenterDelegateTest : public AppListPresenterDelegate {
+ public:
+  AppListPresenterDelegateTest(aura::Window* container,
+                               test::AppListTestViewDelegate* view_delegate)
+      : container_(container), view_delegate_(view_delegate) {}
+  ~AppListPresenterDelegateTest() override {}
+
+  bool init_called() const { return init_called_; }
+  bool on_shown_called() const { return on_shown_called_; }
+  bool on_dismissed_called() const { return on_dismissed_called_; }
+  bool update_bounds_called() const { return update_bounds_called_; }
+
+ private:
+  // AppListPresenterDelegate:
+  AppListViewDelegate* GetViewDelegate() override { return view_delegate_; }
+  void Init(AppListView* view,
+            aura::Window* root_window,
+            int current_apps_page) override {
+    init_called_ = true;
+    view_ = view;
+    view->InitAsFramelessWindow(container_, current_apps_page,
+                                gfx::Rect(100, 50, 300, 200));
+  }
+  void OnShown(aura::Window*) override { on_shown_called_ = true; }
+  void OnDismissed() override { on_dismissed_called_ = true; }
+  void UpdateBounds() override { update_bounds_called_ = true; }
+  gfx::Vector2d GetVisibilityAnimationOffset(aura::Window*) override {
+    return gfx::Vector2d(0, 0);
+  }
+
+ private:
+  aura::Window* container_;
+  test::AppListTestViewDelegate* view_delegate_;
+  AppListView* view_ = nullptr;
+  bool init_called_ = false;
+  bool on_shown_called_ = false;
+  bool on_dismissed_called_ = false;
+  bool update_bounds_called_ = false;
+
+  DISALLOW_COPY_AND_ASSIGN(AppListPresenterDelegateTest);
+};
+
+// Test fake for AppListPresenterDelegateFactory, creates instances of
+// AppListPresenterDelegateTest.
+class AppListPresenterDelegateFactoryTest
+    : public AppListPresenterDelegateFactory {
+ public:
+  explicit AppListPresenterDelegateFactoryTest(aura::Window* container)
+      : container_(container) {}
+  ~AppListPresenterDelegateFactoryTest() override {}
+
+  AppListPresenterDelegateTest* current_delegate() { return current_delegate_; }
+
+  // AppListPresenterDelegateFactory:
+  std::unique_ptr<AppListPresenterDelegate> GetDelegate(
+      AppListPresenter* presenter) override {
+    current_delegate_ =
+        new AppListPresenterDelegateTest(container_, &app_list_view_delegate_);
+    return base::WrapUnique(current_delegate_);
+  }
+
+ private:
+  aura::Window* container_;
+  AppListPresenterDelegateTest* current_delegate_ = nullptr;
+  test::AppListTestViewDelegate app_list_view_delegate_;
+
+  DISALLOW_COPY_AND_ASSIGN(AppListPresenterDelegateFactoryTest);
+};
+
+}  // namespace
+
+class AppListPresenterImplTest : public aura::test::AuraTestBase {
+ public:
+  AppListPresenterImplTest();
+  ~AppListPresenterImplTest() override;
+
+  AppListPresenterImpl* presenter() { return presenter_.get(); }
+  aura::Window* container() { return container_.get(); }
+
+  // Don't cache the return of this method - a new delegate is created every
+  // time the app list is shown.
+  AppListPresenterDelegateTest* delegate() {
+    return factory_->current_delegate();
+  }
+
+  // aura::test::AuraTestBase:
+  void SetUp() override;
+  void TearDown() override;
+
+ private:
+  std::unique_ptr<AppListPresenterDelegateFactoryTest> factory_;
+  std::unique_ptr<AppListPresenterImpl> presenter_;
+  std::unique_ptr<aura::Window> container_;
+
+  DISALLOW_COPY_AND_ASSIGN(AppListPresenterImplTest);
+};
+
+AppListPresenterImplTest::AppListPresenterImplTest() {}
+
+AppListPresenterImplTest::~AppListPresenterImplTest() {}
+
+void AppListPresenterImplTest::SetUp() {
+  AuraTestBase::SetUp();
+  new wm::DefaultActivationClient(root_window());
+  container_.reset(CreateNormalWindow(0, root_window(), nullptr));
+  factory_.reset(new AppListPresenterDelegateFactoryTest(container_.get()));
+  presenter_.reset(new AppListPresenterImpl(factory_.get()));
+}
+
+void AppListPresenterImplTest::TearDown() {
+  container_.reset();
+  AuraTestBase::TearDown();
+}
+
+// Tests that app launcher is dismissed when focus moves to a window which is
+// not app list window's sibling and that appropriate delegate callbacks are
+// executed when the app launcher is shown and then when the app launcher is
+// dismissed.
+TEST_F(AppListPresenterImplTest, HideOnFocusOut) {
+  aura::client::FocusClient* focus_client =
+      aura::client::GetFocusClient(root_window());
+  presenter()->Show(container());
+  EXPECT_TRUE(delegate()->init_called());
+  EXPECT_TRUE(delegate()->on_shown_called());
+  EXPECT_FALSE(delegate()->on_dismissed_called());
+  EXPECT_FALSE(delegate()->update_bounds_called());
+  focus_client->FocusWindow(presenter()->GetWindow());
+  EXPECT_TRUE(presenter()->GetTargetVisibility());
+
+  std::unique_ptr<aura::Window> window(
+      CreateNormalWindow(1, root_window(), nullptr));
+  focus_client->FocusWindow(window.get());
+
+  EXPECT_TRUE(delegate()->on_dismissed_called());
+  EXPECT_FALSE(delegate()->update_bounds_called());
+  EXPECT_FALSE(presenter()->GetTargetVisibility());
+}
+
+// Tests that app launcher remains visible when focus moves to a window which
+// is app list window's sibling and that appropriate delegate callbacks are
+// executed when the app launcher is shown.
+TEST_F(AppListPresenterImplTest, RemainVisibleWhenFocusingToSibling) {
+  aura::client::FocusClient* focus_client =
+      aura::client::GetFocusClient(root_window());
+  presenter()->Show(container());
+  focus_client->FocusWindow(presenter()->GetWindow());
+  EXPECT_TRUE(presenter()->GetTargetVisibility());
+  EXPECT_TRUE(delegate()->init_called());
+  EXPECT_TRUE(delegate()->on_shown_called());
+  EXPECT_FALSE(delegate()->on_dismissed_called());
+  EXPECT_FALSE(delegate()->update_bounds_called());
+
+  // Create a sibling window.
+  std::unique_ptr<aura::Window> window(
+      CreateNormalWindow(1, container(), nullptr));
+  focus_client->FocusWindow(window.get());
+
+  EXPECT_TRUE(presenter()->GetTargetVisibility());
+  EXPECT_FALSE(delegate()->on_dismissed_called());
+  EXPECT_FALSE(delegate()->update_bounds_called());
+}
+
+// Tests that UpdateBounds is called on the delegate when the root window
+// is resized.
+TEST_F(AppListPresenterImplTest, RootWindowResize) {
+  presenter()->Show(container());
+  EXPECT_FALSE(delegate()->update_bounds_called());
+  gfx::Rect bounds = root_window()->bounds();
+  bounds.Inset(-10, 0);
+  root_window()->SetBounds(bounds);
+  EXPECT_TRUE(delegate()->update_bounds_called());
+}
+
+// Tests that the app list is dismissed and the delegate is destroyed when the
+// app list's widget is destroyed.
+TEST_F(AppListPresenterImplTest, WidgetDestroyed) {
+  presenter()->Show(container());
+  EXPECT_TRUE(presenter()->GetTargetVisibility());
+  presenter()->GetView()->GetWidget()->CloseNow();
+  EXPECT_FALSE(presenter()->GetTargetVisibility());
+  test::AppListPresenterImplTestApi presenter_test_api(presenter());
+  EXPECT_FALSE(presenter_test_api.presenter_delegate());
+}
+
+}  // namespace app_list
diff --git a/ui/app_list/shower/app_list_shower_unittests.isolate b/ui/app_list/presenter/app_list_presenter_unittests.isolate
similarity index 88%
rename from ui/app_list/shower/app_list_shower_unittests.isolate
rename to ui/app_list/presenter/app_list_presenter_unittests.isolate
index 2a89e3e..28e79d7 100644
--- a/ui/app_list/shower/app_list_shower_unittests.isolate
+++ b/ui/app_list/presenter/app_list_presenter_unittests.isolate
@@ -7,7 +7,7 @@
       'variables': {
         'command': [
           '../../../testing/test_env.py',
-          '<(PRODUCT_DIR)/app_list_shower_unittests<(EXECUTABLE_SUFFIX)',
+          '<(PRODUCT_DIR)/app_list_presenter_unittests<(EXECUTABLE_SUFFIX)',
           '--brave-new-test-launcher',
           '--test-launcher-bot-mode',
           '--asan=<(asan)',
@@ -21,7 +21,7 @@
         'command': [
           '../../../testing/xvfb.py',
           '<(PRODUCT_DIR)',
-          '<(PRODUCT_DIR)/app_list_shower_unittests<(EXECUTABLE_SUFFIX)',
+          '<(PRODUCT_DIR)/app_list_presenter_unittests<(EXECUTABLE_SUFFIX)',
           '--brave-new-test-launcher',
           '--test-launcher-bot-mode',
           '--asan=<(asan)',
@@ -66,7 +66,7 @@
     ['OS=="mac" and asan==1 and fastbuild==0', {
       'variables': {
         'files': [
-          '<(PRODUCT_DIR)/app_list_shower_unittests.dSYM/',
+          '<(PRODUCT_DIR)/app_list_presenter_unittests.dSYM/',
           '<(PRODUCT_DIR)/osmesa.so.dSYM/',
         ],
       },
diff --git a/ui/app_list/shower/test/DEPS b/ui/app_list/presenter/test/DEPS
similarity index 100%
rename from ui/app_list/shower/test/DEPS
rename to ui/app_list/presenter/test/DEPS
diff --git a/ui/app_list/presenter/test/app_list_presenter_impl_test_api.cc b/ui/app_list/presenter/test/app_list_presenter_impl_test_api.cc
new file mode 100644
index 0000000..12d8dc14
--- /dev/null
+++ b/ui/app_list/presenter/test/app_list_presenter_impl_test_api.cc
@@ -0,0 +1,26 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/app_list/presenter/test/app_list_presenter_impl_test_api.h"
+
+#include "ui/app_list/presenter/app_list_presenter_impl.h"
+#include "ui/app_list/views/app_list_view.h"
+
+namespace app_list {
+namespace test {
+
+AppListPresenterImplTestApi::AppListPresenterImplTestApi(
+    AppListPresenterImpl* presenter)
+    : presenter_(presenter) {}
+
+AppListView* AppListPresenterImplTestApi::view() {
+  return presenter_->view_;
+}
+
+AppListPresenterDelegate* AppListPresenterImplTestApi::presenter_delegate() {
+  return presenter_->presenter_delegate_.get();
+}
+
+}  // namespace test
+}  // namespace app_list
diff --git a/ui/app_list/presenter/test/app_list_presenter_impl_test_api.h b/ui/app_list/presenter/test/app_list_presenter_impl_test_api.h
new file mode 100644
index 0000000..2765f1e
--- /dev/null
+++ b/ui/app_list/presenter/test/app_list_presenter_impl_test_api.h
@@ -0,0 +1,34 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_APP_LIST_PRESENTER_TEST_APP_LIST_PRESENTER_IMPL_TEST_API_H_
+#define UI_APP_LIST_PRESENTER_TEST_APP_LIST_PRESENTER_IMPL_TEST_API_H_
+
+#include "base/macros.h"
+
+namespace app_list {
+class AppListPresenterDelegate;
+class AppListPresenterImpl;
+class AppListView;
+
+namespace test {
+
+// Accesses private data from an AppListController for testing.
+class AppListPresenterImplTestApi {
+ public:
+  explicit AppListPresenterImplTestApi(AppListPresenterImpl* presenter);
+
+  AppListView* view();
+  AppListPresenterDelegate* presenter_delegate();
+
+ private:
+  AppListPresenterImpl* const presenter_;
+
+  DISALLOW_COPY_AND_ASSIGN(AppListPresenterImplTestApi);
+};
+
+}  // namespace test
+}  // namespace app_list
+
+#endif  // UI_APP_LIST_PRESENTER_TEST_APP_LIST_PRESENTER_IMPL_TEST_API_H_
diff --git a/ui/app_list/shower/test/run_all_unittests.cc b/ui/app_list/presenter/test/run_all_unittests.cc
similarity index 70%
rename from ui/app_list/shower/test/run_all_unittests.cc
rename to ui/app_list/presenter/test/run_all_unittests.cc
index 880399b..dea5ef6 100644
--- a/ui/app_list/shower/test/run_all_unittests.cc
+++ b/ui/app_list/presenter/test/run_all_unittests.cc
@@ -14,9 +14,10 @@
 
 namespace {
 
-class AppListShowerTestSuite : public base::TestSuite {
+class AppListPresenterTestSuite : public base::TestSuite {
  public:
-  AppListShowerTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
+  AppListPresenterTestSuite(int argc, char** argv)
+      : base::TestSuite(argc, argv) {}
 
  protected:
   void Initialize() override {
@@ -35,15 +36,15 @@
   }
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(AppListShowerTestSuite);
+  DISALLOW_COPY_AND_ASSIGN(AppListPresenterTestSuite);
 };
 
 }  // namespace
 
 int main(int argc, char** argv) {
-  AppListShowerTestSuite test_suite(argc, argv);
+  AppListPresenterTestSuite test_suite(argc, argv);
 
-  return base::LaunchUnitTests(
-      argc, argv,
-      base::Bind(&AppListShowerTestSuite::Run, base::Unretained(&test_suite)));
+  return base::LaunchUnitTests(argc, argv,
+                               base::Bind(&AppListPresenterTestSuite::Run,
+                                          base::Unretained(&test_suite)));
 }
diff --git a/ui/app_list/shower/app_list_shower_delegate_factory.h b/ui/app_list/shower/app_list_shower_delegate_factory.h
deleted file mode 100644
index 1926f34..0000000
--- a/ui/app_list/shower/app_list_shower_delegate_factory.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_APP_LIST_SHOWER_APP_LIST_SHOWER_DELEGATE_FACTORY_H_
-#define UI_APP_LIST_SHOWER_APP_LIST_SHOWER_DELEGATE_FACTORY_H_
-
-#include <memory>
-
-#include "ui/app_list/shower/app_list_shower_export.h"
-
-namespace app_list {
-
-class AppListShower;
-class AppListShowerDelegate;
-
-class APP_LIST_SHOWER_EXPORT AppListShowerDelegateFactory {
- public:
-  virtual ~AppListShowerDelegateFactory() {}
-
-  virtual std::unique_ptr<AppListShowerDelegate> GetDelegate(
-      AppListShower* shower) = 0;
-};
-
-}  // namespace app_list
-
-#endif  // UI_APP_LIST_SHOWER_APP_LIST_SHOWER_DELEGATE_FACTORY_H_
diff --git a/ui/app_list/shower/app_list_shower_export.h b/ui/app_list/shower/app_list_shower_export.h
deleted file mode 100644
index 571c26f..0000000
--- a/ui/app_list/shower/app_list_shower_export.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_APP_LIST_SHOWER_APP_LIST_SHOWER_EXPORT_H_
-#define UI_APP_LIST_SHOWER_APP_LIST_SHOWER_EXPORT_H_
-
-// Defines APP_LIST_SHOWER_EXPORT so that functionality implemented by the
-// app_list shower module can be exported to consumers.
-
-#if defined(COMPONENT_BUILD)
-#if defined(WIN32)
-
-#if defined(APP_LIST_SHOWER_IMPLEMENTATION)
-#define APP_LIST_SHOWER_EXPORT __declspec(dllexport)
-#else
-#define APP_LIST_SHOWER_EXPORT __declspec(dllimport)
-#endif  // defined(APP_LIST_SHOWER_IMPLEMENTATION)
-
-#else  // defined(WIN32)
-#if defined(APP_LIST_SHOWER_IMPLEMENTATION)
-#define APP_LIST_SHOWER_EXPORT __attribute__((visibility("default")))
-#else
-#define APP_LIST_SHOWER_EXPORT
-#endif
-#endif
-
-#else  // defined(COMPONENT_BUILD)
-#define APP_LIST_SHOWER_EXPORT
-#endif
-
-#endif  // UI_APP_LIST_SHOWER_APP_LIST_SHOWER_EXPORT_H_
diff --git a/ui/app_list/shower/app_list_shower_impl_unittest.cc b/ui/app_list/shower/app_list_shower_impl_unittest.cc
deleted file mode 100644
index 539d5ef3..0000000
--- a/ui/app_list/shower/app_list_shower_impl_unittest.cc
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/app_list/shower/app_list_shower_impl.h"
-
-#include <memory>
-
-#include "base/memory/ptr_util.h"
-#include "ui/app_list/shower/app_list_shower_delegate_factory.h"
-#include "ui/app_list/shower/test/app_list_shower_impl_test_api.h"
-#include "ui/app_list/test/app_list_test_view_delegate.h"
-#include "ui/app_list/views/app_list_view.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/window.h"
-#include "ui/wm/core/default_activation_client.h"
-#include "ui/wm/core/window_util.h"
-
-namespace app_list {
-
-namespace {
-
-// Test stub for AppListShowerDelegate
-class AppListShowerDelegateTest : public AppListShowerDelegate {
- public:
-  AppListShowerDelegateTest(aura::Window* container,
-                            test::AppListTestViewDelegate* view_delegate)
-      : container_(container), view_delegate_(view_delegate) {}
-  ~AppListShowerDelegateTest() override {}
-
-  bool init_called() const { return init_called_; }
-  bool on_shown_called() const { return on_shown_called_; }
-  bool on_dismissed_called() const { return on_dismissed_called_; }
-  bool update_bounds_called() const { return update_bounds_called_; }
-
- private:
-  // AppListShowerDelegate:
-  AppListViewDelegate* GetViewDelegate() override { return view_delegate_; }
-  void Init(AppListView* view,
-            aura::Window* root_window,
-            int current_apps_page) override {
-    init_called_ = true;
-    view_ = view;
-    view->InitAsFramelessWindow(container_, current_apps_page,
-                                gfx::Rect(100, 50, 300, 200));
-  }
-  void OnShown(aura::Window*) override { on_shown_called_ = true; }
-  void OnDismissed() override { on_dismissed_called_ = true; }
-  void UpdateBounds() override { update_bounds_called_ = true; }
-  gfx::Vector2d GetVisibilityAnimationOffset(aura::Window*) override {
-    return gfx::Vector2d(0, 0);
-  }
-
- private:
-  aura::Window* container_;
-  test::AppListTestViewDelegate* view_delegate_;
-  AppListView* view_ = nullptr;
-  bool init_called_ = false;
-  bool on_shown_called_ = false;
-  bool on_dismissed_called_ = false;
-  bool update_bounds_called_ = false;
-
-  DISALLOW_COPY_AND_ASSIGN(AppListShowerDelegateTest);
-};
-
-// Test fake for AppListShowerDelegateFactory, creates instances of
-// AppListShowerDelegateTest.
-class AppListShowerDelegateFactoryTest : public AppListShowerDelegateFactory {
- public:
-  explicit AppListShowerDelegateFactoryTest(aura::Window* container)
-      : container_(container) {}
-  ~AppListShowerDelegateFactoryTest() override {}
-
-  AppListShowerDelegateTest* current_delegate() { return current_delegate_; }
-
-  // AppListShowerDelegateFactory:
-  std::unique_ptr<AppListShowerDelegate> GetDelegate(
-      AppListShower* shower) override {
-    current_delegate_ =
-        new AppListShowerDelegateTest(container_, &app_list_view_delegate_);
-    return base::WrapUnique(current_delegate_);
-  }
-
- private:
-  aura::Window* container_;
-  AppListShowerDelegateTest* current_delegate_ = nullptr;
-  test::AppListTestViewDelegate app_list_view_delegate_;
-
-  DISALLOW_COPY_AND_ASSIGN(AppListShowerDelegateFactoryTest);
-};
-
-}  // namespace
-
-class AppListShowerImplTest : public aura::test::AuraTestBase {
- public:
-  AppListShowerImplTest();
-  ~AppListShowerImplTest() override;
-
-  AppListShowerImpl* shower() { return shower_.get(); }
-  aura::Window* container() { return container_.get(); }
-
-  // Don't cache the return of this method - a new delegate is created every
-  // time the app list is shown.
-  AppListShowerDelegateTest* delegate() { return factory_->current_delegate(); }
-
-  // aura::test::AuraTestBase:
-  void SetUp() override;
-  void TearDown() override;
-
- private:
-  std::unique_ptr<AppListShowerDelegateFactoryTest> factory_;
-  std::unique_ptr<AppListShowerImpl> shower_;
-  std::unique_ptr<aura::Window> container_;
-
-  DISALLOW_COPY_AND_ASSIGN(AppListShowerImplTest);
-};
-
-AppListShowerImplTest::AppListShowerImplTest() {}
-
-AppListShowerImplTest::~AppListShowerImplTest() {}
-
-void AppListShowerImplTest::SetUp() {
-  AuraTestBase::SetUp();
-  new wm::DefaultActivationClient(root_window());
-  container_.reset(CreateNormalWindow(0, root_window(), nullptr));
-  factory_.reset(new AppListShowerDelegateFactoryTest(container_.get()));
-  shower_.reset(new AppListShowerImpl(factory_.get()));
-}
-
-void AppListShowerImplTest::TearDown() {
-  container_.reset();
-  AuraTestBase::TearDown();
-}
-
-// Tests that app launcher is dismissed when focus moves to a window which is
-// not app list window's sibling and that appropriate delegate callbacks are
-// executed when the app launcher is shown and then when the app launcher is
-// dismissed.
-TEST_F(AppListShowerImplTest, HideOnFocusOut) {
-  aura::client::FocusClient* focus_client =
-      aura::client::GetFocusClient(root_window());
-  shower()->Show(container());
-  EXPECT_TRUE(delegate()->init_called());
-  EXPECT_TRUE(delegate()->on_shown_called());
-  EXPECT_FALSE(delegate()->on_dismissed_called());
-  EXPECT_FALSE(delegate()->update_bounds_called());
-  focus_client->FocusWindow(shower()->GetWindow());
-  EXPECT_TRUE(shower()->GetTargetVisibility());
-
-  std::unique_ptr<aura::Window> window(
-      CreateNormalWindow(1, root_window(), nullptr));
-  focus_client->FocusWindow(window.get());
-
-  EXPECT_TRUE(delegate()->on_dismissed_called());
-  EXPECT_FALSE(delegate()->update_bounds_called());
-  EXPECT_FALSE(shower()->GetTargetVisibility());
-}
-
-// Tests that app launcher remains visible when focus moves to a window which
-// is app list window's sibling and that appropriate delegate callbacks are
-// executed when the app launcher is shown.
-TEST_F(AppListShowerImplTest, RemainVisibleWhenFocusingToSibling) {
-  aura::client::FocusClient* focus_client =
-      aura::client::GetFocusClient(root_window());
-  shower()->Show(container());
-  focus_client->FocusWindow(shower()->GetWindow());
-  EXPECT_TRUE(shower()->GetTargetVisibility());
-  EXPECT_TRUE(delegate()->init_called());
-  EXPECT_TRUE(delegate()->on_shown_called());
-  EXPECT_FALSE(delegate()->on_dismissed_called());
-  EXPECT_FALSE(delegate()->update_bounds_called());
-
-  // Create a sibling window.
-  std::unique_ptr<aura::Window> window(
-      CreateNormalWindow(1, container(), nullptr));
-  focus_client->FocusWindow(window.get());
-
-  EXPECT_TRUE(shower()->GetTargetVisibility());
-  EXPECT_FALSE(delegate()->on_dismissed_called());
-  EXPECT_FALSE(delegate()->update_bounds_called());
-}
-
-// Tests that UpdateBounds is called on the delegate when the root window
-// is resized.
-TEST_F(AppListShowerImplTest, RootWindowResize) {
-  shower()->Show(container());
-  EXPECT_FALSE(delegate()->update_bounds_called());
-  gfx::Rect bounds = root_window()->bounds();
-  bounds.Inset(-10, 0);
-  root_window()->SetBounds(bounds);
-  EXPECT_TRUE(delegate()->update_bounds_called());
-}
-
-// Tests that the app list is dismissed and the delegate is destroyed when the
-// app list's widget is destroyed.
-TEST_F(AppListShowerImplTest, WidgetDestroyed) {
-  shower()->Show(container());
-  EXPECT_TRUE(shower()->GetTargetVisibility());
-  shower()->GetView()->GetWidget()->CloseNow();
-  EXPECT_FALSE(shower()->GetTargetVisibility());
-  test::AppListShowerImplTestApi shower_test_api(shower());
-  EXPECT_FALSE(shower_test_api.shower_delegate());
-}
-
-}  // namespace app_list
diff --git a/ui/app_list/shower/test/app_list_shower_impl_test_api.cc b/ui/app_list/shower/test/app_list_shower_impl_test_api.cc
deleted file mode 100644
index 9423b37..0000000
--- a/ui/app_list/shower/test/app_list_shower_impl_test_api.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/app_list/shower/test/app_list_shower_impl_test_api.h"
-
-#include "ui/app_list/shower/app_list_shower_impl.h"
-#include "ui/app_list/views/app_list_view.h"
-
-namespace app_list {
-namespace test {
-
-AppListShowerImplTestApi::AppListShowerImplTestApi(AppListShowerImpl* shower)
-    : shower_(shower) {}
-
-AppListView* AppListShowerImplTestApi::view() {
-  return shower_->view_;
-}
-
-AppListShowerDelegate* AppListShowerImplTestApi::shower_delegate() {
-  return shower_->shower_delegate_.get();
-}
-
-}  // namespace test
-}  // namespace app_list
diff --git a/ui/app_list/shower/test/app_list_shower_impl_test_api.h b/ui/app_list/shower/test/app_list_shower_impl_test_api.h
deleted file mode 100644
index 8f59587..0000000
--- a/ui/app_list/shower/test/app_list_shower_impl_test_api.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_APP_LIST_SHOWER_TEST_APP_LIST_SHOWER_IMPL_TEST_API_H_
-#define UI_APP_LIST_SHOWER_TEST_APP_LIST_SHOWER_IMPL_TEST_API_H_
-
-#include "base/macros.h"
-
-namespace app_list {
-class AppListShowerDelegate;
-class AppListShowerImpl;
-class AppListView;
-
-namespace test {
-
-// Accesses private data from an AppListController for testing.
-class AppListShowerImplTestApi {
- public:
-  explicit AppListShowerImplTestApi(AppListShowerImpl* shower);
-
-  AppListView* view();
-  AppListShowerDelegate* shower_delegate();
-
- private:
-  AppListShowerImpl* const shower_;
-
-  DISALLOW_COPY_AND_ASSIGN(AppListShowerImplTestApi);
-};
-
-}  // namespace test
-}  // namespace app_list
-
-#endif  // UI_APP_LIST_SHOWER_TEST_APP_LIST_SHOWER_IMPL_TEST_API_H_
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc
index a04d982..3cccff1 100644
--- a/ui/app_list/views/apps_grid_view.cc
+++ b/ui/app_list/views/apps_grid_view.cc
@@ -48,7 +48,7 @@
 #include "ui/base/dragdrop/drop_target_win.h"
 #include "ui/base/dragdrop/os_exchange_data.h"
 #include "ui/base/dragdrop/os_exchange_data_provider_win.h"
-#include "ui/gfx/win/dpi.h"
+#include "ui/display/win/screen_win.h"
 #endif
 
 namespace app_list {
@@ -338,7 +338,9 @@
     GetCursorPos(&p);
     ScreenToClient(GetGridViewHWND(), &p);
     gfx::Point grid_view_pt(p.x, p.y);
-    grid_view_pt = gfx::win::ScreenToDIPPoint(grid_view_pt);
+    grid_view_pt =
+        display::win::ScreenWin::ClientToDIPPoint(GetGridViewHWND(),
+                                                  grid_view_pt);
     views::View::ConvertPointFromWidget(grid_view_, &grid_view_pt);
     return grid_view_pt;
   }
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index fa98173..d229003 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -945,7 +945,8 @@
     data += [ "$root_out_dir/ui_unittests Framework.framework/" ]
 
     if (is_asan && symbol_level == 0) {
-      data += [ "$root_out_dir/ui_base_unittests.dSYM/" ]
+      # TODO(crbug.com/330301): make this conditional on mac_strip_release.
+      # data += [ "$root_out_dir/ui_base_unittests.dSYM/" ]
     }
   }
 }
diff --git a/ui/base/DEPS b/ui/base/DEPS
index aed302df..1a5dca37 100644
--- a/ui/base/DEPS
+++ b/ui/base/DEPS
@@ -3,6 +3,7 @@
   "+net",
   "+skia/ext",
   "+third_party/skia",
+  "+ui/display",
   "+ui/events",
   "+ui/gfx",
   "+ui/resources/grit/ui_resources.h",
diff --git a/ui/base/ime/BUILD.gn b/ui/base/ime/BUILD.gn
index 668f4f9..e60caafc 100644
--- a/ui/base/ime/BUILD.gn
+++ b/ui/base/ime/BUILD.gn
@@ -110,6 +110,7 @@
     "//net",
     "//third_party/icu",
     "//ui/base",
+    "//ui/display",
     "//ui/events",
     "//ui/gfx",
     "//ui/gfx/geometry",
diff --git a/ui/base/ime/input_method_win.cc b/ui/base/ime/input_method_win.cc
index df9ac66..4ec5a84 100644
--- a/ui/base/ime/input_method_win.cc
+++ b/ui/base/ime/input_method_win.cc
@@ -15,11 +15,11 @@
 #include "ui/base/ime/text_input_client.h"
 #include "ui/base/ime/win/tsf_input_scope.h"
 #include "ui/base/ui_base_switches.h"
+#include "ui/display/win/screen_win.h"
 #include "ui/events/event.h"
 #include "ui/events/event_constants.h"
 #include "ui/events/event_utils.h"
 #include "ui/events/keycodes/keyboard_codes.h"
-#include "ui/gfx/win/dpi.h"
 #include "ui/gfx/win/hwnd_util.h"
 
 namespace {
@@ -234,7 +234,9 @@
   // Tentatively assume that the returned value is DIP (Density Independent
   // Pixel). See the comment in text_input_client.h and http://crbug.com/360334.
   const gfx::Rect dip_screen_bounds(GetTextInputClient()->GetCaretBounds());
-  const gfx::Rect screen_bounds = gfx::win::DIPToScreenRect(dip_screen_bounds);
+  const gfx::Rect screen_bounds =
+      display::win::ScreenWin::DIPToScreenRect(toplevel_window_handle_,
+                                               dip_screen_bounds);
 
   HWND attached_window = toplevel_window_handle_;
   // TODO(ime): see comment in TextInputClient::GetCaretBounds(), this
@@ -615,7 +617,9 @@
       return 0;
     dip_rect = client->GetCaretBounds();
   }
-  const gfx::Rect rect = gfx::win::DIPToScreenRect(dip_rect);
+  const gfx::Rect rect =
+      display::win::ScreenWin::DIPToScreenRect(toplevel_window_handle_,
+                                               dip_rect);
 
   char_positon->pt.x = rect.x();
   char_positon->pt.y = rect.y();
diff --git a/ui/base/ime/ui_base_ime.gyp b/ui/base/ime/ui_base_ime.gyp
index ed873ae..9a8688c 100644
--- a/ui/base/ime/ui_base_ime.gyp
+++ b/ui/base/ime/ui_base_ime.gyp
@@ -29,6 +29,7 @@
         '../../../third_party/icu/icu.gyp:icui18n',
         '../../../third_party/icu/icu.gyp:icuuc',
         '../../../url/url.gyp:url_lib',
+        '../../display/display.gyp:display',
         '../../events/events.gyp:dom_keycode_converter',
         '../../events/events.gyp:events',
         '../../events/events.gyp:events_base',
diff --git a/ui/compositor/test/in_process_context_provider.cc b/ui/compositor/test/in_process_context_provider.cc
index 1eac2df..591eedc3 100644
--- a/ui/compositor/test/in_process_context_provider.cc
+++ b/ui/compositor/test/in_process_context_provider.cc
@@ -14,7 +14,7 @@
 #include "gpu/command_buffer/client/gl_in_process_context.h"
 #include "gpu/command_buffer/client/gles2_implementation.h"
 #include "gpu/command_buffer/client/gles2_lib.h"
-#include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h"
+#include "gpu/skia_bindings/grcontext_for_gles2_interface.h"
 #include "third_party/skia/include/gpu/GrContext.h"
 #include "third_party/skia/include/gpu/gl/GrGLInterface.h"
 
@@ -75,8 +75,6 @@
 InProcessContextProvider::~InProcessContextProvider() {
   DCHECK(main_thread_checker_.CalledOnValidThread() ||
          context_thread_checker_.CalledOnValidThread());
-  if (gr_context_)
-    gr_context_->releaseResourcesAndAbandonContext();
 }
 
 bool InProcessContextProvider::BindToCurrentThread() {
@@ -134,21 +132,18 @@
   DCHECK(context_thread_checker_.CalledOnValidThread());
 
   if (gr_context_)
-    return gr_context_.get();
+    return gr_context_->get();
 
-  sk_sp<GrGLInterface> interface(
-      skia_bindings::CreateGLES2InterfaceBindings(ContextGL()));
-  gr_context_ = skia::AdoptRef(GrContext::Create(
-      // GrContext takes ownership of |interface|.
-      kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(interface.get())));
-  return gr_context_.get();
+  gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(ContextGL()));
+
+  return gr_context_->get();
 }
 
 void InProcessContextProvider::InvalidateGrContext(uint32_t state) {
   DCHECK(context_thread_checker_.CalledOnValidThread());
 
   if (gr_context_)
-    gr_context_.get()->resetContext(state);
+    gr_context_->ResetContext(state);
 }
 
 void InProcessContextProvider::SetupLock() {
@@ -161,11 +156,8 @@
 void InProcessContextProvider::DeleteCachedResources() {
   DCHECK(context_thread_checker_.CalledOnValidThread());
 
-  if (gr_context_) {
-    TRACE_EVENT_INSTANT0("gpu", "GrContext::freeGpuResources",
-                         TRACE_EVENT_SCOPE_THREAD);
-    gr_context_->freeGpuResources();
-  }
+  if (gr_context_)
+    gr_context_->FreeGpuResources();
 }
 
 void InProcessContextProvider::SetLostContextCallback(
diff --git a/ui/compositor/test/in_process_context_provider.h b/ui/compositor/test/in_process_context_provider.h
index 1bc2cc3..e3dfce15 100644
--- a/ui/compositor/test/in_process_context_provider.h
+++ b/ui/compositor/test/in_process_context_provider.h
@@ -24,6 +24,10 @@
 class ImageFactory;
 }
 
+namespace skia_bindings {
+class GrContextForGLES2Interface;
+}
+
 namespace ui {
 
 class InProcessContextProvider : public cc::ContextProvider {
@@ -70,7 +74,7 @@
   base::ThreadChecker context_thread_checker_;
 
   std::unique_ptr<gpu::GLInProcessContext> context_;
-  skia::RefPtr<class GrContext> gr_context_;
+  std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_;
 
   gpu::gles2::ContextCreationAttribHelper attribs_;
   InProcessContextProvider* shared_context_;
diff --git a/ui/display/win/screen_win.cc b/ui/display/win/screen_win.cc
index 96d880f..6e4423b08 100644
--- a/ui/display/win/screen_win.cc
+++ b/ui/display/win/screen_win.cc
@@ -12,7 +12,10 @@
 #include "ui/display/win/screen_win_display.h"
 #include "ui/gfx/display.h"
 #include "ui/gfx/geometry/point.h"
+#include "ui/gfx/geometry/point_conversions.h"
 #include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/rect_conversions.h"
+#include "ui/gfx/geometry/size_conversions.h"
 #include "ui/gfx/win/dpi.h"
 
 namespace display {
@@ -75,6 +78,72 @@
 
 ScreenWin::~ScreenWin() = default;
 
+// static
+gfx::Point ScreenWin::ScreenToDIPPoint(const gfx::Point& pixel_point) {
+  return ScaleToFlooredPoint(pixel_point, 1.0f / gfx::GetDPIScale());
+}
+
+// static
+gfx::Point ScreenWin::DIPToScreenPoint(const gfx::Point& dip_point) {
+  return ScaleToFlooredPoint(dip_point, gfx::GetDPIScale());
+}
+
+// static
+gfx::Point ScreenWin::ClientToDIPPoint(HWND hwnd,
+                                       const gfx::Point& client_point) {
+  // TODO(robliao): Get the scale factor from |hwnd|.
+  return ScreenToDIPPoint(client_point);
+}
+
+// static
+gfx::Point ScreenWin::DIPToClientPoint(HWND hwnd, const gfx::Point& dip_point) {
+  // TODO(robliao): Get the scale factor from |hwnd|.
+  return DIPToScreenPoint(dip_point);
+}
+
+// static
+gfx::Rect ScreenWin::ScreenToDIPRect(HWND hwnd, const gfx::Rect& pixel_bounds) {
+  // It's important we scale the origin and size separately. If we instead
+  // calculated the size from the floored origin and ceiled right the size could
+  // vary depending upon where the two points land. That would cause problems
+  // for the places this code is used (in particular mapping from native window
+  // bounds to DIPs).
+  return gfx::Rect(ScreenToDIPPoint(pixel_bounds.origin()),
+                   ScreenToDIPSize(hwnd, pixel_bounds.size()));
+}
+
+// static
+gfx::Rect ScreenWin::DIPToScreenRect(HWND hwnd, const gfx::Rect& dip_bounds) {
+  // See comment in ScreenToDIPRect for why we calculate size like this.
+  return gfx::Rect(DIPToScreenPoint(dip_bounds.origin()),
+                   DIPToScreenSize(hwnd, dip_bounds.size()));
+}
+
+// static
+gfx::Rect ScreenWin::ClientToDIPRect(HWND hwnd, const gfx::Rect& pixel_bounds) {
+  return ScreenToDIPRect(hwnd, pixel_bounds);
+}
+
+// static
+gfx::Rect ScreenWin::DIPToClientRect(HWND hwnd, const gfx::Rect& dip_bounds) {
+  return DIPToScreenRect(hwnd, dip_bounds);
+}
+
+// static
+gfx::Size ScreenWin::ScreenToDIPSize(HWND hwnd,
+                                     const gfx::Size& size_in_pixels) {
+  // Always ceil sizes. Otherwise we may be leaving off part of the bounds.
+  // TODO(robliao): Get the scale factor from |hwnd|.
+  return ScaleToCeiledSize(size_in_pixels, 1.0f / gfx::GetDPIScale());
+}
+
+// static
+gfx::Size ScreenWin::DIPToScreenSize(HWND hwnd, const gfx::Size& dip_size) {
+  // Always ceil sizes. Otherwise we may be leaving off part of the bounds.
+  // TODO(robliao): Get the scale factor from |hwnd|.
+  return ScaleToCeiledSize(dip_size, gfx::GetDPIScale());
+}
+
 HWND ScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
   NOTREACHED();
   return nullptr;
@@ -89,7 +158,7 @@
   POINT pt;
   ::GetCursorPos(&pt);
   gfx::Point cursor_pos_pixels(pt);
-  return gfx::win::ScreenToDIPPoint(cursor_pos_pixels);
+  return ScreenToDIPPoint(cursor_pos_pixels);
 }
 
 gfx::NativeWindow ScreenWin::GetWindowUnderCursor() {
@@ -100,7 +169,7 @@
 }
 
 gfx::NativeWindow ScreenWin::GetWindowAtScreenPoint(const gfx::Point& point) {
-  gfx::Point point_in_pixels = gfx::win::DIPToScreenPoint(point);
+  gfx::Point point_in_pixels = DIPToScreenPoint(point);
   return GetNativeWindowFromHWND(WindowFromPoint(point_in_pixels.ToPOINT()));
 }
 
@@ -126,7 +195,7 @@
 }
 
 gfx::Display ScreenWin::GetDisplayNearestPoint(const gfx::Point& point) const {
-  gfx::Point screen_point(gfx::win::DIPToScreenPoint(point));
+  gfx::Point screen_point(DIPToScreenPoint(point));
   ScreenWinDisplay screen_win_display =
       GetScreenWinDisplayNearestScreenPoint(screen_point);
   return screen_win_display.display();
diff --git a/ui/display/win/screen_win.h b/ui/display/win/screen_win.h
index f1c5630..c503707 100644
--- a/ui/display/win/screen_win.h
+++ b/ui/display/win/screen_win.h
@@ -21,6 +21,7 @@
 class Display;
 class Point;
 class Rect;
+class Size;
 }   // namespace gfx
 
 namespace display {
@@ -34,6 +35,60 @@
   ScreenWin();
   ~ScreenWin() override;
 
+  // Converts a screen physical point to a screen DIP point.
+  // The DPI scale is performed relative to the display containing the physical
+  // point.
+  static gfx::Point ScreenToDIPPoint(const gfx::Point& pixel_point);
+
+  // Converts a screen DIP point to a screen physical point.
+  // The DPI scale is performed relative to the display containing the DIP
+  // point.
+  static gfx::Point DIPToScreenPoint(const gfx::Point& dip_point);
+
+  // Converts a client physical point relative to |hwnd| to a client DIP point.
+  // The DPI scale is performed relative to |hwnd| using an origin of (0, 0).
+  static gfx::Point ClientToDIPPoint(HWND hwnd, const gfx::Point& client_point);
+
+  // Converts a client DIP point relative to |hwnd| to a client physical point.
+  // The DPI scale is performed relative to |hwnd| using an origin of (0, 0).
+  static gfx::Point DIPToClientPoint(HWND hwnd, const gfx::Point& dip_point);
+
+  // WARNING: There is no right way to scale sizes and rects.
+  // Sometimes you may need the enclosing rect (which favors transformations
+  // that stretch the bounds towards integral values) or the enclosed rect
+  // (transformations that shrink the bounds towards integral values).
+  // This implementation favors the enclosing rect.
+  //
+  // Understand which you need before blindly assuming this is the right way.
+
+  // Converts a screen physical rect to a screen DIP rect.
+  // The DPI scale is performed relative to the display nearest to |hwnd|.
+  // If |hwnd| is null, scaling will be performed to the display nearest to
+  // |pixel_bounds|.
+  static gfx::Rect ScreenToDIPRect(HWND hwnd, const gfx::Rect& pixel_bounds);
+
+  // Converts a screen DIP rect to a screen physical rect.
+  // The DPI scale is performed relative to the display nearest to |hwnd|.
+  // If |hwnd| is null, scaling will be performed to the display nearest to
+  // |dip_bounds|.
+  static gfx::Rect DIPToScreenRect(HWND hwnd, const gfx::Rect& dip_bounds);
+
+  // Converts a client physical rect to a client DIP rect.
+  // The DPI scale is performed relative to |hwnd| using an origin of (0, 0).
+  static gfx::Rect ClientToDIPRect(HWND hwnd, const gfx::Rect& pixel_bounds);
+
+  // Converts a client DIP rect to a client physical rect.
+  // The DPI scale is performed relative to |hwnd| using an origin of (0, 0).
+  static gfx::Rect DIPToClientRect(HWND hwnd, const gfx::Rect& dip_bounds);
+
+  // Converts a physical size to a DIP size.
+  // The DPI scale is performed relative to the display nearest to |hwnd|.
+  static gfx::Size ScreenToDIPSize(HWND hwnd, const gfx::Size& size_in_pixels);
+
+  // Converts a DIP size to a physical size.
+  // The DPI scale is performed relative to the display nearest to |hwnd|.
+  static gfx::Size DIPToScreenSize(HWND hwnd, const gfx::Size& dip_size);
+
   // Returns the HWND associated with the NativeView.
   virtual HWND GetHWNDFromNativeView(gfx::NativeView window) const;
 
diff --git a/ui/display/win/screen_win_display.cc b/ui/display/win/screen_win_display.cc
index 38104bb..c991b8ee2 100644
--- a/ui/display/win/screen_win_display.cc
+++ b/ui/display/win/screen_win_display.cc
@@ -5,6 +5,7 @@
 #include "ui/display/win/screen_win_display.h"
 
 #include "ui/display/win/display_info.h"
+#include "ui/display/win/screen_win.h"
 #include "ui/gfx/win/dpi.h"
 
 namespace display {
@@ -15,10 +16,12 @@
 gfx::Display CreateDisplayFromDisplayInfo(const DisplayInfo& display_info) {
   gfx::Display display(display_info.id());
   gfx::Rect dip_screen_bounds(
-      gfx::win::ScreenToDIPRect(display_info.screen_rect()));
+      display::win::ScreenWin::ScreenToDIPRect(nullptr,
+                                               display_info.screen_rect()));
   display.set_bounds(dip_screen_bounds);
   display.set_work_area(
-      gfx::win::ScreenToDIPRect(display_info.screen_work_rect()));
+      display::win::ScreenWin::ScreenToDIPRect(
+          nullptr, display_info.screen_work_rect()));
   display.SetScaleAndBounds(display_info.device_scale_factor(),
                             display_info.screen_rect());
   display.set_rotation(display_info.rotation());
diff --git a/ui/events/BUILD.gn b/ui/events/BUILD.gn
index 21eecf0b..30500e4 100644
--- a/ui/events/BUILD.gn
+++ b/ui/events/BUILD.gn
@@ -26,6 +26,7 @@
 
   deps = [
     "//base",
+    "//ipc:param_traits",
   ]
 }
 
diff --git a/ui/events/blink/BUILD.gn b/ui/events/blink/BUILD.gn
index acc1f80..d73e279 100644
--- a/ui/events/blink/BUILD.gn
+++ b/ui/events/blink/BUILD.gn
@@ -20,5 +20,6 @@
     "//ui/events",
     "//ui/events:gesture_detection",
     "//ui/gfx/geometry",
+    "//ui/latency_info",
   ]
 }
diff --git a/ui/events/gesture_detection/filtered_gesture_provider.cc b/ui/events/gesture_detection/filtered_gesture_provider.cc
index be4b197..d82d5db 100644
--- a/ui/events/gesture_detection/filtered_gesture_provider.cc
+++ b/ui/events/gesture_detection/filtered_gesture_provider.cc
@@ -6,7 +6,6 @@
 
 #include "base/auto_reset.h"
 #include "base/logging.h"
-#include "ui/events/blink/blink_event_util.h"
 #include "ui/events/gesture_detection/motion_event.h"
 
 namespace ui {
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
index e48a813..52fe6014 100644
--- a/ui/gfx/mac/io_surface.cc
+++ b/ui/gfx/mac/io_surface.cc
@@ -31,6 +31,7 @@
       DCHECK_EQ(plane, 0);
       return 1;
     case gfx::BufferFormat::BGRA_8888:
+    case gfx::BufferFormat::BGRX_8888:
     case gfx::BufferFormat::RGBA_8888:
       DCHECK_EQ(plane, 0);
       return 4;
@@ -48,7 +49,6 @@
     case gfx::BufferFormat::ETC1:
     case gfx::BufferFormat::RGBA_4444:
     case gfx::BufferFormat::RGBX_8888:
-    case gfx::BufferFormat::BGRX_8888:
     case gfx::BufferFormat::YUV_420:
       NOTREACHED();
       return 0;
@@ -63,6 +63,7 @@
     case gfx::BufferFormat::R_8:
       return 'L008';
     case gfx::BufferFormat::BGRA_8888:
+    case gfx::BufferFormat::BGRX_8888:
     case gfx::BufferFormat::RGBA_8888:
       return 'BGRA';
     case gfx::BufferFormat::YUV_420_BIPLANAR:
@@ -76,7 +77,6 @@
     case gfx::BufferFormat::ETC1:
     case gfx::BufferFormat::RGBA_4444:
     case gfx::BufferFormat::RGBX_8888:
-    case gfx::BufferFormat::BGRX_8888:
     case gfx::BufferFormat::YUV_420:
       NOTREACHED();
       return 0;
diff --git a/ui/gfx/win/dpi.cc b/ui/gfx/win/dpi.cc
index a958de4..7d961d7 100644
--- a/ui/gfx/win/dpi.cc
+++ b/ui/gfx/win/dpi.cc
@@ -7,9 +7,6 @@
 #include <windows.h>
 #include "base/win/scoped_hdc.h"
 #include "ui/gfx/display.h"
-#include "ui/gfx/geometry/point_conversions.h"
-#include "ui/gfx/geometry/rect_conversions.h"
-#include "ui/gfx/geometry/size_conversions.h"
 
 namespace {
 
@@ -58,40 +55,6 @@
 
 namespace win {
 
-Point ScreenToDIPPoint(const Point& pixel_point) {
-  return ScaleToFlooredPoint(pixel_point, 1.0f / GetDPIScale());
-}
-
-Point DIPToScreenPoint(const Point& dip_point) {
-  return ScaleToFlooredPoint(dip_point, GetDPIScale());
-}
-
-Rect ScreenToDIPRect(const Rect& pixel_bounds) {
-  // It's important we scale the origin and size separately. If we instead
-  // calculated the size from the floored origin and ceiled right the size could
-  // vary depending upon where the two points land. That would cause problems
-  // for the places this code is used (in particular mapping from native window
-  // bounds to DIPs).
-  return Rect(ScreenToDIPPoint(pixel_bounds.origin()),
-              ScreenToDIPSize(pixel_bounds.size()));
-}
-
-Rect DIPToScreenRect(const Rect& dip_bounds) {
-  // See comment in ScreenToDIPRect for why we calculate size like this.
-  return Rect(DIPToScreenPoint(dip_bounds.origin()),
-              DIPToScreenSize(dip_bounds.size()));
-}
-
-Size ScreenToDIPSize(const Size& size_in_pixels) {
-  // Always ceil sizes. Otherwise we may be leaving off part of the bounds.
-  return ScaleToCeiledSize(size_in_pixels, 1.0f / GetDPIScale());
-}
-
-Size DIPToScreenSize(const Size& dip_size) {
-  // Always ceil sizes. Otherwise we may be leaving off part of the bounds.
-  return ScaleToCeiledSize(dip_size, GetDPIScale());
-}
-
 int GetSystemMetricsInDIP(int metric) {
   // The system metrics always reflect the system DPI, not whatever scale we've
   // forced or decided to use.
diff --git a/ui/gfx/win/dpi.h b/ui/gfx/win/dpi.h
index b77e2dc..f6deab1 100644
--- a/ui/gfx/win/dpi.h
+++ b/ui/gfx/win/dpi.h
@@ -5,8 +5,6 @@
 #ifndef UI_GFX_DPI_WIN_H_
 #define UI_GFX_DPI_WIN_H_
 
-#include "ui/gfx/geometry/point.h"
-#include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/geometry/size.h"
 #include "ui/gfx/gfx_export.h"
 
@@ -28,20 +26,6 @@
 
 namespace win {
 
-GFX_EXPORT Point ScreenToDIPPoint(const Point& pixel_point);
-
-GFX_EXPORT Point DIPToScreenPoint(const Point& dip_point);
-
-// WARNING: there is no right way to scale sizes and rects. The implementation
-// of these strives to maintain a constant size by scaling the size independent
-// of the origin. An alternative is to get the enclosing rect, which is the
-// right way for some situations. Understand which you need before blindly
-// assuming this is the right way.
-GFX_EXPORT Rect ScreenToDIPRect(const Rect& pixel_bounds);
-GFX_EXPORT Rect DIPToScreenRect(const Rect& dip_bounds);
-GFX_EXPORT Size ScreenToDIPSize(const Size& size_in_pixels);
-GFX_EXPORT Size DIPToScreenSize(const Size& dip_size);
-
 // Win32's GetSystemMetrics uses pixel measures. This function calls
 // GetSystemMetrics for the given |metric|, then converts the result to DIP.
 GFX_EXPORT int GetSystemMetricsInDIP(int metric);
diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn
index 9d92df5..34cecb7 100644
--- a/ui/gl/BUILD.gn
+++ b/ui/gl/BUILD.gn
@@ -59,6 +59,7 @@
     "gl_gl_api_implementation.h",
     "gl_helper.cc",
     "gl_helper.h",
+    "gl_image.cc",
     "gl_image.h",
     "gl_image_memory.cc",
     "gl_image_memory.h",
diff --git a/ui/gl/gl.gyp b/ui/gl/gl.gyp
index 9dfd8ed..66420ce 100644
--- a/ui/gl/gl.gyp
+++ b/ui/gl/gl.gyp
@@ -74,6 +74,7 @@
         'gl_gl_api_implementation.h',
         'gl_helper.cc',
         'gl_helper.h',
+        'gl_image.cc',
         'gl_image.h',
         'gl_image_memory.cc',
         'gl_image_memory.h',
diff --git a/ui/gl/gl_image.cc b/ui/gl/gl_image.cc
new file mode 100644
index 0000000..b74aa83
--- /dev/null
+++ b/ui/gl/gl_image.cc
@@ -0,0 +1,13 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/gl/gl_image.h"
+
+namespace gl {
+
+bool GLImage::EmulatingRGB() const {
+  return false;
+}
+
+}  // namespace gl
diff --git a/ui/gl/gl_image.h b/ui/gl/gl_image.h
index 6b98fe9..929970e 100644
--- a/ui/gl/gl_image.h
+++ b/ui/gl/gl_image.h
@@ -74,6 +74,17 @@
                             uint64_t process_tracing_id,
                             const std::string& dump_name) = 0;
 
+  // If this returns true, then the command buffer client has requested a
+  // CHROMIUM image with internalformat GL_RGB, but the platform only supports
+  // GL_RGBA. The client is responsible for implementing appropriate
+  // workarounds. The only support that the command buffer provides is format
+  // validation during calls to copyTexImage2D and copySubTexImage2D.
+  //
+  // This is a workaround that is not intended to become a permanent part of the
+  // GLImage API. Theoretically, when Apple fixes their drivers, this can be
+  // removed. https://crbug.com/581777#c36
+  virtual bool EmulatingRGB() const;
+
  protected:
   virtual ~GLImage() {}
 
diff --git a/ui/gl/gl_image_io_surface.h b/ui/gl/gl_image_io_surface.h
index 7b68a96b..a7d71be 100644
--- a/ui/gl/gl_image_io_surface.h
+++ b/ui/gl/gl_image_io_surface.h
@@ -58,6 +58,7 @@
   void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
                     uint64_t process_tracing_id,
                     const std::string& dump_name) override;
+  bool EmulatingRGB() const override;
 
   gfx::GenericSharedMemoryId io_surface_id() const { return io_surface_id_; }
   base::ScopedCFTypeRef<IOSurfaceRef> io_surface();
@@ -72,7 +73,14 @@
   class RGBConverter;
 
   const gfx::Size size_;
+
+  // The "internalformat" exposed to the command buffer, which may not be
+  // "internalformat" requested by the client.
   const unsigned internalformat_;
+
+  // The "internalformat" requested by the client.
+  const unsigned client_internalformat_;
+
   gfx::BufferFormat format_;
   base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
   base::ScopedCFTypeRef<CVPixelBufferRef> cv_pixel_buffer_;
diff --git a/ui/gl/gl_image_io_surface.mm b/ui/gl/gl_image_io_surface.mm
index 08f01f1f..1ae69b6 100644
--- a/ui/gl/gl_image_io_surface.mm
+++ b/ui/gl/gl_image_io_surface.mm
@@ -105,6 +105,7 @@
   switch (format) {
     case BufferFormat::R_8:
     case BufferFormat::BGRA_8888:
+    case BufferFormat::BGRX_8888:
     case BufferFormat::RGBA_8888:
     case BufferFormat::UYVY_422:
     case BufferFormat::YUV_420_BIPLANAR:
@@ -116,7 +117,6 @@
     case BufferFormat::ETC1:
     case BufferFormat::RGBA_4444:
     case BufferFormat::RGBX_8888:
-    case BufferFormat::BGRX_8888:
     case BufferFormat::YUV_420:
       return false;
   }
@@ -130,6 +130,7 @@
     case BufferFormat::R_8:
       return GL_RED;
     case BufferFormat::BGRA_8888:
+    case BufferFormat::BGRX_8888:
     case BufferFormat::RGBA_8888:
       return GL_RGBA;
     case BufferFormat::UYVY_422:
@@ -143,7 +144,6 @@
     case BufferFormat::ETC1:
     case BufferFormat::RGBA_4444:
     case BufferFormat::RGBX_8888:
-    case BufferFormat::BGRX_8888:
     case BufferFormat::YUV_420:
       NOTREACHED();
       return 0;
@@ -158,6 +158,7 @@
     case BufferFormat::R_8:
       return GL_RED;
     case BufferFormat::BGRA_8888:
+    case BufferFormat::BGRX_8888:
     case BufferFormat::RGBA_8888:
       return GL_BGRA;
     case BufferFormat::UYVY_422:
@@ -169,7 +170,6 @@
     case BufferFormat::ETC1:
     case BufferFormat::RGBA_4444:
     case BufferFormat::RGBX_8888:
-    case BufferFormat::BGRX_8888:
     case BufferFormat::YUV_420:
     case BufferFormat::YUV_420_BIPLANAR:
       NOTREACHED();
@@ -185,6 +185,7 @@
     case BufferFormat::R_8:
       return GL_UNSIGNED_BYTE;
     case BufferFormat::BGRA_8888:
+    case BufferFormat::BGRX_8888:
     case BufferFormat::RGBA_8888:
       return GL_UNSIGNED_INT_8_8_8_8_REV;
     case BufferFormat::UYVY_422:
@@ -197,7 +198,6 @@
     case BufferFormat::ETC1:
     case BufferFormat::RGBA_4444:
     case BufferFormat::RGBX_8888:
-    case BufferFormat::BGRX_8888:
     case BufferFormat::YUV_420:
     case BufferFormat::YUV_420_BIPLANAR:
       NOTREACHED();
@@ -208,6 +208,15 @@
   return 0;
 }
 
+// When an IOSurface is bound to a texture with internalformat "GL_RGB", many
+// OpenGL operations are broken. Therefore, never allow an IOSurface to be bound
+// with GL_RGB. https://crbug.com/595948.
+GLenum ConvertRequestedInternalFormat(GLenum internalformat) {
+  if (internalformat == GL_RGB)
+    return GL_RGBA;
+  return internalformat;
+}
+
 }  // namespace
 
 class GLImageIOSurface::RGBConverter
@@ -383,7 +392,8 @@
 GLImageIOSurface::GLImageIOSurface(const gfx::Size& size,
                                    unsigned internalformat)
     : size_(size),
-      internalformat_(internalformat),
+      internalformat_(ConvertRequestedInternalFormat(internalformat)),
+      client_internalformat_(internalformat),
       format_(BufferFormat::RGBA_8888) {}
 
 GLImageIOSurface::~GLImageIOSurface() {
@@ -525,6 +535,10 @@
   pmd->AddOwnershipEdge(dump->guid(), guid);
 }
 
+bool GLImageIOSurface::EmulatingRGB() const {
+  return client_internalformat_ == GL_RGB;
+}
+
 base::ScopedCFTypeRef<IOSurfaceRef> GLImageIOSurface::io_surface() {
   return io_surface_;
 }
diff --git a/ui/views/accessibility/ax_window_obj_wrapper.cc b/ui/views/accessibility/ax_window_obj_wrapper.cc
index 124ae78..ebdb650 100644
--- a/ui/views/accessibility/ax_window_obj_wrapper.cc
+++ b/ui/views/accessibility/ax_window_obj_wrapper.cc
@@ -35,6 +35,8 @@
     std::vector<AXAuraObjWrapper*>* out_children) {
   aura::Window::Windows children = window_->children();
   for (size_t i = 0; i < children.size(); ++i) {
+    if (!children[i]->IsVisible())
+      continue;
     out_children->push_back(
         AXAuraObjCache::GetInstance()->GetOrCreate(children[i]));
   }
@@ -64,7 +66,7 @@
   return AXAuraObjCache::GetInstance()->GetID(window_);
 }
 
-void AXWindowObjWrapper::OnWindowDestroying(aura::Window* window) {
+void AXWindowObjWrapper::OnWindowDestroyed(aura::Window* window) {
   AXAuraObjCache::GetInstance()->Remove(window);
 }
 
diff --git a/ui/views/accessibility/ax_window_obj_wrapper.h b/ui/views/accessibility/ax_window_obj_wrapper.h
index 2bc46aa..bcf35481 100644
--- a/ui/views/accessibility/ax_window_obj_wrapper.h
+++ b/ui/views/accessibility/ax_window_obj_wrapper.h
@@ -37,7 +37,7 @@
   int32_t GetID() override;
 
   // WindowObserver overrides.
-  void OnWindowDestroying(aura::Window* window) override;
+  void OnWindowDestroyed(aura::Window* window) override;
 
  private:
   aura::Window* window_;
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index 2983139..4d123da5 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -41,7 +41,7 @@
 #if defined(OS_WIN)
 #include "ui/aura/window_tree_host.h"
 #include "ui/base/win/internal_constants.h"
-#include "ui/gfx/win/dpi.h"
+#include "ui/display/win/screen_win.h"
 #include "ui/views/win/hwnd_util.h"
 #endif
 
@@ -176,7 +176,8 @@
     return;
 
 #if defined(OS_WIN)
-  gfx::Point screen_loc_pixels = gfx::win::DIPToScreenPoint(screen_loc);
+  gfx::Point screen_loc_pixels =
+      display::win::ScreenWin::DIPToScreenPoint(screen_loc);
   HWND target_window = ::WindowFromPoint(screen_loc_pixels.ToPOINT());
   // If we don't find a native window for the HWND at the current location,
   // then attempt to find a native window from its parent if one exists.
diff --git a/ui/views/corewm/tooltip_win.cc b/ui/views/corewm/tooltip_win.cc
index b892d38..0a427b59 100644
--- a/ui/views/corewm/tooltip_win.cc
+++ b/ui/views/corewm/tooltip_win.cc
@@ -10,9 +10,9 @@
 #include "base/i18n/rtl.h"
 #include "base/logging.h"
 #include "ui/base/l10n/l10n_util_win.h"
+#include "ui/display/win/screen_win.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/screen.h"
-#include "ui/gfx/win/dpi.h"
 #include "ui/views/corewm/cursor_height_provider_win.h"
 
 namespace views {
@@ -77,7 +77,8 @@
 }
 
 void TooltipWin::PositionTooltip() {
-  gfx::Point screen_point = gfx::win::DIPToScreenPoint(location_);
+  gfx::Point screen_point =
+      display::win::ScreenWin::DIPToScreenPoint(location_);
   const int cursoroffset = GetCurrentCursorVisibleHeight();
   screen_point.Offset(0, cursoroffset);
 
@@ -86,16 +87,19 @@
   const gfx::Size size(LOWORD(tooltip_size), HIWORD(tooltip_size));
 
   const gfx::Display display(
-      gfx::Screen::GetScreen()->GetDisplayNearestPoint(screen_point));
+      gfx::Screen::GetScreen()->GetDisplayNearestPoint(location_));
 
   gfx::Rect tooltip_bounds(screen_point, size);
-  tooltip_bounds.AdjustToFit(gfx::win::DIPToScreenRect(display.work_area()));
+  tooltip_bounds.AdjustToFit(
+      display::win::ScreenWin::DIPToScreenRect(parent_hwnd_,
+                                               display.work_area()));
   SetWindowPos(tooltip_hwnd_, NULL, tooltip_bounds.x(), tooltip_bounds.y(), 0,
                0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
 }
 
 int TooltipWin::GetMaxWidth(const gfx::Point& location) const {
-  const gfx::Point screen_point = gfx::win::DIPToScreenPoint(location);
+  const gfx::Point screen_point =
+      display::win::ScreenWin::DIPToScreenPoint(location);
   gfx::Display display(
       gfx::Screen::GetScreen()->GetDisplayNearestPoint(screen_point));
   const gfx::Rect monitor_bounds = display.bounds();
diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc
index 180921b07..44c7550 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -352,6 +352,10 @@
     (*properties)[mus::mojom::WindowManager::kUserSetBounds_Property] =
         mojo::ConvertTo<std::vector<uint8_t>>(init_params.bounds);
   }
+  if (!init_params.name.empty()) {
+    (*properties)[mus::mojom::WindowManager::kName_Property] =
+        mojo::ConvertTo<std::vector<uint8_t>>(init_params.name);
+  }
 
   if (!Widget::RequiresNonClientView(init_params.type))
     return;
@@ -421,6 +425,9 @@
       parent_mus->AddTransientWindow(window_);
   }
 
+  if (params.parent_mus)
+    params.parent_mus->AddChild(window_);
+
   // TODO(sky): deal with show state.
   if (!params.bounds.size().IsEmpty())
     SetBounds(params.bounds);
@@ -876,6 +883,10 @@
   // NOTIMPLEMENTED();
 }
 
+std::string NativeWidgetMus::GetName() const {
+  return window_->GetName();
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // NativeWidgetMus, aura::WindowDelegate implementation:
 
diff --git a/ui/views/mus/native_widget_mus.h b/ui/views/mus/native_widget_mus.h
index 8a7ed8c..3636769 100644
--- a/ui/views/mus/native_widget_mus.h
+++ b/ui/views/mus/native_widget_mus.h
@@ -168,6 +168,7 @@
   bool IsTranslucentWindowOpacitySupported() const override;
   void OnSizeConstraintsChanged() override;
   void RepostNativeEvent(gfx::NativeEvent native_event) override;
+  std::string GetName() const override;
 
   // Overridden from aura::WindowDelegate:
   gfx::Size GetMinimumSize() const override;
diff --git a/ui/views/mus/native_widget_mus_unittest.cc b/ui/views/mus/native_widget_mus_unittest.cc
index 95fba97..d7e485aac 100644
--- a/ui/views/mus/native_widget_mus_unittest.cc
+++ b/ui/views/mus/native_widget_mus_unittest.cc
@@ -193,5 +193,18 @@
   EXPECT_TRUE(widget->GetNativeWindow()->layer()->Contains(content->layer()));
 }
 
+// Tests that the internal name is propagated from the Widget to the
+// mus::Window.
+TEST_F(NativeWidgetMusTest, GetName) {
+  Widget widget;
+  Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_WINDOW);
+  params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
+  params.name = "MyWidget";
+  widget.Init(params);
+  mus::Window* window =
+      static_cast<NativeWidgetMus*>(widget.native_widget_private())->window();
+  EXPECT_EQ("MyWidget", window->GetName());
+}
+
 }  // namespace
 }  // namespace views
diff --git a/ui/views/mus/platform_window_mus.cc b/ui/views/mus/platform_window_mus.cc
index 1c21eadd..4b72979 100644
--- a/ui/views/mus/platform_window_mus.cc
+++ b/ui/views/mus/platform_window_mus.cc
@@ -223,11 +223,12 @@
 void PlatformWindowMus::OnWindowInputEvent(
     mus::Window* view,
     const ui::Event& event,
-    std::unique_ptr<base::Callback<void(bool)>>* ack_callback) {
+    std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>*
+        ack_callback) {
   // It's possible dispatching the event will spin a nested message loop. Ack
   // the callback now, otherwise we appear unresponsive for the life of the
   // nested message loop.
-  (*ack_callback)->Run(true);
+  (*ack_callback)->Run(mus::mojom::EventResult::HANDLED);
   ack_callback->reset();
   // TODO(moshayedi): Avoid cloning after updating PlatformWindowDelegate to
   // accept constant pointers.
diff --git a/ui/views/mus/platform_window_mus.h b/ui/views/mus/platform_window_mus.h
index 7e9caa0..9364239 100644
--- a/ui/views/mus/platform_window_mus.h
+++ b/ui/views/mus/platform_window_mus.h
@@ -86,7 +86,8 @@
   void OnWindowInputEvent(
       mus::Window* view,
       const ui::Event& event,
-      std::unique_ptr<base::Callback<void(bool)>>* ack_callback) override;
+      std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>*
+          ack_callback) override;
 
   ui::PlatformWindowDelegate* delegate_;
   mus::Window* mus_window_;
diff --git a/ui/views/views.gyp b/ui/views/views.gyp
index 50ad0d5..83288d8b 100644
--- a/ui/views/views.gyp
+++ b/ui/views/views.gyp
@@ -881,6 +881,7 @@
         '../events/events.gyp:events_test_support',
         '../gfx/gfx.gyp:gfx',
         '../gfx/gfx.gyp:gfx_geometry',
+        '../latency_info/latency_info.gyp:latency_info',
         '../native_theme/native_theme.gyp:native_theme',
         '../resources/ui_resources.gyp:ui_resources',
         '../resources/ui_resources.gyp:ui_test_pak',
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index 82b5813..e1b03bf 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -401,6 +401,7 @@
     const Widget::InitParams& params) {
   ownership_ = params.ownership;
   widget_type_ = params.type;
+  name_ = params.name;
 
   NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_);
   // Animations on TYPE_WINDOW are handled by the OS. Additionally if we animate
@@ -946,6 +947,10 @@
   OnEvent(native_event);
 }
 
+std::string DesktopNativeWidgetAura::GetName() const {
+  return name_;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // DesktopNativeWidgetAura, aura::WindowDelegate implementation:
 
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
index 1f488a39..a8c42b6a 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
@@ -5,6 +5,8 @@
 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
 
+#include <string>
+
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "ui/aura/client/focus_change_observer.h"
@@ -173,6 +175,7 @@
   bool IsTranslucentWindowOpacitySupported() const override;
   void OnSizeConstraintsChanged() override;
   void RepostNativeEvent(gfx::NativeEvent native_event) override;
+  std::string GetName() const override;
 
   // Overridden from aura::WindowDelegate:
   gfx::Size GetMinimumSize() const override;
@@ -241,6 +244,9 @@
   // See class documentation for Widget in widget.h for a note about ownership.
   Widget::InitParams::Ownership ownership_;
 
+  // Internal name.
+  std::string name_;
+
   std::unique_ptr<DesktopCaptureClient> capture_client_;
 
   // Child of the root, contains |content_window_|.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 17525593..4dcceb3 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -17,6 +17,7 @@
 #include "ui/base/win/shell.h"
 #include "ui/compositor/compositor_constants.h"
 #include "ui/compositor/paint_context.h"
+#include "ui/display/win/screen_win.h"
 #include "ui/gfx/geometry/insets.h"
 #include "ui/gfx/geometry/vector2d.h"
 #include "ui/gfx/native_widget_types.h"
@@ -141,7 +142,9 @@
   remove_standard_frame_ = params.remove_standard_frame;
   has_non_client_view_ = Widget::RequiresNonClientView(params.type);
 
-  gfx::Rect pixel_bounds = gfx::win::DIPToScreenRect(params.bounds);
+  // We don't have an HWND yet, so scale relative to the nearest screen.
+  gfx::Rect pixel_bounds =
+      display::win::ScreenWin::DIPToScreenRect(nullptr, params.bounds);
   message_handler_->Init(parent_hwnd, pixel_bounds);
   if (params.force_software_compositing) {
     ::SetProp(GetAcceleratedWidget(),
@@ -219,7 +222,8 @@
     const gfx::Rect& restored_bounds) {
   if (compositor())
     compositor()->SetVisible(true);
-  gfx::Rect pixel_bounds = gfx::win::DIPToScreenRect(restored_bounds);
+  gfx::Rect pixel_bounds =
+      display::win::ScreenWin::DIPToScreenRect(GetHWND(), restored_bounds);
   message_handler_->ShowMaximizedWithBounds(pixel_bounds);
 }
 
@@ -228,7 +232,8 @@
 }
 
 void DesktopWindowTreeHostWin::SetSize(const gfx::Size& size) {
-  gfx::Size size_in_pixels = gfx::win::DIPToScreenSize(size);
+  gfx::Size size_in_pixels = display::win::ScreenWin::DIPToScreenSize(GetHWND(),
+                                                                      size);
   gfx::Size expanded = GetExpandedWindowSize(
       message_handler_->window_ex_style(), size_in_pixels);
   window_enlargement_ =
@@ -248,7 +253,8 @@
 }
 
 void DesktopWindowTreeHostWin::CenterWindow(const gfx::Size& size) {
-  gfx::Size size_in_pixels = gfx::win::DIPToScreenSize(size);
+  gfx::Size size_in_pixels = display::win::ScreenWin::DIPToScreenSize(GetHWND(),
+                                                                      size);
   gfx::Size expanded_size;
   expanded_size = GetExpandedWindowSize(message_handler_->window_ex_style(),
                                         size_in_pixels);
@@ -263,25 +269,25 @@
     ui::WindowShowState* show_state) const {
   message_handler_->GetWindowPlacement(bounds, show_state);
   InsetBottomRight(bounds, window_enlargement_);
-  *bounds = gfx::win::ScreenToDIPRect(*bounds);
+  *bounds = display::win::ScreenWin::ScreenToDIPRect(GetHWND(), *bounds);
 }
 
 gfx::Rect DesktopWindowTreeHostWin::GetWindowBoundsInScreen() const {
   gfx::Rect pixel_bounds = message_handler_->GetWindowBoundsInScreen();
   InsetBottomRight(&pixel_bounds, window_enlargement_);
-  return gfx::win::ScreenToDIPRect(pixel_bounds);
+  return display::win::ScreenWin::ScreenToDIPRect(GetHWND(), pixel_bounds);
 }
 
 gfx::Rect DesktopWindowTreeHostWin::GetClientAreaBoundsInScreen() const {
   gfx::Rect pixel_bounds = message_handler_->GetClientAreaBoundsInScreen();
   InsetBottomRight(&pixel_bounds, window_enlargement_);
-  return gfx::win::ScreenToDIPRect(pixel_bounds);
+  return display::win::ScreenWin::ScreenToDIPRect(GetHWND(), pixel_bounds);
 }
 
 gfx::Rect DesktopWindowTreeHostWin::GetRestoredBounds() const {
   gfx::Rect pixel_bounds = message_handler_->GetRestoredBounds();
   InsetBottomRight(&pixel_bounds, window_enlargement_);
-  return gfx::win::ScreenToDIPRect(pixel_bounds);
+  return display::win::ScreenWin::ScreenToDIPRect(GetHWND(), pixel_bounds);
 }
 
 gfx::Rect DesktopWindowTreeHostWin::GetWorkAreaBoundsInScreen() const {
@@ -291,7 +297,7 @@
                                    MONITOR_DEFAULTTONEAREST),
                  &monitor_info);
   gfx::Rect pixel_bounds = gfx::Rect(monitor_info.rcWork);
-  return gfx::win::ScreenToDIPRect(pixel_bounds);
+  return display::win::ScreenWin::ScreenToDIPRect(GetHWND(), pixel_bounds);
 }
 
 void DesktopWindowTreeHostWin::SetShape(SkRegion* native_region) {
@@ -655,7 +661,8 @@
 
 int DesktopWindowTreeHostWin::GetNonClientComponent(
     const gfx::Point& point) const {
-  gfx::Point dip_position = gfx::win::ScreenToDIPPoint(point);
+  gfx::Point dip_position = display::win::ScreenWin::ClientToDIPPoint(GetHWND(),
+                                                                      point);
   return native_widget_delegate_->GetNonClientComponent(dip_position);
 }
 
@@ -686,6 +693,11 @@
   return GetWidget()->GetRootView()->size();
 }
 
+gfx::Size DesktopWindowTreeHostWin::DIPToScreenSize(
+    const gfx::Size& dip_size) const {
+  return display::win::ScreenWin::DIPToScreenSize(GetHWND(), dip_size);
+}
+
 void DesktopWindowTreeHostWin::ResetWindowControls() {
   GetWidget()->non_client_view()->ResetWindowControls();
 }
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index 4d62c39d..8ec159e 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -146,6 +146,7 @@
   bool GetClientAreaInsets(gfx::Insets* insets) const override;
   void GetMinMaxSize(gfx::Size* min_size, gfx::Size* max_size) const override;
   gfx::Size GetRootViewSize() const override;
+  gfx::Size DIPToScreenSize(const gfx::Size& dip_size) const override;
   void ResetWindowControls() override;
   gfx::NativeViewAccessible GetNativeViewAccessible() override;
   bool ShouldHandleSystemCommands() const override;
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index e723f48..2aa13986 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -101,6 +101,7 @@
   DCHECK(params.parent || params.context);
 
   ownership_ = params.ownership;
+  name_ = params.name;
 
   RegisterNativeWidgetForWindow(this, window_);
   window_->SetType(GetAuraWindowTypeForWidgetType(params.type));
@@ -738,6 +739,10 @@
   OnEvent(native_event);
 }
 
+std::string NativeWidgetAura::GetName() const {
+  return name_;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // NativeWidgetAura, aura::WindowDelegate implementation:
 
diff --git a/ui/views/widget/native_widget_aura.h b/ui/views/widget/native_widget_aura.h
index 463f066..35d1575 100644
--- a/ui/views/widget/native_widget_aura.h
+++ b/ui/views/widget/native_widget_aura.h
@@ -5,6 +5,8 @@
 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_
 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_
 
+#include <string>
+
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "ui/aura/client/focus_change_observer.h"
@@ -133,6 +135,7 @@
   bool IsTranslucentWindowOpacitySupported() const override;
   void OnSizeConstraintsChanged() override;
   void RepostNativeEvent(gfx::NativeEvent native_event) override;
+  std::string GetName() const override;
 
   // Overridden from aura::WindowDelegate:
   gfx::Size GetMinimumSize() const override;
@@ -205,6 +208,9 @@
   // See class documentation for Widget in widget.h for a note about ownership.
   Widget::InitParams::Ownership ownership_;
 
+  // Internal name.
+  std::string name_;
+
   // Are we in the destructor?
   bool destroying_;
 
diff --git a/ui/views/widget/native_widget_mac.h b/ui/views/widget/native_widget_mac.h
index 306a89d..0670a6a1 100644
--- a/ui/views/widget/native_widget_mac.h
+++ b/ui/views/widget/native_widget_mac.h
@@ -132,6 +132,7 @@
   bool IsTranslucentWindowOpacitySupported() const override;
   void OnSizeConstraintsChanged() override;
   void RepostNativeEvent(gfx::NativeEvent native_event) override;
+  std::string GetName() const override;
 
  protected:
   // Creates the NSWindow that will be passed to the BridgedNativeWidget.
@@ -150,6 +151,9 @@
 
   Widget::InitParams::Ownership ownership_;
 
+  // Internal name.
+  std::string name_;
+
   DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac);
 };
 
diff --git a/ui/views/widget/native_widget_mac.mm b/ui/views/widget/native_widget_mac.mm
index e64961a..524e94a 100644
--- a/ui/views/widget/native_widget_mac.mm
+++ b/ui/views/widget/native_widget_mac.mm
@@ -119,6 +119,7 @@
 
 void NativeWidgetMac::InitNativeWidget(const Widget::InitParams& params) {
   ownership_ = params.ownership;
+  name_ = params.name;
   base::scoped_nsobject<NSWindow> window([CreateNSWindow(params) retain]);
   [window setReleasedWhenClosed:NO];  // Owned by scoped_nsobject.
   bridge_->Init(window, params);
@@ -590,6 +591,10 @@
   NOTIMPLEMENTED();
 }
 
+std::string NativeWidgetMac::GetName() const {
+  return name_;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // NativeWidgetMac, protected:
 
diff --git a/ui/views/widget/native_widget_private.h b/ui/views/widget/native_widget_private.h
index 777eaa2..f4e5040 100644
--- a/ui/views/widget/native_widget_private.h
+++ b/ui/views/widget/native_widget_private.h
@@ -5,6 +5,8 @@
 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_
 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_
 
+#include <string>
+
 #include "base/strings/string16.h"
 #include "ui/base/ui_base_types.h"
 #include "ui/gfx/native_widget_types.h"
@@ -223,6 +225,9 @@
   // Repost an unhandled event to the native widget for default OS processing.
   virtual void RepostNativeEvent(gfx::NativeEvent native_event) = 0;
 
+  // Returns an internal name that matches the name of the associated Widget.
+  virtual std::string GetName() const = 0;
+
   // Overridden from NativeWidget:
   internal::NativeWidgetPrivate* AsNativeWidgetPrivate() override;
 };
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index ffafd0d..c715a3b3 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -290,6 +290,12 @@
   TRACE_EVENT0("views", "Widget::Init");
   InitParams params = in_params;
 
+  // If an internal name was not provided the class name of the contents view
+  // is a reasonable default.
+  if (params.name.empty() && params.delegate &&
+      params.delegate->GetContentsView())
+    params.name = params.delegate->GetContentsView()->GetClassName();
+
   params.child |= (params.type == InitParams::TYPE_CONTROL);
   is_top_level_ = !params.child;
 
@@ -987,6 +993,10 @@
 
 void Widget::OnOwnerClosing() {}
 
+std::string Widget::GetName() const {
+  return native_widget_->GetName();
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // Widget, NativeWidgetDelegate implementation:
 
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index e945abb..4f95200 100644
--- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h
@@ -47,6 +47,10 @@
 class Rect;
 }
 
+namespace mus {
+class Window;
+}
+
 namespace ui {
 class Accelerator;
 class Compositor;
@@ -209,6 +213,8 @@
     // If null, a default implementation will be constructed. The default
     // implementation deletes itself when the Widget closes.
     WidgetDelegate* delegate;
+    // Internal name. Propagated to the NativeWidget. Useful for debugging.
+    std::string name;
     bool child;
     // If TRANSLUCENT_WINDOW, the widget may be fully or partially transparent.
     // If OPAQUE_WINDOW, we can perform optimizations based on the widget being
@@ -236,6 +242,8 @@
     // Whether the widget should be maximized or minimized.
     ui::WindowShowState show_state;
     gfx::NativeView parent;
+    // Used only by mus and is necessitated by mus not being a NativeView.
+    mus::Window* parent_mus = nullptr;
     // Specifies the initial bounds of the Widget. Default is empty, which means
     // the NativeWidget may specify a default size. If the parent is specified,
     // |bounds| is in the parent's coordinate system. If the parent is not
@@ -758,6 +766,9 @@
   // closes.
   virtual void OnOwnerClosing();
 
+  // Returns the internal name for this Widget and NativeWidget.
+  std::string GetName() const;
+
   // Overridden from NativeWidgetDelegate:
   bool IsModal() const override;
   bool IsDialogBox() const override;
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index 8fc4aa3..ebadeb2 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -154,6 +154,19 @@
   EXPECT_EQ(Widget::InitParams::INFER_OPACITY, init1.opacity);
 }
 
+// Tests that the internal name is propagated through widget initialization to
+// the native widget and back.
+TEST_F(WidgetTest, GetName) {
+  Widget widget;
+  Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_WINDOW);
+  params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
+  params.name = "MyWidget";
+  widget.Init(params);
+
+  EXPECT_EQ("MyWidget", widget.native_widget_private()->GetName());
+  EXPECT_EQ("MyWidget", widget.GetName());
+}
+
 TEST_F(WidgetTest, NativeWindowProperty) {
   const char* key = "foo";
   int value = 3;
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index fb7f7a5..513a184 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -36,7 +36,6 @@
 #include "ui/gfx/path_win.h"
 #include "ui/gfx/screen.h"
 #include "ui/gfx/win/direct_manipulation.h"
-#include "ui/gfx/win/dpi.h"
 #include "ui/gfx/win/hwnd_util.h"
 #include "ui/gfx/win/rendering_window_manager.h"
 #include "ui/native_theme/native_theme_win.h"
@@ -1405,8 +1404,8 @@
   gfx::Size min_window_size;
   gfx::Size max_window_size;
   delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
-  min_window_size = gfx::win::DIPToScreenSize(min_window_size);
-  max_window_size = gfx::win::DIPToScreenSize(max_window_size);
+  min_window_size = delegate_->DIPToScreenSize(min_window_size);
+  max_window_size = delegate_->DIPToScreenSize(max_window_size);
 
 
   // Add the native frame border size to the minimum and maximum size if the
diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
index 007157a..631f3592 100644
--- a/ui/views/win/hwnd_message_handler_delegate.h
+++ b/ui/views/win/hwnd_message_handler_delegate.h
@@ -89,6 +89,8 @@
   // Returns the current size of the RootView.
   virtual gfx::Size GetRootViewSize() const = 0;
 
+  virtual gfx::Size DIPToScreenSize(const gfx::Size& dip_size) const = 0;
+
   virtual void ResetWindowControls() = 0;
 
   virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0;